[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

How to actionscript alpha fade in for graphic/mc in a scene

Posted on 2006-07-14
4
Medium Priority
?
1,052 Views
Last Modified: 2012-06-27
Hi,

I am sure this is really easy I just can't get my head around it properly, all solutions I find are too complex.

I have different scenes, one image (at the moment as graphics, should maybe be MC) in each scene that I want to fade in. By using normal tween I get a flicker here and there and understand that if I use actionscript instead it should be smoother. So, what I need is

"at the beginning of this scene fade in item X and then stop." That's it. I just don't get what I write and where... ever so grateful for help!!

Thanks a million in advance,

Jzen
0
Comment
Question by:snowtrail
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 23

Expert Comment

by:Zeffer
ID: 17106764
yes should be movieclips..more options for control .. and the flash player will thank you :)

made a sample for ya

www.redpearl.co.nz/ee/fadein_picture.zip

Z

0
 

Author Comment

by:snowtrail
ID: 17107071
That is great thanks, but I know how to do it the "create motion tween way", I would like to to it completely with actionscripting... I understand that will both make it smoother and the file size smaller? I'll do movieclips for sure - especially if it keeps the flash player happy...

Jzen
0
 
LVL 5

Accepted Solution

by:
lupuleine earned 250 total points
ID: 17109366
hi,

you could use something like this

easeType = mx.transitions.easing.None.easeNone; // ease type
var begin = 0;
var end = 100;
var frames = 20;
var mc = picture_mc; // the movieclip :)
var myTween = new mx.transitions.Tween(mc, "_alpha", easeType, begin, end, frames );

the Tween and all other trasition classes are undocumented ... but you can find some tutorials on the internet ... if you want more details

Lupuleine
0
 

Author Comment

by:snowtrail
ID: 17109614
Thanks, I'm sure that might help... I managed to find another solution though that works well

mc._alpha = 0;
mc.onEnterFrame = function() {
    if (this._alpha<100) {
        this._alpha++;
    } else {
        this._alpha = 100;
        delete this.onEnterFrame;
    }
};
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question