Dynamic addition of combobox and other controls again clip empty via AS2

Hello

I use Flash Pro CS4 and ActionScript 2, and I am trying to create objects dynamically, through code, rather than by the designer in Flash. Here is a code snippet to give you an idea:

Create clip

converter_mc = target.createEmptyMovieClip ("converter", depth);

converter_mc._x = x;

converter_mc._y = y;

... add different controls, such as the following:

cboTest = converter_mc.createClassObject (ComboBox, "eyedropper", converter_mc.getNextHighestDepth ()); <-this does not work

cboTest.setSize (200, cboTest.height);

cboTest.move (cboTest.x, 10);

cboTest.dataProvider = [{Label: "Select target currency", data: null}, {label: "Canadian Dollar", given: 'US'}, {label: "Canadian at the Center Pound Sterling", given: 'UK'}, {label: "Canadian to the Euro", data: "EU"}];

convert_mc. AddChild (cboTest); <-this does not work

I tried to use the converter_mc.createClassObject, but that seems to be something that existed in previous versions of Flash, but changed (what, I can't figured out). I also saw examples of the addChild, but I think it is perhaps only in AS3 and also, it doesn't seem to work for me in AS2.

Any suggestions/ideas on how I can add components to a new clip via ActionScript 2?

Thank you

D

You are welcome.

p.s. If you're still able, please mark this thread as answered.

Tags: Adobe Animate

Similar Questions

  • BlackBerry Smartphones No micro sd, data connection, simply to transfer photos and other BlackBerry to the computer via a usb port

    Very well. So I don't have a data plan on my blackberry, so no not web email, I use it strictly for telephone calls, text messaging and taking pictures. I want to transfer my photos and my text messages sms from my phone on my computer. I would also like to transfer my ringtones if possible but I won't push my luck on this one here. I don't have a microsd card in my phone, so everything is recorded directly on the phone itself. I tried to connect my phone to my computer via the usb port but it does not allow me to go into things phone and copy on my computer. I also downloaded and tried the blackberry desktop manager, but he wants me to turn on the storage of mass media that will not help me because there is no microsd card in my phone. I want to record everything on my computer because I bought a new phone that is NOT a blackberry and I want to have my files on my computer. Can someone help me please?

    Thank you!

    Hello

    Try to download and install an earlier version of the desktop as the BlackBerry Desktop Software 4.6 software.  You should be able to download it here: https://www.blackberry.com/Downloads/entry.do?code=A8BAA56554F96369AB93E4F3BB068C22

    Which works best?  Another option is to get the CD that came with your phone and install the original version (assuming you still have it).

  • Control problem sounds induvidually via AS2

    Hi, I'm a beginner looking to learn Flash by myself. I'm pretty good with things, I recently started to learn the sounds of loading with the Action Scripts...

    Recently, I saw a flash file where there are four horses and you click each horse to make them sing. you click on it again to make them stop. in this way, you can mix the sounds to get different results every time. Here is the link to the file: Horses.swf

    I tried to make my own version of horses... So I started to learn all the action required scripts (that I could find!) and started to do flash animation.

    With great difficulty, I figured out how turn sounds on and off with a single button and play different songs for different buttons. But now I'm stuck with this bit. Here's my problem:

    I can click on any button to play a sound, while the sound plays, I can click the button and the different sound plays as it should. However, when I click on any button to stop this particular sound, all sound stops immediately. Here is the link to the file that I programmed:myOwnHorses.swf

    I've even attached the source file I'm working on... Please let me know what I'm doing wrong!

    Thank you very much!

    * Additional info *.

    I said the sound variables in the first frame of _root

    the code in the root layer is:

    1
    var boy1 = 1;
    mySound1 = new Sound (this);
    mySound1.attachSound ("b1");

    2
    boy2 var = 1;
    mySound2 = new Sound (this);
    mySound2.attachSound ("b2");

    3
    girl1 var = 1;
    mySound3 = new Sound (this);
    mySound3.attachSound ("g1");

    And, there are three buttons (as you can see in the link above - my own horses. swf) and with the click of each button, I check to see if the sound is already playing, and if it's playing, I stop the sound.

    Key 1:

    on {(press)
    If (_root.boy1 == 1) {}
    _root.mySound1.start (0.99).
    _root. Boy1 = 0;
    } Else if (_root.boy1 == 0) {}
    _root.mySound1.stop ();
    _root. Boy1 = 1;
    }
    }

    Key 2:

    on {(press)
    If (_root.girl1 == 1) {}
    _root.mySound3.start (0.99).
    _root.girl1 = 0;
    } Else if (_root.girl1 == 0) {}
    _root.mySound3.stop ();
    _root.girl1 = 1;
    }
    }

    Key 3:

    on {(press)
    If (_root.boy2 == 1) {}
    _root.mySound2.start (0.99).
    _root.boy2 = 0;
    } Else if (_root.boy2 == 0) {}
    _root.mySound2.stop ();
    _root.boy2 = 1;
    }
    }

    If you have any doubts, please let me know, I will clarify to the best of my knowledge!

    Please help me with this guy! Thanks a lot again!

    very good looks you're going very well - good work!

    you're the problem here, as do with registrant the "scope" of the Sound object in the constructor - is often a 'good' thing to do - if good work, however it only creates a 'global' object that controls "all" sounds in the designated frame.  Since you stated each of them to be as part of 'this' one of the three sounds "will control" * all * sound objects that are running in the target scope.  simply remove the 'this' of each and you should then have individual control of them.

  • Are there other control in addition to Control, Shift, and Alt keys?

    I have a mac and he had the "Command" key to create shortcuts more, but on windows it don't let me use it for a shortcut command. And I need 4 control buttons. So is there any other key that can be used to launch shortcuts and more control, shift, and alt?

    In short, I want 4 shortcut buttons, but only know 3:

    1. the order

    2 shift

    3 alt

    4. ....?

    Control, shift, and alt keys only are available on Windows (they reserve the "windows" button found on some keyboards for other things).

    Macintosh's command, control, shift and option - but control clicking normally open context menus so the control key is not too useful.

  • "Windows Media Center cannot detect the IR control cables, which are necessary to control the set-top box. Fixing parts IR that supports the IR control cables and then try again. IR HARDWARE NOT FOUND ".

    Original title: when setting up Windows Media Center, I get the error message: "IR hardware not detected".

    I have an internal TV Tuner that has been installed by HP, when I bought recently a "computer build-your-own." (According to the control panel Device Manager, my tuner is a Win TV HVR 1290, made by Hauppauge). The computer came with Windows 7. While installing Windows Media Center, after setting up the TV Signal (on channel 3) I am able to see a video thumbnail on my computer screen. I am also able to change the channel using my remote control U-Verse (not the Windows remote control supplied with the computer). So far so good! I then hit next and get the following message: "Windows Media Center cannot detect the IR control cables, which are necessary to control the set-top box. Fixing parts IR that supports the IR control cables and then try again. IR HARDWARE NOT FOUND ".  After you receive this message, the installation procedure is completed. I called HP that support intalled the tuner. They had not the slightest idea what to do. I then called Hauppage customer (manufacturer of TV Tuner). They said that I need to plug one end of the IR Blaster cable that shipped with the computer in a slot in the back of my computer (they told me which slot). They said so to run the IR all the way cable to my cable box and the other end of the cable to my cable box of band. They said it was necessary to be able to use my Microsoft Remote to instruct the box to change channels (cable IR stuck on the box). I told her that I did not use the Microsoft Remote, I could change the channel with my U-verse remote (that I preferred to use anyway). He said that it took the cable on the band decoder in order to remove the error message and the installation of Windows Media Center. I then called U-Verse technical adapter who informed me of their set-top boxes (made by Cisco Systems) do not have the ability to receive signals IR IR Blaster cable (or any othe IR signal source). Microsoft is apparently not understand how U-Verse set-top boxes are designed to work and sells a product incompatible remote control/IR. My question is this: How do I set up Windows Media Center, in order to avoid getting the error message "IR hardware not detected" when you install Windows Media Center and just use the remote control of the U-Verse that I prefer to use in the first place. Once understand you this point, please send the information to HP, At & T U-Verse and others. Thank you.

    Ron, I have something for you!

    and for all the people who have this problem :)

    Hi, I had the time of IR not detected in Windows 7 Ultimate with a TV wonder 650 card and a box of digital adapter from Verizon for my PC... Go on the road to installation and after the Media Center channel search, choose manual configuration. Choose the aerial signal (I aso picked after this analog) l. After he sought more, he finds no channels.  Do not be afraid. Just accept it and go to the main settings page in the Mediacenter. If I remember correctly, then select TV Guide. Choose Add channel. I added the channel 3.

    Since my Verizon box has no IR for the computer, I added the channel 3 for the media Center and I change the channels with my Verizon remote. All my stations in the Verizon box go to Channel 3.

    The story here is so, for some reason any Windows detects that only my box channel signal TV and you must manually configure the media center on the air, then go to settings and add the channel you want in the guide.

    Why the guide TV control which channel you can tune is beyond me, but the scanner locks all channels, it does not detect. they must be added manually in the guide.

    My TV works and looks okay now.

    It actually works!

    the only problem is that it is not in HD

    but there is something


  • Playback on YouTube and other video players controls are tiny

    I am running Windows 8.1 on a Lenovo Yoga Pro 2 (high resolution). I think that it's originally the play/pause, volume, full screen, buttons etc. in YouTube and other video streaming of players to be really too small.

    In addition, Flash games only filling in the upper left corner of the area that they should. Sometimes, this can be corrected by right-clicking and clicking on zoom, but this option is not always there, and YouTube does not have this option, either.

    I read something on the Internet about disabling HiDPI in the comments: page config to fix this, but this option seems to have been deleted.

    Any ideas how to solve this problem? Thank you.

    Yes, you can file a report on Bugzilla: https://bugzilla.mozilla.org/

    The form is simple enough and you probably a few cc follow-up questions would happen to you by e-mail. I will quote the variations that you have tried, such as hardware acceleration on or off, same result. Zoom effect of the page, the effect of changing the device/pixels.

  • The printer control page does not appear, page with scanning, printing and other options need

    Original title: Page printer control

    When I opened my window printer the normal screen to control the printer does not appear.  How can I get this to come form? I need to the page with the scan options, printing and others.

    Hello

    1. are you referring to the preview before print screen or is it a screen of the printer software?

    2. what program you are trying to print from?

    3. This occurs when you use another user account?

    Method 1:

    You can check if you are facing the same question in the user account new or different administrator account.  You can create a new user account on your computer, and then check.

    Create a new user account
    http://Windows.Microsoft.com/en-us/Windows7/create-a-user-account

    If you are not faced with the same question in a new user account, you can check the link below and use the steps provided to screw a corrupted user profile
    http://Windows.Microsoft.com/en-us/Windows7/fix-a-corrupted-user-profile

    Method 2

    You can check the question in the clean boot state. Check out the following link.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/kb/929135
    NOTE: once you are done with the boot, please follow step 7 of article to reset your computer to normal startup.

  • Fan control with 5750G and other machines problems

    Lets start with stating that the 5750 G (and other models with same design cases) has lots of GPU and overheating problems:

    As well as the mysterious GPU problems:

    This problem is happing on computers between 12 and 20 old frames. Although the user

    • Using a fresh install of windows.
    • Uses the latest GPU driver.
    • Use the BIOS more recent (1.21 for my 5750G).
    • A cleaned the dust from heatsink and fan.

    So that's the problem! Thermal and non-functioning fan control past!

    So it goes like this:

    End of one your PC starts to slow down: This is because the heat past at low price, acer puts on their laptop begins to degrade. This means that even if the fan trying to cool the CPU and the GPU. The heat generated by the CPU and the GPU may be transferred on the radiator. Thus the CPU and the GPU lower their performance so that the computer does not so hot that it cannot work. And damage the CPU and the GPU.

    After a bit more time the PC begins to close when you use more intense programs / games:
    This is because that which has degraded the heat past so that the computer becomes so hot than its cutting himself to avoid damaging himself.

    So what's the problem?: I mean that acer can not simply replace past heat each contact? So what can they DO?

    Here's what Acer should do: Do a BIOS 1.22 WITH CUSTOM FAN CONTROL!
    It would be easy! While the main problem is the thermal past. There is another problem:

    Fan will not go 100%: when my 5750 hits 95 degrees Celsius. It is still running the fan speed of ~ 60-70%!
    When it hit 103 degrees Celsius. Just 2 degrees, far from extinguished to prevent critical damage. She is STILL going to ~ 60-70%! Acer... I know that the fan can be turned to a higher speed. Because when I turn on my 5750G after he himself has just cut off due to overheating. He rotates extremely fast fan! But just for a few seconds. Then he goes back to the being to slow to cool enough.

    Acer... Why not do that? ! : Come on Acer! Do it! Make a new BIOS, I would be happy. And I know that Acer is not a * beep * ty company. But actually listens to their customers! If your worried that some people would go in the BIOS and the fan settings so that they broke the laptop. Then just have a big WARNING: "Guarantee will be woid entering this option" or a "to activate this option go to Acer.com/XXXX and type the code. Follow-up of the caveat "the guarantee will be void.

    Please Acer. Give people who know what they make of the option to do so!

    Im going to this ends with a quote from another post on your forum:

    «I look a little, but have not found anything to give a bit more power the fan...»
    Acer could not just add a few adjustments of fan to the bios?

    Quote this post: http://community.acer.com/t5/Acer-Notebooks-Netbooks/Entire-CPU-Overheating/m-p/12211/highlight/fals...

    Hello

    Today I can finally post what you are waiting for. The fan controller tool was developed in a public place.
    Anyone who decides to install this tool, please take note once more:

    • Acer does not support this tool on systems from laptops Aspire 5750 G / 5755G.

    • Acer does not support this tool on Acer OEM Software (your laptop comes with Windows 7 installation).

    • Users with other portable model should not use this tool. This will be entirely at your own risk.

    • Other OS can run this tool, but Acer does not test or review it. Acer is not responsible for any bad consequences when using the tool in that mentioned other environments.

    Official statements made, here are the goodies. Be sure to download the PDF file as well, if you want to check the installation process:
    FTP://ftp2.Acer-euro.com/notebook/aspire_5750G/fan/FanController_V1.0.0.3.zip
    FTP://ftp2.Acer-euro.com/notebook/aspire_5750G/fan/SOP_AS5750G_Fan_Control_Utility.PDF

    Feel free to have a discussion open after this post on the results. I tell you what I'll be less frequent in this topic, though.

    Anyone who still has problems when running this tool is advised to contact Acer support and get their laptop repaired.

    We thank all for your patience, hope that this helps out you.

    Kind regards

    Rolf

  • "Could not open INSTALL. NEWSPAPER"when I try to uninstall Yahoo messenger and other programs of the control panel

    Original title: "Could not open INSTALL. JOURNAL ".

    We get this message when I try to uninstall Yahoo messenger and other programs of the control panel.

    Hi thomaskirchoff,


     

    (1) how long have you been faced with this problem?

    (2) what is the complete error message you receive?

    Method 1: You can see the steps in the Yahoo link below

    http://help.Yahoo.com/kb/index?locale=en_US&page=content&y=PROD_MSNG_MSNG10&ID=SLN649&impressions=true


     

    Method 2:

    If a Protection of resources Windows (WRP) file is missing or is damaged, Windows may not behave as expected. Auditor of file system (CFS) scan to fix all of the corrupted system files. To do this, follow the steps mentioned in the link below:

    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7
    http://support.Microsoft.com/kb/929833

    Method 3:  Put the computer to boot and then check if the problem persists

    Follow step 1 in the link below,
    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    Important: n ' forget not to put the computer to a normal startup follow step 7 in the link.

  • Most of the controls in StackLayout and other at DispositionAbsolue

    Hey. I have a QML page with several controls that I want to keep the default layout of the battery, but I want to have one absolutely positioned on the top of the page, floating above the other controls. How can I make cela pls?

    Cheers, appreciate the help

    Justin D.

    You can nest containers, and each can have its own layout adjustment, so I would do something like:

    Page {
       Container {
          Layout: AbsoluteLayout{}
          SomeControl {
             layoutProperties: AbsoluteLayoutProperties {
                positionX: 0
                positionY: 0
             }
             preferredHeight: 50
             minHeight: 50
             maxHeight: 50
          }
          Container {
             layoutProperties: AbsoluteLayoutProperties {
                positionX: 0
                positionY: 50
             }
             preferredHeight: Infinity
    
            // ---This Container will default to Stack layout. Put the rest of your controls here.
          }
       }
    }
    

    This will be 'SomeControl' at the top and force its height 50 pixels. Below, starting just below "SomeControl" the rest of the controls will be at the disposal of the battery. If you want the lower scrolling controls, but 'SomeControl' which will be fixed at the top you can change the code above like this...

    Page {
       Container {
          Layout: AbsoluteLayout{}
          SomeControl {
             layoutProperties: AbsoluteLayoutProperties {
                positionX: 0
                positionY: 0
             }
             preferredHeight: 50
             minHeight: 50
             maxHeight: 50
          }
          Container {
             layoutProperties: AbsoluteLayoutProperties {
                positionX: 0
                positionY: 50
             }
             preferredHeight: Infinity
    
             ScrollView {
                scrollViewProperties {
                   scrollMode: ScrollMode.Vertical
                }
                Container {
                   // ---Stack layout. Put the rest of your controls here
                }
             }
          }
       }
    }
    
  • Windows Media Player will not play error of MTS files that your computer works at low memory. Quit other programs, and then try again

    I am running Windows 7, 64 bit, home premium on a Dell Studio 1558 with an ATI Mobility Radeon HD4500-5100 graphics card and an Intel Core i3. It has 4 GB of RAM.

    When I try to read files MTS using Windows Media Player I get the error message "your computer is low on memory. Quit other programs, and then try again,"even with no other programs running. Windows Media Player will play other types of video files without difficulty.

    Any suggestions as to what can be the cause of the problem and how to fix?

    TBH I'm not sure.

    All I can say is on my desk, I have not loaded a pack of codecs only support of any kind and WMP12 plays my MTS files very well. Supported by this statement in Windows Media Player 12 is also capable of playing AVCHD formats (. ) M2ts et . MTS ). [13]" from - http://en.Wikipedia.org/wiki/Windows_Media_Player and the fact that in WMP12 - "Media files (all types)" MTS has listed as an acceptable format.

    My office has an AMD/ATI HD5670, and like I said seems to play.

    1. Have you tried to run a full anti-recent virus scan? If this isn't the case, update your antivirus program and run a scan full to see if it finds problems.
    2. Then try a sfc/scannow scan to see if it detects and fixes something.
    3. Just checked, you have installed WMP12? (it should be, but just a double check).

    This type of problem (or similar) has developed before items such as http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-pictures/Windows-Media-Player-and-low-memory-issues/bb4bf226-8bd0-41A5-9eed-9be08e6d3bdb and  http://www.TomsHardware.co.UK/answers/ID-1699934/computer-running-low-memory-Windows-Media-Player.html and some people said re-register the DLL of WMP files helped. Personally, I've never needed to test or try this kind cannot confirm.

  • How can I restrict permissions to users selected features like control panel, run, format and other administrative functions?

    Windows 7 Pro, how can I restrict permissions to users selected to features such as Control Panel, run, format and other administrative functions?

    Hello

    You should be able to control it for all users, users or groups or all users
    except the administrator.

    Settings for group policy to control panel
    http://TechNet.Microsoft.com/en-us/library/ee617167 (WS.10) .aspx

    Policy settings for display in the Panel group
    http://TechNet.Microsoft.com/en-us/library/ee617168 (WS.10) .aspx

    How to enable or disable the control panel in Vista and Windows 7 - see two Option
    http://www.Vistax64.com/tutorials/121043-Control-Panel-enable-disable.html

    How to hide or display a Control Panel icon in Vista and Windows 7 - see an Option
    http://www.Vistax64.com/tutorials/120937-Control-Panel-hide-icon.html

    How to disable the control panel in Windows 7
    http://www.howtogeek.com/HOWTO/16189/configure-what-items-are-available-in-Control-Panel-or-completely-disable-it-in-Windows-7/

    Enable/disable the Windows 7 control panel access
    http://www.AddictiveTips.com/Windows-tips/disable-enable-access-to-Windows-7-Control-Panel/

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">

  • The 459 ordinal could not be located in the dynamic and other link library urlmon.dll various problems

    So I got the above error message sometimes appears when you install a program by clicking Help in Codeblocks and sometimes irregular.

    I don't know if there is a model when it appears, but it's getting boring.
    When AVG is done scanning or updating, there's usually something slide up in the lower right part of the screen, but lately it shows only a white box. I guess it has something to do with the problem in urlmon.dll.
    In Skype, it keeps insisting that I don't have an active internet connection, so it won't let me import contacts or to see the home screen.
    When I went to the control panel to see if Internet Options had nothing to do with it, I couldn't open Internet Options. I would try to click on it, and it opens, even if I tried to get there by typing it in at the top, through network connections and other means.
    Spybot Search and Destroy can not scan at all, he just opened and then stops working.
    I have Windows 7 Enterprise (Korean).
    The trouble started during an update or another, but I can't remember which.
    It would be much appreciated if someone knew how to solve this problem, because I'm close to just reinstall Windows, which would be a great way to do.

    Hi JI Abe.

    As you have Windows 7 Enterprise edition installed, I suggest you post this question in the Forums of TechNet Windows 7 IT Pro: http://social.technet.microsoft.com/Forums/en/category/w7itpro/

    Thank you.

  • Hello, I need help with my photoshop, rececently the majority of my family disappeared merger options and I cant access AVC and other options ive tried reset preferences and it seems to come back but when I add an image and try add text again

    Hello, I need help with my photoshop, the majority of my family rececently disappeared options fusion and I can't access strokes and other options ive tried to reset the settings of preference and he seems to come back but when I add an image and you try to add text again, they'll only options I have are drop shadow , gradient, Chromakey, shine of satin overlay, inner (I use photoshop cc 2015) Please help, my Skype contact options are: RoblivionM8 and email:[email protected]

    Thanks for your time

    Your first screenshot shows the layer style dialog where not all types of effects are indicated on the left. Bottom left of the dialog box, you see a small icon fx with a menu arrow drop-down. Use drop down the menu and make sure all you click on show all effects or restore the default list. I don't know what you're trying the shoe on the second screen capture.

  • Is it possible to get clip names and additional descriptions (and other metadata) in a report? The number, .xls or some other document available?

    I have about 12 tablespoons of images recorded on several projects. Each clip has a description added to it. I'm trying to find a way to search for a specific content easier. Since so much information was laboriously on slot form of description of metadata, it would be great to be able to use it. Which brings me to the question -

    Is it possible to get clip names and additional descriptions (and other metadata) in a report? The number, .xls or some other document available?

    Thank you!

    Karim.

    one way is to highlight all the media/bins in the project Panel and from the menu, export the batch list. This will create a .csv text file.

    There is also this option in another post, but do not know how it works. First Pro CC - how can I export metadata custom in Excel?

Maybe you are looking for