Be a Supporter!

Help with Variable

  • 263 Views
  • 2 Replies
New Topic Respond to this Topic
geohoundz55
geohoundz55
  • Member since: May. 31, 2007
  • Offline.
Forum Stats
Member
Level 10
Blank Slate
Help with Variable 2009-03-17 04:44:24 Reply

I'm having trouble with variables,.
var myInt:Number = _root.StatsMenu.intel;

I tried to put that code in my main timeline keyframe,.
and the input text is on the StatsMeny Clip,.

But once I use the myInt variable it seems that it's not working.,.
how could I fix it?

thanks!

geohoundz55
geohoundz55
  • Member since: May. 31, 2007
  • Offline.
Forum Stats
Member
Level 10
Blank Slate
Response to Help with Variable 2009-03-17 07:06:20 Reply

Bump

Denvish
Denvish
  • Member since: Apr. 25, 2003
  • Offline.
Forum Stats
Member
Level 46
Blank Slate
Response to Help with Variable 2009-03-17 10:51:10 Reply

At 3/17/09 04:44 AM, geohoundz55 wrote: I'm having trouble with variables,.
var myInt:Number = _root.StatsMenu.intel;

I tried to put that code in my main timeline keyframe,.
and the input text is on the StatsMeny Clip,.

But once I use the myInt variable it seems that it's not working.,.
how could I fix it?

thanks!

Give the input textbox the instance name 'mys' and use this on the main timeline

StatsMenu.mys.onChanged=function(){
	myInt=Number(_root.StatsMenu.mys.text);
	trace(myInt)
}

- - Flash - Music - Images - -

BBS Signature