Skip to main content
Participant
December 25, 2006
Answered

Controlling flash that is loaded in flash

  • December 25, 2006
  • 1 reply
  • 221 views
Here is the senario:

I have a photo.swf that loads pictures during runtime depending on what the user clicks on. I have a main.swf that loads photo.swf into itself. viewing main.swf, the scripts in photo.swf don't function. Is this setup possible? If so, how would I call a funtion within photo.swf from main.swf?
This topic has been closed for replies.
Correct answer kglad
if photo.swf works when run without loading into main.swf try adding this._lockroot=1 to the _root timeline of photo.swf.

otherwise, to access a function (say f1() ) in photo.swf after photo.swf is loaded into _root.targetMC in main.swf, use _root.targetMC.f1() to access the function in photo.swf AFTER loading is complete.

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
December 25, 2006
if photo.swf works when run without loading into main.swf try adding this._lockroot=1 to the _root timeline of photo.swf.

otherwise, to access a function (say f1() ) in photo.swf after photo.swf is loaded into _root.targetMC in main.swf, use _root.targetMC.f1() to access the function in photo.swf AFTER loading is complete.