# \_global. help

**URL:** https://forum.kirupa.com/t/-global-help/64087
**Category:** flash
**Created:** [September 13, 2004, 5:58am UTC](https://forum.kirupa.com/t/-global-help/64087 "2004-09-13T05:58:37Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![PtrckL](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@PtrckL](https://forum.kirupa.com/u/PtrckL)
#### Post date: [September 13, 2004, 5:58am UTC](https://forum.kirupa.com/t/-global-help/64087/1 "2004-09-13T05:58:37Z")

</div>

Hi,  
I’m new to actionscript and I am having trouble with the \_global command. I have a script within a movie clip that is supposed to define \_global.firstload on release of said movie clip.

```auto
 
on (release) {
_root.gotoAndPlay(39);
_global.firstload = "info";
}

```

For some reason \_global.firstload = “info” does not seem to set the global variable, or atleast in root. The \_root.gotoAndPlay(39) works so I know the on(release) is working. I don’t recieve an error in output about \_global.firstload = “info”, but when I used trace(\_global.firstload), the variable comes out to be undefined. Im trying to use this in conjunction with:

```auto
_root.contents.loadMovie(_global.firstload+".swf");

```

Is there something wrong with the script or does \_global not effect root while used within a movie clip? Thanks.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 13, 2004, 6:02am UTC](https://forum.kirupa.com/t/-global-help/64087/2 "2004-09-13T06:02:16Z")

</div>

in my experiences \_global has always been buggy. just use \_root.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 13, 2004, 6:09am UTC](https://forum.kirupa.com/t/-global-help/64087/3 "2004-09-13T06:09:37Z")

</div>

> [@rysolag](#):
>
> in my experiences \_global has always been buggy. just use \_root.

Just changed it to:

```auto
 
on (release) {
 _root.gotoAndPlay(39);
 _root.firstload = "info";
}

```

But trace(\_root.firstload) still comes out to be undefined.:sigh:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 13, 2004, 7:30am UTC](https://forum.kirupa.com/t/-global-help/64087/4 "2004-09-13T07:30:19Z")

</div>

can you post your fla. file somewhere?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 14, 2004, 3:35am UTC](https://forum.kirupa.com/t/-global-help/64087/5 "2004-09-14T03:35:13Z")

</div>

Anyone know a good place to upload the fla to? The fla file is too big for my hosting.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 4, 2004, 8:10pm UTC](https://forum.kirupa.com/t/-global-help/64087/6 "2004-10-04T20:10:49Z")

</div>

try having the move to the \_global. before the gotoAndPlay. It’s worth a shot.
