Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / September 2006



Tip: Looking for answers? Try searching our database.

set var in another symbol?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
planetfallstudios - 25 Sep 2006 15:05 GMT
i have a button in a symbol, when i release the mouseclick, i want it to add
the value if 1 to a dyn. txt field in another symbol... var name is
"DYNTXTFIELD"

so, if i use:

var DYNTXTFIELD=DYNTXTFIELD+1;

nothing happens.

if i add the path to the variable, i get an error!

**Error** Symbol=Menu, layer=Buttons, frame=88:Line 9: Syntax error.

var _root.Symbol.DYNTXTFIELD=root.Symbol.DYNTXTFIELD+1;

why would such a simple thing be so difficut for flash to do?

does anyone have any ideas how to get what i want to happen, to happen? i cant
find any documentation about this function, one you would think would have come
up often, thanks!
planetfallstudios - 25 Sep 2006 15:18 GMT
well, according to:

http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14727

"Declare variables with var or set variable. Although Flash does not require
using var or set variable to assign a value to a variable, it's a good
practice...."

Right, thats why it didnt work for me, what did work is :

_root.Symbol.DYNTXTFIELD=root.Symbol.DYNTXTFIELD+1;

notice, the lack of "var"? as suggested by adobe's own documentation...  

live and learn.

also, this topic posted twice, with no option to delete my repeated post...
why do you suppose that is?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.