It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Flash Forum

adding a backg in flash

Moderator: Phate

adding a backg in flash

Postby kitina on Sun Sep 17, 2006 10:26 am

Hi.
I`m new in all this flash business and I know absolutly nothing about making a HTML page. So I need some help please. What I want to do is full flash site that will rezize after the browser. And I also want to add a gradient backg to my flash site. Can I do this in flash?
I`ve manage to get the flash to resize when I shrink down my browser but the backg is a total mistery to me.
So, if anyone could explaine it to me in a way that I will understand I`d be very gratefull.
Tks.
kitina
 
Posts: 17
Joined: Sun Sep 17, 2006 10:20 am

Postby Phate on Mon Sep 18, 2006 8:00 pm

Just add a layer at the very bottom with a picture of a gradient...
Web-Developing since '03
Image
User avatar
Phate
500+ Club
 
Posts: 826
Joined: Sun Nov 21, 2004 4:12 am
Location: 127.0.0.1

Postby stewball on Wed Sep 20, 2006 4:46 pm

and... if you want the gradient to resize to the dimensions of the movie copy the following actionscript to the first frame of your movie.

Code: Select all
onEnterFrame {
   sWidth = Stage.width;
   sHeight = Stage.height;
   fillType = "linear";
   colors = [0xFF0000, 0xFFFF00];
   alphas = [100, 100];
   ratios = [0, 255];
   matrix = {matrixType:"box", x:0, y:0, w:sWidth, h:sHeight, r:90/180*Math.PI};
   _root.lineStyle(1, 0xFFFFFF, 0);
   _root.beginGradientFill(fillType, colors, alphas, ratios, matrix);
   _root.lineTo(sWidth, 0);
   _root.lineTo(sWidth, sHeight);
   _root.lineTo(0, sHeight);
   _root.lineTo(0, 0);
   _root.endFill();
}
User avatar
stewball
100+ Club
 
Posts: 116
Joined: Sun Oct 30, 2005 6:30 pm
Location: London, UK

Postby kitina on Thu Sep 21, 2006 8:16 pm

tks


I`ll trie to see how it works :)
kitina
 
Posts: 17
Joined: Sun Sep 17, 2006 10:20 am


Who is online

Users browsing this forum: No registered users and 0 guests