Dravos
November 2, 2002, 9:58am
1
I know that you can do for example onClipEvent(enterFrame) as an action for an exisiting movie clip.
How do i dynamically do this
I load the movie:
_root.createEmptyMovieClip(“myMovieClip”, 101);
myMovieClip._x=50;
myMovieClip._y=50;
loadMovie(“image1.jpg”, myMovieClip);
and i thought
myMovieClip.onClipEvent(enterFrame){
this._x+=10;
}
why wont this work and if not how can i do this?
Thanx
Dravos
system
November 2, 2002, 10:14am
2
what version of flash ur using!
system
November 2, 2002, 10:29am
3
Sorry, Im using Flash MX, thats why i can dynamically load the jpg to the movie clip. but seeming as you can not see it on stage as you create it on entering frame how can i apply this action to it?
system
November 2, 2002, 10:38am
4
it will be something:
movieclip.onEnterFrame = function () {
// ur code over here
}
hope that helps u,
yours,
system
November 2, 2002, 10:47am
5
I tried that as well, still no movement
system
November 2, 2002, 10:52am
6
can u post ur code, just want to check, cuz that one should work though!
cheers!
system
November 2, 2002, 10:59am
7
man i just tested it, WORKING!!!
_root.createEmptyMovieClip("myMovieClip", 101);
myMovieClip._x=50;
myMovieClip._y=50;
loadMovie("image1.jpg", myMovieClip);
myMovieClip.onEnterFrame = function () {
this._x+=10;
}
hope that what were you thinking about! =)
yours,
system
November 2, 2002, 11:05am
8
That is in fact exactly what i want, but i just copied and paster your code ovre mine and it still not working??? If it works on yours is it possible i have some setting turned off???
my image doesnt move…
system
November 2, 2002, 11:21am
9
Ok get this, i tried a demo and its a movie clip with a actionscripted box, when i do it with that it moves, but if its with the jpg it dont… Some setting wrong or i need an update/patch??? very confused.
system
November 2, 2002, 11:27am
10
YES, its now worrking :D!!!
_root.createEmptyMovieClip("myMovieClip", 1);
myMovieClip._x=100;
myMovieClip._y=100;
loadMovie("image1.jpg", myMovieClip);
_root.onEnterFrame = function () {
myMovieClip._x+=10;
}
yours,
system
November 2, 2002, 11:30am
11
ok that works, cool
erm dare i ask for more help
why will this not work ??
_root.createEmptyMovieClip(“myMovieClip”, 1);
myMovieClip._x=100;
myMovieClip._y=100;
loadMovie(“image1.jpg”, myMovieClip);
myMovieClip.onRollOver= function(){
this._x+=10;
}
system
November 2, 2002, 11:34am
12
it works if i draw a box as a movieclip
<HR>
_root.createEmptyMovieClip("button1", 100);
button1.lineStyle(2, 0x000000, 100);
button1.beginFill(0xFF0000, 100);
button1.moveTo(-25, -10);
button1.lineTo(25, -10);
button1.lineTo(25, 10);
button1.lineTo(-25, 10);
button1.endFill(-25, -10);
button1._x=i*60;
button1._y=25;
button1.onRollover=function(){
this._x+=10;
}
button1.onRollover=function(){
this._x+=10;
}
<HR>
but not as a jpg again
system
November 2, 2002, 11:36am
13
this would!
_root.createEmptyMovieClip("myMovieClip", 1);
myMovieClip._x=100;
myMovieClip._y=100;
loadMovie("image1.jpg", myMovieClip);
_root.onEnterFrame = function () {
myMovieClip.onRollOver= function(){
this._x+=10;
}
}
yours,
system
November 2, 2002, 11:38am
14
i assume the previous post was what you need!
system
November 2, 2002, 11:39am
15
CUNNING!!! kinda annoying that you need an on enterframe but it works
THANX A LOT FOR YOUR HELP
HAPPY SCRIPTING
DRAVOS
(dravos@talk21.com )