Skip to main content
Known Participant
April 28, 2010
Answered

Is it possible to 'script' an swf object from within another flash file.

  • April 28, 2010
  • 1 reply
  • 384 views

I would like to be able to place or load another flash file into my main flash file.  The child flash file is written by a third party, and I do not want to rewrite / recompile any parts of its source code.  So ideally, I would like to be able to call something such as:

child_mc.genericFlashSpirte.x += 15;

child_mc.genericFlashSpirte.y -= 30;

etc...

inside the code of the parent flash file.

Is this possible.  I imagine, that once I embed the child flash file, I should be able to start, and stop it from playing, but I want to do more then this.

This topic has been closed for replies.
Correct answer Ned Murphy

You can load external swf files using the Loader class.  You can target the loaded file after loading is completed and it has set itself up (after INIT event occurs) by targeting the event.target.content.

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
April 28, 2010

You can load external swf files using the Loader class.  You can target the loaded file after loading is completed and it has set itself up (after INIT event occurs) by targeting the event.target.content.

Known Participant
May 4, 2010

Thank You!

That is exactly what I was looking for.