The Armor Games website will be down for maintenance on Monday 10/7/2024
starting at 10:00 AM Pacific time. We apologize for the inconvenience.

ForumsProgramming ForumNeed help with dynamic text boxes [AS3]

2 4734
ExplosionsHurt
offline
ExplosionsHurt
248 posts
Nomad

I'm trying to make a text box that displays the current fps in it. My current code looks like this:

fpsMeter.addEventListener(Event.ENTER_FRAME, updateMeter);

function updateMeter(evt:Event)
{
fpsMeter.text = stage.frameRate.toString();
}

It does not give an error, but the text box does not display anything in it.

Also, the flash file works perfectly in Flash CS4, but it doesn't display anything in CS5.5.

Any help?

  • 2 Replies
Boomer404
offline
Boomer404
2 posts
Nomad

Make sure your dynamic text's box's instance name is "fpsMeter".

If all else fails try looking up a tutorial, try this: http://kaioa.com/node/83

PixelSmash
offline
PixelSmash
566 posts
Nomad

Try tracing the value first, see what comes out... If nothing traces, there's something wrong with getting the framerate value. If something does trace, it probably has something to do with the textbox itself

Showing 1-2 of 2