Hey dudes… just wondering if anyone can shed a bit of light on this for me…
basically i am tryin to move logos around on screen using actionscript…i have lots of them that i want to run through so i’m using variables… i have an array called logos[0] that the images are coming from and i have MovieClip 6 holders on the stage called holder1 - 6…i’ve adapted this bit of code i got off a forum to get this workin…
var boxcounter:Number = new Number(1);
var currentlogo:String =new String (“holder”+boxcounter);
var startX = 646;
var endX = 65;
var speed = 10;
currentlogo._x = startX;
function moveMe(targ){
targ._x+=(_root.endX-targ._x)/_root.speed
}
onEnterFrame = function(){
setInterval(moveMe,30,_root.currentlogo)
}
i think i know what the problem is but i just don’t know how to fix it… the error is showing in this line
currentlogo._x = startX;
where it says
There is no property with the name ‘_x’.
currentlogo._x = startX;
what i think is happening is that currentlogo isn’t a movieClip its a variable so it doesn’t have the property x… am i right in thinking this?? i’ve traced currentlogo and i get holder1 which is the name of the movie clip i’m tryin to target… if i put holder1 into
currentlogo._x = startX; like this…
holder1._x=startX;
it works fine…
is there a different syntax i’ve to use or something? anyone know? any help would be greatly appreciated!
thanks a mill
leapin