# The World According to VAR... or why the -snip- it doesn't work (F5)

**URL:** <https://forum.kirupa.com/t/the-world-according-to-var-or-why-the-snip-it-doesnt-work-f5/19889>\
**Category:** flash\
**Created:** [May 2, 2003, 3:00pm UTC](https://forum.kirupa.com/t/the-world-according-to-var-or-why-the-snip-it-doesnt-work-f5/19889 "2003-05-02T15:00:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericinho](https://avatars.discourse-cdn.com/v4/letter/e/9dc877/32.png) [@ericinho](https://forum.kirupa.com/u/ericinho)\
**Post date:** [May 2, 2003, 3:00pm UTC](https://forum.kirupa.com/t/the-world-according-to-var-or-why-the-snip-it-doesnt-work-f5/19889/1 "2003-05-02T15:00:03Z")

</div>

picture this:

on the root:

1 SWF loaded, 1 MC called CONTENT

the SWF contains 3 buttons, on Release it loads another SWF into that content MC.  
it also sets a VAR called thumbkids and it’s set to 1 or 2 or 3 (depending on which button you press)

on (release) {  
\_root.nextMovie = “externalswf.swf”;  
\_root.cover.gotoAndPlay(“close”);  
\_root.thumbkids = “1”;  
}

* * *

inside the to be loaded ‘externalswf.swf’ there is the following action:

if (\_root.thumbkids = “1”) {  
\_root.content.gotoAndStop(“4”);  
}  
if (\_root.thumbkids =“2”) {  
\_root.content.gotoAndStop(“5”);

}  
if (\_root.thumbkids = “3”) {  
\_root.content.gotoAndStop(“6”);

}

else {  
\_root.content.gotoAndStop(3);  
}

* * *

so after loading the swf goes automatically to that frame and the var should make sure that it goes to the correct frame…

but as you guessed already, it doesn’t work ☹

i am fairly weary, so I am surely missing an easy solution, so your help is much appreciated

---

<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:** [May 2, 2003, 3:15pm UTC](https://forum.kirupa.com/t/the-world-according-to-var-or-why-the-snip-it-doesnt-work-f5/19889/2 "2003-05-02T15:15:33Z")

</div>

it should be:

if(\_root.thumbkids == “2”)

there should be two =s

---

<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:** [May 2, 2003, 3:49pm UTC](https://forum.kirupa.com/t/the-world-according-to-var-or-why-the-snip-it-doesnt-work-f5/19889/3 "2003-05-02T15:49:15Z")

</div>

yeah, figured that out as well, but still doesn’t work.

it constantly plays the ‘else’ path…

shouldn’t I put in the first if action an ‘else if’ instead of an if

???

---

<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:** [May 2, 2003, 5:43pm UTC](https://forum.kirupa.com/t/the-world-according-to-var-or-why-the-snip-it-doesnt-work-f5/19889/4 "2003-05-02T17:43:13Z")

</div>

have you tried:

switch (\_root.thumbkids) {  
case 1:  
\_root.content.gotoAndStop(“4”);  
break;  
case 2:  
\_root.content.gotoAndStop(“5”);  
break;  
case 3:  
\_root.content.gotoAndStop(“6”);  
break;  
default:  
\_root.content.gotoAndStop(3);  
}

---

<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:** [May 2, 2003, 5:44pm UTC](https://forum.kirupa.com/t/the-world-according-to-var-or-why-the-snip-it-doesnt-work-f5/19889/5 "2003-05-02T17:44:01Z")

</div>

Sorry all my tabs got messed up
