It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Flash Forum

Options Screen - Navigation Issues

Moderator: Phate

Options Screen - Navigation Issues

Postby robtyketto on Thu Mar 15, 2007 12:16 pm

Hi, I’m a newbie and now learning flash in a school project to right a simple game (pong with a football theme) in Flash mx 2004.

I've designed a title page that has a menu on the right hand side containing buttons, within action script I've added code so when each button ("Instructions", "options" or "about") is clicked they load in a flash movie file into the position of my defined movie clip which is to the left hand side of the buttons and is basically a square shape with some text in.

This is all working fine, now I’ve hit a brick wall as my Option page requires some user interaction that I don’t know how it can be achieved using the standard up, over and down.

Firstly I need a way of being able for the user to select parameters of the game for difficulty (easy, medium or hard), sound volume (0 - 100) etc.., and then store these values into variables.

I guess this could be done in a number of ways

a) Left and right arrows allowing selecting choices
b) All choices displayed but only one highlighted and allow mouse to select another.
c) Have one label that when clicked upon changes the option i.e. 2 clicks needed to jump from easy to hard.

I’m also concerned as I’ve used embedded swf files if this will complicate me passing the variables into my game.

Any thoughts, ideas and suggestions of how i could setup this screen would be greatly appreciated.

Even if it just the basics or pointing me in the right direction, would all be very helpful to me. Thanks.
robtyketto
 
Posts: 4
Joined: Thu Mar 15, 2007 12:12 pm

Postby flabbyrabbit on Thu Mar 15, 2007 6:07 pm

Well my first question would be why have you got each section load a movie clip, why isnt it all in one? If it was all in one then the whole process would be made a lot easier.

Flabby Rabbit
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England

Postby robtyketto on Thu Mar 15, 2007 7:05 pm

Thanks for the reply.

Initially my pages (rectangle box with text in drawn in flash) were assigned to the 'Down' function which then displayed the contents (A new layer was created to hold the page images).

However, the user would have to hold the mouse button down to display the page. If the user released the button the page would disappear.

So after some thinking and browsing the web I choose to assign a load a movie file on the button 'Down' status. The page would only then dissapears when the user clicks on anoher button.

I was limited by knowledge of flash to incorporate a better solution, open to any recommendations.

I would like to keep it as simple as possible, so if you could explain in more detail how to simplify my project would be much appreaciated.

Thanks.
robtyketto
 
Posts: 4
Joined: Thu Mar 15, 2007 12:12 pm

Postby flabbyrabbit on Fri Mar 16, 2007 11:41 am

Well the simplest idea I was thinking of was just having like 3 key frames all exactly the same except for the content you wanted to change. Then onClick gotoFrame(2); or what ever. That is probably how i would have done it and not complicated it by using extra MovieClips.

Flabby Rabbit
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England

Postby robtyketto on Fri Mar 16, 2007 11:55 am

Thats sounds like a plan, thanks I can't believe I didnt think of that.

Will also label the keyframes too, had an idea of how to use buttons (left & right arrows) to populate a text box which will allows user to select game dfficulty etc..,

Let see how I get on, your advice was much appreciated.
robtyketto
 
Posts: 4
Joined: Thu Mar 15, 2007 12:12 pm

Postby flabbyrabbit on Fri Mar 16, 2007 8:32 pm

Well to select the difficulty level why dont you just have three buttons (easy, medium, hard) and when one is selected the others are deselected? Btw you say your doing this for a school project, what year are you in?! I never got to do this sort of stuff at school :(

Flabby Rabbit
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England

Postby robtyketto on Fri Mar 16, 2007 8:45 pm

Im at University (2nd year), I used the term school as though it would be a more recognised term for non-uk residents.

I used the arrows Idea in the end with the following code, however I thnk it looks alittle sloppy and long:-

Options Keyframe upon entering the screen
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DifficultyLevel.text = "Medium";
DifficultyLevel.variable = level;

stop();


Script assigned to the right button
~~~~~~~~~~~~~~~~~~~~~~
on (release)
{
if (level == "Medium") {
level = "Hard";
DifficultyLevel.text = level; }
else if (level == "Easy") {
level = "Medium";
DifficultyLevel.text = level;}
}

Still cant get my menu setup as I would like as the title page contains the menu (buttons on the right hand side).

I cannot find a way to place the menu item screen images on top of the background when the user select an option.

Easier to see in a copy of my flash file.


Thanks
robtyketto
 
Posts: 4
Joined: Thu Mar 15, 2007 12:12 pm

Postby flabbyrabbit on Fri Mar 16, 2007 9:19 pm

Want to send me a copy of your .fla so i can mess around abit, im interested to see how you have done thing (nosmo-kings@hotmail.com).

Ok i see about the school thing, what course you doing then? See im in my first year of 6th form and i have taken a computing course which deals mainly with pascal/delphi (not that i have learnt anything new as of yet as i have been coding in pascal for somtime), but im wondering what to do after i have left 6th form.

Flabby Rabbit
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England


Who is online

Users browsing this forum: No registered users and 0 guests