Hi!
I’m loading an image into a thumbnail button in flash from an XML file.
The button will scale up when it is mouse-over’d (is this a word?)
Here is the loading of the image into the movieclip
imageLoader = [COLOR=LightBlue]new[/COLOR] [COLOR=DeepSkyBlue]Loader[/COLOR]();
[COLOR=Silver]//imageURLArray* = "image.jpg"[/COLOR]
imageLoader.[COLOR=DeepSkyBlue]load[/COLOR]([COLOR=LightBlue]new[/COLOR] [COLOR=DeepSkyBlue]URLRequest[/COLOR](imageURLArray*));
[COLOR=Silver]//load image into thumbnail movieclip[/COLOR]
thumbnail.imageHolder.[COLOR=DeepSkyBlue]addChild[/COLOR](imageLoader);
[COLOR=Silver]//event listener for the thumbnail button[/COLOR]
thumbnail.[COLOR=DeepSkyBlue]addEventListener[/COLOR]([COLOR=DeepSkyBlue]MouseEvent[/COLOR].[COLOR=DeepSkyBlue]MOUSE_OVER[/COLOR], onOver);
[COLOR=Silver]//when button is mouse over'd, it will scale to 150% of its original size[/COLOR]
[COLOR=DeepSkyBlue]function[/COLOR] onOver([COLOR=DeepSkyBlue]event[/COLOR]:[COLOR=DeepSkyBlue]MouseEvent[/COLOR]):[COLOR=DeepSkyBlue]void[/COLOR]
{
[COLOR=Silver] //use event.target to find which button was moused over as there are several thumnails[/COLOR]
Tweener.[COLOR=DeepSkyBlue]addTween[/COLOR]([COLOR=DeepSkyBlue]event.target[/COLOR], {time: 1, [COLOR=DeepSkyBlue]scaleX[/COLOR]: 1.5, [COLOR=DeepSkyBlue]scaleY[/COLOR]: 1.5});
}
Without the image loaded in it works fine. But with the image loaded in, the image is on top of the button so the scale event triggers the Loader object to scale ( instead of the button it is parented to). Is there a way to make the Loader object or the moveiclip it’s parented to (imageHolder) unresponsive to a mouse over so only the thumbnail will scale (and its children as a result of course).
Here is the parenting if you need help visualizing it:
[ thumnail:MovieClip ] --child–> [ imageHolder:MovieClip ] --child–> [ Loader:dont know]
Thanks for your help in advance!!
Leigh