# Simple \_global not working!

**URL:** https://forum.kirupa.com/t/simple--global-not-working/29522
**Category:** flash
**Created:** [August 27, 2003, 7:43pm UTC](https://forum.kirupa.com/t/simple--global-not-working/29522 "2003-08-27T19:43:15Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![earph](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/earph/32/79_2.png) [@earph](https://forum.kirupa.com/u/earph)
#### Post date: [August 27, 2003, 7:43pm UTC](https://forum.kirupa.com/t/simple--global-not-working/29522/1 "2003-08-27T19:43:15Z")

</div>

This is plain and simple, why is it not working?

BUTTON

```auto
_global.section = "GettingStarted/GettingStarted.swf";

```

\_ROOT FRAME

```auto
_root.loadBox.loadMovie(section);

```

Thanks ahead of time!

---

<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: [August 27, 2003, 7:58pm UTC](https://forum.kirupa.com/t/simple--global-not-working/29522/2 "2003-08-27T19:58:43Z")

</div>

what frame? When is that frame run? AFTER the button is pressed?

---

<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: [August 27, 2003, 8:43pm UTC](https://forum.kirupa.com/t/simple--global-not-working/29522/3 "2003-08-27T20:43:25Z")

</div>

Try to

```auto
trace (section) ;

```

before loading the movie 🙂

---

<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: [August 28, 2003, 4:21pm UTC](https://forum.kirupa.com/t/simple--global-not-working/29522/4 "2003-08-28T16:21:00Z")

</div>

I’m gonna change the code on you real fast, but it’s the same situation.

My \_root is stopped on a frame which has this code:

```auto
_root.titleBox.attachMovie(title,"newtitle",1);

```

The buttons has this:

```auto
_global.title = "gettingStartedTitle";

```

When the button is pressed, the \_root does not move, it stays “stopped” in that frame.

I don’t understand why some of my \_globals will work when stopped in a single frame, but others won’t. All this was working before… I don’t know what has gone wrong.

I can provide the souce if you like…

I appreciate the help.

---

<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: [August 29, 2003, 2:34pm UTC](https://forum.kirupa.com/t/simple--global-not-working/29522/5 "2003-08-29T14:34:18Z")

</div>

When you try tro reference title is is looking for \_root.title. Try prefacing it with \_global.  
[AS]\_root.titlebox.attachMovie(\_global.title,“newtitle”,1);  
[/AS]

That should do it.

---

<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: [August 29, 2003, 7:12pm UTC](https://forum.kirupa.com/t/simple--global-not-working/29522/6 "2003-08-29T19:12:03Z")

</div>

Sorry Rolando… that didn’t work either. I’ve attached an example so all you peeps can see how weird these \_globals are acting.

Check it out.

---

<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: [August 29, 2003, 8:28pm UTC](https://forum.kirupa.com/t/simple--global-not-working/29522/7 "2003-08-29T20:28:28Z")

</div>

skillet,  
Because you have

```auto
_root.titleBox.attachMovie(_global.title,"newtitle",1);

```

in the first frame it only happens upon loading the file. When you click one of the buttons the \_global is set but nothing else happens. Put the above code in the on(release) command of each button.

---

<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: [August 29, 2003, 8:50pm UTC](https://forum.kirupa.com/t/simple--global-not-working/29522/8 "2003-08-29T20:50:04Z")

</div>

Ah, I see, but in that case, it’d probably just be easier to do it this way.

```auto
_root.titleBox.attachMovie("movieTitle1","newtitle",1);

```

Less code… No reason to set a \_global if it’s going to excute on the very next line of code.

I appreciate all the help!
