Doing a Jigsaw Puzzle need help :-)

Hi hoping that I can get some help with out having to start all over on my project.  I am very new at this coding and have never coded anything before.  I see there is a ton of code out there but the examples really confuse me.  They don't tell you what or where my instance names fit into the code given.  Or that I am not familiar with it enough to see where my names for either my movie clips or button names fit into the codes available.
The code I have for my simple puzzle is as follows:
var pArr:Array = new Array (p1_mc, p2_mc, p3_mc, p4_mc, p5_mc, p6_mc, p7_mc, p8_mc, p9_mc, p10_mc, p11_mc);
for (var i:uint =0;
i < pArr.length; i++) {
pArr[i].addEventListener(MouseEvent.MOUSE_DOWN, drag);
pArr[i].addEventListener(MouseEvent.MOUSE_UP, drop);
function drag(event:MouseEvent):void {
event.currentTarget.startDrag();
function drop(event:MouseEvent):void {
event.currentTarget.stopDrag();
Although this will move all the pieces around, what I need is to be able to be able to lock the pieces together, and complete it.
Please Help
Valerie

The code you have now should be fine as a starting point, so chances are you can build onto what you already have.  The reason you might not be able to do that is if you find a tutorial that takes a different approach that forces you to changes things due to lack of understanding the coding/programming.
What you should do is search Google using terms like "AS3 jigsaw tutorial" and "AS3 drag tutorial", and try to find one that somewhat matches what you have so far.
As an aid to maybe help you to avoid having to rewrite your code to follow someone else's approach, just realize that you have the basics already in place for the dragging and dropping.  You are just missing the rest of the code you'll need in the dropping function that helps you determine when an object is placed where it belongs and how process it into whatever position is deemed necessary (where it goes versus where it came from, etc).  So you might be able to skip to the part where checking the if the drop is on target gets discussed.

Similar Messages

  • "Adobe Premier Pro could not find any capable video play modules. Please update your video display drivers." What does this mean? Need help urgently!

    Premier Pro CC will not open, even though all my computer software is updated. It comes up with the message every time I try and open it. "Adobe Premier Pro could not find any capable video play modules. Please update your video display drivers and start again." What does this mean? I have been searching the internet for an answer for hours. Urgent help needed.

    Error "Premiere Pro could not find any capable video play modules" | Startup 

  • Flash player does not work i need help!!

    flash player 10 says it downloads but it doesn't work youtube does but like myspace and facebook doesnt work it still says I need  to install it so I tryed the other way with the zip file and the uninstall and change ActiveX thing and it still doesn't work

    Hello, the first thing that I would do in this case is to make sure that you have Flash Player
    version 10.0.32.18 installed.  Go to www.adobe.com/software/flash/about.  Adobe will tell
    you if this is installed, the version number and if the install was successful.
    Now, the next thing to do is go to Tool>manage add ons, find Shockwave Flash Object,
    click on it, look down at the bottom right side and click on Update Active X.  When that
    is finished, then you will need to restart Windows.
    Now go to the sites that you were having problems with and see if they now work.
    Please post back one way or the other.
    Hope it works for you, it did for me.

  • Try to use Headset for Skype on G5, but microphone does not work! Need help

    I recently installed skype on my G5, bought a headset, can hear people talking to me, but nobody can hear me. It's not an USB or bluetooth headset, but with 2 plugins (sorry, i'm austrian...).
    Does anybody know what setups to change that it works?
    I try the system configuration and set up line in and line out...
    Pleas help!

    I have used a headset with the 2 connections. In order to connect I use the Griffin iMic as my adapter. Every once in awhile I get the 2 plugs in backwards and have to switch them.
    http://www.griffintechnology.com/products/imic/
    The other thing I have had happen is that my machine seems to auto mute when I switch things around. Sometimes I have had to go in to the System or program preferences to change the settings. For some reason the system has muted me or the program I am using did not keep the previous settings due to having the headset unplugged/replugged etc.
    Message was edited by: Casey

  • Is there a problem with FaceTime, can not connect. When dial it connects and drops. When friends are calling me they have calling message and I have connecting but it does not connect. Need help, face time is my life line.

    Face time not working. When dialled it says connecting and drops immediately. When my friends calling it show connecting but it does not.
    Is there a problem with face time. I am in south Africa, it was working perfectly up to Easter. Please help this is my life line.

    There is a barely acknowledged issue. For Mac users Apple has released an update to the app, but for iOS users the recommendation is for users to update their ipad to the most recent operating system.
    There may be a fix coming for iOS6 users (which seem to be many of those having problems) or there may not be. If your ipad isn't up to date then you can update it and see if that helps, or if you don't want to update then you may want to wait and see if there is either a fix or if it fixes itself.

  • Facebook is left justified on my machine only. erashing cache does not fix it. need help.

    this just started today.
    i've followed every single step on the support with no change.
    -i've updated to firefox 10
    -i've cleared both caches 10 times, also used third party programs and manually after that did not work. no change.
    -i've tested the font size (it's where it should be)
    -tested java script (it is on)
    -tested zoom. When zooming in or out the page fixes itself and goes centered, but when at the default zoom, the site is left justified instead of centered.
    i would really appreciate some help here. bad enough firefox crashes enough for other reasons, but now that the number one page i go to on a daily basis isn't working right it's basically enough reason to leave for good.

    I have an answer!!!
    Check it out, I uninstalled Firefox and IE from my machine, reloaded the default IE.
    When I reloaded it (IE) and went to facebook, my machine said there was a certificate error, i hadnt seen this before for some reason (my wife ignored it or something).
    I clicked ignore and it came up with the left justified angry mess we all hate so much, well IE then popped up in the bottom saying something about blocking the content associated with the bad security certificates, also giving me an option to display said content, i clicked the button and low and behold beautiful colorful facebook pops up.
    Well I press back and go back to the Certificate Error screen and I click on technical details, it says something along the lines of "Certificate for this website works starting November 11, 2011, and system time is march 02, 2002.....
    .......wait what?
    I look down, sure enough, system time, 2:44AM, 03/02/2002.
    ......So I reset the time (this tells me, by the way, i need to crack open my laptop and replace that little nifty system battery that keeps the clock accurate, they go out every so often, newegg/ebay sells them for cheap),
    so after i reset the time i simply (on the error page even) hit refresh and bam, like there was never anything ever wrong.
    Conclusion: if your system time is messed up (how often do you really look at it) and the year is wrong, it'll screw up EVERY browser you try to use, because every browser (in an attempt to protect you from risky websites) is blocking content that doesnt have a valid security certificate (because the date is xx years away from even being initiated).
    Hope this gets to you in time before you go all Office Space on your computer.
    (I created an account JUST to write this reply)

  • Ipad (first generation) Battery does not charge. Need help

    I tried Mac, pc and electric sockets; doesn't work. Same ports and cable I can use to charge my iPhone 4, so I know that cables and USB ports that I tried are OK.
    I have 20% batter left. If I turn Ipad off and connected it to the USB cable, the Ipad automatically turns on but still doesn't charge. Also, I the iPad is not getting detected by the iTunes.
    Does it mean that my iPad battery is dead?

    Try a Reset - (For those who do not know, hold the Home and Sleep/Wake buttons down together for 15 seconds.) even do it a couple of times.
    I am a little confused as to when you see or do not see the battery symbol etc etc. You mentioned a 20% battery strength and if that still applies then the following comment would be of little relevance (it may take completely drained batteries 20 minutes or more to indicate that they're actually charging).
    As to the iPad not showing up in iTunes, try a different USB port, even a number of times.

  • Im browsing FB in my ipad then suddenly it shutsdown and then when i open it again connect to itunes appear in the displaY? why does that happened?need help!

    Im browsing in my ipad then suddenly it shutsdown, any idea why?

    Something went wrong in the iOS if you are getting the connect to iTunes screen. you will have to exactly that - connect your iPad to your computer's iTunes using the cable. You will need to restore the iPad now.
    Read this all the way to the end before you begin. Make sure that you read about recovery mode at the end of the article.
    iTunes: Restoring iOS software

  • DOES not boot! Need help please!

    I just bought a k7t266 pro2-u and a amd xp2400+, new case and 400 watt psu. When I push the power button, nothing happens in the computer, no fans, no drives. I see power on the front light though, which is connected ot the motherboard. Any suggestions? I may have connected the power switch wrong or something, I'm really not sure, Thanks alot to anyone who can help.

    Any joy yet?  Make sure all your front panel switches are connected correctly.  Uplug any USB connectors that connect to the front of your case (if you have them) these can cause all kinds of shorts.
    Is your board mounted properly in the case and the HSF mount on your CPU?
    You can only connect the main power to the board one way. Read the manual regarding the DLEDS

  • Auto brightness does not work anymore, need help!

    Auto brightness quit working... I see a several posts but no replies? Anyway to fix this? Is this an iso6 issue?

    If you have tried the troubleshooting steps for the iPhone, (power off/on, reset, restore) and none of them work, then I would say it is probably a hardware issue. The sleep button can fail after a period of time and you state you are using a 3G, so it is possible it was failing before you did the upgrade and that it has finally given up. It may be you need to either look for a repair facility to repair it or replace the phone. Up to you.

  • My ipod says connect to itunes and i did but it still isnt doing anything and i need help!

    ok so my friends locked my ipod untill it said connect to itunes and i did and itunes is findind the device but it says enter the 4 diget coad and i cant enter the 4 diget code and it is rely retting on my nervs please help me! and it is a ipod 2nd gen and i do not know what firmware =(

    Try restoring theiPod while having it plugged in.  This will get rid of the passcode.  Good lcuk!

  • I need help with creating PDF with Preview...

    Hello
    I need help with creating PDF documetns with Preview. Just a few days ago, I was able to create PDF files composed of scanned images (notes) and everything worked perfectly fine. However, today I was having trouble with it. I scanned my notebook and saved 8 images/pages in jpeg format. I did the usual routine with Preview (select all files>print>PDF>save as PDF>then save). Well this worked a few days ago, but when I tried it today, I was able to save it, but the after opening the PDF file that I have saved, only the first page was there. The other pages weren't included. I really don't see anything wrong with what I'm doing. I really need help. Any help would be greatly appreciated.

    I can't find it.  I went into advanced and then document processing but no batch sequence is there and everything is grayed out.
    EDIT: I realized that you cant do batch sequences in standard.  Any other ideas?

  • I actually need help but cannot find the answer. Please.......Lately when open a new tab it does not open with a blank page. I don't want to set my homepage as

    I actually need help but cannot find the answer.
    Please.......Lately when open a new tab it does not open with a blank page. I don't want to set my homepage as blank as when I first open Firefox, it automatically loads my hotmail page. But then if I open other pages I don't get a blank page. Help, please?
    Thank you.
    ''[Personal information removed by moderator. Please read [[Forum and chat rules and guidelines]], thanks.]''

    hello, please refer to [[New Tab Page – show, hide and customize top sites]] in order to switch the feature off.

  • Hello, I need help with my macbook pro. It looks like I cannot install anything anymore. Everytime I try to install a new software, use the migration assistant or click the lock to make changes, it simply does not react.

    Hello, I need help with my macbook pro.
    It looks like I cannot install anything anymore. Everytime I try to install a new software, I simply get stuck during the installation type process. I put in my password, it does accept it, but it does not go any further.
    I tried to reset the password, put no password, repair the permissions, the disk but nothing will do. I nearly got stuck with the log in screen but finally succeeded in disabling it.
    So I thought I might try to create a new account but I cannot click the lock to make changes. It simply refuses to react.
    I am now thinking about using the migration assistant to save all my settings, data and so fourth, but again I get stuck when I have to type in my password. It accepts it but nothing happens...
    I guess it has something to do with the authorization process, but can't find anything on the internet about it... Can you help me out?
    I am running Lion 10.7.3.
    Regards,
    Nicolas.
    (I apologize if any grammatical/structural mistakes were to be found, english is not my mother-tongue. )

    You probably won't like this suggestion, but I suggest you reinstall Lion.
    First, backup your system. Next, reboot your system, press/hold the COMMAND-R keys to boot into the Recovery HD. Select 'Reinstall Mac OS X'. If you purchased Lion as an upgrade to Snow Leopard, the reinstall process will install Lion 10.7.3. If your system came preinstalled with Lion, you might still get Lion 10.7.2. Both installs are a total install of the OS. None of your apps or data will be impacted. Just the OS.

  • Need help in formatting the Date - Date does not

    Need help in formatting the Date - Date does not formats and give Not a valid month error in the below scenario.
    select oc.ST_PGM_MGR, r.ag_dnum, get_major_work_type(r.perf_eval_rtng_id) "v_work_code", r.ag_dnum_supp "supp", r.intfinal, to_char(r.formdate,'MM/DD/YYYY') "formdate", to_char(r.servfrom,'MM/DD/YYYY') "srv_from", to_char(r.servto,'MM/DD/YYYY') "srv_to", descript, add_months(to_char
    --- Bellow line of Code on trying to format it to mm/dd/yyyy gives the error
    (r.formdate, 'DD-MON-YYYY'),12) "formdate2"
    from  table REdited by: Lucy Discover on Jul 7, 2011 11:34 AM
    Edited by: Lucy Discover on Jul 7, 2011 1:05 PM

    Your syntax is wrong - look at the post above where this syntax is given:
    to_char (add_months(r.formdate,12), 'MM/DD/YYYY') "formdate2"Look at the formula from a logical perspective - "inside out" to read what is happening -
    take formdate, add 12 months
    add_months(r.formdate, 12)then apply the to_char format mask - basic syntax
    to_char(date, 'MM/DD/YYYY')Compare to your syntax:
    to_char(add_months(r.formdate, 'MM/DD/YYYY'),12) "formdate2"You will see your format string inside the call to add_months, and your 12 inside the call to to_char.
    Good luck!

Maybe you are looking for

  • Pacman : returning error 16 from alpm_db_update

    Recently, yaourt behave oddly on my homeserver, outputting some truncated errors messages as if they were answers from a regex search. Long story short, I tried to fix the problem but did not yet succeeded, so maybe someone here will help me. What I

  • Upgraded to 7.3.1 and audio files are corrupted -- missing vocal tracks

    Just upgraded a work computer to itunes 7.3.1 and my music files are now playing without vocal tracks and very poor audio quality. it's a cheapo work computer, HP with a celeron processor. Any suggestions?

  • How do i find the internet MAC address for my MBP?

    I am trying to get my MBP integrated into my home wireless network.  Need to enter MAC address.

  • Strange character appear when writing to text file.

    Hello, I am facing some problem when I read some data from and binary file (.dat) and then saving them into text file. When I convert those data into string and then write to a text file. Some strange characters were found in the file when I opened i

  • Problem while saving the query

    I have created transport request from solman, and when I try to save the query under the the request it is asking whether to create a new task under a different specific user, if I cancel it the query is not getting saved, please help me. thanks