I need help with coding/scripting buttons (multiple questions)

  1. how do i make it so that when the animation starts it just shows a button and when you click it the actual animation starts plays

  2. are preloaders possible, and if so, how do i make one?

  3. at the end i want it to loop at the end and have a button to restart the animation from the begining. how do i do that?

plz help

This is really simple, you are going to have a frame before your animation and create the button art, after that you will click on it and make it into a clip. In the clip you go to the mouse down function and type this code

gotoAndStop(2);

But you are not done with the first frame yet, this time click on the frame make it into a script and go to the default one and type

stop();

This is the same for the end of the animation, just make a frame after your animation. DO NOT FORGET THE STOP(), it will play to the next frame without pressing anything and the button will be useless.

This is pretty easy stuff

Also, by preloaders, do you mean to preload the animation? I mean, if you are coding default scripts, run right when pressing play. But I don’t think you can preload animations

Also, I know this is late compared to my other replies, but if you need anything or are confused, you can let me know :)

tysm bro (10 characters)