Drag / move do not work inside parent movieclip?

I have a function of drag in the timeline

var spells: Array = new Array (spellBook.Spell1, spellBook.Spell2, spellBook.Spell3, spellBook.Spell4, spellBook.Spell5, spellBook.Spell6, spellBook.Spell7, spellBook.Spell8, spellBook.Spell9);

var SpellIdentity:String = "";

var landslide: Boolean = false;

for (i = 0; i < Spells.length; i ++) {}

_root. The spells [i] .onPress = function() {}

trace ("Drag")

If (drag == false) {}

Move = true;

OriginX = this ._x;

OriginY = this ._y;

this.startDrag("");

}

}

}

I have this code allows me to drag the 9 spells. But theres a problam I 9 spells of MC in a MovieClip called Grimoire that has 2 images one being blank and the second with the spells on and when I opened the book of spells (goto frame 2) spells don't do drag, if I get stated the Grimoire and put right on the scene, they hang out very well.

Then bacicly spells drag when they are a child of an another movieclip. Any ideas?

Try:

spellBook.gotoAndStop (2);

var spells: Array;

this.onEnterFrame = spellsArrayF;

function spellsArrayF() {}

Spells = new Array (spellBook.Spell1, spellBook.Spell2, spellBook.Spell3, spellBook.Spell4, spellBook.Spell5, spellBook.Spell6, spellBook.Spell7, spellBook.Spell8, spellBook.Spell9);

delete this.onEnterFrame;

dragF();

}

var SpellIdentity:String = "";

var landslide: Boolean = false;

function dragF() {}

for (i = 0; i

_root. The spells [i] .onPress = function() {}

trace ("Drag")

If (drag == false) {}

Move = true;

OriginX = this ._x;

OriginY = this ._y;

this.startDrag("");

}

}

you need a stopDrag, too:

_root. {Spells [i] .onRelease = Function ()}

this.stopDrag ();

}

}

}

Tags: Adobe Animate

Similar Questions

  • Help! Drag / move does NOT work!

    Hello - I'm using a simple drag and drop quiz, but it does NOT work correctly .  When I play the movie, the mouse takes the movieclips but never falls, even when they are in a target area.  Help, please!  I have attached my FLA - any help would be much appreciated!

    Thank you.

    Just for starters, you change startDrag line to be: event.target.startDrag (false);

    Then see what's left more questions.  While I had other changes at different times, changing only one line was let down when I let go.

  • Drag / move does not work

    Windows Explorer - updated my computer with the latest updates of Windows XP on February 26 - since then the function drag / move on Windows Explorer (and my office) didn't work. I did a scan full antivirus and came out the own. Also checked the properties of the task bar and Start Menu and confirm the Drag and Drop check box is checked. No new hardware recently added with the exception of an APC battery backup. Suggestions for remedies?

    Hello

    1. have you made changes on the computer recently?

    Method 1.
    Let us first start the sfc scan and check if there are any file system corruption.
    a. to do this, click Start, click programs, accessories principally made, right click Guest and then click Run as administrator. If you are prompted for an administrator password or a confirmation, type the password, or click on allow.
    b. type the following command and press ENTER:
    sfc/scannow
    The sfc/scannow command. analyzes all protected system files and replaces incorrect versions with appropriate Microsoft versions.
     
    More information on SFC scan found in this document:
    Description of Windows XP and Windows Server 2003 System File Checker (Sfc.exe)
    http://support.Microsoft.com/kb/310747

    Method 2.
    If the problem persists, then create a new user profile and then copy your current users assigning to this profile. For more information, see:
    How to create and configure user accounts in Windows XP
    http://support.Microsoft.com/kb/279783

    How to copy data from a corrupted to a new profile in Windows XP user profile
    http://support.Microsoft.com/kb/811151

    How to recover damaged Windows XP user profile
    http://support.Microsoft.com/kb/555473

    I hope this helps.

  • Drag / move does not work between WinXP host and guest of CentOS

    I am just learning how to use FSL v 4.1.0 under CentOS 5 on VMWare

    Player 2.5.1 and difficulties of moving files between Windows XP - SP3 and the

    VM. instructions for installation by the FSL, I should be able to drag-and - drop

    WinXP for the computer desktop virtual, but that did not work - I get the

    "no" symbol when I hover over the virtual desktop.

    Make sure that the shared folders are not configured as ReaOnly. Check under VM configuration-> Options-> shared folders and properties of individual records share.

  • Drag / move does not work in the export release version

    I use the built in the DragManager class to manage a few drag and drop features in an application.  When running in flex builder, it works exactly as expected, but when I export a release build project, dragging only works in the vertical direction.  How is that possible?  What could be the cause of this strange behavior.

    Any help would be appreciated.

    So I thought about it, it turns out that it was a combination of two questions.  First, the background color should be set in order to avoid that the events of gout are received correctly.  Not sure why it worked but since flash builder!

    Secondly it updated me that AIR drag Manager was not the mouseX property that we depend on to a logic of positioning, then had to update to store the required mouseX value.

  • Drag / move do not work when the importation of .oam in superposition of folio InDesign

    I made an animation with a movable symbol.

    It works very well with the preview in the browser directly from Animate.

    (including in the folder the ' jquery.ui.touch - punch.min.js' and ' jquery-ui - 1.10.4.custom.min.js')

    So I publish the .oam file to import the animation in In Design to publish a folio.

    It does not work. All other functions works, but not the draggable.

    It seems that he does not read the .js file...

    It is likely?

    Thank you, Laura

    Hi, Laura.

    You use the most recent version of Animate, and you include the file using the new upload feature script?  If so, your scripts must be included.  If you are not (and something like a load of manual yepnope), your scripts are not included in the CAO may publish.  A quick way to check is to unzip your OAM (just change the .oam in .zip) and check Active Directory to see if your JavaScript in.

    Thank you

    -Elaine

  • Drag / move does not work Windows 7

    I've upgraded to Windows 7 from Vista.  Now I can't drag and drop files in a folder.  I can arrange the icons on my desktop by drag and drop, but not files.  This is how Windows 7 works or is something wrong?  If so any ideas on a fix?

    Microsoft has removed the option to disable the auto arrange in folders other then the desktop in Windows 7. It is still possible to drag and drop files from one folder to another.

    Auto fix - how to turn off the auto arrange in Windows 7
    Note: This is to change the registry - be careful!

    Auto fix - how to disable auto arrange automatically in Windows 7
    Note: An easier method, but it also changes the registry (automatically) - be careful!

    Questions about installing Windows 7?
    FAQ - Frequently Asked Questions from Installation Windows 7 & responses

  • Drag - move does not work on the first extension

    Hi all

    I'm a new user in Flex. And now, I am trying to create the first plugin.

    -the problem is that I use drag and drop to the desktop application event, works fine, when I debug it to first Extension, access the extension on the creation and the event does not properly.

    The error is Error #1034: Type coercion failed: cannot convert mx.events::DragEvent@7fff8465a19 in mx.events.DragEvent.

    The same two events and already worked in desktop application. Is this a bug or what Miss me?

    Thanks in advance

    Drag-n-drop works fine; See SDKPanel/src/ImportFilesDlg.mxml:handleFileDragStart ().

    I recommend starting a project Panel (based on SDKPanel), then pull in your office room by room application code.

  • Brush control with CTRL + ALT + click right + mouse/pen movement does not work with the tool liquify (photoshop cc 2015): what should I do?

    Brush control with CTRL + ALT + click right + mouse/pen movement does not work with the tool of liquefy; I can't change the size of the brush or hardness. OS win 7 Professional 64 bit, wacom tablet intuos 6.3.14 - 1 driver s pro, Photoshop 2015 CC worm.  2015.0.1 20150722.r.168

    What are your settings of GPU acceleration?  As I understand it, the Alt right click size and hardness adjust needs acceleration GPU to be turned on, but I have a feeling Brush hardness is always set to easy when using fluidity.  You can still see the quick mask as representation of the soft brush when Alt right click, but you can't change the hardness.

    Is that you can change the brush size and pressure (framed in red in my screenshot) Alt right click drag left and right changes size and down to pressure changes, and you can see what is happening in real-time by looking at the sign on the right.  It works independently of your acceleration GPU (IME) settings, but you don't get the effect of soft red quick mask.

    Does this fit with what you see, or you are not able to change things at all?  If not, then I've always found that fluidity consumes system resources, if you could check the Task Manager > Performance tab to see what kind of RAM and CPU use is using the fluidity.  That's what I see after direction the lens above with a big brush continuously for 10 seconds.  Note This is on a fairly quick NLE System.

  • Drag / drop does not work in external SWF?

    Hi all

    I am currently a TA for a Flash course at my school.  We are using AS 2.0 and external SWF.

    I think it could be very simple to remedy.  Well, at least I hope!

    A student is wrong with drag & drop functionality when used in an external SWF.  In fact, in our drag & drop section, we have a sheet of paper ('book' MC) and an object drag us in it ('object' MC).  When the object is released in the paper area, we go to frame 2 of the 'paper' MC, who therefore has an animation.

    It works very fine and dandy in the said drag & drop section, but once the section drag & drop is loaded into our main SWF via a space reserved MC, the feature drag - move no longer works.

    Here's the URL for the section drag & drop by itself:

    http://www.phayzed.com/Flashkit/drag_for_animation.swf

    and here's the URL for the main SWF, that loads the drag & drop SWF into a movieclip and forced to work incorrectly:

    http://www.phayzed.com/Flashkit/main.swf

    Here is the code on the draggable object ("object" MC):

    on (press) {
            startDrag (this, true);
    }
    on (release) {
            stopDrag ();
            if (this._droptarget == "/paper") {
                    _parent.paper.gotoAndStop(2);
                    _parent.object._visible=false;
    ;
            }
    }
    
    
    

    If we need more info, I'm ready to download the two FLA files.   Although, something tells me it's a simple problem to solve.

    For any help, thank you very much!

    See you soon
    T

    with as2, you need to convert that code to archaic as1:

    on (press) {
            startDrag (this, true);
    }
    on (release) {
            stopDrag ();
            if (eval(this._droptarget) == _parent.paper) {
                    _parent.paper.gotoAndStop(2);
                    _parent.object._visible=false;
    ;
            }
    }
    
    
    
  • Sony VGN-FW31E of eye movement does not work.

    My Sony VGN-FW31E of eye movement does not work, when I use the webcam it always shows video service bluetooth does not work. How can I get help from sony or other means?

    Thank you

    Evelyn

    Hello

    • Did you change your computer?

    Method 1

    I suggest you to follow the links and check out them.

    Check the status of the webcam in Device Manager?

    http://Windows.Microsoft.com/en-us/Windows-Vista/open-Device-Manager

    Uninstall and reinstall the webcam from the Device Manager.

    You must be logged on as administrator to perform these steps.
    a. open the Manager of devices by clicking the Start button, click Control Panel, click System and security, and then, under system, clicking Device Manager. Need administrator permission if you are prompted for an administrator password or a confirmation, type the password or provide confirmation.
    b. in the list of USB devices or imaging devices locate the webcam and make a right click on it and then click on uninstall.
    c. restart the computer and webcam again, he will be re - install it back automatically.

    Method 2:

    Updated a hardware driver that is not working properly
    http://Windows.Microsoft.com/en-us/Windows-Vista/update-a-driver-for-hardware-that-isn ' t-work correctly

    If you still have problems, that I suggest you contact Sony center and check.

    http://eSupport.Sony.com/Perl/support-contacts.pl

  • MovieClip (root) does not work inside a function

    Hey everybody,

    I'm having this problem.

    When I publish my FLA with reader 9, in fact, there is no prob.

    When I publish with player 10 selection, there is this problem.

    I paste my code:

    var leng:int = MovieClip(root).program.websiteXML.pages.titlePage.length();
    trace ("leng"+leng);
         
    setInterval(function () : void {
    
              if (MovieClip(root).program.autoCh==true){
                           
               trace("CHANGE");
                                
              
              MovieClip(root).allContent.controllMenu2['itemButton_' + MovieClip(root).program.linkPic].gotoAndPlay("s4");
              
              if (MovieClip(root).program.linkPic < int(leng-1)){
                        MovieClip(root).program.linkPic++;
                           }else{
                               //MovieClip(root).allContent.play ();
                             MovieClip(root).program.autoCh=false;
                             MovieClip(root).program.linkPic=1;
                             }
                           
                   
                             MovieClip(root).allContent.controllMenu2['itemButton_' + MovieClip(root).program.linkPic].gotoAndPlay("s4");
                             
    
                             
                             
                             for (var z:uint=1; z<(MovieClip(root).program.linkPic+1); z++) {
                                  var tempMC:MovieClip = MovieClip(MovieClip(root).allContent.controllMenu2)["itemButton_"+z];
                                  Tweener.addTween(tempMC, { x:(z-1)*(45+1)-353, time:1} );     
                                  
                             }
                             
                             for (var j:uint=(MovieClip(root).program.linkPic+1); j<7; j++) {
                                  var tempMC2:MovieClip = MovieClip(MovieClip(root).allContent.controllMenu2)["itemButton_"+j];
                                  Tweener.addTween(tempMC2, { x:(j-1)*(45+1)+352, time:1} );     
                                  
                             }
                             
                             MovieClip(root).allContent.controllMenu2['itemButton_' + MovieClip(root).program.linkPic].gotoAndPlay("s3");
                             
                        
    
                       }}, 4000);
    

    For variable coz, there is no problem, the value is retrieved.

    But it is inside SetIntervall, to

    MovieClip(root).program.autoCh

    He tells me that:

    TypeError: Error #1009: cannot access a property or method of an object reference zero.
    function / < anonymous > () [main6_cs3_fla._00button_136::frame1:32]
    service / http://adobe.com/AS3/2006/builtin: applies ()
    to SetIntervalTimer / onTimer)
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()

    And if I put the value outside the function:

    var autoChtest = MovieClip(root).program.autoCh;

    And use:

    if (autoChtest==true)

    There are no errors, but my function does not work properly, as native can be 'false' in another action.

    Well, I hope that will not scare you, and someone will try to help me, please.

    If anyone knows anything on this topic post or having the same problem please tell me.

    Thank you!

    Try:

    :

    var leng:int = MovieClip(root).program.websiteXML.pages.titlePage.length();
    trace ("leng"+leng);
    
    var rootVar:MovieClip=MovieClip(root); 
    setInterval(function () : void {
    
              if (rootVar.program.autoCh==true){
    
               trace("CHANGE");
    
             rootVar.allContent.controllMenu2['itemButton_' + rootVar.program.linkPic].gotoAndPlay("s4");
    
              if (rootVar.program.linkPic < int(leng-1)){
                       rootVar.program.linkPic++;
                           }else{
                               //MovieClip(root).allContent.play ();
                             rootVar.program.autoCh=false;
                             rootVar.program.linkPic=1;
                             }
    
                            rootVar.allContent.controllMenu2['itemButton_' + rootVar.program.linkPic].gotoAndPlay("s4");
    
                             for (var z:uint=1; z<(MovieClip(root).program.linkPic+1); z++) {
                                  var tempMC:MovieClip = rootVar.allContent.controllMenu2)["itemButton_"+z];
                                  Tweener.addTween(tempMC, { x:(z-1)*(45+1)-353, time:1} );     
    
                             }
    
                             for (var j:uint=rootVar.program.linkPic+1; j<7; j++) {
                                  var tempMC2:MovieClip = rootVar.allContent.controllMenu2)["itemButton_"+j];
                                  Tweener.addTween(tempMC2, { x:(j-1)*(45+1)+352, time:1} );     
    
                             }
    
                            rootVar.allContent.controllMenu2['itemButton_' + rootVar.program.linkPic].gotoAndPlay("s3");
    
                       }}, 4000);
    
    
  • Windows Snap function does not work inside a Setup dual monitor.

    I have Windows 7 Home Premium x 64 fully updated.  So far, it's great. But I have two monitors, 1440 x 900 primary and secondary 1280 x 1024 with the secondary monitor on the right of the main screen. When I try to 'break' a window on the edge of each monitor located next to the other monitor, nothing happens.  I was wondering if it was a typical problem people have seen or if it was just me and if there is no way to do work or if there was a patch for it. (A built-in feature of Google chrome "fit" allows inside monitors). Thanks for your help!

    Hello

    The action which engages a window on the side of a monitor, when you drag a window, is when the cursor comes in contact with the last row of pixels on the edge of the screen. Since there is no physical "edge" where monitors meet on a dual monitor configuration by dragging a window to that location does not work.

    You can always break a window inside edge on a double configuration monitor using the keyboard.

    = Wink left arrow Windows logo key + left key
    = Wink right arrow Windows logo key + right key

    I hope this helps.

    Thank you for using Windows 7 Ronnie Vernon MVP

  • The tab does not work inside the Scrollpane (AS3)

    Hello

    I have a movieclip with some input text fields. It's like a form. I need to use scrollpane due to its size. If I join this movieclip in the scrollpane component, the tab does not work between these text fields. When I press the tab, the focus moves to the scrollpane himself.

    I tried to set the tabIndex to the textfields. tabChildren and tabEnabled to true for the ScrollPane, but nothing seems to work.

    Please help if anyone has a solution for this.

    Finally found answer on another post. Add the following line of code solved my problem.

    sp.focusManager.deactivate ();

  • command of the keyboard to move does not work

    The command of period and comma for FCPX on my iMac won't work. FCPX just beeps at me instead to shift the video before a picture or backward a frame. (for a comma) He works for the arrow, but for some reason some will not work with the key to the period and comma. I use an Apple keyboard without the numeric keypad.

    OCHA you post a screenshot. You cannot move a clip in the scenario unless the Position tool is active.

Maybe you are looking for