A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: How to control a mc within a SWF loaded with loadclip?

  1. #1
    flashguy
    Join Date
    May 2005
    Location
    In the mountains
    Posts
    341

    How to control a mc within a SWF loaded with loadclip?

    Ok, this is really driving me crazy. I have the following code:

    Code:
    _root.TemplateListener = new Object();
    
    _root.TemplateListener.onLoadComplete = function(target_mc:MovieClip):Void
    {
    	trace (_root.mcBalloonBase.mcTemplate); // undefined
    }
    
    _root.createEmptyMovieClip("mcBalloonBase",55000);
    _root.TemplateLoader = new MovieClipLoader();
    _root.TemplateLoader.addListener(_root.TemplateListener);
    _root.TemplateLoader.loadClip("bt_latex10.swf",_root.mcBalloonBase);
    The loaded SWF 'bt_latex10.swf' have an instance named 'mcTemplate' in its stage. Since it is being loaded into a new empty movieclip called 'mcBalloonBase' that is at the stage of main movie, why it is returning undefined? How can I access the 'mcTemplate' after it be loaded? Or it is not possible?

    Thanks!
    Visit my business at http://www.ballooncreator.com - Software Tool For Party Balloons Online Design!

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    onLoadInit is what you need.

    gparis

  3. #3
    flashguy
    Join Date
    May 2005
    Location
    In the mountains
    Posts
    341
    Thanks GParis. I have tried it before but it was working just local (not with remote loading). But i tried it again and it worked. Do not know what happened before. Thanks for that!
    Visit my business at http://www.ballooncreator.com - Software Tool For Party Balloons Online Design!

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