this is great, but how would you restrict the movement to between 2 points on an axis, so the object wont move right to the edges of the page on the x or y axis?
@Ahmadkhanize Although the stage only contains one frame, the clip still must know when to execute it's code. onEnterFrame is a function that is called whenever it's host frame is shown. So, for example, if the clip is on frame three, the code would be executed on frame three.
If we were to use another function, such as, onLoad, the code would execute when the clip is loaded.
Can you make a video of how to make an object follow when the mouse is CLICKED? Ive been searching... And i thought this is what I needed but, good video!!! ;)
you do flash tutorials too :o didn't work in flash for so long time. It's understandable and stuff but i think adding the script to the description will be a good idea ;)
this is great, but how would you restrict the movement to between 2 points on an axis, so the object wont move right to the edges of the page on the x or y axis?
cheers
legendari8031 7 months ago
I cannot make this work on Flash CS5 AS2 or AS3.
The ball simply does not move!!
Any thoughts?
Thanks for the video though!
walterrldias 8 months ago
can this tutorial applicable for flash cs3?
manesshardey 1 year ago
@manesshardey Yes. But you'll need to select ActionScript 2 instead of ActionScript 3 when creating a new flash document. :)
ddoodm 1 year ago
can anyone explain what is the need for writing : "OnEnterframe" , since we are not inserting any frames in the timeline..
Ahmadkhanize 1 year ago
@Ahmadkhanize Although the stage only contains one frame, the clip still must know when to execute it's code. onEnterFrame is a function that is called whenever it's host frame is shown. So, for example, if the clip is on frame three, the code would be executed on frame three.
If we were to use another function, such as, onLoad, the code would execute when the clip is loaded.
Hope that helps!
ddoodm 1 year ago
@ddoodm , tnx a lot..now it is clear for me..Wish u all the best luck
Ahmadkhanize 1 year ago
coooll man with this you can to do small game!!
alexcent50 1 year ago
Thanks'' MINE Friend
TheCasaFriend 2 years ago
how can you make it go in any directions?
legobatman1 2 years ago
@legobatman1 I've tried this onEnterFrame = function(){
ball1._x = _xmouse;
ball1._y = _ymouse;
}
Visionaf 1 year ago
actually the human eye can see up to 75 frames a second but it depends on lighting and the amount of activity you are seeing ect
jekcheck 2 years ago
Oh ok cool! Thought it would be something around there. :) Don't know why those retards are saying you can only see 25. :)
Thanks for sharing!
ddoodm 2 years ago
Can you make a video of how to make an object follow when the mouse is CLICKED? Ive been searching... And i thought this is what I needed but, good video!!! ;)
xrayblaze67 2 years ago
there already is one =D look through Luther92's videos.
SubbingForFree 2 years ago
@xrayblaze67 Im thinking you need to you a boolian statement (if or else). as in
" if (spacebar is down)
{ person lives;
}
else
{ person explodes;
}"
lol
CalvertPratt561 2 years ago
thanks man,cool n easy.gud one buddy
swezification 2 years ago
you do flash tutorials too :o didn't work in flash for so long time. It's understandable and stuff but i think adding the script to the description will be a good idea ;)
sergiuung 2 years ago
Haha! Yep! :)
Oh cool idea! :) Will do right now! Thanks for the comment!
ddoodm 2 years ago
Still don't understand...... 5 ***** though!
01davethecouchguy 2 years ago
Haha! Two comments from the same guy! :D That's a first for me! :) Thanks for the 5 stars! :) Really appreciate it! :)
ddoodm 2 years ago
Cool stuff man!!
I have no idea what just happened there... but I liked it!! :)
01davethecouchguy 2 years ago
Haha! Thanks Dave! :) Great comment! :D
ddoodm 2 years ago