A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Align loaded movieclip

Threaded View

  1. #4
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    in frame one of your actions layer:

    Code:
    Stage.align = "LT"; //force the flash movie to justify to the top left
    Stage.scaleMode = "noScale"; //prevent the movie from scaling its contents
    
    resizeListener = new Object();//create a generic object
    resizeListener.onResize = function(){  //give it a function for onResize events
    blankMc._x = (Stage.width/2) - (blankMc._width/2); //assumes your registration point in the MC is top left
    blankMc._y = (Stage.height/2) - (blankMc._height/2);//assumes your registration point in the MC is top left
    }
    Stage.addListener("resizeListener");
    //any time you want to force an onResize call you can just say
    resizeListener.onResize();
    Last edited by jAQUAN; 02-24-2007 at 04:07 PM.

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