Sizing and NOT stretching a movie from html

  • Ray20
  • Born
  • Born
  • Ray20
  • Posts: 1

Post 3+ Months Ago

I wrote a movie that draws entirely from actionscript - there is nothing there when you look at the stage in flash. My script puts things on the stage within the area of 0,0 to Stage.width, Stage.height.

I assumed that when the movie's html <OBJECT> tag specified a width and/or height, my actionscript would just get those valuse as Stage.width and Stage.height, and therefore my script could make intelligent use of the extra pixels. Instead, when the HTML <OBJECT> width and height differ from the width and height in the movie, it stretches it - my script is unaware if it's ever being displayed in a different size than its default.

Is there a way to make flash just give me the actual current pixel size somehow and let my script decide how to handle the available space?

Alternatively if I could detect the actual displayed width and height, I could apply the opposite stretch to my whole movie.

Please help!
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Add
Code: [ Select ]
Stage.scaleMode = "noScale";
Stage.align = "TL";
  1. Stage.scaleMode = "noScale";
  2. Stage.align = "TL";
to the very first frame of your movie. This should prevent your movie from scaling, and keeps it's alignment to the top left corner where it should be (noScale typically centers your unscaled movie unless otherwise specified as in this case).

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 20 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
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.