PDA

View Full Version : page of formulas



Scootman
October 5th, 2002, 04:59 PM
I think a really cool thing to do would be to make a page in action script tricks... or somthing... that just lists a bunch of formulas for different effects... this can make it so people dont have to ask for help so much... they dont need you to give them code... they can use the formula and develop their own code...

just a thought...

lostinbeta
October 5th, 2002, 05:24 PM
kirupa.com does have an AS tricks section. Ilyas writes most (if not everything) in there. Kirupa's site is down right now so I can't get the exact link, but it is there alright.

<B>EDIT :</B> The site came back up so here is the link...
http://www.kirupa.com/developer/actionscript/as_tricks.asp

pom
October 5th, 2002, 07:50 PM
Originally posted by Scootman
I think a really cool thing to do would be to make a page in action script tricks... Somebody stop me before I KILL HIM!!!!

Scootman
October 5th, 2002, 08:25 PM
no, i mean like within the as tricks page... had formulas for like properties of movie clips... almost like pseudocode or somthin... like just list them all together IE:

-----------------------------------------------

Scale depending on mouse distance:[b]

--enter frame--
mcX= (mouseX - movieClipX)
mcY= (mouseY - movieClipY)
distance = (mcX * mcX) + (mcY * mcY)
X and Y scale = distance / ####(speed of scaling)

[b]Easing to a point:

--load--
set start x + y points
speed = whatever

--enter frame--
x = end x point
y = end y point
movieClipX += (x - MovieClipX)/speed
movieClipY += (y - MovieClipY)/speed

---------------------------------------------------

i just meant to put up formulas for common effects people ask about all the time... like you said in a different post, pom, for easing a movie clip, no matter what... ITS THE SAME FORMULA =P so i just wanted to see formulas for cool stuff like this thats easy to do... and doesnt take long to write pseudocode type stuff for.. to be up on the site somewhere... and it could save you from having to explain stuff over and over to people... and its shorter than writing a whole tutorial

i would like to see stuff like the easing for example... the scaling relative to the mouse... maybe a mouse swarm of some sort... just some cool easy effects... like if you put a little twist on the easing to a point you can have an easy mouse trail.. i dunno stuff like that...

only reason i suggest this is that i tried that easing to a point before... and that scaling thing before... but i could never figure it out... and if i knew the formula it would have been easy to write the code to make the effect i wanted...

Scootman
October 5th, 2002, 08:25 PM
oops forgot the / on that b lol

lostinbeta
October 5th, 2002, 09:23 PM
OH NO, I THINK I KNOW HOW YOU FEEL ILAYS!

Well I really appreciate you <B><I>READING</I></B> my tutorials on <I>easing</i> :P

Scootman
October 6th, 2002, 12:28 AM
oh, im sorry lol... i feel stupid now... can we take this post off of the forum? i used to come to kirupa all the time... but then i just started going to the forums... i didnt even realize that there was an easing tutorial... sorry again lostinbeta...:*(

lostinbeta
October 6th, 2002, 12:39 AM
LOL, no problem scootman. I was just messing with you. The easing tutorials were just added not too long ago:) (2 weeks maybe?)

Scootman
October 6th, 2002, 01:38 AM
hey, is that how you did your footer thingy? with the grass... using the easing thing and just setting different speeds for them...

lostinbeta
October 6th, 2002, 01:39 AM
Yeppers:) 100% easing and if statements to keep it from going off the stage.

Scootman
October 6th, 2002, 01:54 AM
Oh yeah, BTW... Pom, i just actually took a real look at the AS Tricks page... great job... I love the Drawing API and the Dynamic Events ones...

lostinbeta
October 6th, 2002, 02:01 AM
I loved all of them =)

pom
October 6th, 2002, 03:56 AM
Thanks :)

But you're right, Scootman, there should be something about useful formulas. Actually, you can find almost everything in the tutorials, but not at the same place: easing in the easing tutorial, random motion in the random motion, elastic motion in the sliding window tutorial... We should put everything at the same location, or at least links pointing to the right tutes.

pom :hat:

cybergold
October 6th, 2002, 09:26 AM
I didn't think post deserved a new thread so that is why i am posting it in here.

How would i get a window to open within a flash movie, like a Flash website, where the window is a flash window, with actions such as closing and a tab for moving it around the stage? I heard some mentioning of loading a swf or something along those lines.