Ross Isenegger

Profile photo

Profile photo

Who am I?

I am the Information Technology and Numeracy Coordinator at the Near North DSB currently working on the Ministry of Education's CLIPs project (see http://www.oame.on.ca/clips).

This feed widget is undefined.

An example text box

This is a text box on your profile.

Blog

The blog entries here are automatically published from http://mathfest.blogspot.com.

Blog :: Ross Isenegger

http://mathfest.blogspot.com/2008/09/how-does-flash-pass-control-as-

One of the pleasures of working on CLIPS is the chance to work with some top-notch Ontario educators, like Greg Rodrigo of Georgian College. As part of this summer's work, we we trying to figure out how actionscript is executed as control is passed to different frames and the onEnterFrame method is called. Greg created a little test file similar to the following:

Create seven keyframes and put the following code in each frame:
  1. XonEnterFrame= function() {
    trace("I am on frame " + _currentframe);
    }
    trace("Frame 1");

  2. gotoAndPlay(4);
    gotoAndPlay(3);
    trace("Frame 2");

  3. trace("Frame 3");
    gotoAndPlay(5);

  4. trace("Frame 4");
    gotoAndPlay(1);

  5. trace("Frame 5");

  6. trace("Frame 6");
    delete onEnterFrame;

  7. stop();
    trace("Frame 7");
So here is what the teacher would ask you to do:
Determine what Flash's output window will contain when this file is tested.
We learned a lot about how Flash operates by trying to make this prediction.

STOP: Try it yourself now.






If that question is too hard or open-ended, here are some other questions that might be simpler:
  1. What will the output be the first time the onEnterFrame method is executed?
  2. Will the first output "Frame 2" occur before or after the first output "Frame 4"?
  3. Why does "I am on frame 5" not appear in the output window? (I am not sure what the answer to this question is, so perhaps it is not simpler.)
Please feel free to leave a comment about the last question.

If you don't feel like typing this in yourself, I have posted the .fla source file.

Posted by Ross Isenegger | | 0 comment(s)

An example Generic Widget Box