flash title/logo header on variable-width site

  • Matthew
  • Proficient
  • Proficient
  • User avatar
  • Joined: Jul 07, 2005
  • Posts: 266
  • Loc: Canada
  • Status: Offline

Post November 28th, 2006, 5:16 pm

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.
Matthew Doucette, Xona Games
Award winning indie game studio.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post November 28th, 2006, 5:16 pm

  • Matthew
  • Proficient
  • Proficient
  • User avatar
  • Joined: Jul 07, 2005
  • Posts: 266
  • Loc: Canada
  • Status: Offline

Post November 28th, 2006, 5:48 pm

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.
Matthew Doucette, Xona Games
Award winning indie game studio.
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Joined: Jul 11, 2005
  • Posts: 1828
  • Loc: In the Great White North
  • Status: Offline

Post November 28th, 2006, 8:32 pm

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
  • Joined: Jul 07, 2005
  • Posts: 266
  • Loc: Canada
  • Status: Offline

Post November 28th, 2006, 8:58 pm

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?
Matthew Doucette, Xona Games
Award winning indie game studio.
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Joined: Jul 11, 2005
  • Posts: 1828
  • Loc: In the Great White North
  • Status: Offline

Post November 28th, 2006, 11:35 pm

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 27 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.