macromedia.director.basics
[Top] [All Lists]

Re: Control Panel: Rewind

Subject: Re: Control Panel: Rewind
From: "Andrew Morton" <akm@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 29 Nov 2007 16:13:39 -0000
Newsgroups: macromedia.director.basics

adam@blueapplestudio wrote:
> Mike:
> I believe that my code is indeed creating gMyArray as a global.  This
> is all using Javascript, not Lingo, so I don't think that using
> "global" is required.
>
> Andrew:
> I tried prepareMovie instead of startMovie and get the same error.
> Does prepareMovie execute similar to startMovie?
>
> I am unclear as to why if I 1) clear globals and then 2) create a
> global variable that the variable can come up later as having no
> properties.  It would make sense to me if I created the variable and
> THEN cleared globals.  Any thoughts?

You /are/ declaring the global at the top of every script that needs to 
access it, aren't you?

--------------------------------------
global myGlobal

on myHandler
    myGlobal=myGlobal+1
etc.
--------------------------------------

Andrew 



<Prev in Thread] Current Thread [Next in Thread>