Skip to main content
Participant
January 2, 2009
Question

Accessing components

  • January 2, 2009
  • 3 replies
  • 331 views
Hi, I am trying to populate a combo box that I have dragged onto the stage in Flash CS3 professional, from a separate .as file (that targets the .fla file).

The code works if I put it in the timeline on a new layer above and I reference comboBox1 from there but not in the separate .as file from inside a class definition. I think I have all the correct import statements in there.

Have spent two days looking in to this but to no avail from web trawling. Any hints?
Is it a problem doing the following.
* Dragging components from flash onto the stage, giving them an instance name
* Working with these from a separate .as (actionscript 3.0) file using this instance name.
I'm obviously missing something because this should be possible I'd imagine.

any help would be greatly appreciated,
Taffy_Boy
This topic has been closed for replies.

3 replies

Taffy_BoyAuthor
Participant
January 2, 2009
I think the other thing that was mucking things up was typing something in for prompt on the parameters section in the flash working environment trying to then populate the box in the separate .as file didn't seem towork

Taffy_BoyAuthor
Participant
January 2, 2009
Got it working now thanks,

hadn't set the document class in publishsettings-flash-settings.

Inspiring
January 2, 2009
What is the code you are using to access the component in separate .as?