Mailing List
Home
Forum Home
Flash Pro
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
Store a reference to an object 's property

Store a reference to an object 's property

2004-02-26       - By tech lists

 Back
Reply:     1     2     3     4     5     6     7     8     9     10  

All,

Simple question: Is it possible to store a reference to an object's property
in a variable?

In other words, in the following code -

a = new Object();
a.x = 10;
var b = a.x;

b takes the value of a.x, which is 10, rather than storing a reference to
a.x.

I know that it's possible to do this:

a = new Object();
a.x = 10;
var b = a;

which causes b to store a reference to the entire object, but that's not
what I'm after.

In case it matters, I'm using AS1.

Many thanks in advance for your advice and insight!

Cheers,
Matt Stuehler





=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Supported by Fig Leaf Software
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Be sure to check the archives and the wiki:
http://chattyfig.figleaf.com/
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:105318
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)




Earn $52 per hosting referral at Lunarpages.