dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Problem with v2 Components in loaded SWF's

  1. #1
    Junior Member
    Join Date
    Feb 2005
    Posts
    1

    Problem with v2 Components in loaded SWF's

    Hello Everyone,

    Hopefully one of you can help me with this utterly intractable problem. I've been tearing my hair out over it for the past few days. None of the solutions I've found seem to work (either that, or I've been implementing them incorrectly). Help!

    My flash piece consists of two SWF's, one loaded into the other at run time. The main SWF is a reusable transition effect. The secondary SWF is a form that uses four v2 components: Label, ComboBox, RadioButton, and TextInput.

    Running the secondary SWF on its own causes no problems. But when loaded into the main SWF, the form in the secondary SWF no longer displays the text of the component labels, and does not allow any input into the TextInput components. Oddly, the ComboBox component functions properly in both cases.


    1. In my first implementation, I used the loadMovie() method in the main SWF (placed in the first frame of the _root level) to load the secondary SWF. Here's the code:

    loadMovie("content.swf", "container_mc.content_mc");

    "container_mc" is a manually-created clip that holds the content clip, named - appropriately enough - "content_mc", which is an empty movie clip that is also manually created. Both clips exist on the stage in the first frame.

    With this implementation, the form appeared, but neither labels nor text input widgets functioned properly. The labels didn't appear, and the input boxes did not accept any input.


    2. Attempts to solve the problem by setting the _lockroot property of the target movie clip to "true" didn't work. Here's the revised code:

    container_mc.content_mc._lockroot = true;
    loadMovie("content.swf", "container_mc.content_mc");

    This code yielded the same result as the code in #1.


    3. Using the "Loader" class component didn't work, either.

    In this case, I swapped the existing "container_mc.content_mc" instance with an instance of the Loader class. Here's the revised code:

    container_mc.content_mc.scaleContent = false;
    container_mc.content_mc.content._lockroot = true;
    container_mc.content_mc.load("content.swf");

    This code yielded the same result as the code in #1.


    4. Loading the secondary SWF into the main SWF's _root level makes the secondary SWF's forms work.

    So when I load the content into the main SWF's _root level, the forms work! Here's the code:

    loadMovie("content.swf", "_root");



    Other things I've done:
    - Verified that both SWF's are version 7 with AS 2.0 (following the suggestion in the Macromedia tech notes area)
    - Upgraded to Flash to 7.2


    I'm at wit's end! Help, please.

    Joo

  2. #2
    Captain
    Join Date
    Oct 2005
    Posts
    63
    I am experiencing the same problem, has anyone got a solution to this?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center