blob: d1d4d0ad5359ee23202f4b90c093d35314a854ec [file] [log] [blame]
{ "type": "class",
"qname": "spark.components.Image",
"baseClassname": "spark.components.supportClasses.SkinnableComponent"
,
"description": "The Spark Image control is a skinnable component that provides a customizable loading state, chrome, and error state. The Image control lets you import JPEG, PNG, and GIF files at runtime. You can also embed any of these 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>The default skin provides a chromeless image skin with a generic progress bar based preloader and broken image icon to reflect invalid content.</p> <p>To use this component in a list-based component, such as a List or DataGrid, create an item renderer. For information about creating an item renderer, see <a href=&quot;http://help.adobe.com/en_US/flex/using/WS4bebcd66a74275c3-fc6548e124e49b51c4-8000.html&quot;> Custom Spark item renderers</a>. </p> <p>The Image control has the following default characteristics:</p> <table class=&quot;innertable&quot;> <tr> <th>Characteristic</th> <th>Description</th> </tr> <tr> <td>Default size</td> <td>Wide enough to hold the associated source content</td> </tr> <tr> <td>Minimum size</td> <td>0 pixels wide by 0 pixels high</td> </tr> <tr> <td>Maximum size</td> <td>10000 pixels wide and 10000 pixels high</td> </tr> <tr> <td>Default skin class</td> <td>spark.skins.spark.ImageSkin</td> </tr> </table> attributes of its superclass and adds the following tag attributes:</p> <pre>\\n &lt;s:Image\\n <strong>Properties</strong>\\n clearOnLoad=&quot;true&quot;\\n contentLoader=&quot;null&quot;\\n contentLoaderGrouping=&quot;null&quot;\\n fillMode=&quot;scale&quot;\\n horizontalAlign=&quot;center&quot;\\n preliminaryHeight=&quot;NaN&quot;\\n preliminaryWidth=&quot;NaN&quot;\\n scaleMode=&quot;letterbox&quot;\\n smooth=&quot;false&quot;\\n source=&quot;null\\n verticalAlign=&quot;middle&quot;\\n \\n <strong>Styles</strong>\\n backgroundAlpha=&quot;NaN&quot;\\n backgroundColor=&quot;NaN&quot;\\n enableLoadingState=&quot;false&quot;\\n smoothingQuality=&quot;default&quot;\\n \\n <strong>Events</strong>\\n complete=&quot;<i>No default</i>&quot;\\n httpStatus=&quot;<i>No default</i>&quot;\\n ioError=&quot;<i>No default</i>&quot;\\n progress=&quot;<i>No default</i>&quot;\\n ready=&quot;<i>No default</i>&quot;\\n securityError=&quot;<i>No default</i>&quot;\\n /&gt;\\n </pre>",
"tags": [
{ "tagName": "see",
"values": ["spark.skins.spark.ImageSkin", "mx.controls.SWFLoader"]},
{ "tagName": "mxml",
"values": ["<p>The <code>&lt;s:Image&gt;</code> tag inherits all of the tag"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 2.5"]},
{ "tagName": "productversion",
"values": ["Flex 4.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "method",
"qname": "spark.components.Image",
"namespace": "",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Constructor.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 2.5"]},
{ "tagName": "productversion",
"values": ["Flex 4.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "",
"params": []}
,
{ "type": "accessor",
"access": "read-write",
"return": "Object",
"qname": "source",
"namespace": "public",
"bindable": ["sourceChanged"],
"details": [],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 2.5"]},
{ "tagName": "copy",
"values": ["spark.primitives.BitmapImage#source"]},
{ "tagName": "productversion",
"values": ["Flex 4.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]}]
,
"events": [
{ "qname": "complete",
"type": "flash.events.Event"
,
"description": "Dispatched when content loading is complete. This event is only dispatched for url and ByteArray based sources (those sources requiring a Loader). <p>Note that for content loaded by Loader, both <code>ready</code> and <code>complete</code> events are dispatched.</p> For other source types such as embeds, only <code>ready</code> is dispatched.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 2.5"]},
{ "tagName": "eventType",
"values": ["flash.events.Event.COMPLETE"]},
{ "tagName": "productversion",
"values": ["Flex 4.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "httpStatus",
"type": "flash.events.HTTPStatusEvent"
,
"description": "Dispatched when a network request is made over HTTP and Flash Player or AIR can detect the HTTP status code.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 2.5"]},
{ "tagName": "eventType",
"values": ["flash.events.HTTPStatusEvent.HTTP_STATUS"]},
{ "tagName": "productversion",
"values": ["Flex 4.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "ioError",
"type": "flash.events.IOErrorEvent"
,
"description": "Dispatched when an input or output error occurs.",
"tags": [
{ "tagName": "see",
"values": ["flash.events.IOErrorEvent"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 2.5"]},
{ "tagName": "eventType",
"values": ["flash.events.IOErrorEvent.IO_ERROR"]},
{ "tagName": "productversion",
"values": ["Flex 4.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "progress",
"type": "flash.events.ProgressEvent"
,
"description": "Dispatched when content is loading. <p><strong>Note:</strong> The <code>progress</code> event is not guaranteed to be dispatched. The <code>complete</code> event may be received, without any <code>progress</code> events being dispatched. This can happen when the loaded content is a local file.</p>",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 2.5"]},
{ "tagName": "eventType",
"values": ["flash.events.ProgressEvent.PROGRESS"]},
{ "tagName": "productversion",
"values": ["Flex 4.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "ready",
"type": "mx.events.FlexEvent"
,
"description": "Dispatched when content loading is complete. Unlike the <code>complete</code> event, this event is dispatched for all source types. <p>Note that for content loaded via Loader, both <code>ready</code> and <code>complete</code> events are dispatched.</p> For other source types such as embeds, only <code>ready</code> is dispatched.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 2.5"]},
{ "tagName": "eventType",
"values": ["mx.events.FlexEvent.READY"]},
{ "tagName": "productversion",
"values": ["Flex 4.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "securityError",
"type": "flash.events.SecurityErrorEvent"
,
"description": "Dispatched when a security error occurs.",
"tags": [
{ "tagName": "see",
"values": ["flash.events.SecurityErrorEvent"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 2.5"]},
{ "tagName": "eventType",
"values": ["flash.events.SecurityErrorEvent.SECURITY_ERROR"]},
{ "tagName": "productversion",
"values": ["Flex 4.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]}]
}