Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Load SWF into empty movieClip?

Enthusiast ,
Nov 24, 2007 Nov 24, 2007
Hello,

Could anyone please point me in the right direction to find out how to load an external SWF into an already existing movieClip instance that is already placed on the stage? This is the way I've always worked in AS2, but I can't find how to do it in AS3. Can anyone point me to an example where URLRequest works with a specified movieClip instance?

Thank you!
TOPICS
ActionScript
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 24, 2007 Nov 24, 2007
you don't load into a movieclip in as3: you load into the content property of a loader instance. check the loader class and its load() method.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 24, 2007 Nov 24, 2007
Thank you for your quick response 🙂 Of course, after searching all day and still being confused, I finally find the answer right after posting... This page has code that does what I need it to do if I replace "this" with my movieClip instance name:

http://livedocs.adobe.com/flash/9.0/main/00000171.html

Thanks, again!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 24, 2007 Nov 24, 2007
Now that I can load my SWF into my empty movie clip, I can't seem to get it to play. I have the framescript

this.stop();

in a frame at the beginning of the SWF. The main movie which loads it into a movieclip has a framescript

myMovieClip.play();

in one of the frames that occur on it's main timeline, but the loaded SWF doesn't play. Both are published AS3. Does anyone have any suggestions? Thank you very much in advance!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 24, 2007 Nov 24, 2007
i just saw you posted another message making the same erroneous statement about loading into a target movieclip.

ahhh. nvm. if you can't read and try to learn, you're not going to get help via a forum.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 25, 2007 Nov 25, 2007
I understand why you might think I was ignoring your advice, but this isn't the case. You're expertise is much valued and respected.

My purpose for continuing to experiment with loading into a movieClip was an attempt to find an easy way to layer the SWF behind other elements, but as you know, although it works for this purpose, it doesn't allow control of the loaded SWF from the main timeline. For others struggling to learn as I am, here's a link where I found the answer to my question above:

http://www.hostingforum.ca/776586-as3-controlling-loaded-swf.html

The transition to AS3 is not as easy for some as for others, and there are new concepts to understand.

Don't know what "nvm" means... curious, but might be better off not knowing 😉 Thanks again for all the help you offer to all of us who are struggling.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 25, 2007 Nov 25, 2007
nvm=nevermind.

again, you cannot and do not load into a movieclip using as3.

to assign apparent depths in as3, you use addChild(), removeChild(), addChildAt(), removeChildAt() , swapChlldren(), swapChildrenAt() methods of displayobjectcontainers.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 25, 2007 Nov 25, 2007
Thanks, kglad. You rock! 🙂
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 25, 2007 Nov 25, 2007
LATEST
you're welcome.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines