# Var

**URL:** <https://forum.kirupa.com/t/var/16217>\
**Category:** Uncategorized\
**Created:** [March 22, 2003, 9:09am UTC](https://forum.kirupa.com/t/var/16217 "2003-03-22T09:09:30Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![geedogg](https://avatars.discourse-cdn.com/v4/letter/g/f04885/32.png) [@geedogg](https://forum.kirupa.com/u/geedogg)\
**Post date:** [March 22, 2003, 9:09am UTC](https://forum.kirupa.com/t/var/16217/1 "2003-03-22T09:09:30Z")

</div>

Yes, im stil strugling=)

anyone know how i could incorpotrate a varial i this code witch makes it go on top of the old one. Right now its set to one.  
And then delete the old one?

on (release) {  
var newMc = this.attachMovie(“megmain”,“interface”,1);  
newMc.\_x = 0;  
newMc.\_y = 0;

}

???

---

<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:** [March 22, 2003, 9:21am UTC](https://forum.kirupa.com/t/var/16217/2 "2003-03-22T09:21:51Z")

</div>

How many thread are you trying to create with one single question??? ☹

---

<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:** [March 22, 2003, 9:24am UTC](https://forum.kirupa.com/t/var/16217/3 "2003-03-22T09:24:57Z")

</div>

i figure someone new is online today.  
Its joust that im sooooooooo desperate, ive got my deadline on monday=) and im readin in the flash help file but it dont seem to work=)

---

<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:** [March 22, 2003, 9:35am UTC](https://forum.kirupa.com/t/var/16217/4 "2003-03-22T09:35:32Z")

</div>

Okay… Let me tell you what I think…

First of all, that reason doesn’t justify the multiple threads… I know that there is no rule on that, but I think that is a netiquette…

Having said that, I saw your original thread… and you are not providing all the information that needs whichi we can use to help you…

Let me tell you this… Why not create a sample file and post it so the other people can take a look??? I say sample file because that way you might be able to pinpoint where your problem lies while creating one, and the file size gets smaller…

What do you think??? 😉

---

<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:** [March 22, 2003, 9:47am UTC](https://forum.kirupa.com/t/var/16217/5 "2003-03-22T09:47:47Z")

</div>

heres the file, right now the old one dissapers when the new one is loaded in, i want it to still be there untill the new one has loaded.

i cant get it in the forum, but i put it on the net

[http://www.pro](http://www.pro)\*\*\*\*.com/potofolio/pro6.swf

---

<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:** [March 22, 2003, 9:50am UTC](https://forum.kirupa.com/t/var/16217/6 "2003-03-22T09:50:54Z")

</div>

Um… What’s wrong with the URL??? And What do you want us do with the SWF file??? ☹

---

<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:** [March 22, 2003, 10:05am UTC](https://forum.kirupa.com/t/var/16217/7 "2003-03-22T10:05:14Z")

</div>

it sencored my adress. the\*\*\*\* is suposed to be:

s\_h\_i\_t without the underscores=)

---

<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:** [March 22, 2003, 10:07am UTC](https://forum.kirupa.com/t/var/16217/8 "2003-03-22T10:07:46Z")

</div>

swf so u can see what i mean or u want the.fla?

---

<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:** [March 22, 2003, 11:16am UTC](https://forum.kirupa.com/t/var/16217/9 "2003-03-22T11:16:27Z")

</div>

Yes, please… Otherwise, how could other people know what you have in your file??? :beam:

---

<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:** [March 22, 2003, 11:21am UTC](https://forum.kirupa.com/t/var/16217/10 "2003-03-22T11:21:27Z")

</div>

[http://www.pro](http://www.pro)\*\*\*\*.com/potofolio/pro6.fla

\*\*\*\* = s\_h\_i\_t =)

---

<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:** [March 22, 2003, 11:41am UTC](https://forum.kirupa.com/t/var/16217/11 "2003-03-22T11:41:24Z")

</div>

Hm… Nice one you’ve got there… 😉

I don’t see any old movie staying on the stage though… Where am I looking at???

---

<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:** [March 22, 2003, 11:48am UTC](https://forum.kirupa.com/t/var/16217/12 "2003-03-22T11:48:11Z")

</div>

Thanks=)

no it dont do that here, cus im loading it into \_root now.  
But the thing is, when u push the main menu(the small squears) the old one dissapears and the new one starts. Because the are both loaded in 1. But id like the new one to load in over the old one, so that it builds it self up over it, then when its done, it removes the old one.

Im thinkin it has to be some var on the attach, so if the old one is on 2 the new goes on 3. But i have no idea how to do it?

Is this clear or am i still ramblin?=)

---

<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:** [March 22, 2003, 11:59am UTC](https://forum.kirupa.com/t/var/16217/13 "2003-03-22T11:59:10Z")

</div>

Um… Okay… 😉

You can try this…

Add this in the first frame of main timeline…

```auto
_global.depth = 0;

```

and change you code like this for all of them…

```auto
var newMc = _root.attachMovie("megmain", "interface" + (_global.depth + 1), _global.depth++);

```

This will ensure that the depth where they get attached will be keep going up…

Well… I had to change the new instance name of the movieclip too so that you can use that name to delete the specific movieclip…

Good luck… 😉

---

<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:** [March 22, 2003, 12:03pm UTC](https://forum.kirupa.com/t/var/16217/14 "2003-03-22T12:03:06Z")

</div>

THANKS MAN!!!  
its my portfolio, a big agency is lookin at it monday, so i might get myself a new job=)

So i joust use removeclip to remove it?  
did u change interface\_1 to interface?

---

<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:** [March 22, 2003, 12:15pm UTC](https://forum.kirupa.com/t/var/16217/15 "2003-03-22T12:15:26Z")

</div>

Well… The new instance name… You are using names like this in your movie…

```auto
interface_1
interface
megmain_1
portfoliomain_1
kompetansemain_1
portfoliomain
megmain_1
kompetansemain_1

```

It doesn’t matter what it is as long as you keep track of it… Why did I change it to ‘interface’??? I just copied the script from that button… That’s why… No other reason… 😉  
To remove… Use (the instance name + the depth number). removeMovieClip()… For example, you want to remove ‘kompetansemain\_1’ which is located in depth number 30, then…

```auto
_root.kompetansemain_130.removeMovieClip();

```

something like this??? Check out the debugger while you are doing it to make sure you get the right path for the movieclip…

Good luck for the new job… I hope you get 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:** [March 22, 2003, 12:23pm UTC](https://forum.kirupa.com/t/var/16217/16 "2003-03-22T12:23:09Z")

</div>

Thanks a lot man, uve been to big help!!!

trying to get into as, but i seem to be doing it when there is no time for it:smirk:

---

<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:** [March 22, 2003, 12:28pm UTC](https://forum.kirupa.com/t/var/16217/17 "2003-03-22T12:28:27Z")

</div>

Well… I guess that’s the best time to learn… 😉

Gotta try to go get some sleep… Good luck… and if you got problem, post it up… There are many people who’s gotta help ya… 😉

G’day!!!

---

<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:** [March 22, 2003, 12:56pm UTC](https://forum.kirupa.com/t/var/16217/18 "2003-03-22T12:56:17Z")

</div>

anyone know what this means? or whats wrong?

Scene=kompetanse, Layer=mal, Frame=1: Line 2: ‘)’ or ‘,’ expected  
var newMc = \_root.attachMovie(“megmain”, “megani” + (\_global.depth + 1), \_global.depth++;

---

<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:** [March 22, 2003, 2:31pm UTC](https://forum.kirupa.com/t/var/16217/19 "2003-03-22T14:31:28Z")

</div>

Sorry… I missed the ending parenthesis… :beam:

```auto
var newMc = _root.attachMovie("megmain", "megani" + (_global.depth + 1), _global.depth++);

```

Should work… 😉

---

<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:** [March 22, 2003, 2:33pm UTC](https://forum.kirupa.com/t/var/16217/20 "2003-03-22T14:33:43Z")

</div>

thanks=)

i joust figured it out my self, after houers of plundering:beam:

im not mr iq=)

[Next page](https://forum.kirupa.com/t/var/16217.md?page=2)
