Hi all,
I"m trying get a tile list of 5 static images that will be listed in a
tile list. Upon mouse over, a zoom effect will be given, and upon
mouse out the zoom effect will be given again. I would also like, but
haven't figure it out, to be able to click the image and go to a URL.
My dillema is that when i run this code below, i get funky response to
the zoom. Sometimes the zoom stays enlarged if i pan in between the
images. They seem to go out to the right, and i'd like them to come
straight out. Also, is there a way i can make them dim when they're
not being moused over?
Thanks for any help at all! :)
CODE:
<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the Zoom effect. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
backgroundColor="#000000" horizontalAlign="center"
verticalAlign="middle"
paddingTop="5" paddingLeft="10" paddingRight="10" paddingBottom="5">
<mx:Script>
<![CDATA[
import flash.events.MouseEvent;
public function doZoom(event:MouseEvent):void {
if (zoomAll.isPlaying) {
zoomAll.reverse();
}
else {
// If this is a ROLL_OUT event, play the effect
backwards.
// If this is a ROLL_OVER event, play the effect
forwards.
zoomAll.play([event.target], event.type ==
MouseEvent.ROLL_OUT ? true : false);
}
}
]]>
</mx:Script>
<mx:Zoom id="zoomAll" captureRollEvents="true" zoomWidthTo="1"
zoomHeightTo="1" zoomWidthFrom=".8" zoomHeightFrom=".8" />
<mx:Tile width="100%" verticalGap="25">
<mx:Image id="img1"
source="@Embed(source='galleries/Vacation1.jpg')"
scaleX=".8" scaleY=".8"
rollOver="doZoom(event)"
rollOut="doZoom(event)"/>
<mx:Image id="img2"
source="@Embed(source='galleries/Vacation1.jpg')"
scaleX=".8" scaleY=".8"
rollOver="doZoom(event)"
rollOut="doZoom(event)"/>
<mx:Image id="img3"
source="@Embed(source='galleries/Vacation1.jpg')"
scaleX=".8" scaleY=".8"
rollOver="doZoom(event)"
rollOut="doZoom(event)"/>
<mx:Image id="img4"
source="@Embed(source='galleries/Vacation1.jpg')"
scaleX=".8" scaleY=".8"
rollOver="doZoom(event)"
rollOut="doZoom(event)"/>
<mx:Image id="img5"
source="@Embed(source='galleries/Vacation1.jpg')"
scaleX=".8" scaleY=".8"
rollOver="doZoom(event)"
rollOut="doZoom(event)"/>
</mx:Tile>
</mx:Application>
Thanks again,
David
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/