A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: When I loadMovie into a Container the other SWF stop frame won't stop();

  1. #1
    Bmcc*81 bmcc81's Avatar
    Join Date
    Jul 2007
    Location
    Montreal
    Posts
    299

    When I loadMovie into a Container the other SWF stop frame won't stop();

    Hi.


    I'm making a swf web site where when you click on a button like EVENTS, the the events.swf gets loaded into mcContent

    However when I load it in, it never stops at my stop(); action

    Can anyone tell me what i'm doing wrong?

    The SWF that I load in keeps on looping.

    How do I make this stop();

    Is this a bug, can someone please have look???

    PHP Code:
    on (release) {
        
    this.mcContent.loadMovie("events.swf"1);

    Thanks,
    bmcc
    Attached Files Attached Files
    Last edited by bmcc81; 02-10-2010 at 06:03 PM.
    Bmcc81
    Flash Designer / Web Developer
    -----------------------------------
    http://www.webinkgraphics.com

  2. #2
    :
    Join Date
    Dec 2002
    Posts
    3,518
    centercontent is using AS2.

    events is published as AS 3.0, change settings to AS 2.0 and republish

  3. #3
    Bmcc*81 bmcc81's Avatar
    Join Date
    Jul 2007
    Location
    Montreal
    Posts
    299

    Great but how come it's not centered?

    Hi Thanks for responding,

    My stop action now works, but it's not showing up centered, would you know why this is?


    Code:
    Stage.scaleMode = "noscale";
    Stage.align = "tl";
    Stage.addListener({onResize:reposition});
    
    function reposition() {
    var mc = _root.mainContent_mc;
    var newX = Math.floor((Stage.width - mc._width) / 2);
    var newY = Math.floor((Stage.height - mc._height) / 2);
    mc._x = newX;
    mc._y = newY;
    };
    
    this.reposition();
    Thanks again!!!
    Bmcc81
    Flash Designer / Web Developer
    -----------------------------------
    http://www.webinkgraphics.com

  4. #4
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Code:
    function centercontent(target_mc:MovieClip) {
    	target_mc._x = Math.ceil(Stage.width/2-target_mc._width/2);
    	target_mc._y = Math.ceil(Stage.height/2-target_mc._height/2);
    }
    var loadListener:Object = new Object();
    loadListener.onLoadInit = function(target_mc:MovieClip):Void {
    	centercontent(target_mc)
    }
    
    var mcLoader:MovieClipLoader = new MovieClipLoader();
    mcLoader.addListener(loadListener);
    Code:
    on (release) {
    	//this.mcContent.loadMovie("events.swf", 1);
    	mcLoader.loadClip("events.swf", mcContent);
    }

  5. #5
    Bmcc*81 bmcc81's Avatar
    Join Date
    Jul 2007
    Location
    Montreal
    Posts
    299

    Thanks, but al that did was move my header off

    Thanks, but I think something is strange...

    It moved my Menu Header up and off? and renamed the mc centercontent

    was that right?

    Do you know why?

    I've attached the file if you want to see.

    Thanks,
    bmcc81
    Attached Files Attached Files
    Bmcc81
    Flash Designer / Web Developer
    -----------------------------------
    http://www.webinkgraphics.com

  6. #6
    :
    Join Date
    Dec 2002
    Posts
    3,518
    You changed the instance name of the 'blue box' movie clip, change it back to 'mcContent'.

    Try this...
    Last edited by dawsonk; 03-09-2010 at 05:42 PM.

  7. #7
    Bmcc*81 bmcc81's Avatar
    Join Date
    Jul 2007
    Location
    Montreal
    Posts
    299
    Hmm, it's still the same problem...
    Bmcc81
    Flash Designer / Web Developer
    -----------------------------------
    http://www.webinkgraphics.com

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