0

I can get the SWC into my project and I can see the various buttons it contains but.. I can't seem to get them into my custom class.

I think this might be the answer but I don't know how to format the necessary import statement: Flash Builder - How to build or include an SWC

A Pic to demonstrate what I'm saying. enter image description here

Community
  • 1
  • 1
Mytheral
  • 3,929
  • 7
  • 34
  • 57
  • have you considered to use the »new« operator and an »addChild« call? – philipp Nov 20 '12 at 14:40
  • I don't want to add a button to the swc, I want to get a button from it. – Mytheral Nov 20 '12 at 14:52
  • so since the button is represented by a class in the swc, you can create a new button with new () and add the instance to the display list. – philipp Nov 20 '12 at 15:34
  • So you're saying something like var btnAlarms:Button = new btnAlarms(); or am I completely wrong. As that isn't working for me. – Mytheral Nov 20 '12 at 17:33
  • 1
    @Mytheral How about: `var buttnAlrams : btnAlarms = new btnAlarms()` ? Your way was creating a new "btnAlarms" object but typing it as a regular old "Button". – Sunil D. Nov 20 '12 at 18:49
  • 1
    Also, make sure you actually try to compile the code -- if you are relying on those little orange circles with the question mark in them, sometimes they get improperly displayed b/c it thinks there is an error (but it hasn't actually compiled anything). But if you see the red circle instead, that means there was a compile error. – Sunil D. Nov 20 '12 at 18:51

1 Answers1

0

I found my answer http://forums.adobe.com/thread/864992

It was a simple thing I was over looking the objects just needed a public declaration.

Mytheral
  • 3,929
  • 7
  • 34
  • 57