Flasher Archive

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


Subject: FLASH: Return a string of a variable name???? - code check
From: jmerrill
Date: Tue, 9 Jan 2001 22:08:24 GMT


Adding to Musak's helpful post and others, let me add to my second question
again a different way, getting at the heart of the problem.

Why does the following work:

_root[varN2+i].matterNumsField=_root.loadVariablesM.pVarName;

but this doesn't:

instanceFieldName = "matterNumsField";
_root[varN2+i].instanceFieldName=_root.loadVariablesM.pVarName;

(where "instanceFieldName" is the name of the dynamic text field in MC
instance varN2+i)

???

Jason Merrill
Multimedia/Courseware Developer @ ELF, Issaquah, WA
425.369.5214
SerengetiUS.com - "Where Law Does Business"

Seattle Macromedia Authorware User's Group



jmerrill@elft
ech.com To: flasheratchinwag [dot] com
Sent by: cc:
owner@chinwag Subject: FLASH: Return a string of a variable name????
.com


01/09/01
01:08 PM
Please
respond to
flasher







How do I return the string of a variable name?

For example, if I do this:

var1 = "apple"
var2 = var1

var1 returns "apple" and of course var2 now returns "apple" also. Fine.

But how do I get the name of the "var1" variable as a string, so that
returning var2 gives me the string "var1" instead of "apple"??? I want to
dynamically reference variables in this way. I'm using Flash5. Thanks
again.

Jason Merrill
Multimedia/Courseware Developer @ ELF, Issaquah, WA
425.369.5214
SerengetiUS.com - "Where Law Does Business"

Seattle Macromedia Authorware User's Group





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre

Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save £200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: Return a string of a variable, Muzak

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