Can't really understand what you need. Your post doesn't really explain it.
And you are asking volunteers to go somewhere else, check something out, understand it and give you directions. You will probably get more help if you are more clear about what you want to do and what problem you are having.
You want to click the about button and make "this" happen? What is this?
And if you have been able to make something happen when you click the about button, and if what you want to happen is similar to that, then what is the problem doing it again?
I have a movieclip that will make "this" happen. ie the sliding presentation that I want. What I need is the ability to link that movieclip to a clickable button.
I am not asking someone to google answers for me, because I have done that and come up with nothing. I am looking for someone who knows how to make an animation occur after clicking a specified button. http://http://www.youtube.com/watch?v=TeBPvQIamBA&feature=relmfu <-- this link seems to have the general idea, I haven't had success with it yet but it is only a matter of time i suppose.
1 person found this helpful
Is your button an instance of SimpleButton or a MovieClip/Sprite with buttonMode? Do you know how to use an event listener?
If your button has an instance name of myButton and the animated clip has an instance name of myAnimationMovie then something like this:
Of course if things are inside of various other movies or clips then the paths will change.
Is that what you mean?
The guide I recently found and mentioned earlier goes over event listeners. I think that will work, cannot try it out at the moment. There is an image instance of the button, a movie instance of the button (making it glow/blur when clicked), and a button instance. I think I have got it, will post back after I get a chance.
I have been unable to test the event listener so far. I have all of the animations(images sliding) on the main timeline, and I have them divided into sections for each button along with a home section that has everything in its' normal spot. I created a layer named actions and inserted a stop(); at the end of each section. When I test the scene the entire timeline continually loops instead of stopping at the home section. any idea?
I tried putting:
about.enabled = true;
projects.enabled = true;
gallery.enabled = true;
contact.enabled = true;
event.target.enabled = false;
in a keyframe in the actions layer at frame 1...but no luck.
In what manner is there "no luck"? There is generally one way that works and millions that don't. Narrowing down what kind of don't is very helpful for getting to yes.
Now would be the time to add some trace statements to see what might be happening.
So inside your button click function add a line like this:
trace("Clicked on: "+e.target.name);
Also look at what you are telling the playhead to do:
Given the screenshot you show here, is there anything about the words gotoAndStop() that seems like it might not be what you want?
As for the looping I have no idea what could be causing that. If you have a stop in that actions keyframe at 3 or 4 it should stop. When you say test the scene do you mean you publish it or are you only pressing enter to make the timeline play?
Also when you say "scene" are you actually using scenes? If you are using code (especially code that moves the playhead around) you shouldn't use scenes. They can/will mess you up at some point.
Finally looking at your timeline I can't figure out where the buttons are. There aren't any layers that look like they run across all the frames. So in that case you are likely to have many different instances of the buttons and the code might not be available to the button when it needs it and/or vice versa.
I. Saying no luck I just meant that the several guides and posts I have
looked through have not worked for my particular project. I am out of town
till tonight so I will try in a few hours. I have been working from scene1,
and the "buttons" are indeed I stances of the text that is below each photo.
They also have a movie instance.