dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Help! Global Variables Undefined....

  1. #1
    Junior Member
    Join Date
    Feb 2007
    Posts
    1

    Help! Global Variables Undefined....

    Hello all,

    Im having a problem with global variables being recognized.

    I have a file that has a couple global variables declared. This file loads in other movies using loadmovie function onto different levels (5 and 10). When I try to use or trace the global variables from these loaded in movies the globals are not being recognized. Any ideas? Thanks

    code on control.fla (loads in other movies)
    _global.keysFound = 0;
    _global.bcFound = "no";

    code on coupon.fla (loaded in on level 5)
    trace(_global.keysFound);
    if (_global.keysFound == 0)
    {
    coupon2._visible = true;
    }
    else
    {
    coupon2._visible = false;
    }

  2. #2
    Captain
    Join Date
    Oct 2005
    Posts
    63

    Anyone?

    I wonder about the same thing!!

  3. #3
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    i cannot get global variables to fail
    see attached file
    Last edited by a_modified_dog; 09-23-2007 at 05:55 PM.

  4. #4
    Captain
    Join Date
    Oct 2005
    Posts
    63

    the "_global" operator

    ...So I see that you do not include the _global-prefix when referencing the global variable... is that not necessary? I use to do that with good results normally...

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