PDA

View Full Version : Start menu help



InfestedDemon
May 7th, 2006, 10:49 AM
Hi, I need help. Me and ocelot are making a game (like xp emulator but not taking the mick) and i need help with the start menu. I have a mc (both with stop) i need some thing that would:

When i click start bring up the menu (both in the mc). I need to be able to put other mc's onto the menu without the start menu closing and i need something that would make the start MENU dissapear (back to frame one). Please help, you WILL be added in credits! :snug:

Joppe
May 7th, 2006, 11:29 AM
How come always when I log on to kirupa.com, go into the game/ai programming forums and look at the threads, I see atleast one thread with your name looking for help? Would it be too much if you looked over the flash help and maybe learnt some basic functions of flash?.. Anyway for your problem you would like something like this


start_btn.onPress = function(){
if(!start){
start_menu._visible = true;
}else{
if(start){
start_menu._visible = false;
}
}
}

InfestedDemon
May 7th, 2006, 11:39 AM
well, i do help a few peeps lol. Anyway, i learn, i spread knowledge :P I'll ask less now because i have natan's thing.

EDIT: It doesn't work

EDIT EDIT: You might not of understood.

I have a movie clip.

Frame one is the start button and frame 2 is start menu. I want it so when you click the start button it goes to the menu

Joppe
May 7th, 2006, 11:52 AM
aye,


start = true;
start_btn.onPress = function(){
if(!start){
start = true;
start_menu._visible = true;
}else{
if(start){
start = false;
start_menu._visible = false;
}
}
}


Well, it would be more organized like this..

InfestedDemon
May 7th, 2006, 11:58 AM
Thanks! But i have one problem, i have a control panel item in my start menu (on the flash :P) and when i highlight that and the other buttons it closes the menu :(

Joppe
May 7th, 2006, 12:02 PM
Mind posting your fla?


And both version of start menu..

InfestedDemon
May 7th, 2006, 12:08 PM
Here.

EDIT: thanks! i did it and deleted the examples

Joppe
May 7th, 2006, 12:18 PM
umm.. like wtf?
And why did you ask for code that you dont use?
And you should also learn to make clean movies.. brrr..

Something like this you want, yes?

InfestedDemon
May 7th, 2006, 03:02 PM
thanks so much, can you help with desktop?>?

Joppe
May 7th, 2006, 03:44 PM
Use an variable.. And .. If you are going for an bit laggy xp, use an onenterframe which constantly checks the variables or you could run an function something like this..


check = function(){
if(desk1){
desk2=false;
desk3=false;
desktop.gotoAndStop(1);
}else{
if(desk2){
desk3=false;
desk1=false;
desktop.gotoAndStop(2);
}
}else{
if(desk3){
desk2=false;
desk1=false;
desktop.gotoAndStop(3);
}
}
}



desk1btn.onPress = function(){
desk1=true;
check();
}

InfestedDemon
May 7th, 2006, 04:33 PM
so what do i have to name what

Joppe
May 7th, 2006, 04:39 PM
Isnt that quite obvious :s
the change desk buttons you name
desk1btn - for first screen
desk2btn - for the second screen
etc
then nothing more ..

InfestedDemon
May 7th, 2006, 04:50 PM
th actionscript aint working

Joppe
May 7th, 2006, 05:07 PM
Ok hm.. try maybe


check = function(){
desk.gotoAndStop(i)
}
deskbtn1.onPress = function(){
i = 1
check();
}
deskbtn3.onPress = function(){
i = 3
check();
}
deskbtn2.onPress = function(){
i = 2
check();
}

nathan99
May 7th, 2006, 07:07 PM
ok, for the first code of jops use;


start = true;
start_btn.onPress = function(){
start = start_menu._visible = !start ? true : false
}



no time for the second ill look lata

nathan99
May 8th, 2006, 03:21 AM
function check(num){
desk.gotoAndStop(num)
}
var totalCount:Number = 1;
while (_root.desk["deskbtn"+totalCount]){
_root.desk["deskbtn"+totalCount].i = totalCount;
_root.desk["deskbtn"+totalCount].onPress = function(){
check(this.i);
};
}


I haven't bothered reading any of the posts... just been looking at jop's codes..

The aboce code scans "_root.desk.deskbtn1", "_root.desk.deskbtn2", etc til there's no more objects... then when they're pressed it tells desk to goto and stop at the number in it's name... so basically the same as jop's