A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Does setInterval work in 3DFA?

  1. #1
    Member
    Join Date
    Apr 2008
    Posts
    31

    Does setInterval work in 3DFA?

    To simplify here is the code again in a class file:

    package {
    import flash.display.Sprite;
    import flash.utils.setInterval;

    public class SetIntervalExample extends Sprite {
    private var intervalDuration:Number = 1000; // duration between intervals, in milliseconds

    public function SetIntervalExample() {
    var intervalId:uint = setInterval(myRepeatingFunction, intervalDuration, "Hello", "World");
    trace("SetIntervalExample called");
    }

    public function myRepeatingFunction():void {
    trace(arguments[0] + " " + arguments[1]);
    }
    }
    }

    And the script to run it in a script file:

    var xx:SetIntervalExample = new SetIntervalExample;
    xx.SetIntervalExample();
    trace(typeof(xx));

    gives the error message that setInterval is not a function of the SetIntervalExample class.

    The AS3 book I am trying to learn this program with says it should work fine.

  2. #2
    A Senior Newbie - How Odd ForumNewbie's Avatar
    Join Date
    Mar 2003
    Posts
    590
    Hi,
    Just a quick comment to say that I don't know, but I hope someone will be along soon to help, as I'd be interested to see how this is supposed to work too
    Morgan.
    Please note that my domain has changed to http://www.morganmultinational.com

  3. #3
    A Senior Newbie - How Odd ForumNewbie's Avatar
    Join Date
    Mar 2003
    Posts
    590
    Out of interest, does it behave any differently when exported to when you use it in the preview mode?
    Please note that my domain has changed to http://www.morganmultinational.com

  4. #4
    Senior Member kusco's Avatar
    Join Date
    Nov 2001
    Posts
    681
    setInterval should work on export, but it is not supported in the current version.

    However, there should be a new release this weekend that includes the setInterval instructions
    Cheers,
    kusco
    (3DFA Support Team)

  5. #5
    Member
    Join Date
    Apr 2008
    Posts
    31

    Great, thanks

    My sanity may make a return!

  6. #6
    Senior Member Zoranan's Avatar
    Join Date
    May 2008
    Posts
    126
    I have never used set interval before, and I don't know how...

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center