Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


harrywatson last won the day on October 16 2014

harrywatson had the most liked content!

About harrywatson

  • Rank
    Advanced Member

Recent Profile Visitors

1501 profile views
  1. Not sure what google web designer does. You could always try a True - False statement within your function. function if reverse == true. go in reverse else if foward == true. go forward. But you'll need some variables first; here is something I wrote for opening and closing a door; var door1open = false; var ghostly = true; door1.on("click", function(event){ createjs.Tween.get(uparrow) .wait(1800) .to({alpha: .5}, 100); if (ghostly == true){ createjs.Tween.get(ghost1) .wait(800) .to({scaleX: 3, scaleY: 3, x: 300, y: 200}, 800) .wait
  2. Hey great, well done! Code is fantastic fun. Like a crossword on steroids. Yes you're right setTimeout and some others are wrong for games. Though don't shy off raw code altogether. It's where you might do your most original work. I've made a door opener and closer and a combination lock code for click and point or escape type games. The combination lock one took about three weeks. Plus I adapted a shoot 'em code which was raw javascript. Now it's unrecognisable from the original and I now see it as my own. Great adventures!
  3. Ahh! You need maybe some 'if' and 'else' statements going on in there. sorry in advance for the not code var continue=true; var pause=false; function stopMe (pause continue){ if continue==true( //your date and timer functions here )}else if{ continue==false //your date and time functions here if (whatYouWant <= 10 timer=stop){ eradicateNastyOne } else if {whatYouWant <= 20 timer=continue} eradicateNastyTwo and so on. Also you could say ; if nastyOne is eradicated your timer = +whatever value Also just a quick word on debugging; You could take out each 'this' statement
  4. Hey ! Good on ya ! that's what it's all about ! Sounds to me as though you'll crack it !
  5. OK not sure I can help, I use createjs. Though here is a successful timer in that framework; First createjs uses RAF (request animation frame); createjs.Ticker.timingMode = createjs.Ticker.RAF_SYNCHED; function createCountDown(timeRemaining) { var startTime = Date.now(); return function() { return timeRemaining - ( Date.now() - startTime ); } } Timer text, so we can watch the countdown. var timerText = new createjs.Text("Time Remaining: ", "30px Acme","#8e2f2f"); timerText.x = 20; timerText.y = 480; level1.addChild(timerText); Let's set the co
  6. harrywatson

    Learning to draw

    Pencils and paper and loads of determination
  7. harrywatson

    Happy App

    Hello everyone. I'm working on a 'happyapp'. Could take years (hope not). Just a wee game that cheers you up. Bit of a complicated question really. What cheers you up? I like watching horror movies so it's not simple. We don't want one of those. I've got some objects moving around.... http://harrywatson.altervista.org/Happyapp/happy.html Any suggestions ? Funny bone tickle ideas?
  8. harrywatson

    Pause Button

    paused = true, That should fix all your problems. http://corehtml5canvas.com/code-live/ch05/example-5.9/example.html
  9. The best framework for making games is the one you are most familiar with.
  10. Ok here's the code; hopefully it's a bit like a css - inline override, rather than a code butchering: pic1 = new createjs.Bitmap("images/marae.png"); pic1.x = 0; pic1.y = 0; pic1.scaleX = .1; pic1.scaleY = .1; pic1.cursor = "pointer"; stage.addChild(pic1); And then I want it to scale up in front of another lot of thumbnail images. When the picture is clicked again, it goes back to it's grid of thumbnails. I can add as many 'pics' as will nicely fit the page. Note the whole reason for this post: stage.addChild again: var pic1big = false; pic1.on("click", function(event){
  11. Great idea ! Lot's of time involved. You probably won't be paid for it. Don't let me squash your dreams! (annoying smiley here)
  12. Hey great @gregmax17 ! That makes clear what I've been staring at for over a year. I'd been trying to use a z-index without declaring a variable, I think my brain has just dribbled out onto the floor.. Thanks! I'm away from Mrs computer but would like to post my; 'stage.addChild, stage.addChild' type code hack soon. happy day h (annoying smiley face here)
  13. This is a question and answer at the same time. So during an 'onclick' event I've used createjs to 'addChild' so that the 'child' or 'displayObject' is re - added to the canvas every time it's clicked. I've done this so that the 'displayObject' (in this case a bitmap), has a primery z-index, so it overlays all other children of the canvas or the canvas container. It seems a bit of a hack in that there doesn't seem an easy way to arrange your z-index with javascript. I haven't got the code in front of me but it's something like this; -bit map c
  • Create New...