# Absurd undefined variable

**URL:** <https://forum.kirupa.com/t/absurd-undefined-variable/218547>\
**Category:** Uncategorized\
**Created:** [March 8, 2007, 5:49pm UTC](https://forum.kirupa.com/t/absurd-undefined-variable/218547 "2007-03-08T17:49:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arrovellio](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@arrovellio](https://forum.kirupa.com/u/arrovellio)\
**Post date:** [March 8, 2007, 5:49pm UTC](https://forum.kirupa.com/t/absurd-undefined-variable/218547/1 "2007-03-08T17:49:59Z")

</div>

[FONT=Arial]Hello everyone.[/FONT]  
[FONT=Arial]I have trouble with an undefined variable.[/FONT]

[FONT=Arial]I have three movieclips ([COLOR=blue] **a** [/COLOR],[COLOR=blue] **b** [/COLOR],[COLOR=blue] **c** [/COLOR]):[/FONT]  
[FONT=Arial]**[COLOR=blue]b[/COLOR]** scrolling limits are “controlled” by variable **[SIZE=3]“i”[/SIZE]** setted in **[COLOR=blue]a[/COLOR]**.[/FONT]  
[FONT=Arial][COLOR=blue] **c** [/COLOR] is a movieclip that must appear only for a certain value of [SIZE=3] **“i”** [/SIZE] established as follow.[/FONT]

[FONT=Arial][COLOR=blue] **a** [/COLOR] has this script:[/FONT]  
[FONT=Arial]**onClipEvent (mouseDown) {**[/FONT]  
**[FONT=Arial]if(this.hitTest(\_root.\_xmouse,\_root.\_ymouse,false) ){[/FONT]**  
**[FONT=Arial]if (\_parent.i \< 50) {[/FONT]**  
**[FONT=Arial]\_parent.scrolling.fine -= 96;[/FONT]**  
**[FONT=Arial]\_parent.i++;[/FONT]**  
**[FONT=Arial]}[/FONT]**  
**[FONT=Arial]}[/FONT]**  
**[FONT=Arial]}[/FONT]**

[FONT=Arial]In the first frame of main timeline is written:[/FONT]  
[FONT=Arial] **i=1;** // to let limits of scrolling movie [/FONT]

[FONT=Arial]And adding:[/FONT]  
[FONT=Arial]**if (i=1) {**[/FONT]  
**[FONT=Arial]mc.\_alpha=100; }[/FONT]**  
**[FONT=Arial]else {mc.\_alpha=0;}[/FONT]**

[FONT=Arial]it doesn’t work![/FONT]

[FONT=Arial][COLOR=blue] **c** [/COLOR] is visible but, after clicking on a to scroll [COLOR=blue] **b** [/COLOR], [COLOR=blue] **c** [/COLOR] remains still visible (while, [SIZE=3] **“i”** ,[/SIZE] that lets scrolling, has changed to 2).[/FONT]

[FONT=Arial]How can I resolve, please?[/FONT]

[FONT=Arial]Thank you very much.[/FONT]
