Flash full screen with image resizing.

  • ipdstudent
  • Novice
  • Novice
  • No Avatar
  • Joined: Jan 21, 2007
  • Posts: 16
  • Loc: London
  • Status: Offline

Post November 11th, 2008, 5:24 am

Hey guys, wondering if anyone can help me. I am trying to create a flash document which is viewable full screen, but changes sizes of certain things and keeps other items the same. For example, I would want the text to remain 1 size, but a background image to get bigger. A good example are the following:

http://www.lookmumimontheinternet.com/f ... ackground/
http://flashden.net/files/6421/index.html

Any help would be much appreciated!! :D
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post November 11th, 2008, 5:24 am

  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Joined: Jul 11, 2005
  • Posts: 1828
  • Loc: In the Great White North
  • Status: Offline

Post November 11th, 2008, 12:11 pm

ok there are several things you need to do.

First in the html when you embed your swf you need to remove the page margins and padding and set the swf to be 100% x 100%

You also need to set allowScale to false. (that means nothing scales unless you tell it to). There's an example here that uses the swfObject to place the swf and set its scale.

inside your flash you need to find out when the size of the swf changes and you need to set everthings starting point. You can do that with a stage callback
Code: [ Select ]
Stage.align = "TL"; // sets content to upper left corner
Stage.scaleMode = "noScale"; // repeats the no scale

var stageChange:Object = new Object();
stageChange.onResize = function() {
    // do something when stage size changes
        // image resize code here
}
Stage.addListener(stageChange);
  1. Stage.align = "TL"; // sets content to upper left corner
  2. Stage.scaleMode = "noScale"; // repeats the no scale
  3. var stageChange:Object = new Object();
  4. stageChange.onResize = function() {
  5.     // do something when stage size changes
  6.         // image resize code here
  7. }
  8. Stage.addListener(stageChange);
If at first you don't succeed F1... If that doesn't work try Google!
//// Designer, Developer & Teacher - Interactive, Motion and 3D \\\\
Portfolio at WhenImNotSleeping.com

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 35 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.