I am using the tween class to add an elastic FX to my nav bar. I want the FX to happen once when the page is loaded and the timeline moves over its frame. How do I alter my code so this will happen?
import mx.transitions.Tween;
import mx.transitions.easing.*;
bar.onEnterFrame = function () {
var tw:Tween = new Tween (this,"_width",Bounce.easeOut,0,780, 1, true);
var tw:Tween = new Tween (this,"_height",Bounce.easeOut,0,30, 1, true);
}
I have tried placing this code on the MC (bar) timeline and the root timeline.
Cheers
Andy