Note that there are some explanatory texts on larger screens.

plurals
  1. POActionScript 3 Alpha Tweening
    text
    copied!<p>I am building a custom preloader which is different than the "traditional" sliding bar that is common in RIAs. The preloader uses 100 white laser lights which are in a straight line, and collectively they indicate the progress bar. Let me describe how this works before I ask my question:</p> <p>.................<strong>.......,,,,,,,,,:::::::::::::::::::::::::BBBBBBBB</strong> and so on...</p> <p>The above string captures the spirit of the preloader indicator. In this illustration, the bigger and fatter the character, the brighter the laser light in my actual preloader:</p> <ol> <li>The farthest laser to the right indicates the currently loaded percentage. This is also the brightest laser light.</li> <li>All other trailing lasers get increasingly dimmer until they become completely black, as if they had burned a whole in the back of the screen.</li> </ol> <p>Step "2" is where things get tricky. For some reason, the trialing lasers do not get darker, except for a few random lasers. Here is a snippet of the code controlling the brightness (or, as I used it, the alpha property) of the dot:</p> <pre><code>... more code ... //Build the dots according the configuration and load status parameters private function buildDots(x:int, y:int):void { //Draw the dot, details not shown var dot:Shape = new Shape(); //Begin the transitioning this.fadeOn(dot); } //Fade a dot to full brightness private function fadeOn(dot:Shape):void { var fadeOn:Tween = new Tween(dot, "alpha", None.easeNone, 0, 1, this.fadeOnTime, true); fadeOn.addEventListener(TweenEvent.MOTION_FINISH, fadeOff); } //Fade a dot to black private function fadeOff(e:TweenEvent):void { var fadeOff:Tween = new Tween(e.target.obj, "alpha", None.easeNone, 1, .2, this.fadeOffTime, true); } ... more code ... </code></pre> <p>Could someone please show me where I am going wrong? These details may help:</p> <ol> <li>This entire preloader is inside of a custom class.</li> <li>The laser lights are created completely by code, without access to the library.</li> </ol> <p>Please let me know if I can provide any more details. I will reward a good answer/feedback with as many points as I can.</p> <p>Thank you for all your time!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload