FORUMS: list search recent posts

UILoader images to buttons?

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mike Throck
UILoader images to buttons?
on Jul 30, 2010 at 5:24:44 pm

I have a 5 thumbnail gallery that dynamically loads large images. Now I want to be able to click on the large images and jump to different sections of my site.

I know how to code the jump to sections, but how do I make the large images into buttons?

Return to posts index

demetri tashie
Re: UILoader images to buttons?
on Jul 31, 2010 at 12:24:24 am

you are using a UILoader component? give the component(s) names, then you can direct them to do what you want.

for example- if you use the same UILoader to load the large images. the UILoader is given an instance name of,say 'ldr'.

then if you load into the loader either 'pic1.jpg' or 'pic2.jpg', you want to click on 'pic1.jpg' and be taken to frame label 'label1' or if you click on 'pic2.jpg' then you want to go to frame label 'label2'.

then this code makes that work:

ldr.addEventListener(MouseEvent.CLICK, loaderFunction);
function loaderFunction(ebent:MouseEvent):void{

but of course this will all depend on how you have your file and loader(s) set up

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved