-
Hi,
This might sound a bit confusing but it's a simple setup:
I have 2 graphics that when clicked on go to the same location on the screen. Only 1 can be at that location.
I converted them to buttons. I set it up so that if graphic 1 is clicked on then the result is displayed on layer 10 and if graphic 2 is clicked on the result is displayed on layer 20.
My problem is, I have a final button that when clicked needs to show the result of which graphic was clicked on but the problem is that I have both on the timeline. So if I say go to frame 30, and I insert a frame on all layers then I'll get the result of the graphic in the latest frames in this case frame 20.
Not sure how to get around this. Thanks for your help.
-
United States Presidential Hopeful in 2028
I'm not sure exactly what you are trying to do, but you'll probably need to use variables. Have the button press set a variable to 1 or 2 depending on the button that was pressed. Then in the end you can evaluate the variable to determine which button was pressed last.
-
Thanks
Thanks. I haven't tried it yet but it sounds like it makes sense. I just needed a general direction on what to do.
-
Button Action
Hi,
I seem to be stuck on some code. The final button that evaluates which of the two buttons has been pressed has the following action:
on (release) {
if (line1="hop") {
gotoAndPlay (30);
} else if (line1="swim") {
gotoAndPlay (35);
}
stop ();
}
When I display the value of the variables, they're correct. The above code doesn't work. The button doesn't do anything.
Also, when I'm setting the variable, I create a variable and give it the following value:
Line1 = " ";
Then for each of the buttons that gets selected, I have the action:
Line1 = "hop"; or
Line1 = "swim";
depending on the button.
Not sure if I'm messing up here.
Thanks for your help.
Thanks for your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|