The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 3 of 3

Thread: beginner's trouble - pure actionscript 3 swf and text scroll

  1. #1

    beginner's trouble - pure actionscript 3 swf and text scroll

    I want to learn actionscript 3 (using Flashdevelop) and tried to create simple swf that displays scrolling text in browser. I managed so far only to display text. Scrolling appears diificult since i tried to move text on x axis inside for() loop and it only shows up on last x value. It scrolls first and then swf is displayed, when all scrolling is already done.

    I've found some info telling me that i need additional frame to display scrolling text after swf loads (using flash editor). Also i tried use various events but none of them allowed me to show programmatically-scrolling text AFTER swf is displayed.

    Is there a simple "hello world" text scrolling example/tutorial in pure action script, without any bells and whistles to burden a beginner ?

  2. #2
    The Flash Player renders the scene in regular intervals based on a framerate. You can be notified about the beginning of the cycle with the Event.ENTER_FRAME which is dispatched by every DisplayObject... which is pretty much anything that you can display, including your main class that Flash Develop sets up for you.

    To animate an object over time, register an event handler for the ENTER_FRAME event and modify anything you need there.

    // ...
        // in some function
        addEventListener ( Event.ENTER_FRAME, enterFrameHandler );
    protected function enterFrameHandler ( e : Event ) : void
        something.x += 5;

  3. #3
    Thank you for this clear example !

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Home About Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012