Thursday, 20 September 2012
Flash cs6: basic code for page buttons
The picture above is just a simple design for buttons for a webpage, including the code that I used to link the buttons to the different pages(frames in this case), this was my first time in making this in flash but was simple and easy to do.
the code:
stop();
onebtn.onPress = function(){
gotoAndStop(1)
};
twobtn.onPress = function(){
gotoAndStop(2)
};
threebtn.onPress = function(){
gotoAndStop(3)
};
fourbtn.onPress = function(){
gotoAndStop(4)
};
I only had to write the first part then it was just copying and pasting and just changing a few letters and a number I did that for all four pages, If I didn't have the "stop();" at the top then the five frames would just loop, to stop on each frame I had to make the buttons stop on each frame for the different pages.
Subscribe to:
Post Comments (Atom)
After reading a diverse group of articles on "Reuse/Repurpose your old smart phone," I decided to repurpose the old S2 for the 3 year old GBaby. She tinkers with the iPad, Kindle, Chromebook, and our phones as I support her being platform agnostic...but this is her device.
ReplyDeletevumoo