i am new to flash but i am quited experienced in programming in general. i am facing the following problem and any help would me deeply appreciated:

i bought a flash template and am trying to modify it to create a quite simple website. in the template there is a menu and one button from there leads to a page that has only one object. this object is a "movie" of images. if i provide the images in the xml file in the appropriate element then when i click on this button in the menu, i get to see the images.

the template also has an element in its library called popup_page which i use pretty often. if i put a link in the xml file and call the event "switchPopup" i get to see the popup page.

what i want to do is to create a new popup page containing only the object i reffered to before that displays the images. so i created a new "object" in the library call popup_page2 and put this object in it. then i created in actionscript a new event "switchPopup2" which calls the new function switchpopup2 (the old function is call switchpopup and is used to send me to the other page that i use as a popup one).

so what i want to do is to have 2 possible popup pages. and choose the appropriate event every time (switchpopup or switchpopup2) so that i will get the correct popup page.

can u give me any help? obviously i must be doing sth wrong. probably the problem is that the new function (switchpopup2) cannot call the correct popup page. how can i do that in actionscript?

the switchPopup function is this ->

function onSwitchPopup(event:TemplateEvent):void {

var targetPage:Number = event.info[0];

popapPage.popapTitle =websiteXML.pages.titlePage[_root.linkPage].pagePopup.popup[targetPage].item.(@name == "title");

popapPage.popapInfo = websiteXML.pages.titlePage[_root.linkPage].pagePopup.popup[targetPage].item.(@name == "linkText");