Groups | Blog | Home
all groups > macromedia flash sitedesign > march 2005 >

macromedia flash sitedesign : Easiest way to achieve this....


True Blue 32
3/5/2005 7:33:36 AM
What i want to acheive is to have the SWF bg colour fill the screen when
published.

If i use a solid colour i can do this by altering the scale within HTML when
pulishing, but the problem i have is that i want to have a gradient bg colour
running top to bottom, and the only way i have found to achieve that is to draw
a box around the 800 x 800 document, fill with the gradient, and then rotate
into position. Obviously when i attempt to publish again, the gradient fill in
the box doe's not fill the screen.

I'm sure there must be a easier way of achieving this, can somebody please
point me in the right direction?

Thanks.
timberfish
3/5/2005 10:53:04 AM
On 2005-03-04 23:33:36 -0800, "True Blue 32"
<webforumsuser@macromedia.com> said:

[quoted text, click to view]

The best way to do this is to set your Flash movie to 100% width and
height in the HTML so that it takes up the entire HTML page. Now
inside your Flash movie on your first keyframe put this code:

Stage.scaleMode = "noScale";

Now what you can do is put a huge vector rectangle in you Flash movie
on the bottom layer with a gradient. It's not perfect, but it works
well. I do it this way on www.timberfish.com so you can see what I
mean.
--
{ timberfish }
{ www.grassapple.com }
fasterthanlight
3/5/2005 6:13:05 PM
Easiest way to do this, is to create a background gradient in Photoshop, or
whatever it is you use. Open a new image, set the gradient to how you want it.
Here is where it gets kind of tricky. you have to extend the bottom of the
image about 800 pixels or so, so that its a REALLY tall image. to do that,
change the canvas size, and add about 800pixels to the height. then, fill the
empty space with the colour that is the bottom colour of the gradient. Then
chnge the IMAGE size so that its width is only one pixel. why one pixel?
because it creates a small file, and the backgroudn image is going to be
duplicated across the page anyways. Open your favourite html editor, and set
the background to the image you just created. If you did it properly, the image
fills the html page nicely, with no gaps. you can see examples of this method
everywhere on my website: http://www.jamieroy.com
True Blue 32
3/5/2005 8:59:57 PM
fasterthanlight, thanks for your feedback on this, i'll give it a go and see how i get on.
fasterthanlight
3/6/2005 3:40:18 AM
AddThis Social Bookmark Button