Problem of passage of a string like a movie clip instance name

Hey guys out there.

I thought it would be a simple, but I am confused.  So I trained to the use of this solution less than optimal, just to make it work...

If (lobby.gamemap.selectedItem.label == "Map1") card. AddMap (new Map1)

Else if (lobby.gamemap.selectedItem.label == "Map2") card. AddMap (new map2)

Map1 and Map2 are video clips in my library with a binding Map1 and Map2, fla

I have a class of entry Hall, inside it's a combo box with the choice of the map... the problems when I try this application preferred

card. AddMap (lobby.gamemap.selectedItem.label)

Survey of error - Type 1067: Implicit coercion of a value of type String to an unrelated type flash.display:MovieClip of

I read in this post http://forums.Adobe.com/message/2741961 the flash should be able to use this [string] to pass the string as the name instance... film clip then I tried

card. AddMap (this [lobby.gamemap.selectedItem.label)]

trace (this [lobby.gamemap.selectItem.label])

This also will raise an error TypeError: Error #2007: child parameter must be non-null.

I note also that track come back NULL...

I tried this, the inclusion of the word 'new '.

card. AddMap (new this [lobby.gamemap.selectedItem.label])

This will raise - TypeError: Error #1007: instantiation attempted on a non-constructeur.

I also tried lobby.gamemap.selectedItem.label to pass a string and try all the previous situations with the string instead of the label of the comboBox.

.. still no dice.

Haaalp

Your preferred approach won't work for what is obvious if all goes well.  Whatever the done function AddMap, he expects a MovieClip as an argument, not a string.  Using the notation of support you've tried at the next attempt fails because the instance must exist to target this way.  And the last is simply wrong, in part for the previous reason and partly because an instance cannot be used directly as a class identifier.

Here is a code that can be used to create a new instance using a string value for the name of the class.  See if you can fit that...

var ClassRef: Class = Class (getDefinitionByName ("className"));
var classInstance: * = new ClassRef();

Tags: Adobe Animate

Similar Questions

  • How to use the commands on the cmd prompt witout using a string like 'netstat' but I need output

    How use the commands on the cmd prompt witout using a string like netstat but I need output
    example: C:\ > netstat-an... will give its results
    But if the keyword netstat is blocked...
    I want to use the command netstat another way... can I convert it to binary, and then I can run or something else
    Please answer my questin

    Netstat is simply a file program located in the folder C:\Windows\System32.   It appears as "netstat.exe.  If you rename (or copy / paste / rename) to "abc.exe" then you can run it using 'abc' instead of 'netstat '.

    HTH,
    JW

  • How to summarize a string like ("123456") is 1 + 2 + 3 + 4 + 5 + 6

    How to summarize a string like ("123456") is 1 + 2 + 3 + 4 + 5 + 6
    With T
    as (select '123456' str from dual)
    select sum(val)
    From
    (
    select substr(str,level,1) val from t connect by level <= length(str)
    )
    /
    
  • Need help duplicate Movie Clip problem

    Here's my problem:
    First of all, I have a movie that loads an external SWF that contains several images (each of the different "module" for a product)
    Each of these modules is named "module", more the number of frame (the frame one its "module1")

    So in the other film, which takes care of this, I used the script to load:
    var moduleloader:MovieClipLoader = new MovieClipLoader();
    moduleloader.loadClip ("PLCbuildermodules.swf", _root.modules);

    So... the real clip (called "modules") I added this script:
    {We (Press)}
    moduleName = eval ("module" + _root.modules._currentframe);
    {if(this._name=="modules")}
    i ++ ;
    duplicateMovieClip (modulename, "OxygisNouveau" + i, this.getNextHighestDepth ())
    startDrag (modulename, true);
    }
    }

    Now the problem is basically when reproduce you them, he hangs out fine like its supposed to... but when you click again, it duplicates again. I tried to counter this with the if(this._name=="modules") {script, but without success...}

    I am sure that the problem is that the clip be duplicated in the parent movie clip. I just can't understand how to reproduce them outside the clip parent!

    I would appreciate ANY help!

    Thanks in advance!

    -Chris

    -EDIT-

    Sorry for the double post... that was an accident...:)

    Well, I used the wrong terminology (I think...)...
    I think that what I had intended to say is,

    How to duplicate a clip so that the copy can be found outside its parent?

    Thank you!

    -Chris

  • I use iWeb for my website (use Go Daddy) but I would like to move to something different and easy even as iWeb (what you see is what you get) any suggestions?

    I use iWeb for my website (use Go Daddy) but I would like to move to something different and easy even as iWeb (what you see is what you get) any suggestions?

    Yes, why not take a look at EverWeb.  It has been designed to be very like iWeb, but with everything you wanted iWeb joined, as a form of contact, drop-down menus etc and much more.

    The layout is very similar to iWeb, and it was deliberately designed to be - have a look here EverWeb.

  • I'm having a problem trying to burn a DVD using Windows Movie Maker on Windows Vista...

    I'm having a problem trying to burn a DVD using Windows Movie Maker on Windows Vista. I was able to burn the WMV to a DVD file but I'm not able to watch on my DVD player.  It plays ok on my computer.  How can I burn a file to a DVD and be able to continue to watch on my DVD player?

    If you're running Vista Home Premium or Ultimate
    You can try using Windows DVD Maker.

    Windows Vista - disk to burn a DVD-video

    http://Windows.Microsoft.com/en-us/Windows-Vista/burn-a-DVD-video-disc

    Windows Vista - demo: disk make a DVD-video
    http://Windows.Microsoft.com/en-us/Windows-Vista/demo-make-a-DVD-video-disc

    If you don't have a DVD Maker, you will need DVD
    Creation software. The following freeware peuvent
    be worth a try:

    (FWIW) It's always a good idea to create a system
    Restore point before installing software or updates)

    DVD Flick
    http://www.videohelp.com/tools/DVD_Flick
    (the download is: "dvdflick_setup_1.3.0.7.exe")
    (Mirror download (direct link) is the fastest.

    Save the file to your desktop or a folder on your
    hard drive and install from there.

    Be sure to read the Guide:
    http://www.dvdflick.NET/Guide.php

    Tutorials:

    Tutorial DVD Flick
    http://beginwithsoftware.com/videoguides/DVD-flick-Guide.html

    Burn any Format video DVD PC
    http://www.freevideoworkshop.com/dvdflicktutorial.htm

    AVI to DVD with DVD Flick Guide
    http://www.Digital-Digest.com/articles/AVI_to_DVD_using_DVD_Flick_page1.html

    To create a video DVD base that should play in a free
    permanent drive DVD... try the following...

    First... read the DVD Flick Guide to familiarize
    with the program.

    Open DVD Flick and insert a blank DVD in your drive.

    If the window of Autorun from your computer... just close it.

    Click the project settings button and check... Video /.
    Target format... residents United States... Choose... NTSC /.
    Accept.

    The title button left click Add and navigate to your
    Video clips and select the ones you want on the DVD.

    You can have by selecting one and then use
    the up and down buttons.

    Left click on the button create DVD / OK / Yes / Yes.

    Please wait while the DVD is created.

    When the text "Completed successfully" is displayed you
    DVD Flick can close. Now you can eject your DVD
    and play in your DVD player.

    At some point you might want to buy more
    Advanced Cyberlink, Nero, Roxio, software
    Ulead, etc... but at least it is a start.

    Good luck.

  • My computer crashed while I was able to cancel the registration of my copy of Windows 7. I would like to move to my laptop. What should I do for this (a number to call, etc.) Thank you!

    My computer crashed while I was able to cancel the registration of my copy of Windows 7. I would like to move to my laptop. What should I do for this (a number to call, etc.) Thank you!

    Jut a little word. If it is a retail version of Windows 7, you should be OK, but if it's a version of Windows 7 OEM then the license died when the machine does.

  • My daughter bought InDesign CS5 inscribed at the University of Albany. Since then, she hasn't needed InDesign and I would like to move to my computer but cannot access his old email. Support is a joke (running around in circles). How can I get this on my

    Since then, she hasn't needed InDesign and I would like to move to my computer but cannot access his old email. Support is a joke (running around in circles). How can I get this on my machine? I have all the files download, she had.

    Legally, you can't transfer a teaching license.

  • Hello, I originally bought CS5 Production Premium for Mac in 2010 and I would now like to move to another machine.  I can't have my serial number on the site because no product seems to be attached to my login.  What can I do?

    Hello, I originally bought CS5 Production Premium for Mac in 2010 and I would now like to move to another machine.  I can't have my serial number on the site because no product seems to be attached to my login.  What can I do?

    Try to contact the Adobe Support via chat and see if they are ready to help you.

    To the link below, click on the still need help? the option in the blue box below and choose the option to chat...
    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Serial number and activation support (non - CC) chat
    https://helpx.Adobe.com/contact.html?step=PHSP-PHXS_downloading-installing-setting-up_lice nsing-activation_stillNeedHelp

  • I saw in the previous discussion, that InDesign in CC2015 police problem has been resolved by setting to "search the entire font name" but I can't find any place to select this setting. Pleae advise!

    I saw in the previous discussion, that InDesign in CC2015 police problem has been resolved by setting to "search the entire font name" but I can't find any place to select this setting. Pleae advise!

    Look at the top of this thread:

    Cannot access fonts with InDesign CC 2015

  • Hi, I want to export my movie on DVD clips, burning them like AVCHD, movies are made on the basis of an iphone 6 1080 p 60. I want to keep the best possible quality. Can someone tell me what that best project settings I should use? Thank you very much.

    Hi, I want to export my movie on DVD clips, burning them like AVCHD, movies are made on the basis of an iphone 6 1080 p 60. I want to keep the best possible quality. Can someone tell me what that best project settings I should use? Thank you very much.

    Johnny

    Thanks for the reply to my comments to complete Responses to your subject.

    Factors in your planning...

    First elements 13/13.1 does not support Windows XP, Windows Vista or Mac OS 10.7.

    First items 10, 11 or 12/12.1 on a Windows computer is 64-bit application when it is run on Windows 7, 8 or 8.1 64-bit computer. Otherwise, it's a 32-bit application. This has implications on important it resources, particularly for your biggest projects in Premiere Elements.

    Video mobile phone registered with a variable rate is a consideration for any version of Premiere Elements. If your cell phone video shows with audio out of sync and you use the hand brake to correct this condition, you should get good quality of the handbrake H.264.mp4 (just make sure that the export rate is comparable to that of the original in addition to changing the frequency of images to a number (use same as source) and selecting constant for this frame rate).

    If any clarification on the above, do not hesitate to ask.

    Thank you.

    RTA

  • Hi, I have a problem with the import of the 4000 SJCAM MOV files. MOV files are in formats supported for Adobe Premiere elements 11. But if I am importing of MOV file, only audio part is imported, part video is not imported. How can I solve this problem?

    Hi, I have a problem with the import of the 4000 SJCAM MOV files. MOV files are in formats supported for Adobe Premiere elements 11. But if I am importing of MOV file, only audio part is imported, part video is not imported. How can I solve this problem?

    haben

    Looking at the specs of your camera (SJCam 4000), we already know what video compression your camera uses. It is H.264.

    A H.264.mov file should be accompanied by a first elements 11. On what computer operating system is your first items 11 running?

    You have the latest version of QuickTime installed on your computer? And, you use QuickTime and first of 11 elements of a

    Account user with administrative privileges? Please go to Premiere elements 11 publish + share/computer/QuickTime to confirm that you will find

    presets it to the choice of QuickTime, it.

    What are the properties of these files H.264.mov - is it 1080 p (1920 x 1080 p 30) 30 or something else? Do you know if this device is registering with a variable or

    a constant rate?

    Please check and review and then we'll decide what next.

    Thank you.

    RTA

  • I've currently exploited cs5, would like to move to extended, is it possible without having to buy the whole program?

    I've currently exploited cs5, would like to move to extended, is it possible without having to buy the whole program?

    It is not possible to buy CS5 now. However, you can get an upgrade PS extended here CS6, Creative Suite 6

    ~ David

  • Coding of a button in a movie clip problems to navigate the scenes

    Hello! I have an another probably noobish question to ask on the CS6.

    My goal is very similar to the mentioned in this forum question described above: http://forums.Adobe.com/message/837995#837995 and also in this issue http://forums.Adobe.com/message/4172919#4172919

    I'm trying to make a button inside a clip in my first scene when you click in the first frame of my second scene. I appointed menu_button_1 instance of the button, and I think that the stage 1 and stage 2 are the names of the scenes. (If they should have special names or instance names, I do not see where type them.) Because of the similarities, I tried to follow the suggestions on these pages. However, I did probably some small thing wrong, (or heck, maybe one thing huge.) that I what I would like to help find.

    Stop();
    myButton.addEventListener (MouseEvent.CLICK, clickHandler);
    function clickHandler(evt:MouseEvent):void {}
    Stop (1, "scene 1");
    }

    This seems to be what has been proposed to enter. I tried to change it works as well for me. That's what I typed to the button action.

    menu_button_1.addEventListener (MouseEvent.CLICK, clickHandler);

    function clickHandler(evt:MouseEvent):void {}

    gotoAndPlay (1, "scene 2");

    }

    (I removed the stop function because I have music on a loop in the clip I want to play until the mouse is clicked). (Also, I took gotoandplay because I wanted to stage 2 to start playing immediately when clicked, rather than to stop.)

    I tried variations, including the "2" instead of "scene 2" and whatnot. I also tried connecting to differnet places just to see if that would work. It seems that she would be able to join if I only asked a frame in the clip of the film itself, but he couldn't go to all other executives in stage 1 or stage 2. When I try this message appears in the output:

    ArgumentError: Error #2108: stage 2 was not found.

    at flash.display::MovieClip/gotoAndPlay()

    at interactivestgermant_fla::menu_1/clickHandler()

    It seems that not finding my scene 2. (She also can't find scene 1 when I invite you to do so.) I'm afraid that I'm not sure of what I entered incorrectly, although I imagine that this is how I typed the navigation of the scene. Should have an instance name or something? I was very muchappreciate a little nudge in the right direction. If you need more info, I'll be happy to provide. Thanks for the help! I appreciate that very much.

    The first image you provided shows that you have assigned an image tag, not an instance name.  You must select the menu object on the stage and then you should see a section of the properties panel at the top which has a field with "", said inside (assuming it's a movieclip symbol).  This is where you enter the word 'menu'... which is by assigning a name to the instance of the menu you have on the stage.

    The way you seem to have a number of keyframes that precedes in the timeline may mean you need to do this in each keyframe where there is this menu item.  IF you do not, then it can inherit the lack of a name of a previous frame.

  • Having problem adding to drag-and - drop operation to move the furniture on a floor plan

    I have the following code. I need to create floor plans where users can drag and drop the furniture on the floor plan.  I have three elements that work but when I convert all of the additional items to a symbol and select movie clip and then add several lines to the code, none work... How the code can determine that my clip I named 'couch' goes to clip 4.  Thanks if you can help, Frankie Foster

    Here is my code:

    var numObjects:uint = 3 / / assign the total number of movieclips that will be dragged

    for (var i: uint = 1; i < = numObjects; i ++) {}

    This ["movieClip_" + String (i)] .addEventListener (MouseEvent.MOUSE_DOWN, clickToDrag);
    This ["movieClip_" + String (i)] .addEventListener (MouseEvent.MOUSE_UP, releaseToDrop);

    }

    var selectedMC:MovieClip;

    movieClip_1.addEventListener (MouseEvent.MOUSE_DOWN, clickToDrag);
    movieClip_2.addEventListener (MouseEvent.MOUSE_DOWN, clickToDrag);
    movieClip_3.addEventListener (MouseEvent.MOUSE_DOWN, clickToDrag);
    movieClip_1.addEventListener (MouseEvent.MOUSE_UP, releaseToDrop);
    movieClip_2.addEventListener (MouseEvent.MOUSE_UP, releaseToDrop);
    movieClip_3.addEventListener (MouseEvent.MOUSE_UP, releaseToDrop);


    function clickToDrag(event:MouseEvent):void
    {
    selectedMC = MovieClip (event.currentTarget);
    selectedMC.startDrag ();
    }

    function releaseToDrop(event:MouseEvent):void
    {
    event.currentTarget.stopDrag ();
    }

    stage.addEventListener (KeyboardEvent.KEY_DOWN, nextQuestion);

    function nextQuestion(event:KeyboardEvent):void {}
    trace (Event.keycode);
    if(Event.keycode == Keyboard.Right)
    {
    selectedMC.rotation += 5;
    }

    if(Event.keycode == Keyboard.Left)
    {
    selectedMC.rotation-= 5;
    }
    }

    It is not a conflict, but it's a waste of code because they are both the same thing.  The first with the right loop is more effective in terms of coding and will make life easier for you because you only need to adjust the numObjects value to have it include more.

    You just need to assign instance names for the rest of your objects in the same way... movieClip_ # code as you (with loop version) should be enough.

Maybe you are looking for

  • Apple doesn't disclose your previous balances from iTunes

    I already posted this question here before and received no response. iTunes mysteriously are not answering this question either. Can you help me? I asked for a refund on a purchase of iTunes. Apple said they would give me a refund. Great! However, I

  • creating Apple id

    BILLING INFORMATION You will not be charged until you make a purchase. For assistance, contact Support for iTunes at www.apple.com/support/itunes/ww/. It always appears when I create identifier apple

  • Screen freezes randomly (Macbook Pro retina 13 inches early 2015)

    MacBook Pro (retina, 13 inches, early 2015) OS X Version of El Capitan 10.11.4 Processor: Intel Core i5 at 2.9 GHz Memory: 8 GB 1867 MHz DDR3 Graphics card: Intel Graphics Iris 6100 1536 MB I bought this MacBook on the Apple store online a year ago,

  • Satellite C850D - 11K does not illuminate

    Hello. Recently, I dropped my laptop. He fell hard and seems not damaged. But since then it will not turn on. When I connect to the AC adapter, the power led lights up. When I press the power button, only the "on" lights up and the fan starts to turn

  • Change the dynamic distribution model

    When you create a new VI of the dynamics or expedition models, I find myself always move the controls on the front panel for a particular arrangement that meets my needs better than the default template. Doing this repeatedly is a huge waste of time