Flasher Archive

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


Subject: RE: FLASH: Movie clips
From: David Williamson
Date: Mon, 26 Jul 1999 14:57:34 +0100

Hi

As JC said nested loops are a bad thing, but you may want to take
this into account too. The 200,000 action limit is not 200,000 EDITOR
actions but related to PLAYER actions. The .SWF open file format white paper
should give infomation on this.

In the player a section of script such as this

LOOPWhile (i <= 200,000)
set variable i = i +1
endloop

The simple code can equal near 7 or so actions i belive.

(infact if you put just this string in a movie and have a text box that
displays i then you will see that the player hit 200,000 actions when i is
equal to 14185 (i think, its a long time since i tried it out.))

The player actually works the SetVariable action as this, or close to it.

get variable i
add 1 to it
set variable to the result.

and when it checks for it in the loop statement it does a similar set of
events

Get Variable i
compare to 200,000

The important thing is that what looks like at maximum 3 actions is
considrably more. The other thing to remember is that Skipping along the
time line WILL NOT Always work. If during the course of an action script you
use a Goto frame action where the rest of the script continues then Flash
may still register the seperate frame and consiquent scripting as part of
the same Action string.

You can test this by using the script

If (i <= 200,000)
goto frame 5
Else
stop

In frame 5 the action
set variable (i = i+1
goto frame 1

if you link up the same text box to display the variable. it crashes way
before i = 200,000

Also Flash 4 will count the number of Nested Function calls. Originally
there was a limit of 32 nested function calls in the player before it
crashed, this may have been raised now. Nested functions are for example

Call (function A)

Function A then has an if Else statement

If (condition)
call (function B)
Else
Call (function C)

both Function B and Function C are nested functions.

Some thing else you should avoid is Using a goto frame command in the course
of either a Function Call or a Loop, this seems to Cause the player to get a
bit confused and crash soon after.

hope this clears some things up.

cheers dave
___________

http://www.oldskoolflash.com
http://www.spookyandthebandit.com

THINK New Ideas
12 Theobalds Road
London
WC1X 8PF

T:+44 (0)171 242 3300
F:+44 (0)171 242 3306




-----Original Message-----
From: John Croteau [croteauaterols [dot] com (mailto:croteauaterols [dot] com)]
Sent: Monday, July 26, 1999 12:53 PM
To: flasheratshocker [dot] com
Subject: Re: FLASH: Movie clips


Hi Jason,

If you get the 200,000 error then operations need to be divided up into
different frames. Loop accross Flash frames not totally in one. Loops
within loops are generally not going to work within the same Flash
frame.

There is no limit to nested frames except practical. I just tried a 9
deep MC /a/b/c/d/e/f/g/h/i which Flash 4 displayed completely, so I
selected the path just by clicking and not manually entering it. I was
able to target the top layer without problems. I have done deeper MCs in
Flash 3. Make sure all your MCs are MCs with their behaviors set to MC.

----------- -----------------------
John Croteau croteauaterols [dot] com (mailto:croteauaterols [dot] com)
------------- -------------------------
FlashTek (Advanced Websites with Flash) http://www.FlashTek.com/
Flash Bible (Fast track to good Flash) http://www.FlashBible.com/
Flash Central(The Universe Starts Here) http://www.FlashCentral.com/
The Flash Tech Resource (Tech Notes) http://www.FlashCentral.com/tech/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manageratshocker [dot] com. Problems to: owneratshocker [dot] com
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-manageratshocker [dot] com

------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manageratshocker [dot] com. Problems to: owneratshocker [dot] com
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-manageratshocker [dot] com


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