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

Adding content to a Loaded movie.

Explorer ,
Jun 10, 2011 Jun 10, 2011

Copy link to clipboard

Copied

I've got an application which loads anexternal swf, then needs to add content to a specific depth in it. It does this by finding a named placeholder clip and replacing it with a UIComponent, using addChildAt(); This seems to work fine - I have a trace utility that walks back up the display list and it shows my UIComponent right where I expect it, then the parent movie clip, then all the containers up to the stage. At each level the container is a) visible b) 1.0 alpha and c) the size I expect it to be, and from my trace I can see that I have a structure which looks something like this:

[root - an mx.application]

-- [canvas]

---- [Loaded SWF - moved from its Loader and attached to the canvas]

-------[UIComponent - added at the right depth in the Loaded SWF]

All well and good, but if I draw a rectangle on the graphics of the UIComponent (or add an image to it, or do anything else), nothing is visible. I can trace any parameters of the UIComponent, I can use it to make changes to its parent SWF, I can even note that if I draw a rectangle on the UIComponent which is larger than the Loaded SWF, then the SWF changes size to accommodate the new bounds - but I can't see a thing.

Any idea what this might be? I was wondering if some security stopped the parent application adding content to the Loaded SWF, or if there was some other issue.

Many thanks in advance for any assistance.

JcFx

TOPICS
ActionScript

Views

375

Translate

Translate

Report

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 10, 2011 Jun 10, 2011

Copy link to clipboard

Copied

LATEST

Hmm. I think I've answered my own question. It seems you can't add an mx.core.UIComponent to the display list of a non-Flex AS3 movie. There's no error, and some functionality seems to work fine, but nothing displays. If I change the UIComponent to a Sprite, everything works fine. Odd.

Votes

Translate

Translate

Report

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