netfuel
10-01-2007, 05:43 PM
First for the code that is working:
_qulaity = "best";
function pauseMe(time) {
stop();
pauseinterval = setInterval(pausefunction, time*1000);
function pausefunction() {
clearInterval(pauseinterval);
play();
}
}
import mx.transitions.Tween;
import mx.transitions.easing.*;
function animateFrame(num:Number, xPosPic1:Number, yPosPic1:Number) {
var prevNum = num-1;
//fase last out
var alphaP1:Tween = new Tween(_root["pic"+prevNum], "_alpha", None.easeOut, 100, 0, 1, true);
//animate pic
var xPosP1:Tween = new Tween(_root["pic"+num], "_x", None.easeOut, xPosPic1, _root["pic"+num]._x, 7, true);
//var yPosP1:Tween = new Tween(_root["pic"+num], "_y", None.easeOut, yPosPic1, _root["pic"+num]._y, 4, true);
var xscaP1:Tween = new Tween(_root["pic"+num], "_xscale", None.easeOut, 100, 90, 7, true);
var yscaP1:Tween = new Tween(_root["pic"+num], "_yscale", None.easeOut, 100, 90, 7, true);
}
function tweenFrame(num:Number, xPosPic1:Number, yPosPic1:Number) {
//animate pic
var xPosP1:Tween = new Tween(_root["pic"+num], "_x", None.easeOut, xPosPic1, _root["pic"+num]._x, 7, true);
//var yPosP1:Tween = new Tween(_root["pic"+num], "_y", None.easeOut, yPosPic1, _root["pic"+num]._y, 4, true);
var xscaP1:Tween = new Tween(_root["pic"+num], "_xscale", None.easeOut, 100, 90, 7, true);
var yscaP1:Tween = new Tween(_root["pic"+num], "_yscale", None.easeOut, 100, 90, 7, true);
}
tweenFrame(0, -60, -100);
pauseMe(6);
The issue is that I am using a frame swf to load these guys in randomly and at intervals. So since I am using _root none of the animations are working in the frame. I tried just switching root to _parent and this is not working. Any suggestions?
_qulaity = "best";
function pauseMe(time) {
stop();
pauseinterval = setInterval(pausefunction, time*1000);
function pausefunction() {
clearInterval(pauseinterval);
play();
}
}
import mx.transitions.Tween;
import mx.transitions.easing.*;
function animateFrame(num:Number, xPosPic1:Number, yPosPic1:Number) {
var prevNum = num-1;
//fase last out
var alphaP1:Tween = new Tween(_root["pic"+prevNum], "_alpha", None.easeOut, 100, 0, 1, true);
//animate pic
var xPosP1:Tween = new Tween(_root["pic"+num], "_x", None.easeOut, xPosPic1, _root["pic"+num]._x, 7, true);
//var yPosP1:Tween = new Tween(_root["pic"+num], "_y", None.easeOut, yPosPic1, _root["pic"+num]._y, 4, true);
var xscaP1:Tween = new Tween(_root["pic"+num], "_xscale", None.easeOut, 100, 90, 7, true);
var yscaP1:Tween = new Tween(_root["pic"+num], "_yscale", None.easeOut, 100, 90, 7, true);
}
function tweenFrame(num:Number, xPosPic1:Number, yPosPic1:Number) {
//animate pic
var xPosP1:Tween = new Tween(_root["pic"+num], "_x", None.easeOut, xPosPic1, _root["pic"+num]._x, 7, true);
//var yPosP1:Tween = new Tween(_root["pic"+num], "_y", None.easeOut, yPosPic1, _root["pic"+num]._y, 4, true);
var xscaP1:Tween = new Tween(_root["pic"+num], "_xscale", None.easeOut, 100, 90, 7, true);
var yscaP1:Tween = new Tween(_root["pic"+num], "_yscale", None.easeOut, 100, 90, 7, true);
}
tweenFrame(0, -60, -100);
pauseMe(6);
The issue is that I am using a frame swf to load these guys in randomly and at intervals. So since I am using _root none of the animations are working in the frame. I tried just switching root to _parent and this is not working. Any suggestions?