Get the ComboBox control to work in AS3
Hi allAm very new to AS and try to get a comboBox control to work. I copied and pasted the following on the Adobe site in frame 1:
Add items to the list.
my_cb. AddItem ({data: 1, label: "An object"});
my_cb. AddItem ({data: 2, label: "the second point"});
my_cb. AddItem ({data: 3, label: "the third point"});
my_cb. AddItem ({data: 4, label: "fourth point"});
var cbListener:Object = new Object();
cbListener.change = {function (evt_obj:Object)}
var item_obj:Object = my_cb.selectedItem;
var i: String;
for {(i in item_obj)
trace (I + ": \t" + item_obj );
}
trace("");
};
my_cb.addEventListener ("change", cbListener);
I have a comboBox control named my_cb onstage. But when I run it, I get this error: "1118: implicit constraint of a static type value Object to a type perhaps unrelated function.»
I can't wait to head, so I try to decipher what you try to do it from code, but here's a revised version that might get you where you're going (?):
Add items to the list.
my_cb. AddItem ({data: 1, label: "An object"});
my_cb. AddItem ({data: 2, label: "the second point"});
my_cb. AddItem ({data: 3, label: "the third point"});
my_cb. AddItem ({data: 4, label: "fourth point"});
function cbListener(evt_obj:Object) {}
var item_obj:Object = my_cb.selectedItem;
var i: String;
for {(i in item_obj)
trace (I + ": \t" + item_obj);
}
trace("");
};
my_cb.addEventListener (Event.CHANGE, cbListener);
Tags: Adobe Animate
Similar Questions
-
How can I get the external classes to work in AS3? Sample included.
I'm doing this work, and something basic must be absent. Its straight out of the Adobe Help file example.
CS4, Actionscript 3
Here's what I do:
1 create a .as file and name it "HelloWorldExample.
2 put the script below into it and save it.
3. create a .fla file and save it in the same directory.
4. in the .fla file, put "HelloWorldExample" in the class of Document properties field
5 save and run the film.
I get a white screen. Nothing. I tried a few other examples, but I was not able to get ALL of the external .as files to run. It is the simplest.
Do I need to import them or call them in some way other than step 4?
I missed something?
package
{
flash.text.engine import. *;
import flash.display.Sprite;
SerializableAttribute public class HelloWorldExample extends Sprite
{
public void HelloWorldExample()
{
var str = "Hello World!" This is Flash Text Engine! « ;
var format: ElementFormat = new ElementFormat();
var textElement: TextElement = new TextElement (str, format);
var textBlock:TextBlock = new TextBlock();
textBlock.content = textElement;
var textLine1:TextLine = textBlock.createTextLine (null, 300);
addChild (textLine1);
textLine1.x = 30;
textLine1.y = 30;
}
}
}
As long as you have your class paths set correctly, it is best to have your .as files in an another loc that your. Fla. What happens if you want to use the same class in different .fla? You will copy in each project file? That kind of defeats, the purpose of the use of classes and then, because if you change it you must change it in various places. Not good. No OOD.
So: Edit > Preferences > AS3 settings - add paths to the source path, or a path... something like c:\flashclasses\as3
Inside of your as3 application you assign to your package files. If you use TweenLite need you:
com
greensock
TweenLite classes
or yours:
com
Mydomain
my classes
then you would be important as:
import com.greensock.TweenLite;
import com.myDomain.myClass;
Make sense?
-
Re: Unable to get the wireless adapter to work on my Satellite L550-1CC
I'm getting bored with this laptop, I reinstalled windows 7 (32 bit) and can not get the wireless adapter to work.
My router settings are perfect, my netbook is zero connection problems - the router is just inches away from the laptop most of the time - the laptop insists that there is "no available networks."
This of course is BS, before I reinstalled windows I could pick up 3 other neighbouring networks as well as mine.
Windows automatically installed the wireless network - I thought that could be the problem, so I downloaded the realtek driver directly.
No difference. Always the small icon with Red Cross barred through it.
I thought it could have been a hot key problem - so I installed the flash card driver that apparently controls the access keys (for some reason any).
Shortcut keys still don't work - I could really care about that - it's just the wireless network I need.
Thanks for any help I receive.
> my netbook has zero connection problems - the router is just inches away from the laptop most of the time - yet the laptop insists there is "no available networks."
After reading this sentence, I'm a bit confused. If there is no available WLAN networks how your laptop had zero problems to connect?One last thing:
> Of course is BS, before I reinstalled windows I could pick up 3 other neighbouring networks as well as mine.
What is the difference between the old and the new installation of Windows?In general the WLAN use is fairly simple.
Wireless network card - must be installed correctly (listed in Device Manager
WLAN card - must be enabled using FN + F8 key combination to activate the wireless network card
-scan the available WLAN networks area, click on the button of your WLAN and use connect
-put key WLAN if necessary and after a few seconds WLAN connection will workI did this many times on laptops preinstalled Win7 and didn't have any problems. On all laptop computers pre-installed with Toshiba recovery image (factory settings) is not necessary to change the WLAN settings.
-
Cannot get the Fn keys to work after installing Windows 7
I have completed the installation of Windows 7, but impossible to get the Fn keys to work. I found and installed the 'flash cards' which seems to do a similar thing, but want the good Fn button as well.
Anyone know who the drivers for it?
Thank you
Tim.Hello Tim
How you installed flash cards?
As far as I know, it must be part of the package of added value.
You have installed Vista VAP on Win7? -
Portege R830: don't seem to be able to get the fingerprint reader to work
HI - need help.
I have a Toshiba R830 I got "downgrade" to Windows 7 32 bit version pre-installed 64-bit. Long story - but it's the software compatibility.
Despite the download and the installation of what I think is all the relvant 32 drivers - I don't seem to be able to get the fingerprint reader to work.
I downloaded and installed the software fp-sw-201103311304 Tosh - chilled out and tried to install it.
It's actually hard to know if it is installed! I get a window telling me it will extract the file in a directory C:\temp and tells me at the same time that 'tinstallwb.exe' will start once the extraction is complete.
It seems to extract - but I do not see that the installation is happening.
Subsequently it is has that nothing listed in the title of the programs - and nothing "launches."
In Device Manager - I can't see anything that is listed as "fingerprint reader" under security features - the list is TPM 1.2. Not actually sure that is nothing to do with the fingerprint reader - well I've enabled and then disabled via the BIOS.
Am I missing something?
Could the reader [which I have not used since the new - even if it's only 8 weeks] have stopped working?Would be very grateful for pointers.
Try to start the installation manually. On the desktop create a folder unpack and after doing the beginning downloaded exe. Extract the files to the folder unpack and disable command run after extraction.
When files are checked almost open and Toshiba archive extracted file extractor. You will find setup.exe.
Try please to start it manually. -
Satellite A210-14 t: how to get the Fn keys to work under XP?
Anyone has a solution how can I get the 'Fn' - key to work under Windows XP?
Will there be a version of the Windows XP drivers in the near future?
Thank you
I imagine that you will not be able to get the keys FN works on XP because the XP drivers are not available at this time.
Seems that you have to wait and hope ;) -
I can't get the Media Creator to work
I can't get the Media Creator to work.
I installed it and it does not open.
Suggestions anyone?Hello
What cell phone do you have exactly?
What is creator of media?
What do you do exactly?Maybe you should try to reinstall the software again.
-
How can I get the internal speakers to work on a hpvs15 screen
I have NEEDED HELP GETTING THE INTERNAL speakers to WORK ON A HPVS15 MONTOR!
Hello
Try a reset of the monitor. Unplug the power cord from the monitor and hold the power button of the monitor for 30 to 60 seconds. Plug the monitor back in and it lights up. Does that help?
Consult this Manual. Go into the on-screen display-->> volume and turn up to max all the sounds?
Don't forget that you have a green audio cable plugged into the monitor and audio output on your PC port. Don't forget to unplug the headphones.
Try a PC speaker separated in order to eliminate the PC as the problem. You can also try the monitor and cable on another PC.
-
Compaq nc6400 upgraded xp to win 7 can not get the fingerprint reader to work
I have upgraded xp to win 7, as we will have to do, but can't get the fingerprint reader to work. It appears in the devices that there is one on the machine. I downloaded the drivers for Vista, but they got nowhere. Read in many places as Vista drivers will work but I seem to need more than that. Any clue? Thank you!!!
Hello:
Yes, for Vista fingerprint reader driver is the only one available, but you must install the software HP protect Manager security tools for Windows 7 from the model which succeeded the nc6400, who was the 6910p.
You must also use the W7 driver quick launch buttons.
If your computer laptop bluetooth, you need the W7 bluetooth software and driver...
And you can use the version of W7 HP wireless assistant software.
You can also read the manual tools security protect manager, so you can understand how to use the fingerprint reader.
-
Tried to run the system restore, but it will not restore.
Hey AnnEdelstein,
Because you can't get the system restore to work, perform a clean boot on your Windows XP system. The guide to that is here. Which follow, and then try again to Outlook. If it works to the minimum, then boot in the boot, analyse the whole system with your Antivirus and other security you have.Also make sure you have the drivers for the keyboard. Search for the manufacturing of the keyboard, and they should have the drivers on their support site. I hope this has been helpful! -
I uninstalled the touchsmart from hp on vista and then tried the system restore, dad will kill me, how can I get the touch screen to work again?
Hello
You have a specific question for HP, it may be better if you ask in the Forums of HP's Support.
See you soon.
-
What can I do to get the Risk II to work on Windows 7?
What can I do to get the Risk II to work on Windows 7?
Hi rafcaf75,1. have you tried to install the game? If so, what was the result?We did check the compatibility of the game risk II with Windows 7 and can't find any information. This means that the game may or may not be compatible with Windows 7.
See compatibility Risk IIStep 1: We recommend you install the game in Windows XP or Vista compatibility mode and check the difference.
To do this, see make older programs run in this version of WindowsStep 2: If nothing works, then you can install the game in Windows XP mode
a. download and install Windows XP mode.
b. Click Start, click all programs, and click Windows XP Mode.
c. open the game configuration file and install it.
d. start the game and play.Kind regards
Syed - Microsoft technical support.
Visit our Microsoft answers feedback Forum and let us know what you think. -
I want to remove the portion of these legs inside of this graph, because a white circle solid at the Center intensifies the effect of the spiral.
Background, the spiral is a mixture of the people flying around in a circle. The circle is then copied and turned several times. I have not developed the appearance again.
There must be an easy way to do it, but I can't use the Pathfinders, the opacity mask, knockout groups, and make simple layers does not work. I just want to axe the legs of these easy people!
This is not correct
I do several models and want to find a way to make it easy and fast!
Thanks to you all!
Emmanuel,
If I (put) correctly, you should be able to get the opacity mask to work as follows:
Select (only) the White path and the mixture and then in the transparency palette flyout on create with unchecked Clip opacity mask and mask invert checked.
Who must hide the inner part of the mixture corresponding to the white circle and let the front remains visible oin the background (circle and all that.)
.
-
Hello, when installing Adobe Creative cloud, you get the error: program stopped working "Adobe Creative Cloud" Windows can check online for a solution to fix this error on the Internet. The next step really is to get an online solution and close the program, close the program. Signature of the problem:
Problem event name: BEX
Application name: Cloud.exe Creative
Application version: 3.4.3.189
The timestamp of the application: a 56702, 75
The name of the module with the error: StackHash_0a9e
Version of the module with the error: 0.0.0.0
The module of time with error stamp: 00000000
The exception of compensation: 00000000
Exception code: c0000005
Exception data: 00000008
OS version: 6.1.7601.2.1.0.768.2
Language code: 1049
Additional information 1: 0a9e
More information 2: 0a9e372d3b4ad19135b953a78882e789
Additional information 3: 0a9e
Additional information 4: 0a9e372d3b4ad19135b953a78882e789
uninstall all cc on your computer.
clean a http://www.adobe.com/support/contact/cscleanertool.html
Restart your computer
suspend your antivirus/antimalware
Right-click on the file to install the desktop application, and then click "Run as Administrator".
-
I just downloaded DC to my laptop and can't get the PDF edition of work. I need instructions
I downloaded just from DC to my laptop and can't get the Edit PDF to work. (I'm technologically challenged) I need someone to "fix" me through it.
Hi frankt13070424,
You won't be able to edit the PDF files using Acrobat Reader DC.
You will need Acrobat application download and install Adobe Acrobat DC to edit PDF files: using Acrobat | Edit PDF files.
Kind regards
Nicos
Maybe you are looking for
-
Since the installation of OSX v10.11.5 my Safari has developed a massive leak, making it unusable. I can look in the activity monitor the RAM is typed, then passing slot, making me have to force quit Safari, whenever it is open. Everyone knows this?
-
HP Pavilion g7-1204sa PC notebook bluetooth
Hi can anyone tell me if the laptop to HP Pavilion g7-1204sa a bluetooth built and if not can it be somehow thank you
-
is it a hoax? Please help asap-received a e-mail from Windows Live
I got the e-mail from windows live saying that my hotmail account is disabled in the next 24 hours because of several unsuccessful connection attempts, and I need to connect safely through activation here link. I havnt had any problems of connection
-
update to Microsoft Windows Mobile 6.1 on the pocket pc
I have a HP Ipaq HX2490b with Microsoft Windows Mobile 5.0 build (2003?) 14366.1.0.1. why the new 6.1 is not compatible with versions earlier than 14847 version? It's been almost what I obsolete, and it is only a few years old. Is there a way to get
-
Display the pages Web HTTPS but HTTP Web pages are not
Hello All of a sudden, http Web pages not loading for me in Explorer, Chrome or Firefox. One minute, they are involved, but the next minute, they were not. I don't get an error message in the browser. Rather, the address of the site remains in the