Photoshop Contest PhotoshopContest.com
Creative Contests. Real Prizes. Essential Resource.
You are not logged in. Log in or Register

 


Photoshop Contest Forum Index - Ask the Experts - Another Flash question - Reply to topic

jkmansell

Location: Ormond Beach,Florida

Post Sat Aug 23, 2008 3:23 pm   Reply with quote         


Okay you Flash experts. I built a games page for my clubs website and started putting puzzles on it. I use PS to make the pieces then move to Flash CS3 to code each piece. My question is, how to I make the pieces stick/lock to each other when they get put in their correct spot?

Here is what I'm using for the code for each piece so you can grab them then move the pieces:

"a1.onPress = function () {
startDrag(this);
};
a1.onRelease = function () {
stopDrag();
"

(without the quotes of course)

a1 being the MC and the instance name and so on...

I've searched the web and came up empty. Any help would be great!

Thanks. Jeff

Oh, here's the page: http://www.midfloridajeepclub.com/games.htm




splodge

Location: Yorkshire,

Post Sat Aug 23, 2008 3:50 pm   Reply with quote         


onRelease. (x=(****) (y=(****)"true"
else= "false" gotoandPlay(1)




_________________


Hallcross Toots
supak0ma

Location: Photoshop Nation

Post Sun Aug 24, 2008 6:20 am   Reply with quote         


its not easy, you should generate the pieces dynamically and assign them a specific value from a predetermined matrix (the solution) so each piece "knows" which other pieces go,for example, on its left or bottom side. also look into hitTest.




Photoshop Contest Forum Index - Ask the Experts - Another Flash question - Reply to topic

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 vote in polls in this forum


Navigate PSC
Contests open  completed  winners  prizes  events  rules  rss 
Galleries votes  authentic  skillful  funny  creative  theme  winners 
Interact register  log in/out  forum  chat  user lookup  contact 
Stats monthly leaders  hall of fame  record holders 
PSC advantage  news (rss)  faq  about  links  contact  home 
Help faq  search  new users  tutorials  contact  password 

Adobe, the Adobe logo, Adobe Photoshop, Creative Suite and Illustrator are registered trademarks of Adobe Systems Incorporated.
Text and images copyright © 2000-2006 Photoshop Contest. All rights reserved.
A venture of ExpertRating.com