Skip navigation
Currently Being Moderated

adding a Flex Component via actionscript

Nov 19, 2013 10:38 AM

I have a Flex Project that is set to use both MX+ Spark.

 

The project is almost entirely built in AS3 but I would like to use a couple of Flex components.

 

In an ActionScript Class, how does one add a Flex Component such as DateSpinner?

 

I have included the spark.swc in the build path.

I am using Flash Builder 4.7.

This is intended to be used as a Desktop app.

 
Replies
  • Currently Being Moderated
    Nov 19, 2013 10:47 AM   in reply to DachFlach

    It should be as easy as instantiating the class ( and adding it to a container). Just look up the class documentation and have a go.

     

    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spa rk/components/DateSpinner.html#DateSpinner%28%29

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 19, 2013 11:33 AM   in reply to DachFlach

    OK, this is outside my experience.

     

    I don't think you can mix Flex components directly with Flash UI components - think you may need to use UIMovieClip.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 19, 2013 11:51 AM   in reply to DachFlach

    Why are you using MovieClips in a Flex project?

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 19, 2013 12:02 PM   in reply to DachFlach

    Why use a MovieClip for your class rather than a Flex container?

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 19, 2013 12:11 PM   in reply to DachFlach

    Ideally if you have a project using Flex, you should use Flex components, so your class should be subclassing a Flex container, not a MovieClip (unless there's a specific reason for using a MovieClip ).

     

    I really don't have enough spare time to do anything but give you a nod in the right direction.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points