Duplicating a movieclip wont work properly (v3)

I have a mc called "Bola_btn" on root and I want to duplicate
it using trhis
code.
play_btn = 'play_btn';
Bola_btn.duplicateMovieClip(play_btn,
_root.getNextHighestDepth());
var botn = eval(play_btn);
botn._x=200;
botn._y= 300;
It duplicates it but it doesnt move it... what am i doing
wrong???
Cheers to everyone.

Thanks for the answer.
The help says:
duplicateMovieClip(target:MovieClip, newname:String,
depth:Number) : Void
That means it doesnt return anything, right?
play_btn is not a child of bola is a movieclip duplicated
whick they stay in
the same level, the look the same but the are different.
(different
actions).
Is called _btn because is going to ahndle actions but is a mc
really.
Hmmm....
Thanks for the interest. :)
"Rothrock" <[email protected]> escribió
en el mensaje
news:ef8oph$2hr$[email protected]..
>I don't really know how to explain what you are doing
wrong other than that
> isn't the way to do it.
>
> Check the help file for the duplicateMovieClip() method.
I think it
> returns a
> reference to the clip. If that is the case you could do
this:
>
> botn=Bola_btn.duplicateMovieClip(play_btn,1000);
> botn._x=200;
> botn._y=300;
>
> Also I think you can create an init object and give that
to the duplicate.
>
> finally if you really want to go this way you could do
something like
>
> Bola_btn[play_btn]._x=200;
>
> That is if I'm following correctly and the new button is
being duplicated
> as a
> child of Bola_btn.
>
> PS: If Bola_btn is a movieclip why are you giving it a
btn suffix?
>

Similar Messages

  • Connected new monitor and now outlook 2010 wont work properly

    Hello, we just connected an new 2013 Asus monitor for my computer that's running Windows XP. Since doing so we cannot use OUTLOOK 2010. Everything else seems to work. Can anyone tell why its not working properly? We have a SSD drive running XP with an
    external 2 tera bite hard drive where most programs and files reside. THANK YOU FOR ANY HELP YOU CAN GIVE US.

    Hi,
    Would you please detail the symptom of this issue? Is the issue that you click on the Outlook icon but it doesn't start, or there's an error message, or it crashes?
    Since this happens after connecting to a new monitor, I recommend you upgrade the graphics card driver to the latest to check the result. In addition, official drivers are more recommended.
    Regards,
    Melon Chen
    TechNet Community Support

  • Site wont work properly?!

    Hello,
    I searched for the same or similar problem first but havent find my kind of problem, so I have decided to make a new thread.
    My site solution is very simple, its something more like a test: www.bursac.net/student
    Techically, Flash itself doesnt report any kind of problem at all. But, practically site (site is one big flash .swf movie right?) wont work as intended.
    Simply, when I roll over the main word "student", text should appear and dissapear when I roll out of the word. It works for a couple of times when I do that, but after a while (or sometimes immediately) it switches around and then text dissapears when I roll over instead of opposite.
    So, are there any idea what could possibly be the problem?
    Thank you so very much in advance.
    Savo
    My code is very basic:
    stop();
    student_mc.buttonMode = true;
    student_mc.addEventListener(MouseEvent.ROLL_OVER, introductionIn);
    student_mc.addEventListener(MouseEvent.ROLL_OUT, introductionOut);
    student_mc.addEventListener(MouseEvent.CLICK, resultIn);
    student_mc.addEventListener(MouseEvent.CLICK, timeIn);
    student_mc.addEventListener(MouseEvent.CLICK, thinkingIn);
    student_mc.addEventListener(MouseEvent.CLICK, educationIn);
    student_mc.addEventListener(MouseEvent.CLICK, cultureIn);
    student_mc.addEventListener(MouseEvent.CLICK, invisibleIn);
    function introductionIn(event:MouseEvent):void
    introduction_mc.gotoAndPlay("over");
    function introductionOut(event:MouseEvent):void
    introduction_mc.gotoAndPlay("out");
    function resultIn(event:MouseEvent):void
    result_mc.gotoAndPlay("over");
    function timeIn(event:MouseEvent):void
    time_mc.gotoAndPlay("over");
    function thinkingIn(event:MouseEvent):void
    thinking_mc.gotoAndPlay("over");
    function educationIn(event:MouseEvent):void
    education_mc.gotoAndPlay("over");
    function cultureIn(event:MouseEvent):void
    culture_mc.gotoAndPlay("over");
    function invisibleIn(event:MouseEvent):void
    invisible_mc.gotoAndPlay("over");
    result_mc.buttonMode = true;
    time_mc.buttonMode = true;
    thinking_mc.buttonMode = true;
    education_mc.buttonMode = true;
    culture_mc.buttonMode = true;
    invisible_mc.buttonMode = true;
    invisible_mc.addEventListener(MouseEvent.CLICK, generalMove);
    invisible_mc.addEventListener(MouseEvent.CLICK, Move);
    invisible_mc.addEventListener(MouseEvent.CLICK, studentOver);
    invisible_mc.addEventListener(MouseEvent.ROLL_OVER, lineIn);
    invisible_mc.addEventListener(MouseEvent.ROLL_OUT, lineOut);
    invisible_mc.addEventListener(MouseEvent.CLICK, navigationMove);
    function navigationMove(event:MouseEvent):void
    up_mc.gotoAndPlay("on");
    down_mc.gotoAndPlay("on");
    left_mc.gotoAndPlay("on");
    right_mc.gotoAndPlay("on");
    function Move(event:MouseEvent):void
    result_mc.gotoAndPlay("click");
    time_mc.gotoAndPlay("click");
    thinking_mc.gotoAndPlay("click");
    education_mc.gotoAndPlay("click");
    culture_mc.gotoAndPlay("click");
    invisible_mc.visible = false;
    function lineIn(event:MouseEvent):void
    lines_mc.gotoAndPlay("over");
    function lineOut(event:MouseEvent):void
    lines_mc.gotoAndPlay("out");
    function studentOver(event:MouseEvent):void
    student_mc.gotoAndPlay("over");
    function generalMove(event:MouseEvent):void
    general_mc.gotoAndPlay("on");
    up_mc.addEventListener(MouseEvent.CLICK, generalUp);
    down_mc.addEventListener(MouseEvent.CLICK, generalDown);
    left_mc.addEventListener(MouseEvent.CLICK, generalLeft);
    right_mc.addEventListener(MouseEvent.CLICK, generalRight);
    function generalUp(event:MouseEvent):void
    general_mc.y += 20;
    function generalDown(event:MouseEvent):void
    general_mc.y -= 20;
    function generalLeft(event:MouseEvent):void
    general_mc.x += 20;
    function generalRight(event:MouseEvent):void
    general_mc.x -= 20;

    Hello,
    Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
    Note: ''This will temporarily log you out of all sites you're logged in to.''
    To clear cache and cookies do the following:
    #Go to Firefox > History > Clear recent history or (if no Firefox button is shown) go to Tools > Clear recent history.
    #Under "Time range to clear", select "Everything".
    #Now, click the arrow next to Details to toggle the Details list active.
    #From the details list, check ''Cache'' and ''Cookies'' and uncheck everything else.
    #Now click the ''Clear now'' button.
    Further information can be found in the [[Clear your cache, history and other personal information in Firefox]] article.
    Start Firefox in Safe Mode to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    <b> To Enable SafeMode </b>
    *You can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    *''Once you get the pop-up, just select "'Start in Safe Mode"''
    If it works in Safe Mode and in normal mode with all extensions (Tools > Add-ons > Extensions) disabled then try to find which extension is causing it by enabling one extension at a time until the problem reappears.
    Close and restart Firefox after each change via "Firefox > Exit" (Windows: Firefox/File > Exit; Mac: "Firefox > Quit Firefox"; Linux: "Firefox/File > Quit")
    * https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Flash buttons nested in movieclips wont work

    I made some movie clips in flash and inside those movie clips are buttons but I can't get the buttons to work in flex. I can only get the buttons to work in flex if they are on the main timeline in my swc file. Is there a way to get the buttons and other movieclips to respond if they are nested in another movieclip?

    It depends on how you are accessing the MoveClips.  If you embed, scripting will get stripped out.  If you load a SWF with those movieclips, it should still work.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Version 6 wants to instal on my computer i've tried but wont work properly had to uninstal I have windows xp

    FLASHES ON SCREEN I SHOULD UPDATE TO VERSION 6 BUT SAID ADD ONS WERE NOT AVAILABLE WAS VERY SLOW COULDN'T USE IT LIKE IT WAS SO I HAD TO DO SYSTEM RESTORE TO GET THINGS BACK AND UNINSTALL FIREFOX 6, PREFER THE ONE I AM WITH NOW WHICH IS 5 I THINK

    I ended up finding a solution.....went to Firefox tab on top left of browser screen. Went to help, restart with add-ons disabled. This takes you to the Firefox Safe Mode text box. Select "Reset all user preferences to Firefox defaults. This seems to have worked, as there is no longer an AVG Secure Search directed screen. Also, I installed Avast. Have had it on my tower PC and another laptop for 2 years with no issue. Screw AVG!!!

  • "Hangman" wont work properly

    import java.awt.*;
    import java.awt.event.*;
    public class Hangman
      /* Extracts letters from the current woriginalCharArray and puts them in a character array */
      private static char[] wordChange (String originalCharArray)
        char[] temp;
          temp = new char[originalCharArray.length ()];
        for (int i = 0; i < originalCharArray.length (); i++)
         temp[i] = originalCharArray.charAt (i);
        return temp;
      /* Handles the 'Guess' button */
      private static class ActionHandler implements ActionListener
        public void actionPerformed (ActionEvent event)
          boolean changeWord;     // If true, change to next word
          boolean correctCheck;     // If false, decrease maxGuessCounter
          char guessedChar;          // Character entered by user
          // Check to see if it's the last word, and quit if it is
          if (index > 4)
           outputLabel.setText ("Game over");
           outputGuess.setText ("Your score is: " + points);
          guessedChar = (textField.getText ()).charAt (0);     // Reads character
          /* Resets boolean variables */
          changeWord = false;
          correctCheck = false;
          /* Checks if the guessed character exists in the Word, adds to points counter */
          for (int i = 0; i < originalCharArray.length; i++)
           if (guessedChar == originalCharArray)
         guessedCharArray[i] = guessedChar;
         correctCheck = true;
         points++;
    /* If false, decrease maxGuessCounter */
    if (correctCheck != true)
         maxGuessCounter--;
    /* Reset the values, to avoid concatenation */
    outputLabelWord = "";
    spacelessOutputWord = "";
    /* Go through array, and set the outputLabelWord to the guessedCharArray (e.g. set all the correctly guessed chars in a String, so you can display it */
    for (int i = 0; i < guessedCharArray.length; i++)
         outputLabelWord = outputLabelWord + " " + guessedCharArray[i];
         spacelessOutputWord = spacelessOutputWord + guessedCharArray[i];
    /* If the word is correctly guessed, or the maximum amount of guesses have been exhausted, change the word */
    if (spacelessOutputWord.equals (wordList[index]) || maxGuessCounter < 1)
         maxGuessCounter = 5;
         index++;
         originalCharArray = new char[wordList[index].length ()];
         originalCharArray = wordChange (wordList[index]);     // Extract characters from the word, enter them in a character array
         guessedCharArray = new char[originalCharArray.length];
         /* Reset the guessed character array */
         for (int i = 0; i < originalCharArray.length; i++)
         guessedCharArray[i] = '_';
         for (int i = 0; i < guessedCharArray.length; i++)
         guessCharString = guessCharString + " " + guessedCharArray[i];
         outputLabel.setText (guessCharString);
         changeWord = true;
    if (changeWord == false)
         outputLabel.setText (outputLabelWord);
    outputGuess.setText ("" + maxGuessCounter);
    /* Declare variables */
    private static int points = 0;
    private static int index;
    private static int maxGuessCounter;
    private static String spacelessOutputWord = "";
    private static String outputLabelWord = "";
    private static String word = " ";
    private static String guessCharString = "";
    private static Label outputLabel;
    private static Label outputGuess;
    private static TextField textField;
    private static Frame display;
    /* Declare arrays */
    private static char[] originalCharArray;
    private static char[] guessedCharArray;
    private static String[] wordList = { "h", "he", "hel", "hell", "hello" };
    public static void main (String[]args)
    textField = new TextField ("", 10);
    maxGuessCounter = 5;
    //Frame
    display = new Frame ();
    display.setLayout (new GridLayout (3, 2));
    index = 0;
    //Button stuff
    Button guess;
    ActionHandler action;
    guess = new Button ("Guess");
    outputGuess = new Label ("5");
    outputLabel = new Label (word);
    originalCharArray = new char[wordList[index].length ()];
    originalCharArray = wordChange (wordList[index]);
    guessedCharArray = new char[originalCharArray.length];
    // Initializes the outputLabel
    for (int i = 0; i < guessedCharArray.length; i++)
         guessedCharArray[i] = '_';
    for (int i = 0; i < guessedCharArray.length; i++)
         guessCharString = guessCharString + " " + guessedCharArray[i];
    outputLabel.setText (guessCharString);
    guess.setActionCommand ("guess");     // Name the button event
    action = new ActionHandler ();     // Instantiate listener
    guess.addActionListener (action);     // Register the listener
    //What to display on screen
    display.add (outputLabel);
    display.add (new Label (""));
    display.add (textField);
    display.add (guess);
    display.add (outputGuess);
    display.pack ();
    display.show ();
    display.addWindowListener (new WindowAdapter ()
    public void windowClosing (WindowEvent event)
    display.dispose ();
    System.exit (0);}
    Problems:
    1) Doesn't work well, when it comes to the last word. It requires an additional click, after the wrong guess, in order to show the game over thing.
    2) Gives an error message:
    java.lang.ArrayIndexOutOfBoundsException
    at Hangman$ActionHandler.actionPerformed(Hangman.java:85)
    at java.awt.Button.processActionEvent(Button.java:381)
    at java.awt.Button.processEvent(Button.java:350)
    at java.awt.Component.dispatchEventImpl(Component.java:3526)
    at java.awt.Component.dispatchEvent(Component.java:3367)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:191)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
    when there.
    3) Doesn't set to correct number of "_"'s (i.e equal to the word) when you guess the right word; only after you have entered the first number does it set the number of "_"'s correctly, namely the same amount as characters in the word.

    Also another weird thing I noticed. Check this part of the code:
      private static char[] wordChange (String originalCharArray)  {    char[] temp;      temp = new char[originalCharArray.length ()];    for (int i = 0; i < originalCharArray.length (); i++)      {     temp<i> = originalCharArray.charAt (i);      }    return temp;  }When I change the length() to length, it doesnt work, although it shouldnt be length(). How come? I thought length() is for strings, and length is for arrays.

  • Actions wont work properly, please help.

    When I run certain actions, I get the errors of "Command feather is not available", or "Command transform is not available".
    I've tried to reset my preferences but it did not work.
    What is going on? Any info would be helpful.

    There has to be a selection active for those command to work on
    something.

  • Button wont work properly with text.

    Hello,
    I've been having a problem getting my buttons to work with
    text.
    What I'm doing:
    1) I create a Circle graphic
    2) I put some text over it (on the same layer)
    3) I highlight the circle and the text and convert to symbol.
    4) I then set the over, down, and hit states
    When I turn on enable simple buttons it works perfectly on
    the stage. But when I test the movie the text blocks the mouse
    pointer from changing states. It'll change in-between the text, but
    not over.
    Any help would be appreciated.

    Your text must be dynamic text rather than static text. Make
    sure the text is not "selectable" and then it won't interfere with
    the button. If you click on the text in the button, look down at
    the bottom of the screen for the properties panel. You should see a
    little Ab in a square. If it is highlighted, the text is
    selectable. Click that Ab button to make it unselectable. If your
    text is input text, then you are out of luck because input text, by
    definition, is always selectable.

  • New sim, old number, iMessage wont work Properly?

    I transferred my old number to my new sim when i got my iphone 4. When i tried to use iMessge it wont send using my new number/email adress contact details, but from the original number on the sim. Can any one help?
    Thanks

    I transferred my old number to my new sim when i got my iphone 4. When i tried to use iMessge it wont send using my new number/email adress contact details, but from the original number on the sim. Can any one help?
    Thanks

  • My Creative Cam wont work properly in MSN Messenger! I cant get the effects to work PLEASE HELP!

    When I open the webcam centre everything works fine I can get all the effects...BUT when I open messenger (MSN) I get a good picture but when I open the effects window I cant get the effects to work in there.... I went to the creative site which tells me I can use this cam ok in MSN Messenger....Please help before I pull my hair outThankyouBillie-Jean x

    I had the exact same issue but finally after much reading found that the Advanced Video FX utility must be activated first, then open the Web Cam Center.
    On the upper left side just above your image is a Device Selection box. You may not redily recognize it as such.. Click on the down arrow just to the left of the Format tab and select the "Creative WebCam(With Video Effects)". Now try the effects. This did the trick for me. Hope it works for you!

  • CD/DVD drive on Satellite Pro M70 wont work properly

    Following my up date to Vista Ultimate and SP1 my CD/DVD disk drive stopped working.
    I was able to adjuest this using the "HKEY_LOCAL_MACHINE/SYSTEM/ETC/.." but now only DVD will operate correctly.
    When I try to re-install my All-in One printer the installation only reaches step 1 and I then get the follwing message. 'the Installer cannot access the regristry key - HIKEY_LOCAL_MACHINE\SYSTEM\Current\ControlSEt\Enum .'
    The drive sems to be permanently in DVD RW. Can anyone assist.

    >Can anyone assist?
    Maybe Microsoft. Many different and very strange issues occur after SP1 installation. For better overview check http://aps2.toshiba-tro.de/kb0/TSB84026M0000R01.htm

  • G510 HD8750M wont work properly. - Driver problems..

    Hey Community, Support and People.
    I'm kinda pissed about all the problems coming with buying a Lenovo Laptop.
    I bought a HP Probook for my mum some days ago, this one was ready after 20 minutes.
    Here i got problem for days.
    I got Windows 7 64-bit working, and all drivers but the 2nd gpu-driver.
    It's installed and hardware manager doesnt say anything about problems.
    When i start Games like World of Warcraft or Battlefield 4 , i can set the graphics to the level the card should be able to work on. No problems so far.
    But then it comes... "AMD DRIVER STOPPED RESPONDING AND HAS RECOVERED".
    I'm going to dream about this sentence...
    At first i wasn't even able to start games with that Radeon.. until i started Catalyst Control Center and set those applications to Maximum power instead of energy saving."
    And i was able to start Battlefield 4 with 44FPS.
    So it was definately the Radeon working, not the Intel 4000....
    i was looking all over the internet for a fix.. 
    reinstalled graphics drivers.. got the actual 14.04 Catalyst driver... and even installed the Windows FIx (http://support.microsoft.com/kb/2665946)
    Anybody got suggestions?
    CPU: i7
    Ram: 4GB
    GPU: Intel 4000 and Radeon HD8750M.
    + is it normal the Intel GPU works on 70°C ?
    Happy about ideas from u...
    greetings..

    Push!°

  • Iphone 5c touchscreen wont work properly until i press the top power button on then off??

    If i leave me phone for a while  or even a fe mins sometimes then try to enter my 4 digits password to get into my phone  it fails to respond to any touches at all...once i press the top power screen to take it away from the lock sreen then press it once more to go to the lock screen its totally fine and everything works as normal?
    Anyone know why this is happening and how i can sort it...its annoying me and should be like this..thanks

    Hey maigo6,
    Thanks for the question. If I understand correctly, the touchcreen does not respond all the time. I would recommend that you read this article, it may be able to help the issue.
    If the screen on your iPhone, iPad, or iPod touch doesn't respond to touch - Apple Support
    Thanks for using Apple Support Communities.
    Have a great day,
    Mario

  • 'cycle region' wont work properly/erases previously rec. notes

    roger said:
    "Use the 'cycle region' facility:
    http://docs.info.apple.com/article.html?path=garageband/3.0/en/df1028.html
    i wasnt aware of this, but i did it as usual, as the yellow cycle is always "on"
    in my songs.
    so, whenever i press record and record some notes with my apple keyboard,
    Gb3 will erase the previously recorded notes when i play rec. a second time or third.. and so on.
    i think i make a simple mistake, yes?
    i cant figure out which...

    ah. i guessed sth. like that. thats a pitty.
    is that a GB3 limitation, is this maybe possible in
    Logic express?
    It's a GB(any version) limitation). I don't know about Le
    Your guess at a workaround is close to correct. Once you've created all the tracks you want, select all the regions and use the Join menuItem to consolidate them into a single track. 
    <hr width="250" align="left">
    HangTime [Will Compute for Food] B-)>
    ♪♫ The Bullets and Bones Band ♫♪
    Disclaimer<hr width="250" align="left">

  • Runescape wont work properly?

    I don't see what could be wrong. The java loads, as well as the game, but when the screen to login is supposed to come on it stays at a black screen.  Please it would be a great help.  Thanks

    Theres a fix on runescape tech forums. Writen by Mr Pacman. I havent tried  but think i will.Good luck

Maybe you are looking for

  • Keeping my iTunes Library on an external hard drive

    I just don't have enough space anymore for my iTunes songs and videos and podcasts, etc. I would like to get a TB or a 1.5 TB external hard drive with a USB connection and move my library to the external hard drive. I have two questions. Will this wo

  • Update db table for duplicate entries.

    Hi, If i want to update a ztable i have 3 to 5 different ways. 1.   UPDATE ztab FROM workarea. 2.   UPDATE ztable SET field1 = wa-f1 field2  = wa-f2                WHERE keyf1 = wa-kf1                AND   keyf2 = wa-kf2. 3.  UPDATE ztable FROM TABLE

  • Can't use iMovie 7 (iLife '08)

    Hi there I have just upgraded my iLife suite from iLife '06 (original with my Mac Mini) to iLife '08. All is well except with iMovie I get the following message 'You can't use this version of the application iMoviewith this version of Mac OS X. You h

  • Saving photos in compressed files

    My DLSR camera creates photos with file sizes in the 4.0 to 9.0 MB range.  At these sizes, even a single photo is sometimes too large to send via email.  Now I am trying to post some of them on a website, and they are too large to be included on a we

  • Actual Finish date in production order

    Hi All Iam using AFKO-GLTRI  ( ACTUAL FINISH DATE) field in some Z-report. Iam having only one operation in production order which does not have AUTOGR key. Iam using serial number and doing GR through migo. Date in AFKO-GLTRI  field does not get pop