blob: 9af30699818fe423a20456dba8333f0cdf4ab859 [file] [log] [blame]
{ "type": "class",
"qname": "mx.controls.Image",
"baseClassname": "mx.core.UIComponent"
,
"description": "The Image control lets you import JPEG, PNG, GIF, and SWF files at runtime. You can also embed any of these files and SVG files at compile time by using <code>&#64;Embed(source='filename')</code>. <p><strong>Note: </strong>Flex also includes the SWFLoader control for loading Flex applications. You typically use the Image control for loading static graphic files and SWF files, and use the SWFLoader control for loading Flex applications. The Image control is also designed to be used in custom item renderers and item editors. </p> <p><strong>Note: </strong>Flex also includes the BitmapImage class. This class is used for embedding images into skins and FXG components. </p> <p>Embedded images load immediately, because they are already part of the Flex SWF file. However, they add to the size of your application and slow down the application initialization process. Embedded images also require you to recompile your applications whenever your image files change.</p> <p>The alternative to embedding a resource is to load the resource at runtime. You can load a resource from the local file system in which the SWF file runs, or you can access a remote resource, typically though an HTTP request over a network. These images are independent of your Flex application, so you can change them without causing a recompile operation as long as the names of the modified images remain the same. The referenced images add no additional overhead to an application's initial loading time. However, you might experience a delay when you use the images and load them into Flash Player or AIR. </p> <p>A SWF file can access one type of external resource only, either local or over a network; it cannot access both types. You determine the type of access allowed by the SWF file using the <code>use-network</code> flag when you compile your application. When the <code>use-network</code> flag is set to <code>false</code>, you can access resources in the local file system, but not over the network. The default value is <code>true</code>, which allows you to access resources over the network, but not in the local file system. </p> <p>When you load images at runtime, you should be aware of the security restrictions of Flash Player or AIR. For example, in Flash Player you can load an image from any domain by using a URL, but the default security settings won't allow your code to access the bitmap data of the image unless it came from the same domain as the application. To access bitmap data from images on other servers, you must use a crossdomain.xml file. </p> <p>The PNG and GIF formats also support the use of an alpha channel for creating transparent images.</p> <p>When you use the Image control as a drop-in item renderer in a List control, either set an explicit row height of the List control, by using the <code>rowHeight</code> property, or set the <code>variableRowHeight</code> property of the List control to <code>true</code> to size the row correctly.</p> <p>If you find memory problems related to Images objects, try explicitly setting the <code>source</code> property to null when you are done using the Image object in your application.</p> <p>The <code>&lt;mx:Image&gt;</code> tag inherits the tag attributes of its superclass, and adds the following tag attribute:</p> <pre>\\n &lt;mx:Image\\n <strong>Events</strong>\\n dataChange=&quot;No default&quot;\\n /&gt\\n </pre>",
"tags": [
{ "tagName": "includeExample",
"values": ["examples/SimpleImage.mxml"]},
{ "tagName": "see",
"values": ["mx.controls.SWFLoader"]},
{ "tagName": "mxml",
"values": []},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.4"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "method",
"qname": "mx.controls.Image",
"namespace": "",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Constructor.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.4"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "",
"params": []}
,
{ "type": "method",
"qname": "addedToParent",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"return": "void",
"params": []}
,
{ "type": "accessor",
"access": "read-write",
"return": "Object",
"qname": "source",
"namespace": "public",
"bindable": ["sourceChanged"],
"details": [],
"deprecated": {}},
{ "type": "accessor",
"access": "read-write",
"return": "String",
"qname": "src",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {}},
{ "type": "accessor",
"access": "read-write",
"return": "Object",
"qname": "data",
"namespace": "public",
"bindable": ["dataChange"],
"details": [],
"deprecated": {},
"description": "The <code>data</code> property lets you pass a value to the component when you use it in an item renderer or item editor. You typically use data binding to bind a field of the <code>data</code> property to a property of this component. <p>When you use the control as a drop-in item renderer, Flex will use the <code>listData.label</code> property, if it exists, as the value of the <code>source</code> property of this control, or use the <code>data</code> property as the <code>source</code> property.</p>",
"tags": [
{ "tagName": "default",
"values": ["null"]},
{ "tagName": "see",
"values": ["mx.core.IDataRenderer"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "mx.controls.listClasses.BaseListData",
"qname": "listData",
"namespace": "public",
"bindable": ["dataChange"],
"details": [],
"deprecated": {},
"description": "When a component is used as a drop-in item renderer or drop-in item editor, Flex initializes the <code>listData</code> property of the component with the appropriate data from the List control. The component can then use the <code>listData</code> property to initialize the other properties of the drop-in item renderer <p>You do not set this property in MXML or ActionScript; Flex sets it when the component is used as a drop-in item renderer or drop-in item editor.</p>",
"tags": [
{ "tagName": "default",
"values": ["null"]},
{ "tagName": "see",
"values": ["mx.controls.listClasses.IDropInListItemRenderer"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-only",
"return": "Number",
"qname": "contentWidth",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Width of the scaled content loaded by the control, in pixels. Note that this is not the width of the control itself, but of the loaded content. Use the <code>width</code> property of the control to obtain its width. <p>The value of this property is not final when the <code>complete</code> event is triggered. You can get the value after the <code>updateComplete</code> event is triggered.</p>",
"tags": [
{ "tagName": "default",
"values": ["NaN"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-only",
"return": "Number",
"qname": "contentHeight",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Height of the scaled content loaded by the control, in pixels. Note that this is not the height of the control itself, but of the loaded content. Use the <code>height</code> property of the control to obtain its height. <p>The value of this property is not final when the <code>complete</code> event is triggered. You can get the value after the <code>updateComplete</code> event is triggered.</p>",
"tags": [
{ "tagName": "default",
"values": ["NaN"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Boolean",
"qname": "scaleContent",
"namespace": "public",
"bindable": ["scaleContentChanged"],
"details": [],
"deprecated": {},
"description": "A flag that indicates whether to scale the content to fit the size of the control or resize the control to the content's size. If <code>true</code>, the content scales to fit the SWFLoader control. If <code>false</code>, the SWFLoader scales to fit the content.",
"tags": [
{ "tagName": "default",
"values": ["true"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.4"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "String",
"qname": "verticalAlign",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {}},
{ "type": "accessor",
"access": "read-write",
"return": "String",
"qname": "horizontalAlign",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {}},
{ "type": "method",
"qname": "measure",
"namespace": "protected",
"bindable": [],
"details": ["override"],
"deprecated": {},
"return": "void",
"params": []}
,
{ "type": "accessor",
"access": "read-write",
"return": "Number",
"qname": "measuredWidth",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "private",
"values": []} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Number",
"qname": "measuredHeight",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "private",
"values": []} ]},
{ "type": "method",
"qname": "updateDisplayList",
"namespace": "protected",
"bindable": [],
"details": ["override"],
"deprecated": {},
"return": "void",
"params": [{ "name": "unscaledWidth", "type": "Number"},
{ "name": "unscaledHeight", "type": "Number"}]}
,
{ "type": "accessor",
"access": "read-write",
"return": "Boolean",
"qname": "maintainAspectRatio",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {}}]
,
"events": [
{ "qname": "dataChange",
"type": "mx.events.FlexEvent"
,
"description": "Dispatched when the <code>data</code> property changes. <p>When you use a component as an item renderer, the <code>data</code> property contains the data to display. You can listen for this event and update the component when the <code>data</code> property changes.</p>",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "eventType",
"values": ["mx.events.FlexEvent.DATA_CHANGE"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.4"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]}]
}