This is for flash MX.
I have a movie clip which I have loaded into a location, once it has loaded in I then want it to slide to a new location with friction. What Script would I need for that.
Sorry if its a bit vague, thanks in advance
This is for flash MX.
I have a movie clip which I have loaded into a location, once it has loaded in I then want it to slide to a new location with friction. What Script would I need for that.
Sorry if its a bit vague, thanks in advance
what do you mean, movieclip loaded into a location?
If you mean that using loadMovie you have loaded a swf into a MC, then you can just use easing motion on the movieclip, that should work,
onClipEvent(enterFrame){
_x+=(400-_x)/5
_y+=(200-_y)/5
}
Sorry it was a bit badly worded.
I have loaded a movieclip in using:
product.onPress = function () {
_root.createEmptyMovieClip(“container”, 1);
loadMovie(“prod.swf”, “container”);
container._x = 7 ;
container._y = 80 ;
}
When it comes in it’s hidden, which is what I want. I then want it to slide up which will make it look like it’s sliding up from behind the menu.
product.onPress = function () {
loadedmovie=true
_root.createEmptyMovieClip(“container”, 1);
loadMovie(“prod.swf”, “container”);
container._x = 7 ;
container._y = 80 ;
}
_root.onEnterFrame=function(){
if(loadedmovie){
container._x+=(400-_x)/5
container._x+=(400-_y)/5
}}
That’s fantastic, thank you very much.
Ok I have this on and its working:
product.onPress = function() {
loadedmovie = true;
_root.createEmptyMovieClip(“container”, 1);
loadMovie(“prod.swf”, “container”);
container._x = 7;
container._y = 80;
};
_root.onEnterFrame = function() {
trace (container._y)
if (loadedmovie) {
container._x += (0-_x)/5;
container._y += (10-_y)/5;
}
};
But it wont stop or move upwards, I know the stop is missing but when I add it, it stops working, what am I doing wrong?
:: Copyright KIRUPA 2024 //--