Click to See Complete Forum and Search --> : targeting a popup .swf file


renae
12-08-2003, 08:18 PM
Hi,

I am building a website in flash. I have a 'gallery' of thumbnail images. When someone clicks on one, I want it to open in a new popup window (that loads another .swf file which has one image in each frame so they can scroll through the larger images in the bigger view)... I was able to get the popup to work with javascript, but it only open to the 1st image in the .swf instead of the specific image that is clicked on... which is what I'm after (so, if they click on the 5th image, it would go to the 5th frame of the popup .swf... make sense?) Anyway...I've posted this same question over at the Flash forum, but haven't gotten any takers! ...so... I'm hoping someone here will have some ideas on how I can accomplish this... Any help will be greatly appreciated!!!

Renae :)

LittleRed
12-09-2003, 07:27 AM
the thing to do is use the javascript
document.flashmoviename.setvariable('variable','value');
where 'flashmoviename' is the name of the flash object when you embed it.
then in your swf have flash check the contents of 'variable' constantly (on the root timeline) and then you can get it to gotoAndStop at whichever frame you'll need to show.

thinking about it though, if it's a popup then you'll probably need to use popupname.flashmoviename.setvariable - but someone who's more competent with their DOM could clarify that.

hope this helps