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

External SWF Parent??

Explorer ,
Jun 21, 2010 Jun 21, 2010

hello there guys..,

i need help in understanding external swf parent,let me describe it a little more about what i mean:

"is it by default when we load and external swf and eventhought we add it as a child of container (an instance of sprite class which we create and then add it to the stage) that the parent of that loaded swf is stage??? "

i do ask this question because i tried to load an external swf and then add it to the container but when i trace it the loaded swf does not count as the child of the container but the stage (i do this by tracing the stage.numChildren and container.numChildren)

thanks for your time and your help..,

i do appreciate any help greatly..,

TOPICS
ActionScript
742
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

correct answers 1 Correct answer

Community Expert , Jun 21, 2010 Jun 21, 2010

if you load a swf (using the loader class), the swf is a child of the loader and the swf's parent is the loader.

if you add the loader to the displaylist, then the loaded swf's parent.parent is a displaylist object.

Translate
Community Expert ,
Jun 21, 2010 Jun 21, 2010

if you load a swf (using the loader class), the swf is a child of the loader and the swf's parent is the loader.

if you add the loader to the displaylist, then the loaded swf's parent.parent is a displaylist object.

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
Explorer ,
Jun 21, 2010 Jun 21, 2010

i'm sorry i don't really get it but is right if i coclude it like this: "basically the loaded swf will become child of where ever i add it as child"

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 ,
Jun 22, 2010 Jun 22, 2010

as long as the loaded swf is an as3 swf, you can reparent the loader's content property, AFTER loading is complete.

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
Explorer ,
Jun 22, 2010 Jun 22, 2010

ok thanks kglad..,

with this i shall look into my code 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
Community Expert ,
Jun 22, 2010 Jun 22, 2010
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