| View previous topic :: View next topic |
| Author |
Message |
..... Expert Cheater
Reputation: 59
Joined: 23 Oct 2010 Posts: 119
|
Posted: Sat Dec 24, 2011 11:36 am Post subject: AS3 Help |
|
|
I am trying to create a dynamic text field in which I can display a variables current number.
Why isn't this working.
| Code: | var spinSpeed:Number = 3;
polyStar.rotation += spinSpeed;
speedShow.text = spinSpeed.toString(); |
|
|
| Back to top |
|
 |
Josheh Expert Cheater
Reputation: 1
Joined: 28 Aug 2011 Posts: 155
|
Posted: Sat Dec 24, 2011 11:36 am Post subject: |
|
|
This isn't the programming section. Try the Flash section.
Also I'd use a label instead of a textfield/box or whatever it's called in Flash.
|
|
| Back to top |
|
 |
..... Expert Cheater
Reputation: 59
Joined: 23 Oct 2010 Posts: 119
|
Posted: Sat Dec 24, 2011 11:40 am Post subject: |
|
|
| Josheh wrote: | This isn't the programming section. Try the Flash section.
Also I'd use a label instead of a textfield/box or whatever it's called in Flash. |
I'm very aware of the section I posted it in.
Who the fuck are you.
|
|
| Back to top |
|
 |
Josheh Expert Cheater
Reputation: 1
Joined: 28 Aug 2011 Posts: 155
|
Posted: Sat Dec 24, 2011 11:42 am Post subject: |
|
|
| Effect wrote: | | Josheh wrote: | This isn't the programming section. Try the Flash section.
Also I'd use a label instead of a textfield/box or whatever it's called in Flash. |
I'm very aware of the section I posted it in.
Who the fuck are you. |
Why so insecure
|
|
| Back to top |
|
 |
..... Expert Cheater
Reputation: 59
Joined: 23 Oct 2010 Posts: 119
|
Posted: Sat Dec 24, 2011 11:43 am Post subject: |
|
|
| Josheh wrote: | | Effect wrote: | | Josheh wrote: | This isn't the programming section. Try the Flash section.
Also I'd use a label instead of a textfield/box or whatever it's called in Flash. |
I'm very aware of the section I posted it in.
Who the fuck are you. |
Why so insecure  |
Not insecure. Asked a simple question.
Why so avoid the question?
|
|
| Back to top |
|
 |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Sat Dec 24, 2011 1:32 pm Post subject: |
|
|
var spinSpeed:number = 3;
addEventListener (Event.ENTER_FRAME, speedShow);
function speedShow(event:ENTER_FRAME){speedShow.text = String ("Speed:"+spinSpeed);
}
|
|
| Back to top |
|
 |
Up2Admin I'm a spammer
Reputation: 126
Joined: 17 Oct 2007 Posts: 6550 Location: Texas
|
Posted: Sat Dec 24, 2011 3:48 pm Post subject: |
|
|
Event listeners are pretty damn important in AS3.
Why you do "event:ENTER_FRAME" instead of something shorter and less confusing?
That would kill me if I had a problem in my code and I had a lot of code...
_________________
|
|
| Back to top |
|
 |
..... Expert Cheater
Reputation: 59
Joined: 23 Oct 2010 Posts: 119
|
Posted: Sat Dec 24, 2011 3:51 pm Post subject: |
|
|
| Up2Admin wrote: | Event listeners are pretty damn important in AS3.
Why you do "event:ENTER_FRAME" instead of something shorter and less confusing?
That would kill me if I had a problem in my code and I had a lot of code... |
ENTER_FRAME is standard for the beginning of a .swf?
|
|
| Back to top |
|
 |
Up2Admin I'm a spammer
Reputation: 126
Joined: 17 Oct 2007 Posts: 6550 Location: Texas
|
Posted: Sat Dec 24, 2011 3:53 pm Post subject: |
|
|
| Effect wrote: | | Up2Admin wrote: | Event listeners are pretty damn important in AS3.
Why you do "event:ENTER_FRAME" instead of something shorter and less confusing?
That would kill me if I had a problem in my code and I had a lot of code... |
ENTER_FRAME is standard for the beginning of a .swf? | The ENTER_FRAME event listener is triggered every time the frame is active, or "entered".
_________________
Last edited by Up2Admin on Sat Dec 24, 2011 3:54 pm; edited 1 time in total |
|
| Back to top |
|
 |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Sat Dec 24, 2011 3:54 pm Post subject: |
|
|
Well on load would be even sooner but I don't think that would make a difference.
Also Chris if there's an error with your code it will tell you which line.
|
|
| Back to top |
|
 |
Up2Admin I'm a spammer
Reputation: 126
Joined: 17 Oct 2007 Posts: 6550 Location: Texas
|
Posted: Sat Dec 24, 2011 3:56 pm Post subject: |
|
|
| Cryoma wrote: | Well on load would be even sooner but I don't think that would make a difference.
Also Chris if there's an error with your code it will tell you which line. | Usually if there's an error in my code, it's not from whatever line it says...
but whatevs
I'm just picky about my code being organized. Everything that is different should be named differently and specifically.
_________________
|
|
| Back to top |
|
 |
|