Skip to main content
August 30, 2006
Answered

figuring out actionscript for a nested swf

  • August 30, 2006
  • 2 replies
  • 226 views
hi all,

i've got 3 swfs: call them 1, 2, and 3. i have a function in swf2 that i want to run when the viewer presses a button in swf3. if 2 is nested in 1, and 3 is nested in 2, how would i go about running a script in 2 from a script in 3?

i tried _root.loadImage();
and _parent.loadImage();

but neither works. any clues?

cheers,
macron
This topic has been closed for replies.
Correct answer
hi nsurveyor

thanks for the suggestion. i was overlooking the fact that there was a pictureframe movieclip in the parent swf. i changed the script to _parent._parent.loadImage(); and it worked.

gracias!

macron

2 replies

August 31, 2006
I'm glad you sorted it out.
August 30, 2006
_parent.loadImage(); should work when called from the root timeline of 3.

Suppose you swf2 in swf1.clip. You could use: _root.clip.loadImage(); from anywhere.
Correct answer
August 30, 2006
hi nsurveyor

thanks for the suggestion. i was overlooking the fact that there was a pictureframe movieclip in the parent swf. i changed the script to _parent._parent.loadImage(); and it worked.

gracias!

macron