Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 10-14-2003, 10:35 AM   #1
Inflicted
Cranium Flavour
 
Inflicted's Avatar
 
Join Date: Aug 2003
Location: Harlem A+, Netherlands
Posts: 159
Default simple AS movement question

I'm doing a tut to learn animation through AS,
but can't figure out how to stop the MC

ActionScript Code:
onClipEvent (enterFrame) {         speed = -2;         this._y += speed; }

Anyone?

regards
Inflicted is offline   Reply With Quote
Old 10-14-2003, 10:42 AM   #2
JGizmo
Flash slave
 
JGizmo's Avatar
 
Join Date: Dec 2002
Location: UK
Posts: 504
Default

Can use this sample example to start with
ActionScript Code:
onClipEvent (enterFrame) {         //execute the code only if the _y of the mc is below or equel to 100         if(this._y <= 100){         speed = -2;         this._y += speed; } }

John
__________________
:===: H A P P Y . . . F L A S H I N G :===:
JGizmo is offline   Reply With Quote
Old 10-14-2003, 10:53 AM   #3
Inflicted
Cranium Flavour
 
Inflicted's Avatar
 
Join Date: Aug 2003
Location: Harlem A+, Netherlands
Posts: 159
Default

That's what I needed, some of the tuts were to complicated for a beginner.
I'll get going with this.

Thanks!

regards
Inflicted is offline   Reply With Quote
Old 10-14-2003, 11:33 AM   #4
Inflicted
Cranium Flavour
 
Inflicted's Avatar
 
Join Date: Aug 2003
Location: Harlem A+, Netherlands
Posts: 159
Default

Got that, and what if I wanted to perform a second action to the MC, like move to the right?

Thanks for your time.

regards
Inflicted is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
My brain hurts (onClipEvent question) andrea_levin ActionScript 2.0 3 03-25-2004 04:23 AM


All times are GMT. The time now is 08:57 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.