Can not get the index number from a StartDrag Function

var t:Array=new Array();
t=[d1,d2,d3,d4,d5];
var d:Array=new Array();
d=[t1,t2,t3,t4,t5];
var ust:int;
for(var i:int=0;i<t.length;i++){
t[i].addEventListener(MouseEvent.MOUSE_DOWN, mouseDowner);
for(var j:int=0;j<t.length;j++){
t[j].addEventListener(MouseEvent.MOUSE_UP, mouseReleased);
function mouseDowner(event:MouseEvent):void {
event.target.startDrag();
trace(t.indexOf(MovieClip(event.target)));
var ast:int;
ast=t.indexOf(MovieClip(event.target));
trace(ast);
ust=ast.valueOf();
function mouseReleased(event:MouseEvent):void {
event.target.stopDrag();
if(d.indexOf(MovieClip(event.target).dropTarget.parent)!=-1){
trace(d.indexOf(MovieClip(event.target).dropTarget.parent));}
else{trace("not appropriate");}
//trace(MovieClip(event.target).dropTarget.parent.name);
var tf1:TextField = new TextField();
tf1.text="LIGHT";
tf1.x=-30;
tf1.y=-30;
t1.addChild(tf1);
tf1.mouseEnabled=false;
var tf2:TextField = new TextField();
tf2.text="EASY";
tf2.x=-30;
tf2.y=-30;
t2.addChild(tf2);
tf2.mouseEnabled=false;
var tf3:TextField = new TextField();
tf3.text="IMPOSSIBLE";
tf3.x=-30;
tf3.y=-30;
t3.addChild(tf3);
tf3.mouseEnabled=false;
var tf4:TextField = new TextField();
tf4.text="FAST";
tf4.x=-30;
tf4.y=-30;
t4.addChild(tf4);
tf4.mouseEnabled=false;
var tf5:TextField = new TextField();
tf5.text="UGLY";
tf5.x=-30;
tf5.y=-30;
t5.addChild(tf5);
tf5.mouseEnabled=false;
var tf6:TextField = new TextField();
tf6.text="DARK";
tf6.x=-30;
tf6.y=-30;
d1.addChild(tf6);
tf6.mouseEnabled=false;
var tf7:TextField = new TextField();
tf7.text="DIFFICULT";
tf7.x=-30;
tf7.y=-30;
d2.addChild(tf7);
tf7.mouseEnabled=false;
var tf8:TextField = new TextField();
tf8.text="POSSIBLE";
tf8.x=-30;
tf8.y=-30;
d3.addChild(tf8);
tf8.mouseEnabled=false;
var tf9:TextField = new TextField();
tf9.text="SLOW";
tf9.x=-30;
tf9.y=-30;
d4.addChild(tf9);
tf9.mouseEnabled=false;
setChildIndex(d5, 1);
var tfh:TextField = new TextField();
tfh.text="BEAUTIFULL";
tfh.x=-30;
tfh.y=-30;
d5.addChild(tfh);
tfh.mouseEnabled=false;
setChildIndex(d[0], 0);
setChildIndex(d[1], 0);
setChildIndex(d[2], 0);
setChildIndex(d[3], 0);
setChildIndex(d[4], 0);
trace(ust);

var t:Array=new Array();
t=[d1,d2,d3,d4,d5];
var d:Array=new Array();
d=[t1,t2,t3,t4,t5];
var ust:int;
var alt:int;
for(var i:int=0;i<t.length;i++){
t[i].addEventListener(MouseEvent.MOUSE_DOWN, mouseDowner);
for(var j:int=0;j<t.length;j++){
t[j].addEventListener(MouseEvent.MOUSE_UP, mouseReleased);
function mouseDowner(event:MouseEvent):void {
event.target.startDrag();
trace(t.indexOf(MovieClip(event.currentTarget)));
ust=t.indexOf(MovieClip(event.currentTarget));
trace(ust);
trace(ust);
function mouseReleased(event:MouseEvent):void {
event.target.stopDrag();
if(d.indexOf(MovieClip(event.currentTarget).dropTarget.parent)!=-1){
trace(d.indexOf(MovieClip(event.currentTarget).dropTarget.parent));
alt=d.indexOf(MovieClip(event.currentTarget).dropTarget.parent);
trace(alt);}
trace(alt);
trace(ust);
if(alt==ust){trace("ok");}
else{trace("not appropriate");}
var tf1:TextField = new TextField();
tf1.text="LIGHT";
tf1.x=-30;
tf1.y=-30;
t1.addChild(tf1);
tf1.mouseEnabled=false;
var tf2:TextField = new TextField();
tf2.text="EASY";
tf2.x=-30;
tf2.y=-30;
t2.addChild(tf2);
tf2.mouseEnabled=false;
var tf3:TextField = new TextField();
tf3.text="IMPOSSIBLE";
tf3.x=-30;
tf3.y=-30;
t3.addChild(tf3);
tf3.mouseEnabled=false;
var tf4:TextField = new TextField();
tf4.text="FAST";
tf4.x=-30;
tf4.y=-30;
t4.addChild(tf4);
tf4.mouseEnabled=false;
var tf5:TextField = new TextField();
tf5.text="UGLY";
tf5.x=-30;
tf5.y=-30;
t5.addChild(tf5);
tf5.mouseEnabled=false;
var tf6:TextField = new TextField();
tf6.text="DARK";
tf6.x=-30;
tf6.y=-30;
d1.addChild(tf6);
tf6.mouseEnabled=false;
var tf7:TextField = new TextField();
tf7.text="DIFFICULT";
tf7.x=-30;
tf7.y=-30;
d2.addChild(tf7);
tf7.mouseEnabled=false;
var tf8:TextField = new TextField();
tf8.text="POSSIBLE";
tf8.x=-30;
tf8.y=-30;
d3.addChild(tf8);
tf8.mouseEnabled=false;
var tf9:TextField = new TextField();
tf9.text="SLOW";
tf9.x=-30;
tf9.y=-30;
d4.addChild(tf9);
tf9.mouseEnabled=false;
setChildIndex(d5, 1);
var tfh:TextField = new TextField();
tfh.text="BEAUTIFULL";
tfh.x=-30;
tfh.y=-30;
d5.addChild(tfh);
tfh.mouseEnabled=false;
setChildIndex(d[0], 0);
setChildIndex(d[1], 0);
setChildIndex(d[2], 0);
setChildIndex(d[3], 0);
setChildIndex(d[4], 0);

Similar Messages

  • HT1349 My Ipad was stolen, How can I get the serial Number from Apple. It was registered with them

    I had  2 Ipads, a mac book pro and a Mac Air stolen 2 weeks ago
    I am trying to locate one of the serial numbers, but cant find the last box.  Can I get the serial number from Apple. It was registered and now it is not showing up as one of my products.
    Thanks

    The easiest way to find your serial number is this Open Itunes...click help... run diagnostics.....(tick or untick as necessary) so that you just have ticked the last two,  device connectivity and device sync.  run these tests. it will say no ipod/ipad found but will give results of test....scroll down to bottom of results... here you will find the serial number of your last attached devices.

  • My iphone was stolen. Can I get the IMEI number from the itunes store?

    I have never connected my iphone to my new computer so can't get the info from itunes on there. All the songs I have bought or downloaded have been done on the phone through the ituns store.The box it came in from the shop is for a white iphone and mine is black so I can only assume that it is the wrong number.

    Call your carrier and ask them.
    Not sure what you would need the number for, other than for the carrier.

  • Updated two computers and now can not get the serial number to work

    can not get Production Premium Suite serial number to work after up dating both of my computers. get invalid serial number error. both are running OS X 10.9.4.

    I am using version CS6, don't know support number. Did not deactivate because drive failed. put in new drive and it will not accept serial number. Same Mac Pro desk top just new hard drive.
    JIM PARKER
    <Removed by Moderator>

  • Lost my ipod nano.  How can i get the Serial Number from apple?

    Hi everyone, I recently Lost my ipod nano at work. How can i recover my serial number. I did register the ipod throgh itunes. Is there a way I can get my serial number incase someone at my work finds it and returns it so i can give security my serial number to prove that it is my ipod? thanks

    Hello franciscor,
    Sadly, there isn't much else Apple can do for you in this situation. However, I can tell you that there are a few other methods that can be used to retrieve your iPod's serial number other than from off the unit itself. Check out this Apple support document for more information. Hope it helps.
    [iPod: How to find the serial number|http://support.apple.com/kb/HT1459]
    B-rock

  • My iPod touch was stolen. Can you tell me how I can get the serial number from my iTunes account?, My iPod touch was stolen. Can you tell me how I can get the serial number from my iTunes account?

    My iPod touch was stolen. Can I get the serial number from my iTunes account?

    See the end of:
    - If you previously turned on FIndMyiPod on the iPod in Settings>iCloud and wifi is on and connected go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone. If the iPod has been restored it will never show up.
    - You can also wipe/erase the iPod and have the iPod play a sound via iCloud.
    - If not shown, then you will have to use the old fashioned way, like if you lost a wallet or purse.
    - Change the passwords for all accounts used on the iPod and report to police
    - There is no way to prevent someone from restoring the iPod (it erases it) using it.
    - Apple will do nothing without a court order                                                
    Reporting a lost or stolen Apple product                                        
    - iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number

  • HT1459 My iPod touch 4th generation will not even turn on so I can't get the serial number.

    My ipod touch 4th generation will not even turn on so i can not get the serial number. what can I do?

    If you synced with your computer then use the iTunesmethod included here:
    - iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number

  • My Macbook are from 2012, and i can not get the Airplay to work. Apple-tv3

    Hello,
    I can not get the Airplay  work betwine my Macbook  and Airplay.
    Have read a lot about it online, and can not understand way its-not work. My mac is from 2012. have dobbel Chek. Also with Serial number on our site.
    Do you have any answer for way its not work?

    Update to Mountain Lion, or higher, which is required.
    Troubleshooting AirPlay

  • No Mail. I can not get or send mail from my iPhone,iCloud, or mail  on the desktop. Password is correct i can get into iCloud but not able to get mail.

    I can not get or send mail from my iPhone, iCloud, and desktop mail.  All are the same account, password is right and working. When the problem first happened I updated to a new  password.
    The Mail and the phone are telling me ( "The iCloud IMAP server “p99-imap.mail.me.com” rejected the password for user “k****n******2”}
    From the iCloud account i get a message saying  mail could not be loaded and the details. Which i have copyed below.
    Any thoughts or anyone I can ring ? This was a paid for mobile me account.
    Thanks
    Running 10.72
    ORIGIN
    server
    TYPE
    error
    BUILDNUMBER
    1FCS29.34215
    TIME
    Sun Dec 11 2011 10:49:50 GMT+0000 (GMT)        (1323600590380)
    HOST
    www.icloud.com
    USERAGENT
    Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.52.7 (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7
    PRSID
    217870346
    RECENTLOGMESSAGES
    Sun, 11 Dec 2011 10:49:22 GMT:  DEBUG: MAIL in main()
    Sun, 11 Dec 2011 10:49:22 GMT:  DEBUG: -->  Request 1:   POST to https://p99-mailws.icloud.com:443/wm/preference,  headers: Content-Type=text/plain,  body: (omitted)
    Sun, 11 Dec 2011 10:49:22 GMT:  DEBUG: Request out: /wm/preference-list-->1323600562085/1
              params: {"locale":"en-us","timeZone":"Europe/Dublin"}
    Sun, 11 Dec 2011 10:49:22 GMT:  DEBUG: SC.Object:sc1074:dispatch('load content')
    Sun, 11 Dec 2011 10:49:22 GMT:  DEBUG: "2.0 Waiting for Content" handled event 'load content' (no transition)
    Sun, 11 Dec 2011 10:49:22 GMT:  DEBUG: SC.Module: Attempting to load 'addresses'
    Sun, 11 Dec 2011 10:49:22 GMT:  DEBUG: SC.Module: Module 'addresses' is not loaded, loading now.
    Sun, 11 Dec 2011 10:49:22 GMT:  DEBUG: SC.Module: Loading JavaScript file in 'addresses' -> '/applications/mail/frameworks/addresses/en-us/1FCS29/javascript.js'
    Sun, 11 Dec 2011 10:49:22 GMT:  DEBUG: SC.Object:sc3099:initStatechart()
    Sun, 11 Dec 2011 10:49:22 GMT:  DEBUG: -> entering "9 Address List Not Visible"
    Sun, 11 Dec 2011 10:49:22 GMT:  DEBUG: -->  Request 2:   GET to https://p03-contactsws.icloud.com:443/co/addressbook/?order=first,last&locale=en _US,  headers: Content-Type=text/plain,  body: (omitted)
    Sun, 11 Dec 2011 10:49:22 GMT:  DEBUG: SC.Module: Module 'addresses' finished loading.
    Sun, 11 Dec 2011 10:49:22 GMT:  DEBUG: SC.Module: Evaluating and invoking callbacks for 'addresses'.
    Sun, 11 Dec 2011 10:49:22 GMT:  DEBUG: SC.Module: Module 'addresses' has completed loading, invoking callbacks.
    Sun, 11 Dec 2011 10:49:22 GMT:  DEBUG: APPLICATION: Received applicationWillBecomeActive
    Sun, 11 Dec 2011 10:49:23 GMT:  WARN:  APPLICATION: Received applicationDidBecomeActive
    Sun, 11 Dec 2011 10:49:23 GMT:  DEBUG: <--  Response 2:  200  (1257ms),  headers: Cache-Control=no-cache, no-store, private, Content-Type=application/json; charset=UTF-8  body: (omitted)
    Sun, 11 Dec 2011 10:49:25 GMT:  DEBUG: willReceive: Status:500, Request:/wm/preference
    Sun, 11 Dec 2011 10:49:25 GMT:  DEBUG: Got HTTP 500 : Redirecting request: /wm/preference : Redirect count:1
    Sun, 11 Dec 2011 10:49:25 GMT:  DEBUG: -->  Request 3:   POST to https://p99-mailws.icloud.com:443/wm/preference,  headers: Content-Type=text/plain,  body: (omitted)
    Sun, 11 Dec 2011 10:49:25 GMT:  DEBUG: Request out: /wm/preference-list-->1323600562085/1
              params: {"locale":"en-us","timeZone":"Europe/Dublin"}
    Sun, 11 Dec 2011 10:49:29 GMT:  DEBUG: willReceive: Status:500, Request:/wm/preference
    Sun, 11 Dec 2011 10:49:29 GMT:  DEBUG: Got HTTP 500 : Redirecting request: /wm/preference : Redirect count:2
    Sun, 11 Dec 2011 10:49:29 GMT:  DEBUG: -->  Request 4:   POST to https://p99-mailws.icloud.com:443/wm/preference,  headers: Content-Type=text/plain,  body: (omitted)
    Sun, 11 Dec 2011 10:49:29 GMT:  DEBUG: Request out: /wm/preference-list-->1323600562085/1
              params: {"locale":"en-us","timeZone":"Europe/Dublin"}
    Sun, 11 Dec 2011 10:49:33 GMT:  DEBUG: willReceive: Status:500, Request:/wm/preference
    Sun, 11 Dec 2011 10:49:33 GMT:  DEBUG: Got HTTP 500 : Redirecting request: /wm/preference : Redirect count:3
    Sun, 11 Dec 2011 10:49:33 GMT:  DEBUG: -->  Request 5:   POST to https://p99-mailws.icloud.com:443/wm/preference,  headers: Content-Type=text/plain,  body: (omitted)
    Sun, 11 Dec 2011 10:49:33 GMT:  DEBUG: Request out: /wm/preference-list-->1323600562085/1
              params: {"locale":"en-us","timeZone":"Europe/Dublin"}
    Sun, 11 Dec 2011 10:49:37 GMT:  DEBUG: willReceive: Status:500, Request:/wm/preference
    Sun, 11 Dec 2011 10:49:37 GMT:  DEBUG: Got HTTP 500 : Redirecting request: /wm/preference : Redirect count:4
    Sun, 11 Dec 2011 10:49:37 GMT:  DEBUG: -->  Request 6:   POST to https://p99-mailws.icloud.com:443/wm/preference,  headers: Content-Type=text/plain,  body: (omitted)
    Sun, 11 Dec 2011 10:49:37 GMT:  DEBUG: Request out: /wm/preference-list-->1323600562085/1
              params: {"locale":"en-us","timeZone":"Europe/Dublin"}
    Sun, 11 Dec 2011 10:49:40 GMT:  DEBUG: willReceive: Status:500, Request:/wm/preference
    Sun, 11 Dec 2011 10:49:40 GMT:  DEBUG: Got HTTP 500 : Redirecting request: /wm/preference : Redirect count:5
    Sun, 11 Dec 2011 10:49:40 GMT:  DEBUG: -->  Request 7:   POST to https://p99-mailws.icloud.com:443/wm/preference,  headers: Content-Type=text/plain,  body: (omitted)
    Sun, 11 Dec 2011 10:49:40 GMT:  DEBUG: Request out: /wm/preference-list-->1323600562085/1
              params: {"locale":"en-us","timeZone":"Europe/Dublin"}
    Sun, 11 Dec 2011 10:49:44 GMT:  DEBUG: willReceive: Status:500, Request:/wm/preference
    Sun, 11 Dec 2011 10:49:44 GMT:  DEBUG: <--  Response 7:  500  (4248ms),  headers: Content-Type=text/html  body: (empty)
    Sun, 11 Dec 2011 10:49:44 GMT:  DEBUG: Request in: /wm/preference-list-->1323600562085/1,500,4249ms
    Sun, 11 Dec 2011 10:49:44 GMT:  DEBUG: ServerPreferencesDataSource.retrieveResponse error = -1/500/guid=serverPrefsGuid
    Sun, 11 Dec 2011 10:49:44 GMT:  ERROR: CoreMail handled error 13002 before exiting Mail

    Spent at least 40 min talking to apple support, to sort it out. luckly not at my cost. After trying lots of things and speaking to a higher grade support person I was given a temp password which did the trick. I then was able to reset that with my own password. 
    The impression i got was no one knowns  what the problem is and resetting the password at the apple end works. Not sure if you would be able to self fix.

  • I have IMac 10.7.5 Lion I use I forgot the password and I did a few fixes from the we sites, which did not work and now I can not get the computer to reboot the gray screen comes on and if a shift c I get a load bar and it goes half way and help

    I have IMac 10.7.5 Lion I use I forgot the password and I did a few fixes from web sites, which did not work and now I can not get the computer to reboot the gray screen comes on with the apple and if a shift+c, I get a load bar and it goes half way and stops, I can get into the black screen area with the hard drive info
    I did the following:   mount -uw /    rm/var/db/.AppleSetupDone    shutdown/uses/us  reboot Ok I know I should not have, but now I need help to reboot and hopefully not lose everything on the desk top, Linda Markle

    You did the wrong things. In the future it's a good idea to remember not to do something when you don't know what you are doing and what happens when you do it.
    Forgot Your Account Password
    For Lion, Mountain Lion, or Mavericks
        Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
         When the menubar appears select Terminal from the Utilities menu.
         Enter resetpassword at the prompt and press RETURN. Follow
         instructions in the dialog window that will appear.
         Or see:
           Reset a Mac OS X 10.7 Lion Password
           OS X Mountain Lion- Reset a login password,
           OS X Mavericks- Solve password problems,
           OS X Lion- Apple ID can be used to reset your user account password.

  • I want to setup Lightroom on my new laptop.  I have my latest serial number but it is the upgrade serial number for LR5.  I do not have the original serial number from my purchase of LR3.  How can I recover the serial number from my original purchase of ?

    I want to setup LR on my new laptop.  I have the serial number from my latest purchase but not the original purchase of LR3.  How can I recover the serial number from my original LR purchase?

    If you did register it back then, open your Adobe account with your Adobe ID and you will find it there: Find your serial number quickly
    If you still have it installed, open the System info in Help menu or look here:
    C:\ProgramData\Adobe\Lightroom\Lightroom xy Registration.lrreg

  • I just upgraded my iMac to OS 10.8.5 from 10.6.8 and now I can not get the calendars on my Mac and my iPhone 4s (running iOS 8.3) to sync

    I just upgraded my iMac to OS 10.8.5 from 10.6.8 and now I can not get the calendars on my Mac and my iPhone 4s (running iOS 8.3) to sync.  I already tried replacing the calendars on the phone with those on my computer but nothing happened.

    Set up iCloud
    Set up iCloud (2)

  • Can not get the agent from rule determination

    Dear expert,
      We have a PR workflow,for one step, the agent is determined by one rule,In our Q system,everythink is ok to get the agent correctly,and the workflow also can works.but in our P system,can not get the agent from the rule,when we simulate the rule,the agent can be get smoothly,but in workflow,realy can't get the agent(after trace the workflow), so would you like to give me sone suggestion, whant had happen in our workflow?
    Many thanks!
    Best Regards,
    Kerry

    Tks!
    I have one question,how to check the agent assignment is active?
    and also want to say,the rule that determin the responsible agent is used at one step of the workflow,not for possible agent of task ,and the rule's type is RESPONSIBILITIES.
    Best Regards
    Edited by: Kerry Wang on Jun 25, 2010 3:14 AM

  • Pictures will load to the photostream just fine, i can see them on both my ipad and iphone, but they stoped uploading to my PC 10 days ago? I can not get any new pictures from my iphone to my PC, what can i do to fix this?

    Pictures will load to the photostream just fine, i can see them on both my ipad and iphone, but they stoped uploading to my PC 10 days ago? I can not get any new pictures from my iphone to my PC, what can i do to fix this?

    Sign out of the iCloud control panel and then back in.

  • Can not get the high resolution photo from iCloud on the iPhone5s, unless re-share the photo to the iCloud.

    after restoring the iPhone, the iPhone can not get the high resolution photo from album of iCloud, unless re-share all the photo to the iCloud.

    If you plug up both to computer, open itunes, click "back up to computer" on both (not necessary for the one that's being transferred to) then on the one that's sending data click "back up" in the iTunes menu. It will then back up (if not already done in sync). Now plug up the second one (being transferred to) and on the iTunes menu, click "restore from backup" then choose the device you just backed up, and click "ok" or what it says.
    Hope this helped
    P.S. I am referencing to using iTunes <11. Some features I show here might not be available in iTunes 10

Maybe you are looking for