View Full Version : Whats wrong with this action script?
zeka
February 11th, 2004, 12:10 AM
I have a mc called display and I have a button. This button is inside another mc.When the button is pressed i want the movieclip mc to go to frame label "tv" (obviously with out the quotation marks). this is what i have
on (release) {
_root.display (gotoAndPlay ("tv");
}
why is this not working? :huh:
upuaut
February 11th, 2004, 01:00 AM
hey zeka and welcome to action script. Are you ready to kick yourself??? :)
on (release) {
_root.display (gotoAndPlay ("tv"));
}
gotta remember to close those parenthesis. :)a
dont' worry about it though.. the day before yesterday I spent 5 hours working on a php error only to find out that I was using a variable "Verify" in some places and a "verify" in others'. Using Arial font.. the capitol and lower case v look almost identical. You can't believe how I screemed when I saw my error.
lostinbeta
February 11th, 2004, 01:04 AM
It should be on (release){
_root.display.gotoAndPlay("tv");
}
Your gotoAndPlay statement was executed improperly.
zeka
February 11th, 2004, 01:08 AM
cant get it to work. ill attach it.
zeka
February 11th, 2004, 01:09 AM
hate that :trout:
upuaut
February 11th, 2004, 01:16 AM
oh man.. lost.. what the heck is up with my head today. I was so concentrated on the missing paran I missed the fact that the code was just plain wrong.
alright.. that's it, I'm giving up crack for good this time.
(please excuse my brain fart.. I have no clue why I missed that.)
zeka
February 11th, 2004, 01:29 AM
so... Whats wrong with it?
lostinbeta
February 11th, 2004, 01:30 AM
You know what david, don't even worry about it. WHen I first looked at the post, offhand I saw a missing parenthesis... but then I realized... "why is there an open parenthesis before a gotoAndPlay?" and I took a second glance and realized the problem.
:)
lostinbeta
February 11th, 2004, 01:32 AM
Originally posted by zeka
so... Whats wrong with it?
Oop
Just loooked at your .fla
The problem is first because of what was just stated... and second because you can't use numbers as frame labels. A frame label can contain a number, but it cannot just be, or start with a number.
zeka
February 11th, 2004, 01:42 AM
can you please post the fla?
EDIT : dont worry, got it to work
lostinbeta
February 11th, 2004, 01:47 AM
What do you need me to post the .fla for?
The on(release) code is in my previous post (3rd post from the top) and the rest is changing the frame labels so they aren't plain numbers. Like changing "1" to "f1" or whatever.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.