Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: FLASH: Action Script - Explain this one
From: Jefferis Peterson
Date: Wed, 5 Jul 2000 00:07:51 +0100

The following is from Branden Hall's SPARKS.fla which has a neat effect
of creating a shower of fireworks when you press a button. I was trying
to follow the fla when I got to the frame actions of the m-controller. I
realize that I need a degree in calculus perhaps to make sense of this,
but if there were an explanation of these terms, I'd be much further
along. I'll ?? my guesses on the right. The problem is that I couldn't
find some of these variables defined anywhere in the fla, unless I
misunderstood the definition syntax.

Set Variable: "zpos" = zpos+../:zspeed ?? z axis a function of speed
of mouse movement?
Set Variable: "scale" = (zpos*4+100)/100 ?? scale is 104% ?
Set Variable: "factor" = (zpos/10+100)/100 ?? ?? from here on I'm pretty
lost.
Set Property ("../spark", X Position) = (../spark:_x+../:xspeed)*factor ??
Set Variable: "../:yspeed" = ../:yspeed+/:gravity

Set Property ("../spark", Y Position) = (../spark:_y+../:yspeed)*factor

Set Property ("../spark", X Scale) = scale*100
?? scale 104% x 100% ?
Set Property ("../spark", Y Scale) = scale*100

Set Property ("../spark", Alpha) = ../spark:_alpha-../:fade
?? fade
isn't defined.
If (../spark:_alpha<0)
?? when fade reaches 0, remove clip.
Remove Movie Clip ("../")

End If



Dragable MC Instance Actions:
On (Release)

Set Variable: "temp" = 1

Loop While (temp<=10)

Set Variable: "current" = random(1000)
?? why times 1000??
Duplicate Movie Clip ("/spark", "spark"&current, current) ??
spark = spark random X, random Y position???
Set Property ("/spark"&current, X Position) = _x
?? why
doesn't this take the image off the screen?
Set Property ("/spark"&current, Y Position) = _y

Set Variable: "/spark"&current&":xspeed" = random(6)-3+1
??
are these the definitions of speed variables? what does it mean in english?
Set Variable: "/spark"&current&":yspeed" = random(8)*-1

Set Variable: "/spark"&current&":zspeed" = random(10)-5

Set Variable: "/spark"&current&":fade" = random(5)+3

Set Variable: "temp" = temp+1

End Loop

End On


--
Jefferis Kent Peterson
www.PetersonSales.net
Flash, Web Design and Marketing
jefferisatpetersonsales [dot] net

ICQ 19112253

flasher-digest

>http://www.dommermuth-1.com/arctan/

flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
www.flashforward2000.com
Produced by United Digital Artists and lynda.com
Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
shockwave.com and Electric Rain.
1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
Register before June 30 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  FLASH: Positioning loaded movies, gym

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]