# Switch .... Case help wanted

**URL:** <https://forum.kirupa.com/t/switch-case-help-wanted/139347>\
**Category:** Uncategorized\
**Created:** [March 2, 2005, 11:36am UTC](https://forum.kirupa.com/t/switch-case-help-wanted/139347 "2005-03-02T11:36:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bart\_weijts](https://avatars.discourse-cdn.com/v4/letter/b/34f0e0/32.png) [@bart\_weijts](https://forum.kirupa.com/u/bart_weijts)\
**Post date:** [March 2, 2005, 11:36am UTC](https://forum.kirupa.com/t/switch-case-help-wanted/139347/1 "2005-03-02T11:36:56Z")

</div>

[size=3][font=Times New Roman]Hi, could anybody help me with a little actionscript problem?[/font][/size]  
[font=Times New Roman][size=3]I have a variable called num, and on a button press it gets it value, 0,1,2,3,etc.[/size][/font]  
[font=Times New Roman][size=3]And when the timeline gets to a certain point it has to play two movies, (depending on the value of num), but how can I formulate two Telltarget statments in one case. I used the next action script, but it’s not working :h: [/size][/font]

[font=Times New Roman][size=3]Please help!![/size][/font]  
[size=3][/size]  
[size=3][font=Times New Roman]switch(num){[/font][/size]  
[size=3][font=Times New Roman]case 0 : gotoAndStop(1);[/font][/size]

[size=3][font=Times New Roman]case 1 : tellTarget ("/Menu") {[/font][/size]

[size=3][font=Times New Roman]gotoAndPlay (“open2”);[/font][/size]

[size=3][font=Times New Roman]}[/font][/size]

[size=3][font=Times New Roman]tellTarget ("/Menu/Sport"){[/font][/size]

[size=3][font=Times New Roman]gotoAndPlay(“open21”);[/font][/size]

[size=3][font=Times New Roman]}[/font][/size]

[size=3][font=Times New Roman]case 2: ……….etc[/font][/size]

[size=3][font=Times New Roman]case 3: ……….etc[/font][/size]

[font=Times New Roman]}[/font]
