A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: what does this Actionscript code mean?

  1. #1
    Junior Member
    Join Date
    Aug 2008
    Posts
    6

    what does this Actionscript code mean?

    Could someone tell me what this code means? (Actionscript 2.0)

    On the maintime I have this code on frame 1
    _root.g_page = 0;
    _root.page = 0;

    then this code is attached to a button
    on (release)
    {
    _root["b" + _root.g_page].gotoAndPlay("s2");
    _root.g_page = 1;
    _root.page = 1;
    _root.play();
    _root["b" + _root.g_page].gotoAndStop("s3");

    I am trying to figure out especially what this g_page means. From looking through this template I purchased it appears to be a variable declared from the main time line. However, I get confused when I see...

    _root.g_page = 0;
    _root.page = 0;

    Could someone explain the code above and tell me how "_root.g_page = 0;" and "_root.page = 0;" are related to one another (or if they are related).

    I would appreciate your help!

  2. #2
    Junior Member
    Join Date
    Aug 2008
    Posts
    3
    It just looks like they are two variables to me, but with a similar name, likely they have a similar task. Without seeing the whole project it's hard to say ther exact role.

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