Groups | Blog | Home
all groups > flash (macromedia) > june 2006 >

flash (macromedia) : Jumping to line number


Balloony2
6/7/2006 8:25:12 PM
Hi all , probably a simple to solution to this , but not for a new comer....lol

I want to jump to a certain line number on the action script if certain
conditions are met or not met..

eg.
if _root.a<=0 <i>I need it to jump to a line number
above the current line , eg back to the top of the action script</i>
if _root.a>=1 <i>I need it to continue </i>
the fleece
6/7/2006 8:47:28 PM
nope, not in actionscript
I remember that from zx81 basic

package up your code in functions and call them when you want to "jump to a
line"

if _root.a<=0
myFunction5
else
myFunction6

myFunction5: moves an mc by a pixel
myFunction6: moves an mc by a pixel but the other direction

(nb err that isn't real code):}
Pete Hughes
6/8/2006 12:33:09 PM
Jumps are an integral part of "spaghetti code" which has been widely
denigrated since the late 1960's. Even GWBASIC would let you GOSUB without
having to write a GOTO.

"The go to statement ... is just too primitive; it is too much an invitation
to make a mess of one's program."
<a target=_blank class=ftalternatingbarlinklarge
href="http://www.acm.org/classics/oct95/">http://www.acm.org/classics/oct95/</a>
AddThis Social Bookmark Button