Use mx and spark components in pure ActionScript project?

I'm working on an AIR project in Flash Builder 4, but I'm not using MXML at all (pure ActionScript). Is there a way for me to instantiate and use mx and spark components without MXML? If not, what is the minimal amount of MXML I have to use? FYI, I've already tried all of the following hacks with absolutely no luck:
http://www.actionscript.org/forums/showthread.php3?t=143062
http://ersatz.tv/2009/off-topic-flex-components-without-mxml
http://stackoverflow.com/questions/141288/possible-to-use-flex-framework-components-withou t-using-mxml
I much prefer ActionScript over MXML. Why does Adobe have such a hard-on for this MXML ****?! It's like all that code and all those great components are going to waste.

Me too.. . I'm a pure as3 guy and all these components go to waste. You would think they would allow people to generate components via mxml or as3...

Similar Messages

  • Pure ActionScript project for Adobe AIR

    I've probably missed an obvious button or checkbox somewhere?
    I've seen that when you create a new MXML project, you have
    the option to target it at AIR. How do you do this for a pure
    ActionScript project? (Or import an existing pure ActionScript
    project that was written for AIR?)

    Hi Mister Lafrance,
    But, but it is same problem with creating project after build configure mxml to as. It can to show error - i have tried anything. It can not work while java runtime kills or show a lot of errors. Like this
    Error: ...
    at ...
    at...
    Please make sure my post!!! Sorry we must to configure manuel with RUN/Debug and adding as files....
    Thanks!
    Great nice tutorial! I hope because air developer are happy with Adobe Air Applications.
    Suggestions:
    new functions for executing applications like this flash.system.os.exec or flash.system.exec - If you want to build distributable Air Multi Applications.
    Application Air should to make default directory for important distributing air installers. If you want to work 1 or more application in currect directory.
    Like this:
    /mycompany <- that is root directory was created by frist air installer.
    ./airapps - that new distributing air installer while you after start of air application
    .//airapps/utilities/ <- example Air SDK should to copy into.. or nice air application like this Languagechooser or StyleChooser etc..
    ./airapps/softwares <- your built application like Widget Builder, Splashup or IconGenerater etc..
    ./airapps/config/ <- your currect saved config files. Important: all applications of distributing air applications will to load your currect config like Styles and Languages...
    ./myapp Binary <- create by air installer.
    ./shared/ <- assets,. libraries, templates and more files were created by Air installer.
    Can you make sure for my idea of distributing air applications? We would to talk with new file for Air distributuing packages = *.airdp.
    Thanks and best regards, SnakeMedia

  • Spark components in pure AS3

    How do I use Spark components in Flex if I'm coding a pure Actionscript file? I want to use components like the Checkbox and NumericStepper in my project, but I'm not up to the task of learning MXML
    It seems that the addChild function doesn't add those components to the parent.

    Is your parent container a Flex control too? If so, then Flex componens are added using the .addElement() method of the parent. The parent needs to descend from the Group component to have this method, e.g. an Application, a View or similar. Info here:
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf62b90-7fe9.html
    Adding Flex components to a plain MovieClip in Flash CS5.5 is a lot more complicated, because Flex does a lot of work behind the scenes that you'd have to take over. Info here, esp. in the comments:
    http://seeing-is-believing.blogspot.com/2007/11/flex-components-in-flash-example-with.html
    MXML is actually quite easy once the penny drops, especially if you already know Flash/AS3, and makes  a lot of things much siimpler and quicker to implement.

  • Embed OTF Font as CFF in Pure Actionscript Project using Flex SDK 4.0

    I want to apply the method explained here: http://www.insideria.com/2009/03/flash-text-engine.html using only the Flex SDK 4 (not using FlashBuilder)
    Specifically:
    Embedding fonts can be tricky. In Flex, embed the font and store it
    using DefineFont4 and font subsetting currently only supported by Gumbo.
    A future version of Flash will support it but in the meantime, a Gumbo
    SWC with the embedded font must be created then adding to your Flash CS4
    project.
    The following is the method I am using to embed the fonts.
    public class Main extends Sprite {
         [Embed(source="../assets/GE Thameen DemiBold.otf",
                                  fontFamily = "GE Thameen",
                                  fontWeight = "bold",
                                  mimeType = "application/x-font",
                                  embedAsCFF = "true"
         private const GEThameen:Class;
    The following command line was assimilated after solving the output error messages using google and a little looking into how FlashDevelop works..
    mxmlc Main.as -load-config config.xml -managers flash.fonts.AFEFontManager
    The output SWF is not working as supposed, and the file size (20KB) does not seem to account for the embedded font. PS: When the font embedding is bypassed, and a device font is used for the text engine classes, the file works perfectly.
    The contents of config.xml are as the following:
    <?xml version="1.0" encoding="utf-8"?>
    <!--This Adobe Flex compiler configuration file was generated by a tool.-->
    <!--Any modifications you make may be lost.-->
    <flex-config>
      <target-player>10.0.0</target-player>
      <compiler>
        <source-path append="true">
          <path-element>E:\actionscript</path-element>
        </source-path>
        <external-library-path>
            <path-element>C:\bin\flex_sdk_4\frameworks\libs\player\10.0\playerglobal.swc</path-element>
            <path-element>C:\bin\flex_sdk_4\frameworks\libs\flex.swc</path-element>
        </external-library-path>
      </compiler>
      <file-specs>
      </file-specs>
      <default-background-color>#FFFFFF</default-background-color>
      <default-frame-rate>30</default-frame-rate>
      <default-size>
        <width>800</width>
        <height>600</height>
      </default-size>
    </flex-config>

    After losing about 2-3 days to trying to figure this stuff out, I rolled back to build 4.5.0.19786 and the problem doesn't occur anymore.  I'll revisit this issue once we ship the product next week.
    Thanks Alex.
    Cheers,
    Nate Beck

  • How To Use SPDD and SPAU Transaction in An Upgrade Project

    Hi Friends,
    I will be working in an upgrade project very soon. this is my first experience for Upgrade project. Though I know these two transaction are used for Upgrade.
    Can anyone give me a step by step document for using these two transactions and other relevant information.
    Also, I have one query where do we use these transactions : On the old system e.g. R/3 4.7 or ECC 6.0
    Thanks,
    Pradeep
    <REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>
    Edited by: Alvaro Tejada Galindo on Dec 23, 2008 10:39 AM

    Hi Pradeep,
    For SPDD see this link
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/2e/6d66587d9011d396b60000e82de14a/frameset.htm
    For SPAU
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/c8/61ec66e33611d1954b0000e82de14a/frameset.htm
    Why you need this Adjustments
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/60/d6ba7bceda11d1953a0000e82de14a/frameset.htm
    You use the transactions in the new system.
    Regards

  • ActionScript Project

    I have an ActionScript Project and I have been running unit tests using the FlexUnit 4 integration in Flash Builder 4 Beta 2. These have been working great until I try to use UIImpersonator, which uses Flex classes and fails in my pure ActionScript project. (UIImpersonator works fine with a Flex Project.)
    Since Flash Builder is for both Flex and ActionScript projects, I figured I would be able to use FlexUnit to equal extents. Is there an ActionScript project equivalent to UIImpersonator, or just a way to access the Stage?

    I found this BDD project page, which includes a stage access example:
    Cuke4AS3 https://github.com/flashquartermaster/Cuke4AS3/
    [EDIT]
    After much research and complication, I ended up using a Singleton that provides a stage reference that was passed in from a `creationComplete` handler in my TestRunner.
    =======TestRunner.mxml==========================================
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        creationComplete="onCreationComplete()"
        xmlns:flexUnitUIRunner="http://www.adobe.com/2009/flexUnitUIRunner"
        styleName="flexUnitApplication"
        layout="absolute" height="800" width="1000">
        <mx:Script>
            <![CDATA[
                import org.flexunit.runner.FlexUnitCore;
                private var core:FlexUnitCore;
                public function onCreationComplete():void {
                    core = new FlexUnitCore();
                    core.addListener( new TraceListener() );
                    core.addListener( new UIListener( uiListener ));
                    new StageLocator(systemManager.stage);
                    core.run(MyTestSuite);
            ]]>
        </mx:Script>
        <mx:Style>
            Application {
                   backgroundColor: #3872b2;
                   backgroundGradientColors: #3872b2, #0c1a3d;
                   backgroundGradientAlphas: 1, 1;
                   themeColor: #ffffff;
                   color: #444444;
                   fontFamily: "Myriad Pro Semibold";
                   fontSize: 12;
        </mx:Style>
        <flexUnitUIRunner:TestRunnerBase id="uiListener" width="100%" height="100%" />
    </mx:Application>
    =======StageLocator.as==========================================
    package {
    import flash.display.Stage;
    public class StageLocator {
        public static var instance:StageLocator;
        public static var stage:Stage;
        public function StageLocator ($stage:Stage) {
            instance = this;
            stage = $stage;

  • Using components in actionscript project

    Sorry if my question sounds dumb, but I just started learning
    AS3.
    I'm trying to use UI components in an ActionScript project.
    I can't import the definition of mx.controls classes such as
    Button or CheckBox.
    Here's the code I'm using:
    package {
    import mx.controls.Button;
    public class Learning {
    public function Learning() {
    var button:Button = new Button();
    When I compile, this is what I get: "Definition
    mx.controls:Button could not be found."
    How to import these definitions?
    -S

    Tried compiling it using the FlexBuilder IDE? There's nothing
    wrong with your code, so it sounds like your compiler doesn't know
    where to find the libraries, or is looking in the wrong place. Are
    you giving an explicit library-path argument?
    http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=L iveDocs_Parts&file=00001500.html

  • Workflow Components : how to use SPLIT and JOIN ?

    Dear all,
    Because a Transition does not have any return of result, do you know how to use SPLIT and JOIN components ?
    <activity name='"xyz">
    <Transition to='act1'>
    </Transition>
    <Transition to='act2'>
    </Transition>
    </activity>
    In this above example, the second transition towards act2 is never called (i.e. there is no condition for the first transition) because there is no return of result for the first transition.
    Unfortunately, I didn't find any documentation about the SPLIT and JOIN workflow components. Do you have some information about these components ? How to use them ?
    Thanks a lot.

    <activity name='"xyz" andSplit='true'>
    <Transition to='act1'>
    </Transition>
    <Transition to='act2'>
    </Transition>
    </activity>
    The "andSplit='true'" will cause it transition to both act1 and act1.

  • Pure Actionscript vs. MXML

    I understand that the answer to this question may be mostly
    subjective to some, but I'm trying to zero in on the objective
    part. In developing my apps, I am finding a regular tension between
    having my Flex components developed in MXML vs. Actionscript. I
    wanted to ask a general question, and again, trying to be objective
    as possible, is it better to develop Flex components in MXML or in
    pure Actionscript?
    While MXML of course let's you perform WYSIWYG development in
    Flex Builder's GUI editor, I have run into things that can't be
    done very gracefully in MXML, reuse of MXML components can become
    cumbersome, and there's a lack of control of loading and unloading
    of components in MXML, which you can accomplish in Actionscript
    much better.
    I have noticed that what I have seen of the Flex API is pure
    Actionscript, which would indicate a lean toward Actionscript, but
    then I've seen code snippets for components in various places on
    the web posted in MXML.
    So to try to get down to the crux of the matter -- is it
    inherently better to develop Flex components in pure Actionscript
    or in MXML, and why?
    Thanks -- I'm curious as to community responses....
    B

    Tankman,
    I'll take one last stab here.
    quote:
    Wait, you've completely lost me- you're saying that MXML
    isn't declarative because it can include Actionscript?
    You said previously that "the Flex documentation explicitly
    states that MXML is declarative, and therefore limited". I replied
    with "MXML isn't completely declarative, it allows embedded
    Actionscript." In other words, while MXML components are
    declarative, they aren't 100% declarative. An MXML component is
    both declarative and includes embedded Actionscript. The intent of
    the original question was to compare writing components in MXML
    (which includes embedded Actionscript), versus writing components
    exclusively in Actionscript. Never at any time was there any
    intention to be discussing writing components in MXML while
    prohibiting any use of embedded Actionscript, like virtually all
    tutorials and samples from Adobe do. The thrust is to determine if
    going in either direction (MXML, which again includes embedded
    Actionscript, vs. pure Actionscript) either provides or removes any
    features / functionality that the other has access to.
    quote:
    By that logic, no, there are no limitations to MXML. Since it
    has actionscript in it.
    Now you've answered the question. In your opinion, writing a
    component using MXML (once again, which includes embedded
    Actionscript) has no limitations.
    quote:
    By your classification system, I could just make my entire
    application one MXML file, with 9000 lines of actionscript in it,
    doing all the work, and that would count as "MXML".
    Yes, this is true. But the question wasn't an architectural
    design one of how the app should be broken into subcomponents, the
    question was about the merits of building your components in MXML
    vs. pure Actionscript. Your scenario has nothing to do with using
    MXML vs. pure Actionscript -- that is merely a design choice with
    whichever one you choose. One could just as easily write 9000 lines
    of Actionscript in a single monolithic Actionscript class.
    Based on your answer above, about there being no limitations
    of MXML when you include Actionscript, if that is true, then I
    believe one has to conclude that writing MXML components is
    superior to Actionscript, based on the fact that Actionscript
    components cannot be rendered and modified in the designer. Now,
    whether MXML has limitations was the question posed in this mail
    thread, and that answer still remains to be seen. But if your
    answer is true, then MXML is clearly superior, based on avaiable
    tooling, to Actionscript.

  • I would like to know how to transform an API C++ application in MFC C++ application to use the measurement studio components or Labwindows CVI

    I don t know the way used to transform a C++ with API program in an MFC application using measurement studio or Labwindows CVI.
    Thank you for you help.

    You can use the Measurement Studio Add/Remove Components Wizard to add Measurement Studio components to your C++ application. For more information, see the "Adding and Removing Components from Measurement Studio Projects Using a Wizard" topic in the Measurement Studio reference. You can find it in the table of contents under:
    Visual C++ Help
    Tutorials
    Measurement Studio for Visual C++ 6.0
    If you're using the Measurement Studio update for Visual C++ .NET, this topic will be under:
    Visual C++ Help
    Tutorials
    Measurement Studio for Visual C++ .NET
    - Elton

  • How can I use Spark and Mx Components in a NativeWindow?

    Hi,
    First of all, please, excuse my english... I'll try to express in the best way I can...
    I'm working in a AIR application, with Flash, Flex Builder y Action Script 3. I'm creating a new interface, and the main class extends from NativeWindow. The design and look&feel of my application is much different so I plan to create my own components, but I want to use some Spark or mx components and make some skinning or styling.
    When I've tried add some components in the stage of my main class (NativeWindow), the component doesn't appear or a compilation error if a try differents ad bizarre things. After reading and searching a lot. I think that Spark or MX component need a Spark or MX container. I've done some tests and if I add a WindowedApplication, I can use Spark/MX components, but I have two differents "windows": my own window and the Spark window.
    What am I searching? I solution to add Spark/MX components under my NativeWindow and integrate with the rest of my components.
    My main MXML file is:
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/mx"
            xmlns:b="*"
            xmlns:a="com.copmadrid.arioco.window.*"  windowActivate="this.close()">
    <fx:Declarations>
      <!-- Place non-visual elements (e.g., services, value objects) here -->
      <a:MainWindow id="ariocoWindow">
      </a:MainWindow>
    </fx:Declarations>
    </s:WindowedApplication>
    In Declarations, I create my own window. If I add Spark/MX components in this file, they're added in another Flex-like window. I have two windows. For this reason I put this.close() to close the Flex Window. It's a trick for the moment.
    Inside <a:MainWindow>, I can't add anything becouse Flex Builder 4 said that I can't add component in declaration - trying to add a component inside the NativeWindow. If I add Spark/MX components in the ActionScript class of MainWindow, even if I add a Spark WindowedApplication, they aren't appear.
    I have to ways, and I'll be very thankful if someone could help me:
    1. How can add in the MXML file Spark/MX components under the MainWindow after the delcaration block. I've searched but I haven't found a way to do it.
    2. Inside de ActionScript class file of MainWindow, add Spark/MX components but I supposse that I have to make an instance of a class that I can add to the stage of MainClase (extends from  NativeWindow) and will be visible there and a valid container for Spark/MX components. I have no idea about which class could be a bridge between NativeWindow and a valid Spark/MX coontainer.
    Thanks in advance! Greetings from Spain!!!

    Spark.components.Window is used for secondary windows.

  • Function module to get the valid Subcontract BOM and components for Pur doc

    Hello Gurus,
    I need help to create a z report of subcontracting bom and their components exploded in Schedule agreement. Seems like there is no standard report which can give the boms from purcashing doc.  Can someone please tell me the name of the function module for it? any help will be highly appreciated.
    Regards,
    Owais

    hi
    u can use
    STPO BOM - item
    STAS BOMs - Item Selection
    STZU Permanent BOM data
    also check stko or mast or stpo
    or
    Perhaps you can run ST05 while run some transaction for display the
    BOM.
    Once the transaction for display the BOM gets finished, you need to stop the
    trace on ST05 and then display it, you will see tables readden in the
    transaction,
    not tried plz check*
    reward if helpful
    regards
    kunal
    Edited by: kunal ingale on Jul 22, 2008 6:21 AM

  • Programatic Generation and positioning of  components using Drag and Drop

    Hi,
    I am relatively new to ADF and UI Designing. Im trying to generate a flowchart using drag and drop feature in ADF. This involves creation of dragging images such as start,decision .. etc from one panel to another and dynamically creating a flowchart.
    Up to now i have managed to drag images from panel1 to panel2 and create them dynamically in the bean class. However im stuck at this point .. Im not able to position the draggable components on the desired position in the panelGroup. They either appear horizontally or vertically.
    Is there any way to achieve this. Also is it possible to assign a dropTarget to a a target component which is created dynamically ?
    Thanks in anticipation ....
    Lyle

    Hi Lyle,
    I am too only 4 months old to adf ,i use jdeveloper 10g.
    In 10g for the components to be placed at desired locations i think is somewhat possible. While you can arrange them by using spaces which causes
    f:verbatim tag to appear or you can use ADF Faces Core items like Object Spacer and Object Seperator where you can set their length and width to space objects on page...
    Regards
    Rohit

  • [svn:fx-trunk] 13288: Changing the workaround for custom whitespace preservation in spark components in order to cater for fixes to SDK-24699 and SDK-24611 .

    Revision: 13288
    Revision: 13288
    Author:   [email protected]
    Date:     2010-01-05 15:21:57 -0800 (Tue, 05 Jan 2010)
    Log Message:
    Changing the workaround for custom whitespace preservation in spark components in order to cater for fixes to SDK-24699 and SDK-24611.
    We now preserve whitespace for all of the spark "text" tags at compile time (but not only-whitespace content if an alternate text attribute was specified).
    QE notes: Please ensure that whitespace preservation continues to work, including for the scenarios mentioned in previous issues SDK-22601, SDK-23160, SDK-23972.
    Doc notes: N/A
    Bugs:
    SDK-24699 - Binding does not work with Spark TextInput "text" property
    SDK-24611 - MXML compiler should preserve whitespace in FlowElement tags (such as
    Reviewer: Paul
    Tests run: checkintests, mustella RichText, List, TextArea (the 2 baseline position failures existed prior to these changes)
    Is noteworthy for integration: Yes
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24699
        http://bugs.adobe.com/jira/browse/SDK-24611
        http://bugs.adobe.com/jira/browse/SDK-22601
        http://bugs.adobe.com/jira/browse/SDK-23160
        http://bugs.adobe.com/jira/browse/SDK-23972
        http://bugs.adobe.com/jira/browse/SDK-24699
        http://bugs.adobe.com/jira/browse/SDK-24611
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/MxmlScanner.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/Node.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java

    This bug figures out also when creating a custom spark ComboBox, then trying to programatically update the userProposedSelectedIndex property. The proposed selected index is selected, but does not apply the same skin as when mouse is on rollover or item is selected due to up and down keys.
    The issue seems like updating the status of the item renderer to rollover or selected to get the same skin applied.
    Please could you attach DropDow nList.as that you edited ?
    Thank you so much.

  • Can't access object using "id" or "name" if created with actionscript

    How can you register an instance of an object with actionscript so that it's id or name value is accessible?
    I included a simple example where a Button is created using mxml and in the same way it is created using actionscript.  The actionscript object is inaccessible using it's "id" and "name" property.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                   creationComplete="application1_creationCompleteHandler(event)">
        <fx:Script>
            <![CDATA[
                import mx.events.FlexEvent;
                protected function application1_creationCompleteHandler(event:FlexEvent):void
                    import spark.components.Button;
                    var asBtn:Button = new Button();
                    asBtn.label = "actionscript";
                    asBtn.x = 200;
                    asBtn.id = "asButton";
                    asBtn.name = "asButtonName";
                    addElement(asBtn);
                    trace("mxmlButton="+this["mxmlButton"].label); // returns: mxml  label
                    //trace("mxmlButton="+this["asButton"].label); // returns runtime error: ReferenceError: Error #1069: Property asButton not found on TestId and there is no default value.
                    //trace("mxmlButton="+this["asButtonName"].label); // returns runtime error: ReferenceError: Error #1069: Property asButtonName not found on TestId and there is no default value.
            ]]>
        </fx:Script>
        <s:Button
            id="mxmlButton"
            label="mxml label"
            alpha="0.8"/>
    </s:Application>

    Hi Dan,
    It is a very rare occurrence when I miss not being able to access an object (object property, really) using the ["name"] notation for objects created using actionscript.
    In MXML the compiler is conveniently adding an attribute to the class with the same name as the id, so you can conveniently refer to it using the [] notation. While we explicitly specify an application container to use, the MXML compiler creates a custom container which is a derivative of the base container and to that it adds properties for the children declared in MXML. I guess it also effectively calls "addElement" for us when  the container is being constructed.
    Your example assumes that using "addElement" to add the button to the application container is the same as declaring a variable (ie property ). It isn't, so there's no point in looking for an property of the name "as3Button" using the [] notation, because it doesn't exist. The container is managing a collection of children in it's display list and that's not the same as being accessible as properties of the container.
    Generally speaking, accessing properties using the ["name"] syntax isn't necessary.
    Paul
    [edit: you may wonder why "addElement" doesn't conveniently also add the "id" attribute to be an property of the container class. Unfortunately, it can't because the container class would need to be dynamic and it's not. A further complication would be that adding properties at runtime would invite naming clashes at runtime with associated mayhem. MXML can do this because the compiler generates the class and can trap name duplication at compile time.
    Great question, BTW.
    -last edit changed my "attributes" to be "properties" in line with Adobe's terminology]

Maybe you are looking for