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

fading in bitmaps

Moderator: Phate

fading in bitmaps

Postby Solar42693 on Thu Jul 13, 2006 3:23 am

I'm trying to make a bitmap fade in but it won't let me change the alpha then just shape tween. So i used this code:
Code: Select all
onClipEvent(load){
this._alpha = 0;
}
onClipEvent(enterframe){
   this._alpha += 10;
}


but it only works smoothly when i leave the alpha increase at 10, and it's too fast then... could someone tell me what i'm doing wrong or give me an easier way, b/c i feeling i'm making this much harder than it is.
User avatar
Solar42693
 
Posts: 35
Joined: Tue Jul 11, 2006 12:56 am

Postby Phate on Thu Jul 13, 2006 4:59 pm

Just make the bmp a graphic, then you should be able to change the alpha in order to fade it in
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 Solar42693 on Fri Jul 14, 2006 12:23 am

i knew there was an easier way... thanks
User avatar
Solar42693
 
Posts: 35
Joined: Tue Jul 11, 2006 12:56 am

Postby stewball on Sat Jul 15, 2006 1:24 am

Phate: converting to a graphic symbol usually isn't a very good idea as they don't allow enough control when it's just as easy to have a movieclip.


Solar42693: Set the flash movie framerate higher. If you're working at the default framerate of 12fps everything will seem very choppy. I usually work at about 60 as it allows me to have everything smooth and 60 is also the highest low end monitors can refresh at so the flash movie gets better quality but is still viewable as intended by everyone.
User avatar
stewball
100+ Club
 
Posts: 116
Joined: Sun Oct 30, 2005 6:30 pm
Location: London, UK

Postby Phate on Sat Jul 15, 2006 5:55 am

Except that if you are just fading an object in, the graphic is plenty. You do not need to complicate the matter by creating a movieclip.
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 Sat Jul 15, 2006 5:52 pm

But what happens when you want to adapt this later on by performing movieclip specific functions? Oh whoops you can't do it you'll have to go back and convert ALL of the graphics to movieclips.

Anything a graphic can do a mc can do better.
User avatar
stewball
100+ Club
 
Posts: 116
Joined: Sun Oct 30, 2005 6:30 pm
Location: London, UK


Who is online

Users browsing this forum: No registered users and 1 guest