<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PlaceType"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PlaceName"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
font-face
        {font-family:Batang;}
font-face
        {font-family:Tahoma;}
font-face
        {font-family:"\@Batang";}

 /* Font Definitions */
 @font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Script MT Bold";
        panose-1:3 4 6 2 4 6 7 8 9 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.emailstyle18
        {font-family:Arial;
        color:navy;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I know this is an old topic but I thought
my input might be useful.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I tend to declare all variables on the
first frame in the _root timeline, I don&#8217;t use the _global option because
it is bad programming practice.&nbsp; <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Global variables can easily become
confused with locals, especially in bigger programs, it also makes your code
less portable so you can&#8217;t reuse it as easily.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Anyway, this is a huge topic, and I&#8217;m
sure people will debate this with me, but in my opinion it&#8217;s the best way
to go.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I find the best practice is to create an
object for each major part of your code in the _root timeline.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>var presentation:Object = new ObjectI(); <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>var audience.Object = new Object();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>and then declaring the variables relating
to that part inside the objects.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>presentation.slides = 5;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>presentation.boring = true;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>audience.sleeping = true;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>etc&#8230;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>You can now reference these objects
anywhere in your application using _root.presentation.slides, _root.audience.sleeping
etc&#8230;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hope this helps.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Cheers,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=MsoNormal><font size=4 color=navy face="Script MT Bold"><span
lang=EN-AU style='font-size:13.5pt;font-family:"Script MT Bold";color:navy'>Paul
Sijpkes<br>
</span></font><font size=1 color=navy face=Arial><span lang=EN-AU
style='font-size:7.5pt;font-family:Arial;color:navy'>VET Coordinator<br>
</span></font><strong><b><font size=2 color=navy face=Arial><span lang=EN-AU
style='font-size:10.0pt;font-family:Arial;color:navy'>THE <st1:place w:st="on"><st1:PlaceName
 w:st="on">KNOX</st1:PlaceName> <st1:PlaceType w:st="on">SCHOOL</st1:PlaceType></st1:place></span></font></b></strong><b><font
size=2 color=navy face=Arial><span lang=EN-AU style='font-size:10.0pt;
font-family:Arial;color:navy;font-weight:bold'><br>
</span></font></b><b><font size=1 color=navy face=Arial><span lang=EN-AU
style='font-size:7.5pt;font-family:Arial;color:navy;font-weight:bold'>Independent
Co-educational International<br>
</span></font></b><font size=1 color=navy face=Arial><span lang=EN-AU
style='font-size:7.5pt;font-family:Arial;color:navy'>Wantirna South VIC 3152<br>
Phone: +61 3 9801 9233 <br>
Fax: +61 3 9887 1850<br>
Website: </span></font><font color=navy><span lang=EN-AU style='color:navy'><a
href="http://mail1/exchweb/bin/redir.asp?URL=http://www.knox.vic.edu.au"
target="_blank"></a></span></font><font size=1 color=navy face=Arial><span
lang=EN-AU style='font-size:7.5pt;font-family:Arial;color:navy'><a
href="http://www.knox.vic.edu.aucricos/">www.knox.vic.edu.au</a><br>
CRICOS Provider No: 00151G ABN: 16 095 158 222</span></font><o:p></o:p></p>

</div>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
vet-mm-bounces@edulists.com.au [mailto:vet-mm-bounces@edulists.com.au] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Stoney, Marian Sy<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, 22 August 2007
4:35 PM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">VET
 Multimedia Teachers' Mailing List</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [vet-mm] global and
local variables</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div id=idOWAReplyText71852>

<div>

<p class=MsoNormal><font size=2 color=black face=Arial><span lang=EN-AU
style='font-size:10.0pt;font-family:Arial;color:black'>Thanks, John. I haven't
loaded Flash 8 yet but I'll have to now!&nbsp; The advice on declaring them on
the main timeline is good,</span></font><span lang=EN-AU><o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-AU style='font-size:
10.0pt;font-family:Arial'>Regards,</span></font><span lang=EN-AU><o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-AU style='font-size:
10.0pt;font-family:Arial'>Marian</span></font><span lang=EN-AU><o:p></o:p></span></p>

</div>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span lang=EN-AU style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabIndex=-1>

</span></font></div>

</div>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><b><font size=2 face=Tahoma><span
lang=EN-AU style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-AU style='font-size:10.0pt;font-family:Tahoma'>
vet-mm-bounces@edulists.com.au on behalf of Mr John Parlas<br>
<b><span style='font-weight:bold'>Sent:</span></b> Tue 21/08/2007 3:26 PM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">VET
 Multimedia Teachers' Mailing List</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [vet-mm] global and
local variables</span></font><span lang=EN-AU><o:p></o:p></span></p>

</div>

</div>

<div>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-AU
style='font-size:10.0pt;font-family:Arial;color:navy'>Hi Marian,</span></font><span
lang=EN-AU><o:p></o:p></span></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-AU
style='font-size:12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-AU
style='font-size:10.0pt;font-family:Arial;color:navy'>Not sure what you mean
but I suspect it has something to do with how the variables are declared.
Hopefully the attached file can clear the water a bit. Basically, when
variables are declared properly, globals can be used in other parts of the
movie where as locals cannot. I tend to always declare globals main timeline
&#8211; not within a function and just use them within the function.</span></font><span
lang=EN-AU><o:p></o:p></span></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-AU
style='font-size:12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-AU
style='font-size:10.0pt;font-family:Arial;color:navy'>Look in the frame script to
see the code.</span></font><span lang=EN-AU><o:p></o:p></span></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-AU
style='font-size:12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-AU
style='font-size:10.0pt;font-family:Arial;color:navy'>Hope this helps?????
Flash 8 format.</span></font><span lang=EN-AU><o:p></o:p></span></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-AU
style='font-size:12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-AU
style='font-size:10.0pt;font-family:Arial;color:navy'>Regards</span></font><span
lang=EN-AU><o:p></o:p></span></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-AU
style='font-size:10.0pt;font-family:Arial;color:navy'>John</span></font><span
lang=EN-AU><o:p></o:p></span></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabIndex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
vet-mm-bounces@edulists.com.au [mailto:vet-mm-bounces@edulists.com.au] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Stoney, Marian Sy<br>
<b><span style='font-weight:bold'>Sent:</span></b> Tuesday, 21 August 2007
12:20 PM<br>
<b><span style='font-weight:bold'>To:</span></b> vet-mm@edulists.com.au<br>
<b><span style='font-weight:bold'>Subject:</span></b> [vet-mm] global and local
variables</span></font><span lang=EN-AU><o:p></o:p></span></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-AU
style='font-size:12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=2 color=black face=Arial><span lang=EN-AU
style='font-size:10.0pt;font-family:Arial;color:black'>Hi there all you
Actionscript types!</span></font><span lang=EN-AU><o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-AU style='font-size:
10.0pt;font-family:Arial'>I'm wondering why, if I declare a global variable on
the timeline, it's available to a function on a movie clip, but if I declare a
global variable inside a function on a movie clip, it's not available to the
timeline, whilst still being available to other functions on other movie clips.
I thought global functions were supposed to be available everywhere? I've
attached my file, but it's a bit of a mess.</span></font><span lang=EN-AU><o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-AU style='font-size:
10.0pt;font-family:Arial'>Grateful for any insights!</span></font><span
lang=EN-AU><o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-AU style='font-size:
10.0pt;font-family:Arial'>Thanks,</span></font><span lang=EN-AU><o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-AU style='font-size:
10.0pt;font-family:Arial'>Marian</span></font><span lang=EN-AU><o:p></o:p></span></p>

</div>

<p><b><font size=3 face="Times New Roman"><span lang=EN-AU style='font-size:
12.0pt;font-weight:bold'>Important - </span></font></b><span lang=EN-AU>This
email and any attachments may be confidential. If received in error, please
contact us and delete all copies. Before opening or using attachments check
them for viruses and defects. Regardless of any loss, damage or consequence,
whether caused by the negligence of the sender or not, resulting directly or
indirectly from the use of any attached files our liability is limited to
resupplying any affected attachments. Any representations or opinions expressed
are those of the individual sender, and not necessarily those of the Department
of Education and Early Childhood Development.<o:p></o:p></span></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-AU
style='font-size:12.0pt'>_______________________________________________ <br>
<a href="http://www.edulists.com.au/">http://www.edulists.com.au </a>- FAQ,
resources, subscribe, unsubscribe <br>
VET Multimedia Mailing List kindly supported by <br>
<a href="http://www.vcaa.vic.edu.au/vet/programs/multimedia/multimedia.html%20">http://www.vcaa.vic.edu.au/vet/programs/multimedia/multimedia.html
</a>- Victorian Curriculum and Assessment Authority and <br>
<a href="http://www.pixeled.org.au/">http://www.pixeled.org.au </a>- PixelEd
Multimedia Teachers Association<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-AU
style='font-size:12.0pt'>_______________________________________________ <br>
<a href="http://www.edulists.com.au/">http://www.edulists.com.au </a>- FAQ,
resources, subscribe, unsubscribe <br>
VET Multimedia Mailing List kindly supported by <br>
<a href="http://www.vcaa.vic.edu.au/vet/programs/multimedia/multimedia.html">http://www.vcaa.vic.edu.au/vet/programs/multimedia/multimedia.html
</a>- Victorian Curriculum and Assessment Authority and <br>
<a href="http://www.pixeled.org.au/">http://www.pixeled.org.au </a>- PixelEd
Multimedia Teachers Association <o:p></o:p></span></font></p>

<p><strong><b><u><font size=1 color=blue face=Tahoma><span lang=EN-AU
style='font-size:7.5pt;font-family:Tahoma;color:blue'>DISCLAIMER:</span></font></u></b></strong><span
lang=EN-AU><o:p></o:p></span></p>

<p align=center style='text-align:center'><font size=1 color=blue face=Tahoma><span
lang=EN-AU style='font-size:7.5pt;font-family:Tahoma;color:blue'>This email and
any files transmitted with it are confidential and intended solely for the use
of the individual to whom they are addressed.</span></font><span lang=EN-AU><o:p></o:p></span></p>

<p align=center style='text-align:center'><font size=1 color=blue face=Tahoma><span
lang=EN-AU style='font-size:7.5pt;font-family:Tahoma;color:blue'>If you have
received this email in error, please notify the sender immediately by return
email and then delete this message. </span></font><span lang=EN-AU><o:p></o:p></span></p>

<p align=center style='text-align:center'><font size=1 color=blue face=Tahoma><span
lang=EN-AU style='font-size:7.5pt;font-family:Tahoma;color:blue'>Any views
expressed in this email are those of the individual sender and may not
necessarily reflect the views of Yarra Valley Grammar.</span></font><span
lang=EN-AU><o:p></o:p></span></p>

</div>

</div>

</body>

</html>