A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: [F8] Variables

  1. #1
    Back to FK Boards!
    Join Date
    Apr 2006
    Location
    Troy
    Posts
    234

    [F8] Variables

    So if I was to make a variable correctly on the timeline like this:

    var stuff:Number = 1;

    how could I make so a MC could call that variable?

    like this:

    onClipEvent(load){
    stuff += 1;
    }

    I try that, but it doesn't work.
    Email: Jacktown012@aim.com
    AIM: jacktown012
    MSN: megafire987@hotmail.com

  2. #2
    Junior Member
    Join Date
    Apr 2007
    Posts
    23
    Try:
    Code:
    onClipEvent (load) {
    _root.stuff += 1;
    }

  3. #3
    Back to FK Boards!
    Join Date
    Apr 2006
    Location
    Troy
    Posts
    234
    I did, still didn't work....
    Email: Jacktown012@aim.com
    AIM: jacktown012
    MSN: megafire987@hotmail.com

  4. #4
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    did you placed the previous code on a movieClip?

  5. #5
    Back to FK Boards!
    Join Date
    Apr 2006
    Location
    Troy
    Posts
    234
    what do you mean? ok just look at the attached file:
    Last edited by Dark Cloud; 10-07-2007 at 07:22 PM.
    Email: Jacktown012@aim.com
    AIM: jacktown012
    MSN: megafire987@hotmail.com

  6. #6
    Back to FK Boards!
    Join Date
    Apr 2006
    Location
    Troy
    Posts
    234
    as you can see i have:

    mario

    health

    enemy

    i want to make a variable on the main timeline so that way i can have every enemy call that variable.
    Email: Jacktown012@aim.com
    AIM: jacktown012
    MSN: megafire987@hotmail.com

  7. #7
    Back to FK Boards!
    Join Date
    Apr 2006
    Location
    Troy
    Posts
    234
    ok i figured it out YET again by myself. i just had to add _global
    Email: Jacktown012@aim.com
    AIM: jacktown012
    MSN: megafire987@hotmail.com

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