Forum Topic: One More Code

(87 views • 6 replies)

This topic is 1 page long.

<< < > >>
None

millon333

Reply To Post Reply & Quote

Posted at: 2/6/09 07:38 PM

millon333 DARK LEVEL 04

Sign-Up: 08/26/08

Posts: 108

does inyone have a code to where i can lock a button untill they click on the tutorial first wat i mean is

Someone trys to play the game they clip play and they try to skip the tutorial asoon as they click play its says sorry this button is locked untill you click tutorial and read it all

so to break it down is there a code

where a button is locked untill the other button is clicked...
can inyone help and im very sorry about the double post.


None

Patcoola

Reply To Post Reply & Quote

Posted at: 2/6/09 07:40 PM

Patcoola LIGHT LEVEL 46

Sign-Up: 03/07/03

Posts: 2,083

you can use a if statement with a Boolean value
or you can use a event listener

Website | Blog | Buy T-Shirts | Flash | Audio

BBS Signature

None

millon333

Reply To Post Reply & Quote

Posted at: 2/6/09 07:43 PM

millon333 DARK LEVEL 04

Sign-Up: 08/26/08

Posts: 108

Umm thank you but obvisouly im kinda new to coding so not sure wat that means inyway u can post a link to that??


None

TheSongSalad

Reply To Post Reply & Quote

Posted at: 2/6/09 09:33 PM

TheSongSalad NEUTRAL LEVEL 10

Sign-Up: 01/17/09

Posts: 1,335

that not really something you'd link to... if you're new look for a flash tutorial. a bool means there can only be true or false as the answer, in other words, 0 or 1. put something like

if(whatever you wanted to be seen first has been pushed);
goto the next frame;
else
display something telling them to watch the something else first.;

obviously that's not real code, but that's the general gist of what the other guy was trying to tell you.


None

CrustySheet

Reply To Post Reply & Quote

Posted at: 2/6/09 09:43 PM

CrustySheet LIGHT LEVEL 03

Sign-Up: 05/03/06

Posts: 532

At 2/6/09 07:43 PM, millon333 wrote: Umm thank you but obvisouly im kinda new to coding so not sure wat that means inyway u can post a link to that??
var tutorialRead:Boolean = false;
button.onRelease = function(){

if(tutorialRead){
gotoandPlay(frame);
}else{
 you didnt read the tutorial
}
}

None

BillysProgrammer

Reply To Post Reply & Quote

Posted at: 2/6/09 09:44 PM

BillysProgrammer LIGHT LEVEL 15

Sign-Up: 09/17/08

Posts: 1,870

At the end of the tutorial, on the last frame make this variable true

var gameenabled = true;

First frame where the buttons are do this

var gameenabled = false;

onEnterFrame = function() {
     if(gameenabled) {
         startbuttoninstancename.enabled = true;
     } else {
          startbuttoninstancename.enabled = false;
     }
}

Motto: Continue with what your doing and you will succeed!
Newgrounds: Where all us freaks go.

BBS Signature

None

fluffkomix

Reply To Post Reply & Quote

Posted at: 2/7/09 12:06 AM

fluffkomix EVIL LEVEL 10

Sign-Up: 05/05/08

Posts: 1,963

or you could go the simplified yet tedious way of making two menus.

they'd have to do the tut every time, tho....

to truly appreciate newgrounds | my store
Lemon Demon: fancy pants manifesto collab
Here ends another post by the grand master of all things: fluffkomix

BBS Signature

All times are Eastern Standard Time (GMT -5) | Current Time: 07:02 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!