flash title/logo header on variable-width site

  • Matthew
  • Proficient
  • Proficient
  • User avatar
  • Posts: 266
  • Loc: Canada

Post 3+ Months Ago

Most flash title/logo headers are for fixed-width websites. What about variable-width sites?

The only solution I can think of is centering a fixed-width flash movie. Are there any solutions for making full use of the website's width?

If any of you have any examples of flash headers on a variable-width site, I would love to see them.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Matthew
  • Proficient
  • Proficient
  • User avatar
  • Posts: 266
  • Loc: Canada

Post 3+ Months Ago

Another solution I just thought of is an extra wide flash (to accomodate all resolutions) with overflow hidden, as shown with an image (not a flash movie) here in #5:

http://clagnut.com/sandbox/imagetest.php/

Only I cannot figure out how you would center it for all resolutions.
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

When you embed your flash movie set it to be 100% wide instead of a pixel dimension

Then use the following tutorial to set noScale and content aligned top left. Also make sure to use a callback like Stage.onResize(){} to make sure that everything scales when someone changes their browser window size

http://moock.org/asdg/technotes/relayout/

an example of a stretching header where I used something similar to that tutorial is here http://www.liveactionset.org
  • Matthew
  • Proficient
  • Proficient
  • User avatar
  • Posts: 266
  • Loc: Canada

Post 3+ Months Ago

graphixboy, excellent.

Before I jump into it, just one question: Can the flash movie "know" the width and compensate for it? Can you have objects aligned to the right, and have them adjust with the adjustment of the screen browser width?
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

Sure, Alignment in Flash is all about math.

For example to align a movieclip called "myClip" to the right of the stage (assuming that the registration point is in the top left of myClip)

Code: [ Select ]

//Align Right
myClip._x = Math.round(Stage.width - myClip._width);

//Align Center
myClip._x = Math.round((Stage.width/2) - (myClip._width/2));
  1. //Align Right
  2. myClip._x = Math.round(Stage.width - myClip._width);
  3. //Align Center
  4. myClip._x = Math.round((Stage.width/2) - (myClip._width/2));


You don't really need the rounding but it forces a whole number so you land on a pixel

Post Information

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