Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 69679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:36:42+00:00 2026-05-10T19:36:42+00:00

Is it possible to use the Flex Framework and Components, without using MXML? I

  • 0

Is it possible to use the Flex Framework and Components, without using MXML? I know ActionScript pretty decently, and don’t feel like messing around with some new XML language just to get some simple UI in there. Can anyone provide an example consisting of an .as file which can be compiled (ideally via FlashDevelop, though just telling how to do it with the Flex SDK is ok too) and uses the Flex Framework? For example, just showing a Flex button that pops open an Alert would be perfect.

If it’s not possible, can someone provide a minimal MXML file which will bootstrap a custom AS class which then has access to the Flex SDK?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T19:36:43+00:00Added an answer on May 10, 2026 at 7:36 pm

    I did a simple bootstrap similar to Borek (see below). I would love to get rid of the mxml file, but if I don’t have it, I don’t get any of the standard themes that come with Flex (haloclassic.swc, etc). Does anybody know how to do what Theo suggests and still have the standard themes applied?

    Here’s my simplified bootstrapping method:

    main.mxml

    <?xml version='1.0' encoding='utf-8'?> <custom:ApplicationClass xmlns:custom='components.*'/> 

    ApplicationClass.as

    package components {     import mx.core.Application;     import mx.events.FlexEvent;     import flash.events.MouseEvent;     import mx.controls.Alert;     import mx.controls.Button;      public class ApplicationClass extends Application {         public function ApplicationClass () {             addEventListener (FlexEvent.CREATION_COMPLETE, handleComplete);         }         private function handleComplete( event : FlexEvent ) : void {             var button : Button = new Button();             button.label = 'My favorite button';             button.styleName='halo'             button.addEventListener(MouseEvent.CLICK, handleClick);             addChild( button );         }         private function handleClick(e:MouseEvent):void {             Alert.show('You clicked on the button!', 'Clickity');         }     } } 

    Here are the necessary updates to use it with Flex 4:

    main.mxml

    <?xml version='1.0' encoding='utf-8'?> <local:MyApplication xmlns:fx='http://ns.adobe.com/mxml/2009' xmlns:local='components.*' /> 

    MyApplication.as

    package components {     import flash.events.MouseEvent;     import mx.controls.Alert;     import mx.events.FlexEvent;     import spark.components.Application;     import spark.components.Button;      public class MyApplication extends Application {         public function MyApplication() {               addEventListener(FlexEvent.CREATION_COMPLETE, creationHandler);         }         private function creationHandler(e:FlexEvent):void {             var button : Button = new Button();             button.label = 'My favorite button';             button.styleName='halo'             button.addEventListener(MouseEvent.CLICK, handleClick);             addElement( button );         }         private function handleClick(e:MouseEvent):void {             Alert.show('You clicked it!', 'Clickity!');         }     } } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 118k
  • Answers 118k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer With Linq to XML, you can do something like the… May 11, 2026 at 11:38 pm
  • Editorial Team
    Editorial Team added an answer date() is not locale-aware. You should use strftime() and its… May 11, 2026 at 11:38 pm
  • Editorial Team
    Editorial Team added an answer If your XML is correctly encoded, you shouldn't have a… May 11, 2026 at 11:38 pm

Related Questions

I build and maintain a set of Flash components that is distributed to publishers
I've heard that the components in the upcoming Flex 4 framework will be more
I'm implementing a custom Flex component that provides a scrollable viewpoint onto a (possibly
A client of mine is looking to convert a critical 'application' based on multiple

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.