<? XML version = "1.0" encoding = "UTF-8"?>
<Mx: Application xmlns: MX = "http://www.adobe.com/2006/mxml"
Creationcomplete = "Init ()"
Verticalscrollpolicy = "off"
Horizontalscrollpolicy = "off"
Verticalalign = "bottom"
Width = "100%"
Height = "100%"
Layout = "horizontal">
<Mx: SCRIPT>
<! [CDATA [
Import MX. Controls. image;
Import MX. Controls. Alert;
Public var imagearray: array;
Public var Timer: timer;
Public static const orginsize: Int = 40;
Public static const crosssize: Int = 110;
Public static const twicenum: Number = 3.5;
Public static const offsety: Int = 0;
Public static const offsetx: Int = 0;
Private function Init (): void
{
Imagearray = new array ();
Imagearray. Push (getimageobj (image1 ));
Imagearray. Push (getimageobj (image2 ));
Imagearray. Push (getimageobj (image3 ));
Imagearray. Push (getimageobj (image4 ));
Imagearray. Push (getimageobj (image5 ));
Imagearray. Push (getimageobj (image6 ));
Imagearray. Push (getimageobj (image7 ));
Imagearray. Push (getimageobj (image8 ));
Timer = new timer (5, 0 );
Timer. addeventlistener (timerevent. Timer, modifyimage );
Timer. Start ();
}
Private function getimageobj (IMG: image): Object
{
VaR OBJ: Object = new object ();
VaR imagex: Number = IMG. x + IMG. width/2;
// Alert. Show (IMG. X. tostring ());
VaR imagey: Number = This. height;
// Alert. Show (imagey. tostring () + "-- y"); 626
OBJ. Image = IMG;
OBJ. orgx = imagex;
OBJ. Orgy = imagey;
Return OBJ;
}
Private function modifyimage (Event: timerevent): void
{
For (var I: String in imagearray)
{
VaR _ image: Image = imagearray [I]. image;
VaR _ Mousey: Number = stage. mousey-offsety;
VaR _ mousex: Number = stage. mousex-offsetx;
If (_ Mousey <imagearray [I]. Orgy & (imagearray [I]. Orgy-_ Mousey) <_ image. Height * twicenum)
{
VaR percentx: Number = 0;
VaR percenty: Number = 0;
VaR percentxy: Number = 0;
If (_ mousex <imagearray [I]. orgx & (imagearray [I]. orgx-_ mousex) <_ image. Width * twicenum)
{
Percentx = 1-(imagearray [I]. orgx-_ mousex)/(_ image. Width * twicenum)
}
Else if (_ mousex> = imagearray [I]. orgx & (_ mousex-imagearray [I]. orgx) <_ image. Width * twicenum)
{
Percentx = 1-(_ mousex-imagearray [I]. orgx)/(_ image. Width * twicenum)
}
Percenty = 1-(imagearray [I]. Orgy-orginsize/2-_ Mousey)/(_ image. Height * twicenum-orginsize/2)
If (percenty> 1)
Percenty = 1;
Percentxy = percentx * percenty;
Imagearray [I]. image. width = crosssize * percentxy + orginsize;
Imagearray [I]. image. Height = crosssize * percentxy + orginsize;
}
}
}
]>
</MX: SCRIPT>
<! -- Mx: hbox width = "100%"
Autolayout = "true"
Bordercolor = "# 136cab"
Themecolor = "# 009dff"
Backgroundcolor = "#879ba9"
Backgroundalpha = "0.69"
Fontsize = "12"
Horizontalalign = "center" -->
<Mx: Image x = "30"
Y = "60"
Id = "image1"
Tooltip = "After Effects cs5"
Source = "@ embed (Source = 'Assets/icons/After Effects cs5.png ')"
Width = "{orginsize }"
Height = "{orginsize }"
Click = "alert. Show ('after effects cs5')"/>
<Mx: Image x = "30"
Y = "90"
Id = "image2"
Tooltip = "bridge cs5"
Source = "@ embed (Source = 'Assets/icons/Bridge cs5.png ')"
Width = "{orginsize }"
Height = "{orginsize }"
Click = "alert. Show ('bridge cs5')"/>
<Mx: Image x = "30"
Y = "120"
Id = "image3"
Tooltip = "Dreamweaver cs5"
Source = "@ embed (Source = 'Assets/icons/Dreamweaver cs5.png ')"
Width = "{orginsize }"
Height = "{orginsize }"
Click = "alert. Show ('dreamweaver cs5')"/>
<Mx: Image x = "30"
Y = "150"
Id = "image4"
Tooltip = "fireworks cs5"
Source = "@ embed (Source = 'Assets/icons/fireworks cs5.png ')"
Width = "{orginsize }"
Height = "{orginsize }"
Click = "alert. Show ('fireworks cs5')"/>
<Mx: Image x = "30"
Y = "180"
Id = "image5"
Tooltip = "Flash cs5"
Source = "@ embed (Source = 'Assets/icons/flash cs5.png ')"
Width = "{orginsize }"
Height = "{orginsize }"
Click = "alert. Show ('Flash cs5')"/>
<Mx: Image x = "30"
Y = "210"
Id = "image6"
Tooltip = "Flash Player"
Source = "@ embed (Source = 'Assets/icons/flash player.png ')"
Width = "{orginsize }"
Height = "{orginsize }"
Click = "alert. Show ('Flash player')"/>
<Mx: Image x = "30"
Y = "240"
Id = "image7"
Tooltip = "Illustrator cs5"
Source = "@ embed (Source = 'Assets/icons/illustrator cs5.png ')"
Width = "{orginsize }"
Height = "{orginsize }"
Click = "alert. Show ('llustrator cs5')"/>
<Mx: Image x = "30"
Y = "240"
Id = "image8"
Tooltip = "flex cs5"
Source = "@ embed (Source = 'Assets/icons/flex cs5.png ')"
Width = "{orginsize }"
Height = "{orginsize }"
Click = "alert. Show ('flex cs5')"/>