how to change background images in <s:application>
hello!
i want make webside flex4 as web http://www.templatemonster.com/flash-cms-templates/29930.html
but don't know how make change background images click , make sound when load page.
can u me ,please. sorry write e not well.
thanks much
bui thi phuong thanh- vietnam
hi,
please create sink application inside put image.and apply skin application on click.
below code.
main application
<s:application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo" xmlns:mx1="library://ns.adobe.com/flex/mx">
<fx:script>
<![cdata[
protected function btn_click(evt:mouseevent):void {
this.setstyle("skinclass", myskinclass);
}
]]>
</fx:script>
<s:button label="change backgroundimage" click="btn_click(event);"/>
</s:application>
myskinclass
<?xml version="1.0" encoding="utf-8"?>
<s:skin xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<!-- host component -->
<fx:metadata>
[hostcomponent("spark.components.supportclasses.skinnablecomponent")]
</fx:metadata>
<s:states>
<s:state name="normal" />
<s:state name="disabled" />
</s:states>
<s:bitmapimage source="@embed('image1.jpg')" smooth="true" left="0" right="0" top="0" bottom="0" />
</s:skin>
with regards,
shardul singh bartwal
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment