Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 17th, 2004, 09:30 AM
joewood86 joewood86 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 24 joewood86 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 13 m 27 sec
Reputation Power: 0
Jigsaw with Flash

I am trying to make an e-jigsaw with Maromedia Flash 2004 Pro and am using the following actionscript to enable click and drag capabilities to each piece, which is a Movie Clip:

on (press) {
startDrag ("");
}
on (release) {
stopDrag();
}


However, what I really want is for the pieces to jump to the correct place when it gets within say 8 pixels. I'm sure this is possible as I've seen similar effects before but being the Flash novice that I am I don't know how to do it!

Can anyone advise me how this can be done?

Joe

Reply With Quote
  #2  
Old February 17th, 2004, 11:25 AM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,720 Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 11326 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 1 Day 13 h 20 m 21 sec
Reputation Power: 580
Facebook MySpace
Hi, it kind of depends on how all your spaces are set up. If it's just a blank space the following wont work. If each space is it's own movie clip then try this out:
Code:
on (release)
   {
      if(this.hitTest(_root.space10)
         {
            this._x = _root.space10._x;
            this._y = _root.space10._y;
         }
      stopDrag();
   }


That's assuming this particluar pieces match is on the main stage and it's instance name is space10.
__________________
-Tann

-Vote for your favorite ActionScript editor here.

Reply With Quote
  #3  
Old February 17th, 2004, 12:03 PM
joewood86 joewood86 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 24 joewood86 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 13 m 27 sec
Reputation Power: 0
Thanks Tann.
However, that was a little too technical for me
How do I make spaces and what are they?

Thanks again

Joe

Reply With Quote
  #4  
Old February 17th, 2004, 12:27 PM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,720 Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 11326 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 1 Day 13 h 20 m 21 sec
Reputation Power: 580
Facebook MySpace
Hi, I just meant the blank area where you would drop the jigsaw piece. You said something like "when it gets to within 8 pixels..." well I meant the thing that it would be 8 pixels near....

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Jigsaw with Flash


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT