---
title: "Variabelproblem"
type: "forum-thread"
url: "https://www.webforum.nu/amne/flash/137142-variabelproblem"
topic: "Flash"
topic_url: "https://www.webforum.nu/amne/flash"
author: "NEOLiNES"
published: "2005-11-07T20:48:02.000Z"
updated: "2005-11-07T20:48:02.000Z"
replies: 0
views: 256
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/flash/137142-variabelproblem"
---

# Variabelproblem

## #1 — NEOLiNES, 2005-11-07T20:48Z

Jag vill att varje knapp ska animeras om värdet innehåller **1**, men jag lyckas bara att **alla knappar** att animeras hela tiden :S

Varje "knapp" har var sitt eget "instance-namn" dvs. ico_guestbook, ico_mail osv.

**Länk:** <http://utveckling.odibonk.se/comSTATUS/flash.asp>

**Kod**

```php
text_guestbook	= 1
text_mail		= 0
text_friends	= 0
text_forum		= 1

if (text_guestbook == 1) {
	ico_guestbook.gotoAndPlay(2);
}
else {
	ico_guestbook.stop();
}
if (text_mail == 1) {
	ico_mail.gotoAndPlay(2);
}
else {
	ico_mail.stop();
}
if (text_friends == 1) {
	ico_friends.gotoAndPlay(2);
}
else {
	ico_friends.stop();
}
if (text_forum == 1) {
	ico_forum.gotoAndPlay(2);
}
else {
	ico_forum.stop();
}
```

Permalänk: https://www.webforum.nu/p/137142

---

Tråden på webben: https://www.webforum.nu/amne/flash/137142-variabelproblem
