• (3 Pages)
  • +
  • 1
  • 2
  • 3

Sliding Puzzle Game Using classes and AS2 Rate Topic: ***** 2 Votes

#31 Guest_David Edwards*


Reputation:

Posted 16 February 2011 - 01:22 PM

View PostLedrer copy,, on 29 December 2010 - 07:01 AM, said:

this will only make a small shuffle still working on the real solution..

View Postkaiserjoint, on 28 December 2010 - 02:15 AM, said:

Fix it! mostly :P there are a few restrictions for all of this...

The fix:
inside 'slidingPuzzleMain.as' in the jumble function there is a piece of code creating a random number.
The problem was the "possibles.length".
I traced this and it gave different numbers each time.

I changed it and now it works great.


var randNum:Number = Math.floor(Math.random() * (possibles.length));
into >>>> var randNum:Number = Math.floor(Math.random() * 1);

The restrictions involving this script.
Pay attention to the amount of moves_to_finish in relation to the amount of tiles you use.
It's spacing out if you use for example: a 3x3 puzzle with a moves_to_finish of 100.
I'd say just keep it realistic.

Was This Post Helpful? 0

#32 osmanmeer  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 18-March 11

Posted 25 March 2011 - 06:40 AM

I'm getting this error below on the eventBroadcaster.as and slidingPuzzleTile.as classes.
The class or interface 'flash.display.MovieClip' could not be loaded.

Using AS2 and Flash 8

Please let me know if you need any other details.

Thanks

PS Finally found I need to "Reply" to this post. I was creating new one hoping to create a new question on this page.

This post has been edited by osmanmeer: 25 March 2011 - 06:41 AM

Was This Post Helpful? 0
  • +
  • -

#33 bradinho  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 20-June 11

Posted 20 June 2011 - 01:49 AM

Has anybody managed to fix that puzzle without having 2 tiles moving to the same space or flying off the stage???
Was This Post Helpful? 0
  • +
  • -

#34 powl  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 27-May 11

Posted 21 June 2011 - 08:14 AM

Great tutorial, works really well.
However for some reason it can't get it to jump to the nextFrame when the puzzle is complete,
Its definitely registering the onPuzzleComplete because it disables the tiles when they're in the right place.
You can right click the puzzle and select forward to bring up the win message but thats not quite the same.
Can anyone help?
It's really frustrating that the complicated bit works great but the simple end bit fails.
Was This Post Helpful? 0
  • +
  • -

#35 exodian  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 20-July 11

Posted 20 July 2011 - 06:45 AM

Could you upload a file from the working classes and the whole flash file because I have a mistake somewhere and I can not see where he is.
Was This Post Helpful? 0
  • +
  • -

#36 Miss_Arrangement6  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 01-August 11

Posted 01 August 2011 - 06:49 AM

My puzzle works nicely except when I changed the possibles to *1 it only shuffles is one way,I have to mainly click up or down to complete the puzzle, has anyone found out how to make it shuffle it both ways? Also when the puzzle is completed I can get it to go to frame 2 "Success"...anyone able to help with these two things?
Was This Post Helpful? 0
  • +
  • -

#37 Miss_Arrangement6  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 01-August 11

Posted 10 August 2011 - 07:02 AM

View PostMiss_Arrangement6, on 01 August 2011 - 06:49 AM, said:

My puzzle works nicely except when I changed the possibles to *1 it only shuffles is one way,I have to mainly click up or down to complete the puzzle, has anyone found out how to make it shuffle it both ways? Also when the puzzle is completed I can get it to go to frame 2 "Success"...anyone able to help with these two things?


Any extremely bright people able to figure this out?....Anyone at all..pleeeeese :)
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3