Timmer script?

  • DooMZ81
  • Newbie
  • Newbie
  • DooMZ81
  • Posts: 9
  • Loc: SIngapore

Post 3+ Months Ago

Creating a maze game

Problem ecounter:

Cant seems to put timmer on my maze...(timmer start counting when any arrow keypress is detected) then (timmer stop once reach destination and show result of the timmer on next frame)

Just wish to know how to create a timmer in flash by using actionscript
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Sounds like you would need to use getTimer().

I covered something slightly similar in this thread...
http://www.ozzu.com/flash-forum/timer-t22279.html
  • DooMZ81
  • Newbie
  • Newbie
  • DooMZ81
  • Posts: 9
  • Loc: SIngapore

Post 3+ Months Ago

very sad...i cant open that file cos it use flashmx(my sch use flash5)and it wont work if i use flashmx to do my project :(



script of the maze:

on (keyPress "<Down>") {
if (maze.hitTest(you._x, (you._y+5), true) ne "true") {
setProperty ("you", _y, (getProperty(you, _y))+5);
}
if (exit.hitTest(you._x, you._y, true) eq "true") {
gotoAndStop (2);
}
}
on (keyPress "<Up>") {
if (maze.hitTest(you._x, (you._y-5), true) ne "true") {
setProperty ("you", _y, (getProperty(you, _y))-5);
}
}
on (keyPress "<Left>") {
if (maze.hitTest((you._x-5), you._y, true) ne "true") {
setProperty ("you", _x, (getProperty(you, _x))-5);
}
}
on (keyPress "<Right>") {
if (maze.hitTest((you._x+5), you._y, true) ne "true") {
setProperty ("you", _x, (getProperty(you, _x))+5);
}
}


it move pixel by pixel tats y it use x+5 y-5 etc

the exit is the down button tats y

if (exit.hitTest(you._x, you._y, true) eq "true") {
gotoAndStop (2);

frame 2 is well done u have complete the maze^^but wanna display a timmer

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 6 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.