List Info

Thread: Access array outside of function




Access array outside of function
country flaguser name
United States
2007-07-23 08:47:22
Having a mental block this Monday morning. Now where *did* I
put that
coffee...

Anyway, if I build and populate an array within a function
on frame 1 of
the main timeline how do I access the array data from
outside the
function? Does the array have to be declared _global?

On Mondays sometime the simple things can be difficult. =)

Thanks!

Dave
_______________________________________________
Flashnewbiechattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashnewb
ie

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.c
om

Re: Access array outside of function
user name
2007-07-23 10:14:43
Is this what you mean?

var myArr:Array = new Array();

function populateArray() {

    myArr[0] = "hello";
    myArr[1] = "world";

};

populateArray();

trace( myArr[0]);


...helmut

On 7/23/07, Vaughn, David (Contractor) (J6B)
<David.Vaughn.ctrdla.mil>
wrote:
>
> Having a mental block this Monday morning. Now where
*did* I put that
> coffee...
>
> Anyway, if I build and populate an array within a
function on frame 1 of
> the main timeline how do I access the array data from
outside the
> function? Does the array have to be declared _global?
>
> On Mondays sometime the simple things can be difficult.
=)
>
> Thanks!
>
> Dave
> _______________________________________________
> Flashnewbiechattyfig.figleaf.com
> To change your subscription options or search the
archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashnewb
ie
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.c
om
>
_______________________________________________
Flashnewbiechattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashnewb
ie

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.c
om

RE: Access array outside of function
country flaguser name
United States
2007-07-23 10:27:48
Thanks Helmut. That is what I needed. =) 

Dave


-----Original Message-----
From: flashnewbie-bounceschattyfig.figleaf.com
[mailto:flashnewbie-bounceschattyfig.figleaf.com] On
Behalf Of Helmut
Granda
Sent: Monday, July 23, 2007 11:15 AM
To: Flashnewbie Mailing List
Subject: Re: [Flashnewbie] Access array outside of function

Is this what you mean?

var myArr:Array = new Array();

function populateArray() {

    myArr[0] = "hello";
    myArr[1] = "world";

};

populateArray();

trace( myArr[0]);


...helmut

On 7/23/07, Vaughn, David (Contractor) (J6B)
<David.Vaughn.ctrdla.mil>
wrote:
>
> Having a mental block this Monday morning. Now where
*did* I put that 
> coffee...
>
> Anyway, if I build and populate an array within a
function on frame 1 
> of the main timeline how do I access the array data
from outside the 
> function? Does the array have to be declared _global?
>
> On Mondays sometime the simple things can be difficult.
=)
>
> Thanks!
>
> Dave
> _______________________________________________
> Flashnewbiechattyfig.figleaf.com
> To change your subscription options or search the
archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashnewb
ie
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training 
> http://www.figleaf.com http://training.figleaf.c
om
>
_______________________________________________
Flashnewbiechattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashnewb
ie

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training http://www.figleaf.com
http://training.figleaf.c
om


_______________________________________________
Flashnewbiechattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashnewb
ie

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.c
om

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )