View Full Version : A bit of help with .AttachMovie
rah33m
August 19th, 2007, 02:27 AM
I am trying to learn to use .attach and well first i got 5 frames of animation under the mc Walking then on the main screen i just had a Mc of the animation still then on it i put on the still mc
onClipEvent(enterFrame){
if(Key.isDown(Key.RIGHT)){
this.attachMovie("Walking", "Walking1", 1 );
this._x += 5;
}
}
and when i test it all it does when i hit right once it starts the walking animation moves 5 pixels but is still and if i hold down right it goes back to the Still mc and drags across
SacrificialLamb
August 19th, 2007, 04:27 AM
i think you will find holding it really goes to the first frame of the animation every frame you hold down right. i don't really understand the "but is still" comment you did tall it to only move 5 pixels, or did the animation not work right.
zellers
August 23rd, 2007, 11:45 PM
I am trying to learn to use .attach and well first i got 5 frames of animation under the mc Walking then on the main screen i just had a Mc of the animation still then on it i put on the still mc
onClipEvent(enterFrame){
if(Key.isDown(Key.RIGHT)){
this.attachMovie("Walking", "Walking1", 1 );
this._x += 5;
}
}
and when i test it all it does when i hit right once it starts the walking animation moves 5 pixels but is still and if i hold down right it goes back to the Still mc and drags across
I honestly can't understand your english, but i think this is what u want?
onClipEvent(load) {
this.attachMovie("Walking","Walking1",this.getNextHighestDepth());
}
onClipEvent(enterFrame){
if(Key.isDown(Key.RIGHT)){
this._x += 5;
}
}
Not sure what your trying to say though.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.