LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 591 users online 225156 members 1205 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Memberlist | Dictionary | News | FAQ
Member Spotlight
etf1249
Peeves: bad spelling and grammar :D short text...
Mood: Sleepy
You have 1 new message.
Emergency Help
Until you sign up you can't do much. Yes, it's free.

Sign Up Now
Membername:
Password:
Already have an account?
Invite Friends
Active Members
Groups
Contests
Moderators
7 online / 22 MPM
Fresh Topics
  LiveWire / Technical Forums / Programming & Application Development / Adding Reply

Quoting Post
Archived Topic: It will not be bumped to the top of the forum.
Topic I need actionscript help!
Membername   Not a member? Sign Up Free (takes 20 seconds)
Password   Forgotten your password?
Post

Font:   Size:   Color:

FAQ Keyword Search:
Post Options
Favorites Manager
Notify me of new replies to this topic by email
Notify me of new replies to this topic by private message
Original Post
PiXiE Posted at 4:01 pm on Mar. 13, 2005
I'm having trouble with a loop. I have 17 buttons, instance names are button1, button2, button 3, etc.
Each button needs to go to a different frame, those are labeled as part1, part2, part3, etc.

This code only works for buttons 10-17:
Code:
for (i=1; i<=17; i++) {
_root["button"+i].onPress = function() {
myVar = getProperty(this, _name);
getCharacter = myVar.charAt(6);
getCharacter2 = myVar.charAt(7);
if (getCharacter2>=1) {
gotoAndStop("part"+getCharacter+getCharacter2);
} else {
gotoAndStop("part"+getCharacter);
}
};
}

I believe it is a problem with my if and else statements. Can anyone help?

Replies
Sol Posted at 9:19 pm on Mar. 31, 2005
You mean I'm not the only one who struggles with actionscript?

Hmm, since you have it figured out I dont have to screw my gray matter trying to figure out whats wrong here.

I wonder how many people on lw are familar with actionscript.

I'd like to have someone who can share my misery and kiss my boo boos when Flash kicks my butt.

PiXiE Posted at 4:12 pm on Mar. 13, 2005
Haha, so true. They are just in it for the points. DAMN THEM!
lauriebebe91 Posted at 4:09 pm on Mar. 13, 2005
Flash can be a pain.  This is the first time I've seen anyone make a topic in here, I was waiting for people to respond and go "I DONT KNOW WHAT YOURE TALKING ABOUT", because people on here seem to find it neccessary to let everyone know when they don't understand a topic.
PiXiE Posted at 4:08 pm on Mar. 13, 2005
Nevermind! I figured it out. I had changed the names of the labels while playing around and forget to switch them back.

I hate flash.

All 4 previous replies displayed.