Reply LinkBack Thread Tools Search this Thread
Old 03-11-2005, 07:01   #1 (permalink)
gray
i still want paying
 
gray's Avatar
 
Join Date: Oct 2003
Location: newcastle, uk
Posts: 4,839
Actionscript Animation Resource #2 - Bouncing

Code:
onClipEvent (load) { _y = 100; ceiling = 0; floor = 200; yspeed = 10; gravity = 1.7; drag = .97; bounce = .7; } onClipEvent (enterFrame) { _y = _y+yspeed*bounce; if (_y-_height/2<ceiling) { _y = ceiling+_height/2; yspeed = -yspeed; } if (_y+_height/2>floor) { _y = floor-_height/2; yspeed = -yspeed; } yspeed = yspeed*drag+gravity; xspeed = xspeed*drag; }
  Reply With Quote
Old 03-11-2005, 07:21   #2 (permalink)
emil
dt immigrant
 
emil's Avatar
 
Join Date: Nov 2004
Location: Bucharest - Romania
Posts: 7,573
Send a message via ICQ to emil Send a message via MSN to emil Send a message via Yahoo to emil Send a message via Skype™ to emil
yay. cool
  Reply With Quote
Old 03-11-2005, 11:03   #3 (permalink)
top_buzz
For your health!
 
top_buzz's Avatar
 
Join Date: Jul 2004
Posts: 2,582
I like the bouncy one i'll be using that!

http://www.northform.co.uk/temp/oooh.html
  Reply With Quote
Old 19-11-2005, 19:09   #4 (permalink)
MDiddy
Half Man/Half Amazing
 
MDiddy's Avatar
 
Join Date: Apr 2004
Location: A small town called Freshoffachumpsass.
Posts: 35
onClipEvent? what are you using? Flash 5? step into the new century chap.
  Reply With Quote
Old 19-11-2005, 22:10   #5 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,340
Quote:
Originally Posted by MDiddy
onClipEvent? what are you using? Flash 5? step into the new century chap.
Nice of you to provide an alternative.
  Reply With Quote
Old 20-11-2005, 11:20   #6 (permalink)
dan
Iris Folder
 
dan's Avatar
 
Join Date: Apr 2003
Location: smokey
Posts: 2,650
Hang on that was free he ain't gonna give away all his tricks


setInterval();
addListener();
  Reply With Quote
Old 20-11-2005, 11:23   #7 (permalink)
gray
i still want paying
 
gray's Avatar
 
Join Date: Oct 2003
Location: newcastle, uk
Posts: 4,839
haha

this was meant for people who are still tweening really, i think its a bit early to introduce setting up functions and oop

but yeah, helpful post there chap, whens your free as3 class?
  Reply With Quote
Old 20-11-2005, 22:21   #8 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,340
Tweens? Like...11 year olds?

Don't worry, I know what tweens are. I read the first five chapters of "H.O.T (Hands-On-Training) Macromedia Flash MX" - I just laughed at the name more than read the book. "Hot Flashes" haha.
  Reply With Quote
Old 23-11-2005, 22:38   #9 (permalink)
MDiddy
Half Man/Half Amazing
 
MDiddy's Avatar
 
Join Date: Apr 2004
Location: A small town called Freshoffachumpsass.
Posts: 35
Quote:
Originally Posted by pgo
Nice of you to provide an alternative.

Right you are, good sir.

Code:
if(youreusing == lameanimationslikebounces) { smackYourself(); }

Seriously though - no direspect, please don't make stuff bounce. I may have a seizure. Which is why I can't watch anime.
  Reply With Quote
Old 25-11-2005, 08:12   #10 (permalink)
top_buzz
For your health!
 
top_buzz's Avatar
 
Join Date: Jul 2004
Posts: 2,582
Thats me told
  Reply With Quote
Old 27-11-2005, 11:24   #11 (permalink)
stealthcow
knocking heads
 
stealthcow's Avatar
 
Join Date: Jul 2003
Location: Liverpool, UK
Posts: 1,963
its just teaching how to approach a problem in flash

dont run before you can walk..
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8