A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Liquid Layout Flash - Weird Effects??

  1. #1
    Member
    Join Date
    Sep 2007
    Posts
    75

    Liquid Layout Flash - Weird Effects??

    I am a beginner in AS3.
    I am looking to have a liquid layout in my flash. I have the AS already written now and it is working however I am getting some very weird effects so I must have something done incorrectly.

    The effect that I am going for is
    If someone resizes the browser window, I want all of the instances on the flash to resize properly as well.
    When different resolutions look at the flash header everything increases or decreases as necessary so that the header looks good and goes all the way across the screen.

    Like the following website:
    http://www.senocular.com/demo/Layout...ageResize.html

    Can someone help me with what I am doing wrong?

    I believe the following two lines are incorrect.
    call_mc.scaleX = stage.width * .5;
    call_mc.scaleY = stage.height * .5;



    Code:
    public class NoScale extends MovieClip
     {
      public function NoScale()
      {
       stage.addEventListener(Event.RESIZE,onResize);
       stage.align = "TL"; // Top left align the stage
       stage.scaleMode = "noScale";  // items do not stretch to fit
      }
      public function onResize(event:Event)
      {
       // In the event call a method to move the items
       // or, call each item here to be sized
    	//call_mc.x = stage.width/2;
    	//call_mc.y = stage.height/2;
    	call_mc.scaleX = stage.width * .5;
    	call_mc.scaleY = stage.height * .5;
    //call_mc is just 1 movie instance on I have the stage.  There are around 20 more.
    
       // ... etc
      }
     }
    }
    Thanks,

    Wayne
    Last edited by SpectacularStuf; 10-28-2007 at 12:42 PM.

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    All you need to do is set the publish settings in the html to 100%.
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    Junior Member
    Join Date
    Sep 2007
    Posts
    15
    Use stage.stageWidth instead of stage.width
    Last edited by 2morrowMan; 10-29-2007 at 09:12 AM.

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