A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: External SWF position issue in Liquid Layout

  1. #1
    Junior Member
    Join Date
    Jun 2008
    Posts
    23

    External SWF position issue in Liquid Layout

    I am making a liquid flash site with a video player which loads within the central movieclip. When the site loads everything sits in place perfectly, however if the browser is rescaled in anyway the external swf pushes up to the top of the screen and stays there permanently.

    This is the link to the site:
    http://www.khawkinsdesign.com/test/website.html

    I have no idea why this is occuring and was wondering if someone could help me with this.
    This is the code I am using to load the external swf:

    var Xpos:Number = 0.5;
    var Ypos:Number = 0.5;
    var swf:MovieClip;
    var loader:Loader = new Loader();

    var defaultSWF:URLRequest = new URLRequest("flashmo_215_video_player.swf");
    loader.load(defaultSWF);
    loader.x = Xpos;
    loader.y = Ypos;
    addChild(loader);

    As ever your help would be greatly appreciated.

  2. #2
    Senior Member
    Join Date
    Jul 2008
    Posts
    391
    How did you set the scale and align properties of the stage? I always use
    PHP Code:
    stage.scaleMode StageScaleMode.NO_SCALE;
    stage.align StageAlign.TOP_LEFT
    because that's the only setting that works properly for me.

    Looks like you have a Event.RESIZE listener, what's the code that repositions the loader?
    PHP Code:
    loader.stage.stageWidth 2;
    loader.stage.stageHeight 2
    Should look something like that depending on the point of origin of the loader.

  3. #3
    Junior Member
    Join Date
    Jun 2008
    Posts
    23
    Thanks, that works a treat! it now centers perfectly.

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