Images After Before
Source Code :
<?xml version="1.0" encoding="utf-8"?>
<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/mx" minWidth="955"
minHeight="600" creationComplete="init()">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
[Bindable] var wid:int=0;
private function init():void
{
wid=can1.width;
}
private function handleMouseMove(event:MouseEvent):void
{
wid=event.localX;
}
]]>
</fx:Script>
<mx:Canvas x="100" id="can1" width="{img1.width}" height="493" mouseMove="handleMouseMove(event)" verticalScrollPolicy="off" horizontalScrollPolicy="off" >
<s:Image id="img1" source="images/first.jpg "/> </mx:Canvas>
<mx:Canvas x="100" id="can2" width="{wid}" height="493" horizontalScrollPolicy="off"
mouseMove="handleMouseMove(event);" verticalScrollPolicy="off">
<s:Image source="images/second.jpg"/></mx:Canvas>
</s:Application>
Comments
Post a Comment