How to attachMovie in a specific frame?
I have 3 pages of a document converted to symbols (i.e. mc_pg1, mc_pg2, mc_pg3), each residing in its own frame (i.e. "pg1", "pg2", "pg3") inside mc_Pages. Mc_pg1, mc_pg2, and mc_pg3 are inside a movieclip called mc_Pages. On click of mc_Pages, I am attaching a blinking icon (mc_Target) to a specific page. The problem I'm having is when I attach mc_Target to a specific mc in its frame, navigate to another frame, and then return to the initial frame, mc_Target is no longer attached. Yet, I have not clicked anywhere else other than the buttons that allow me to navigate from one frame to another. So, my code is:
mc_Pages.onPress = function():Void
{
if(varPg1 == true) //this checks to see if I'm on "pg1" frame where mc_pg1 is located
{
mc_Pages.mc_pg1.attachMovie("mcTarget", "mc_Target", 1); //attaches mc_Target blinking icon in mc_pg1
mc_Pages.mc_pg1.mc_Target._x = mc_Pages.mc_pg1._xmouse
mc_Pages.mc_pg1.mc_Target._y = mc_Pages.mc_pg1._ymouse
}
else if(varPg2 == true) //this checks to see if I'm on "pg2" frame where mc_pg2 is located
{
mc_Pages.mc_pg2.attachMovie("mcTarget", "mc_Target", 1); //attaches mc_Target blinking icon in mc_pg2
mc_Pages.mc_pg2.mc_Target._x = mc_Pages.mc_pg2._xmouse
mc_Pages.mc_pg2.mc_Target._y = mc_Pages.mc_pg2._ymouse
}
else if(etc.)
}
Everything is working as it should, i.e. on press of the mouse button, the mc_Target is attached to the frame/mc within mc_Pages that I'm in (I have a btn_Next and btn_Previous on the same timeline as mc_Pages that navigates to the specific frames inside mc_Pages), except that upon returning to a frame/mc which previously had mc_Target attached, mc_Target is no longer there.
I've been struggling with this for some time and can't seem to find a solution. Any help is greatly appreciated. Thank you.
Artur
