I'm trying to make an iphone app, and was wondering what is the best way around in making Menus for it?
For example upon loading the app, the user is being sent to the main page, if the user would like to change the options for the app (such as turning off sounds or lowering graphic quality), should this "Options" page be made in a new frame of the timeline? Or perhaps a new scene? And I believe there's a way to doing this via writing Actionscript classes.
For what I have done is to have an invisible object that becomes visible with a mouseEvent. But to be honest the best option is to not use the timeline, is better do it all with code. Frames changes are not smooth.
I have worked on a project, in which there are numbers of menues, and are changing for some particular events. That application is on apple app store now.
I want to suggest you to use purely class code, frame code is not as good, and if possible use vector graphics instead of movieclips, because vector is much lighter than movieclip. And if you have any loading issue, than load everything initially and make it invisible, you just have to manage visiblity ON and OFF on mouseEvents.
I make menus like this a lot. Pure class code is much better than what I am going to suggest. I fully agree with esdebon on his statement about frame changes. In case you do want to use frames this is what you do. create a seperate keyframe and name the frame menu. You could have a frame menu and a frame play. Don't create a frame for credits, rules, sound control, etc. That can all be handled within the menu frame. I know this isn't seamless like esdebon mentioned, but it does cut down on the use of frames. Have everything set in the menu page in functions, so if the user clicks credits they will have hit the credit.addEventListener(MouseEvent.CLICK,credits); and will be in the credits function. When someone clicks on credits you don't want the main menu to be showing so you will want to make those objects invisible or remove them altogether with removeEventListener and removeChild. the credits function should have everything you need for credits, including a button that takes them back to the menu function.
I know that someone is going to say this is sloppy code, but it is much better than creating ten frames when you can do it all in two frames or in one frame. You could have the play function on the same frame as the menu. When the user clicks play they would be sent to the play function and just work with everything on one frame. Classes are really the way to go if you are going to do this, but you brought up frames so I addressed frames. Do not create another scene. That is very expensive. When I say expensive I mean in terms of resources.
I hope my ramble was helpful. If you need classes covered, let us know.
That is definitly helpful Z, but I'll try and stick with classes seeing that it's more optimal. Would you happen to know any tutorial resources in creating menus with OOP? I'm still quite new with OOP let alone creating classes, I came from a background where actionscripting is all done on frames.
Europe, Middle East and Africa