hi ,
i am looking for a simple code.
whenever i type a word it goes a specific frame.
example : when i log into my site, if i type Darkstyle withen 1 min it goes and plays a specific frame and play…
expecting a gud code from the expertise.
thank you,
best regards…
system
July 24, 2004, 8:52am
2
I’m no expert…but i think u can have it something like this:
Put this on a movieclip with an input text it in that has the var as inputText:
onClipEvent (enterFrame) {
if (getTimer() == 60000) {
if (inputText == "Darkstyle") {
_root.gotoAndPlay ("spacificFrame")
}
}
}
I’m not sure if that works, but u can try.
system
July 24, 2004, 9:17am
3
ViNc3:
I’m no expert…but i think u can have it something like this:
Put this on a movieclip with an input text it in that has the var as inputText:
onClipEvent (enterFrame) {
if (getTimer() == 60000) {
if (inputText == "Darkstyle") {
_root.gotoAndPlay ("spacificFrame")
}
}
}
I’m not sure if that works, but u can try.
this code seems to be not working
system
July 24, 2004, 9:39am
4
This should work:
onClipEvent (enterFrame) {
time = getTimer();
timer = time;
if (time>=60000) {
if (inputText == "Darkstyle") {
_root.gotoAndPlay("spacificFrame");
} else {
_root.gotoAndPlay("notEntered");
}
}
}
I’ve also added an attachment; you should look at the attachment to get what i mean.
system
July 24, 2004, 9:54am
5
wel sorry i forgot to mention i dont want any input filed also. its like i am using a cheat code with the help of key board. without anyone being aware of it.
system
July 24, 2004, 9:58am
6
that could be possible…but i gotta work it out first
system
July 24, 2004, 10:33am
7
yahoooo!!! i got it!!!..i think.
this must must must work!!!
great wrok dude… u proved that you are really an expert… but dont u think that code are too lengthy?? heheh… any way… i have to admit. nice logic and nice work,
thank you very much…!
onClipEvent (enterFrame) {
timer = Math.round(getTimer()/1000);
text = timeLimit-timer;
if (Key.isDown(75)) {
_root.nextFrame();
trace("k has been typed");
} else if (Key.isDown(68)) {
_root.gotoAndStop(2);
} else if (text<=0) {
_root.gotoAndPlay("slow");
}
}
hmmm one doubt… please could u explain this
if (Key.isDown(75)
what does this (75) stands for ?? if it stand for the chracter or key, what numeric numbers will other key’s will have?
75 stands for K
the number of the keys match the ASCII codes.
i.e.:
trace(String.fromCharCode(75));
will return K
to find out witch the keyvalues, use something like
_root.onEnterFrame=function(){
trace(Key.getCode())
}
Key.getCode() will return the value of the key you pressed last
ViNc3
July 25, 2004, 12:35am
11
you could also go to “Flash Help”, click on “Using Flash” then on “[color=#0000ff][color=black]Keyboard Keys and Key Code Values”. There u can select what kind of keys you want and it’ll have the code in a table form.[/color][/color]
ViNc3
July 25, 2004, 12:36am
12
THANK YOU!! I’m only 14 so this is a very big achievment for me:P