MXML / AS3

Is it possible to add display objects from ActionScript
(Sprites, Shapes, etc) to an MXML application? Or do you have to
create an SWF first and just add that?
I'm working on an Actionscript heavy project. I need to do a
lot of animation with Sprites / Shapes... but I also want to use
MXML components. Pretty new to Flex... any ideas?

Certainly you can add display objects dynamically, at run
time.
See here for a start:
http://livedocs.macromedia.com/flex/2/docs/00001853.html
I am still looking for a simple tutorial on the subject.
Tracy

Similar Messages

  • Changing themes of application in Flex 3

    Hi All ,below is my  mxml file , in which i am trying to change theme of my flex application by selecting the themes in combo box, but it is not working fine.Is there any bug in code ??? How to change the theme of flex application in Flex 3.. Plzz help...
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Script>
    <![CDATA[
               import mx.controls.Alert;
                import mx.collections.ArrayCollection;
                import mx.styles.StyleManager;
                private var cssLoader:URLLoader;
              private var cssRequest:URLRequest;
              [Bindable]
                public var cards:ArrayCollection = new ArrayCollection(
                    [ {label:"Theme 0", data:0},
                      {label:"Theme 1", data:1},
                      {label:"Theme 2", data:2},
                      {label:"Theme 3", data:3} ]);
                   private function closeHandler(event:Event):void {
                   if(event.target.selectedItem.data == 1){
                    cssLoader = new URLLoader();
                    cssRequest = new URLRequest("Alert.css");
                    cssLoader.addEventListener(Event.COMPLETE, cssLoaderComplete);
                    cssLoader.load(cssRequest);
                if(event.target.selectedItem.data == 2){
                  cssLoader = new URLLoader();
                    cssRequest = new URLRequest("Alert1.css");
                    cssLoader.addEventListener(Event.COMPLETE, cssLoaderComplete);
                    cssLoader.load(cssRequest);
                if(event.target.selectedItem.data == 3){
                  cssLoader = new URLLoader(); 
                    cssRequest = new URLRequest("Alert2.css");
                    cssLoader.addEventListener(Event.COMPLETE, cssLoaderComplete);
                    cssLoader.load(cssRequest);
                 private function cssLoaderComplete(event:Event):void
                     var sheet:StyleSheet = new StyleSheet();
                     sheet.parseCSS(cssLoader.data);
                     Application.application.styleSheet = sheet;
    ]]>
    </mx:Script>
    <mx:Button label="Click Me"  x="337" y="148"/>
    <mx:ComboBox dataProvider="{cards}" id="themeCombo" width="100"  change="closeHandler(event);" x="308" y="205"/>
    </mx:Application>

    Hi Bhasker,
    I work for big bank sector corp - Citigroup.,i am using themes to load themes dynamically using style manager class.i wrote a application which have 3 themes as a combo box items. when theme selected the look and feel of the same application's UI screen has to change. for the loading i used below mxml application. please advise me as need to submit this task today to implement all our project.it will be very gr8 if u can help me.
    <?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">
     <fx:Script><![CDATA[
    import mx.controls.Alert;
    import mx.styles.StyleManager;
    import mx.events.StyleEvent;
    [Bindable] private var themes:Array = [ "AeonGraphical","Spark","Halo" ];
    private function initApp():void {
    //Initialize the ComboBox to the first theme in the themes Array.
    themesCmbBox.selectedIndex = themes.indexOf(0);
    private function thmsCmbChangeHandler(themeName:String):void {
    themeName= themesCmbBox.selectedLabel;
    if (themeName!=null && themeName == "AeonGraphical") {
    styleManager.loadStyleDeclarations("assets/AeonGraphical/AeonGraphical.swf");
    if (themeName!=null && themeName == "Spark") {
    styleManager.unloadStyleDeclarations("assets/AeonGraphical/AeonGraphical.swf");
    styleManager.loadStyleDeclarations("assets/Spark/spark.swf");
    if (themeName!=null && themeName == "Halo") {
    styleManager.unloadStyleDeclarations("assets/Spark/spark.swf");
    styleManager.loadStyleDeclarations("assets/Halo/halo.swf");
    private function registrationComplete():void {
    Alert.show('Thank you for registering!');
    private function clickClear(event:KeyboardEvent=null):void {
    if(event==null || event.keyCode == 13 ) {
    person.text = "" ;
    addr.text = "" ;
    city.text = "";
    state.text = "" ;
    zip.text = "" ;
    ]]>
    </fx:Script>
     <mx:Form id="Themes">
     <mx:FormItem>  
    <mx:Label text="{'Themes Demo in Flash 4'}" fontSize="35"/>  
    </mx:FormItem>  
    <mx:FormItem label="Themes" >  
    <mx:ComboBox id="themesCmbBox" dataProvider="{themes}" change="thmsCmbChangeHandler(themesCmbBox.selectedLabel)" />  
    </mx:FormItem>  
    <mx:FormItem label="Person Name">
     <mx:TextInput id="person" />
     </mx:FormItem>
     <mx:FormItem label="Street Address">
     <mx:TextInput id="addr"/>
     </mx:FormItem>
     <mx:FormItem label="City">
     <mx:TextInput id="city"/>
     </mx:FormItem>
     <mx:FormItem label="State">
     <mx:TextInput id="state" />
     </mx:FormItem>
     <mx:FormItem label="ZIP Code">
     <mx:TextInput id="zip" />
     </mx:FormItem>  
    </mx:Form>
     <mx:HBox>
     <mx:Button id="sub" label="{'Submit'}" y="100" click="registrationComplete()" />
     <mx:Button id="reset" label="{'Reset'}" buttonDown="clickClear()" keyDown="clickClear(event)" />
     </mx:HBox> 
    </s:Application>
    and i given the compiler option: -theme=${flexlib}/themes/Halo/halo.swc,${flexlib}/themes/Spark/spark.css,${flexlib}/theme s/AeonGraphical/AeonGraphical.css
    i tried with locally project assets path, and framework path nothing work out. and added these themes in the flex-config.xml file also. please advise me ASAP
    Advance Thanks,
    Usha
    Optional Information:
    Computer OS: Windows XP
    Programming Language: mxml/as3
    Compiler: flash 4.1.0

  • Multiple themes for one application

    Hi,
            How to apply multiple themes dynamically for singel application. Is there any sample available.
    Regards,
    Jayagopal.

    Hi,
    I work for big bank sector corp - Citigroup.,i am using themes to load themes dynamically using style manager class.i wrote a application which have 3 themes as a combo box items. when theme selected the look and feel of the same application's UI screen has to change. for the loading i used below mxml application. please advise me as need to submit this task today to implement all our project.it will be very gr8 if u can help me.
    <?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">
    <fx:Script>
    <![CDATA[
    import mx.controls.Alert;
    import mx.styles.StyleManager;
    import mx.events.StyleEvent;
    [Bindable] private var themes:Array = [ "AeonGraphical","Spark","Halo" ];
    private function initApp():void {
    //Initialize the ComboBox to the first theme in the themes Array.
    themesCmbBox.selectedIndex = themes.indexOf(0);
    private function thmsCmbChangeHandler(themeName:String):void {
    themeName= themesCmbBox.selectedLabel;
    if (themeName!=null && themeName == "AeonGraphical") {
    styleManager.loadStyleDeclarations("assets/AeonGraphical/AeonGraphical .swf");
    if (themeName!=null && themeName == "Spark") {
    styleManager.unloadStyleDeclarations("assets/AeonGraphical/AeonGraphic al.swf");
    styleManager.loadStyleDeclarations("assets/Spark/spark.swf");
    if (themeName!=null && themeName == "Halo") {
    styleManager.unloadStyleDeclarations("assets/Spark/spark.swf");
    styleManager.loadStyleDeclarations("assets/Halo/halo.swf");
    private function registrationComplete():void {
    Alert.show('Thank you for registering!');
    private function clickClear(event:KeyboardEvent=null):void {
    if(event==null || event.keyCode == 13 ) {
    person.text = "" ;
    addr.text = "" ;
    city.text = "";
    state.text = "" ;
    zip.text = "" ;
    ]]>
    </fx:Script>
    <mx:Form id="Themes">
    <mx:FormItem>
    <mx:Label text="{'Themes Demo in Flash 4'}" fontSize="35"/>
    </mx:FormItem>
    <mx:FormItem label="Themes" >
    <mx:ComboBox id="themesCmbBox" dataProvider="{themes}" change="thmsCmbChangeHandler(themesCmbBox.selectedLabel)" />
    </mx:FormItem>
    <mx:FormItem label="Person Name">
    <mx:TextInput id="person" />
    </mx:FormItem>
    <mx:FormItem label="Street Address">
    <mx:TextInput id="addr"/>
    </mx:FormItem>
    <mx:FormItem label="City">
    <mx:TextInput id="city"/>
    </mx:FormItem>
    <mx:FormItem label="State">
    <mx:TextInput id="state" />
    </mx:FormItem>
    <mx:FormItem label="ZIP Code">
    <mx:TextInput id="zip" />
    </mx:FormItem>
    </mx:Form>
    <mx:HBox>
    <mx:Button id="sub" label="{'Submit'}" y="100" click="registrationComplete()" />
    <mx:Button id="reset" label="{'Reset'}" buttonDown="clickClear()" keyDown="clickClear(event)" />
    </mx:HBox>
    </s:Application>
    and i given the compiler option:
    -theme+=${flexlib}/themes/Halo/halo.css,${flexlib}/themes/Spark/spark.css,${flexlib}/theme s/AeonGraphical/AeonGraphical.css
      or -theme+=assets/Halo/halo.css,assets/Spark/spark.css,assets/AeonGraphical/AeonGraphical.cs s
    i tried with locally project assets path, and framework path nothing work out. and added these themes in the flex-config.xml file also.
    And i tried to run your MyStyle app same problem. Please advise me ASAP.
    Advance Thanks,
    Usha
    Optional Information:
    Computer OS: Windows XP
    Programming Language: mxml/as3
    Compiler: flash 4.1.0

  • Trigger transition similar to "on application start" (no user action)

    Structure:
    State 1 -> State 2 -> State 3....and so on.
    On application start there is a simple transition from State 1 -> State 2
    From anywhere in the application (i.e. State 3):
    how would one add interaction that goes to State 1 and transition to State 2?
    am currently "limited" to transitioning to State 2 from anywhere else, but this isn't the intended result
    If this is easily done in Catalyst, and I'm just not seeing it, please do tell...
    Otherwise, yes, am very new to Catalyst/Flex, but am not new to AS3/Flash....so if this requires some Flex/MXML/AS3 work, I think I should be able to follow instruction
    Thanks for any input.
    Ed

    Ok here is how to 'auto-trigger' state changes in a Flash Catalyst project
    You will need to open your Flash Catalyst project in Flash Builder, so if you are using 1.0 this is a one way trip (so consider yourself warned). With 1.5 'Panini', you should be able to re-open the file back in Flash Catalyst (but is it a preview release, so promises).
    In main.mxml file, locate the <s:transitions> portion of the code. You should see a set of nested tags that define each state to state transition. At the first tag after the <s:transitions> (it should be either a <s:Parallel or <s:Sequence tag), at the end of the tag add the following attribute:
       effectEnd="state1_effectEndHandler(event)"
    Original Tag:
    <s:Parallel>
    New Tag:
    <s:Parallel effectEnd="parallel1_effectEndHandler(event)">
    Now in the <fx:Script> portion of the mxml file, you will need to add an event handler:
    protected function parallel1_effectEndHandler(event:EffectEvent):void
         currentState='Page2'
    where Page2 is the name of the next state you want to transition to.
    You can continue to follow this pattern to chain more together by added the effectEnd attribute to the next set of transitions, and adding matching event handlers
    I have attached a simple demo. Click on the button to trigger going from state 1 to state 2, it should auto transition to state 3. You will need to open it in Flash Builder.
    Chris

  • Help From You: New Version of fcsh

    I am looking for some help from you. I want to use something
    like fcsh but which can be automated/scripted. fsch is not possible
    to be scripted because it is an interactive shell script. Adobe
    does not provide the open source for fcsh at this time as far as I
    have seen. I do not want to use the Flex apache module but I wish
    there was a version of fcsh which behaved similarly. I do not wish
    to use the Apache module because any compile errors remain in the
    browser with no opportunity to pass them back with lines to my text
    editor. The Flex module is attached to Apache and Apache can be
    started/stopped via a shell command. I would like to be able to
    operate fcsh similarly - in that fcsh is always running and
    instructions are passed to fcsh via secondary commands. I am
    looking for some help from you. Thanks to you.

    Slowly finding more promising leads:
    http://blog.vixiom.com/2007/03/27/set-up-eclipse-to-compile-mxml-as3-quasi-flex-builder-fo r-os-x/#comment-21637
    http://www.vim.org/scripts/script.php?script_id=1793
    See the download links at the bottom.

  • How to use TestRunnerBase in pure AS3 / no MXML

    Hi,
    is there a way to use the testRunnerBase GUI for a pure AS3 project, without a mxml?
    Thank you

    Hi, the testRunnerBase is a Flex application, so you can't use it in a pure AS3 environment without including all of the Flex dependencies.

  • Instantiating MXML class in AS3

    I have a simple MXML component:
    -- code -- 'MyClass'
    <mx:Canvas ... creationPolicy="none" ... >
      <mx:HBox id="innerPanel" >
        <mx:Canvas ... />
      </mx:HBox>
    </mx:Canvas>
    -- /code --
    I'm trying to instantiate this in AS3 as so:
    -- code --
    var myClass:MyClass = new myClass();
    myClass.createComponentsFromDescriptors(true);
    -- /code --
    myClass is created, but no children.  myClass.childDescriptors is empty.
    What am I doing wrong?
    thanx,
    rickb

    Unfortunatelly nothing of the above works when you have a chain of MXML's and AS's that are instantiating eachother. Not even the combination of all of the techniques mentioned earlier.
    I tried all of the above on the entire chain, and even placed callLater in the main canvas container but still creationComplete in MyMXML happens after callLater.
    I tried to be creative with the bellow pseudo pseudo code, I hope you get the idea.
    <MyMainCanvas>
    <script>
    onCreationComplete
    var myClass = new MyClass();
    addChild(myClass)
    callLater(doSomething)
    doSomething()
    // does nothing as none of the properties are available from MyMXML
    </script>
    </MyMainCanvas>
    MyClass extends Canvas
    function MyClass()
      var myMXML = new MyMXML();
      addChild(myMXML);
    <MyMXML>
    <script>
    onCreationComplete
       // this gets called after callLater in MyMainCanvas
    </script>
    </MyMXML>

  • How to extend an AS3 class in an MXML Component

    Hello,
    I have a few MXML Components based on the Spark Group.
    They all use MXML for layouta and AS3 for logic.
    They all have the same logic and I would like all to extend an AS3 class to have the same methods and properties isteand of declaring the same exact ones for each MXML Component.
    How can this be done please?

    Hm, no, I'm not explaing this properly.
    I have an MXML component based on the Spark Group.
    It has a few form elements.
    There are many such components.
    I want all to have two public methods: getData() and setData() which get and set data from and to the input elements.
    I don't want to write the exact same method for all of them.
    I would like to at least interface the MXML components with an AS3 class forcing them to have those 2 methods.

  • Can't access text properties in AS3. only in MXML

    Please help, I want to access the text property via as3. The code below.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="listService.send()" height="100%" width="555" backgroundAlpha="0.0">
    <mx:Script>
        <![CDATA[
            import mx.collections.XMLListCollection;
            import mx.rpc.events.ResultEvent;
            namespace ink = "http://www.inktomi.com/";
            use namespace ink;
            [Bindable] private var xmlList:XMLList;
            [Bindable] private var listCollection:XMLListCollection;
            [Bindable] private var listData:XML;
            [Bindable] public var serviceURL:String = "http://boss.yahooapis.com/ysearch/news/v1/";
            [Bindable] public var searchFor:String = "biotechnology%20AND%20biotech";  
            private const PROXY:String = "http://localhost/employeePhoneDesktop/src/php/proxy.php?url=";
            private const APIID:String = "###################";
            private const PARAMS:String = "&format=xml&orderby=date";
            private function resultHandler(e:ResultEvent):void {
                listData = e.result as XML;
                // add the imems to an XMLList and XMLListCollection
                // so that they can be used with the repeater class
                // and update automatically
                xmlList = e.result.resultset_news.result as XMLList;
                listCollection = new XMLListCollection(xmlList);
                setData();
            private function setData():void {
                itemRepeater.dataProvider = listCollection;
    ------>  abstract.text = "test in AS3";
                abstract.visible = false;
        ]]>
    </mx:Script>
        <mx:HTTPService id="listService" url="{serviceURL + searchFor + APIID + PARAMS}" result="resultHandler(event)" resultFormat="e4x"/>
        <mx:VBox>
            <mx:Repeater id="itemRepeater">
                <mx:VBox verticalGap="0" x="10" y="10">   
                    <mx:LinkButton id="itemTitle" label="{itemRepeater.currentItem.title}" width="400"/>
                    <mx:Label text="{itemRepeater.currentItem.source + ' | ' + itemRepeater.currentItem.date}"/>
      ---->           <mx:Text id="abstract" text="test in MXML" width="400" visible="true" />
                </mx:VBox>
            </mx:Repeater>
        </mx:VBox>
    </mx:Canvas>

    I am getting it from yahoo boss API.(the public api for news search)
    <ysearchresponse responsecode="200" xmlns="http://www.inktomi.com/">
      <nextpage>
        <![CDATA[/ysearch/news/v1/biotechnology%20AND%20biotech?count=10&appid=&orderby=date&format=xml&start=10]]>
      </nextpage>
      <resultset_news count="10" start="0" totalhits="122" deephits="122">
        <result>
          <abstract>
            President Obama is "right to push for [health care] reform now, despite calls to postpone efforts solely on the economic recovery," a Philadelphia Inquirer editorial states.
          </abstract>
          <clickurl>
            http://lrd.yahooapis.com/_ylc=X3oDMTVjZGJ2c21rBF9TAzIwMjMxNTI3MDIEYXBwaWQDWGpiSkhFX1YzNEguNldqRmdXSjBEUlJpVUdWSHVwRTJMWkFKM1o1Nnpmc04uT2pPS2VrZmNVcTZDR3VUTkdQc0gzTS0EY2xpZW50A2Jvc3MEc2VydmljZQNCT1NTBHNsawN0aXRsZQRzcmNwdmlkA3pGU3g1R0tJY3JwUkdqcVQ3SkNxcVpaaDJBOTZXa29NdXBjQUFPanA-/SIG=13usgm8rr/**http%3A//www.news-medical.net/news/2009/05/14/Editorial-says-Obama-is-e2809cright-to-push-for-health-care-reforme2809d.aspx
          </clickurl>
          <date>
            2009/05/15
          </date>
          <language>
            english
          </language>
          <source>
            News-Medical-Net
          </source>
          <sourceurl>
            http://www.news-medical.net/
          </sourceurl>
          <time>
            00:39:35
          </time>
          <title>
            Editorial says, Obama is “right to push for health care reform”
          </title>
          <url>
            http://www.news-medical.net/news/2009/05/14/Editorial-says-Obama-is-e2809cright-to-push-for-health-care-reforme2809d.aspx
          </url>
        </result>
        <result>
          <abstract>
            By Bill Berkrot
          </abstract>
          <clickurl>
            http://lrd.yahooapis.com/_ylc=X3oDMTVjZGJ2c21rBF9TAzIwMjMxNTI3MDIEYXBwaWQDWGpiSkhFX1YzNEguNldqRmdXSjBEUlJpVUdWSHVwRTJMWkFKM1o1Nnpmc04uT2pPS2VrZmNVcTZDR3VUTkdQc0gzTS0EY2xpZW50A2Jvc3MEc2VydmljZQNCT1NTBHNsawN0aXRsZQRzcmNwdmlkA3pGU3g1R0tJY3JwUkdqcVQ3SkNxcVpaaDJBOTZXa29NdXBjQUFPanA-/SIG=137ejnkf3/**http%3A//www.iii.co.uk/news/%3Ftype=afxnews%26articleid=7322383%26subject=companies%26action=article
          </clickurl>
          <date>
            2009/05/14
          </date>
          <language>
            english
          </language>
          <source>
            Interactive Investor
          </source>
          <sourceurl>
            http://www.iii.co.uk/
          </sourceurl>
          <time>
            22:37:09
          </time>
          <title>
            (AFX UK Focus) 2009-05-14 23:15 UPDATE 1-Tarceva helps keep lung cancer from worsening-study
          </title>
          <url>
            http://www.iii.co.uk/news/?type=afxnews&amp;articleid=7322383&amp;subject=companies&amp;action=article
          </url>
        </result>
        <result>
          <abstract>
            <![CDATA[The American Civil Liberties Union action in filing a lawsuit yesterday against Myriad Genetics is going to lead to one of the most important legal battles in the history of biotechnology, asserts Genetic Engineering & Biotechnology News (GEN). The ACLU charged that the patenting of two human genes linked to breast and ovarian cancer will inhibit medical research. The organization also claims ...]]>
          </abstract>
          <clickurl>
            http://lrd.yahooapis.com/_ylc=X3oDMTVjZGJ2c21rBF9TAzIwMjMxNTI3MDIEYXBwaWQDWGpiSkhFX1YzNEguNldqRmdXSjBEUlJpVUdWSHVwRTJMWkFKM1o1Nnpmc04uT2pPS2VrZmNVcTZDR3VUTkdQc0gzTS0EY2xpZW50A2Jvc3MEc2VydmljZQNCT1NTBHNsawN0aXRsZQRzcmNwdmlkA3pGU3g1R0tJY3JwUkdqcVQ3SkNxcVpaaDJBOTZXa29NdXBjQUFPanA-/SIG=11epq02rp/**http%3A//www.physorg.com/news161542716.html
          </clickurl>
          <date>
            2009/05/14
          </date>
          <language>
            english
          </language>
          <source>
            PhysOrg
          </source>
          <sourceurl>
            http://www.physorg.com/
          </sourceurl>
          <time>
            22:07:23
          </time>
          <title>
            ACLU -- Myriad Genetics lawsuit will become landmark case
          </title>
          <url>
            http://www.physorg.com/news161542716.html
          </url>
        </result>
        <result>
          <abstract>
            <![CDATA[( Mary Ann Liebert, Inc./Genetic Engineering News ) The American Civil Liberties Union action in filing a lawsuit yesterday against Myriad Genetics is going to lead to one of the most important legal battles in the history of biotechnology, asserts Genetic Engineering & Biotechnology News. The ACLU charged that the patenting of two human genes linked to breast and ovarian cancer will inhibit ...]]>
          </abstract>
          <clickurl>
            http://lrd.yahooapis.com/_ylc=X3oDMTVjZGJ2c21rBF9TAzIwMjMxNTI3MDIEYXBwaWQDWGpiSkhFX1YzNEguNldqRmdXSjBEUlJpVUdWSHVwRTJMWkFKM1o1Nnpmc04uT2pPS2VrZmNVcTZDR3VUTkdQc0gzTS0EY2xpZW50A2Jvc3MEc2VydmljZQNCT1NTBHNsawN0aXRsZQRzcmNwdmlkA3pGU3g1R0tJY3JwUkdqcVQ3SkNxcVpaaDJBOTZXa29NdXBjQUFPanA-/SIG=126eo9o3d/**http%3A//www.eurekalert.org/pub_releases/2009-05/mali-agl051409.php
          </clickurl>
          <date>
            2009/05/14
          </date>
          <language>
            english
          </language>
          <source>
            EurekAlert!
          </source>
          <sourceurl>
            http://www.eurekalert.org/
          </sourceurl>
          <time>
            21:53:26
          </time>
          <title>
            ACLU -- Myriad Genetics lawsuit will become landmark case
          </title>
          <url>
            http://www.eurekalert.org/pub_releases/2009-05/mali-agl051409.php
          </url>
        </result>
        <result>
          <abstract>
            Thornburg Core Growth Fund is outdoing its peers and the U.S. market so far this year, but manager Alex Motola would prefer that stocks hadn’t run up so far, so fast.
          </abstract>
          <clickurl>
            http://lrd.yahooapis.com/_ylc=X3oDMTVjZGJ2c21rBF9TAzIwMjMxNTI3MDIEYXBwaWQDWGpiSkhFX1YzNEguNldqRmdXSjBEUlJpVUdWSHVwRTJMWkFKM1o1Nnpmc04uT2pPS2VrZmNVcTZDR3VUTkdQc0gzTS0EY2xpZW50A2Jvc3MEc2VydmljZQNCT1NTBHNsawN0aXRsZQRzcmNwdmlkA3pGU3g1R0tJY3JwUkdqcVQ3SkNxcVpaaDJBOTZXa29NdXBjQUFPanA-/SIG=13e2var20/**http%3A//www.marketwatch.com/enf/rss.asp%3Fguid=%257B3976B0E2-6447-495E-9D35-37F2098C04DB%257D%26siteid=rss
          </clickurl>
          <date>
            2009/05/14
          </date>
          <language>
            english
          </language>
          <source>
            Market Watch
          </source>
          <sourceurl>
            http://www.marketwatch.com/
          </sourceurl>
          <time>
            21:51:01
          </time>
          <title>
            The Stockpickers: Fund manager eyes FLIR Systems, Alexion, Equinix
          </title>
          <url>
            http://www.marketwatch.com/enf/rss.asp?guid=%7B3976B0E2-6447-495E-9D35-37F2098C04DB%7D&amp;siteid=rss
          </url>
        </result>
        <result>
          <abstract>
            WINNIPEG, MANITOBA--(Marketwire - May 14, 2009) - Kane Biotech Inc. (TSX VENTURE:KNE) (the "Company"), a biotechnology company engaged in the development of products that prevent and disperse microbial biofilms, has closed its previously announced private placement offering (the "Offering") with aggregate gross proceeds to the Company of $250,000 from the sale of 3,571,429 units ("Units") at a ...
          </abstract>
          <clickurl>
            http://lrd.yahooapis.com/_ylc=X3oDMTVjZGJ2c21rBF9TAzIwMjMxNTI3MDIEYXBwaWQDWGpiSkhFX1YzNEguNldqRmdXSjBEUlJpVUdWSHVwRTJMWkFKM1o1Nnpmc04uT2pPS2VrZmNVcTZDR3VUTkdQc0gzTS0EY2xpZW50A2Jvc3MEc2VydmljZQNCT1NTBHNsawN0aXRsZQRzcmNwdmlkA3pGU3g1R0tJY3JwUkdqcVQ3SkNxcVpaaDJBOTZXa29NdXBjQUFPanA-/SIG=127a0beqs/**http%3A//www.marketwire.com/mw/release.do%3Fid=990128%26sourceType=3
          </clickurl>
          <date>
            2009/05/14
          </date>
          <language>
            english
          </language>
          <source>
            Marketwire
          </source>
          <sourceurl>
            http://www.marketwire.com/
          </sourceurl>
          <time>
            21:50:53
          </time>
          <title>
            Kane Biotech Announces Closing of Private Placement Offering
          </title>
          <url>
            http://www.marketwire.com/mw/release.do?id=990128&amp;sourceType=3
          </url>
        </result>
        <result>
          <abstract>
            The organizers of the annual biotechnology trade show at Progress Corporate Park were fully prepared to scale back this year's event in light of the sour economy.
          </abstract>
          <clickurl>
            http://lrd.yahooapis.com/_ylc=X3oDMTVjZGJ2c21rBF9TAzIwMjMxNTI3MDIEYXBwaWQDWGpiSkhFX1YzNEguNldqRmdXSjBEUlJpVUdWSHVwRTJMWkFKM1o1Nnpmc04uT2pPS2VrZmNVcTZDR3VUTkdQc0gzTS0EY2xpZW50A2Jvc3MEc2VydmljZQNCT1NTBHNsawN0aXRsZQRzcmNwdmlkA3pGU3g1R0tJY3JwUkdqcVQ3SkNxcVpaaDJBOTZXa29NdXBjQUFPanA-/SIG=12ede36kg/**http%3A//www.gainesville.com/article/20090513/articles/905131010%26tc=yahoo
          </clickurl>
          <date>
            2009/05/14
          </date>
          <language>
            english
          </language>
          <source>
            The Gainesville Sun
          </source>
          <sourceurl>
            http://www.gainesville.com/
          </sourceurl>
          <time>
            21:16:50
          </time>
          <title>
            Biotech trade show draws strong turnout
          </title>
          <url>
            http://www.gainesville.com/article/20090513/articles/905131010&amp;tc=yahoo
          </url>
        </result>
        <result>
          <abstract>
            VANCOUVER, BRITISH COLUMBIA--(Marketwire - May 14, 2009) - Allon Therapeutics Inc. (TSX:NPC) reported today in its First Quarter 2009 operating results that the Company is on track to achieve its 2009 milestones, including completing a partnership with a major pharmaceutical company and advancing the clinical development of lead neuroprotective product candidate davunetide intranasal (AL-108) ...
          </abstract>
          <clickurl>
            http://lrd.yahooapis.com/_ylc=X3oDMTVjZGJ2c21rBF9TAzIwMjMxNTI3MDIEYXBwaWQDWGpiSkhFX1YzNEguNldqRmdXSjBEUlJpVUdWSHVwRTJMWkFKM1o1Nnpmc04uT2pPS2VrZmNVcTZDR3VUTkdQc0gzTS0EY2xpZW50A2Jvc3MEc2VydmljZQNCT1NTBHNsawN0aXRsZQRzcmNwdmlkA3pGU3g1R0tJY3JwUkdqcVQ3SkNxcVpaaDJBOTZXa29NdXBjQUFPanA-/SIG=1272cla75/**http%3A//www.marketwire.com/mw/release.do%3Fid=990087%26sourceType=3
          </clickurl>
          <date>
            2009/05/14
          </date>
          <language>
            english
          </language>
          <source>
            Marketwire
          </source>
          <sourceurl>
            http://www.marketwire.com/
          </sourceurl>
          <tim...
         listCollection
    <result xmlns="http://www.inktomi.com/">
      <abstract>President Obama is "right to push for [health care] reform now, despite calls to postpone efforts solely on the economic recovery," a Philadelphia Inquirer editorial states.</abstract>
      <clickurl>http://lrd.yahooapis.com/_ylc=X3oDMTVjdG04ZXZ1BF9TAzIwMjMxNTI3MDIEYXBwaWQDWGpiSkhFX1YzNEguNldqRmdXSjBEUlJpVUdWSHVwRTJMWkFKM1o1Nnpmc04uT2pPS2VrZmNVcTZDR3VUTkdQc0gzTS0EY2xpZW50A2Jvc3MEc2VydmljZQNCT1NTBHNsawN0aXRsZQRzcmNwdmlkA1VDNU9NbUtJY3JybzRJZThoSEtpcjVjLjJBOTZXa29NdmIwQURSYk0-/SIG=13usgm8rr/**http%3A//www.news-medical.net/news/2009/05/14/Editorial-says-Obama-is-e2809cright-to-push-for-health-care-reforme2809d.aspx</clickurl>
      <date>2009/05/15</date>
      <language>english</language>
      <source>News-Medical-Net</source>
      <sourceurl>http://www.news-medical.net/</sourceurl>
      <time>00:39:35</time>
      <title>Editorial says, Obama is “right to push for health care reform”</title>
      <url>http://www.news-medical.net/news/2009/05/14/Editorial-says-Obama-is-e2809cright-to-push-for-health-care-reforme2809d.aspx</url>
    </result>
    <result xmlns="http://www.inktomi.com/">
      <abstract>By Bill Berkrot</abstract>
      <clickurl>http://lrd.yahooapis.com/_ylc=X3oDMTVjdG04ZXZ1BF9TAzIwMjMxNTI3MDIEYXBwaWQDWGpiSkhFX1YzNEguNldqRmdXSjBEUlJpVUdWSHVwRTJMWkFKM1o1Nnpmc04uT2pPS2VrZmNVcTZDR3VUTkdQc0gzTS0EY2xpZW50A2Jvc3MEc2VydmljZQNCT1NTBHNsawN0aXRsZQRzcmNwdmlkA1VDNU9NbUtJY3JybzRJZThoSEtpcjVjLjJBOTZXa29NdmIwQURSYk0-/SIG=137ejnkf3/**http%3A//www.iii.co.uk/news/%3Ftype=afxnews%26articleid=7322383%26subject=companies%26action=article</clickurl>
      <date>2009/05/14</date>
      <language>english</language>
      <source>Interactive Investor</source>
      <sourceurl>http://www.iii.co.uk/</sourceurl>
      <time>22:37:09</time>
      <title>(AFX UK Focus) 2009-05-14 23:15 UPDATE 1-Tarceva helps keep lung cancer from worsening-study</title>
      <url>http://www.iii.co.uk/news/?type=afxnews&amp;articleid=7322383&amp;subject=companies&amp;action=article</url>
    </result>
    <result xmlns="http://www.inktomi.com/">
      <abstract><![CDATA[The American Civil Liberties Union action in filing a lawsuit yesterday against Myriad Genetics is going to lead to one of the most important legal battles in the history of biotechnology, asserts Genetic Engineering & Biotechnology News (GEN). The ACLU charged that the patenting of two human genes linked to breast and ovarian cancer will inhibit medical research. The organization also claims ...]]></abstract>
      <clickurl>http://lrd.yahooapis.com/_ylc=X3oDMTVjdG04ZXZ1BF9TAzIwMjMxNTI3MDIEYXBwaWQDWGpiSkhFX1YzNEguNldqRmdXSjBEUlJpVUdWSHVwRTJMWkFKM1o1Nnpmc04uT2pPS2VrZmNVcTZDR3VUTkdQc0gzTS0EY2xpZW50A2Jvc3MEc2VydmljZQNCT1NTBHNsawN0aXRsZQRzcmNwdmlkA1VDNU9NbUtJY3JybzRJZThoSEtpcjVjLjJBOTZXa29NdmIwQURSYk0-/SIG=11epq02rp/**http%3A//www.physorg.com/news161542716.html</clickurl>
      <date>2009/05/14</date>
      <language>english</language>
      <source>PhysOrg</source>
      <sourceurl>http://www.physorg.com/</sourceurl>
      <time>22:07:23</time>
      <title>ACLU -- Myriad Genetics lawsuit will become landmark case</title>
      <url>http://www.physorg.com/news161542716.html</url>
    </result>
    <result xmlns="http://www.inktomi.com/">
      <abstract><![CDATA[( Mary Ann Liebert, Inc./Genetic Engineering News ) The American Civil Liberties Union action in filing a lawsuit yesterday against Myriad Genetics is going to lead to one of the most important legal battles in the history of biotechnology, asserts Genetic Engineering & Biotechnology News. The ACLU charged that the patenting of two human genes linked to breast and ovarian cancer will inhibit ...]]></abstract>
      <clickurl>http://lrd.yahooapis.com/_ylc=X3oDMTVjdG04ZXZ1BF9TAzIwMjMxNTI3MDIEYXBwaWQDWGpiSkhFX1YzNEguNldqRmdXSjBEUlJpVUdWSHVwRTJMWkFKM1o1Nnpmc04uT2pPS2VrZmNVcTZDR3VUTkdQc0gzTS0EY2xpZW50A2Jvc3MEc2VydmljZQNCT1NTBHNsawN0aXRsZQRzcmNwdmlkA1VDNU9NbUtJY3JybzRJZThoSEtpcjVjLjJBOTZXa29NdmIwQURSYk0-/SIG=126eo9o3d/**http%3A//www.eurekalert.org/pub_releases/2009-05/mali-agl051409.php</clickurl>
      <date>2009/05/14</date>
      <language>english</language>
      <source>EurekAlert!</source>
      <sourceurl>http://www.eurekalert.org/</sourceurl>
      <time>21:53:26</time>
      <title>ACLU -- Myriad Genetics lawsuit will become landmark case</title>
      <url>http://www.eurekalert.org/pub_releases/2009-05/mali-agl051409.php</url>
    </result>
    <result xmlns="http://www.inktomi.com/">
      <abstract>Thornburg Core Growth Fund is outdoing its peers and the U.S. market so far this year, but manager Alex Motola would prefer that stocks hadn’t run up so far, so fast.</abstract>
      <clickurl>http://lrd.yahooapis.com/_ylc=X3oDMTVjdG04ZXZ1BF9TAzIwMjMxNTI3MDIEYXBwaWQDWGpiSkhFX1YzNEguNldqRmdXSjBEUlJpVUdWSHVwRTJMWkFKM1o1Nnpmc04uT2pPS2VrZmNVcTZDR3VUTkdQc0gzTS0EY2xpZW50A2Jvc3MEc2VydmljZQNCT1NTBHNsawN0aXRsZQRzcmNwdmlkA1VDNU9NbUtJY3JybzRJZThoSEtpcjVjLjJBOTZXa29NdmIwQURSYk0-/SIG=13e2var20/**http%3A//www.marketwatch.com/enf/rss.asp%3Fguid=%257B3976B0E2-6447-495E-9D35-37F2098C04DB%257D%26siteid=rss</clickurl>
      <date>2009/05/14</date>
      <language>english</language>
      <source>Market Watch</source>
      <sourceurl>http://www.marketwatch.com/</sourceurl>
      <time>21:51:01</time>
      <title>The Stockpickers: Fund manager eyes FLIR Systems, Alexion, Equinix</title>
      <url>http://www.marketwatch.com/enf/rss.asp?guid=%7B3976B0E2-6447-495E-9D35-37F2098C04DB%7D&amp;siteid=rss</url>
    </result>
    <result xmlns="http://www.inktomi.com/">
      <abstract>WINNIPEG, MANITOBA--(Marketwire - May 14, 2009) - Kane Biotech Inc. (TSX VENTURE:KNE) (the "Company"), a biotechnology company engaged in the development of products that prevent and disperse microbial biofilms, has closed its previously announced private placement offering (the "Offering") with aggregate gross proceeds to the Company of $250,000 from the sale of 3,571,429 units ("Units") at a ...</abstract>
      <clickurl>http://lrd.yahooapis.com/_ylc=X3oDMTVjdG04ZXZ1BF9TAzIwMjMxNTI3MDIEYXBwaWQDWGpiSkhFX1YzNEguNldqRmdXSjBEUlJpVUdWSHVwRTJMWkFKM1o1Nnpmc04uT2pPS2VrZmNVcTZDR3VUTkdQc0gzTS0EY2xpZW50A2Jvc3MEc2VydmljZQNCT1NTBHNsawN0aXRsZQRzcmNwdmlkA1VDNU9NbUtJY3JybzRJZThoSEtpcjVjLjJBOTZXa29NdmIwQURSYk0-/SIG=127a0beqs/**http%3A//www.marketwire.com/mw/release.do%3Fid=990128%26sourceType=3</clickurl>
      <date>2009/05/14</date>
      <language>english</language>
      <source>Marketwire</source>
      <sourceurl>http://www.marketwire.com/</sourceurl>
      <time>21:50:53</time>
      <title>Kane Biotech Announces Closing of Private Placement Offering</title>
      <url>http://www.marketwire.com/mw/release.do?id=990128&amp;sourceType=3</url>
    </result>
    <result xmlns="http://www.inktomi.com/">
      <abstract>The organizers of the annual biotechnology trade show at Progress Corporate Park were fully prepared to scale back this year's event in light of the sour economy.</abstract>
      <clickurl>http://lrd.yahooapis.com/_ylc=X3oDMTVjdG04ZXZ1BF9TAzIwMjMxNTI3MDIEYXBwaWQDWGpiSkhFX1YzNEguNldqRmdXSjBEUlJpVUdWSHVwRTJMWkFKM1o1Nnpmc04uT2pPS2VrZmNVcTZDR3VUTkdQc0gzTS0EY2xpZW50A2Jvc3MEc2VydmljZQNCT1NTBHNsawN0aXRsZQRzcmNwdmlkA1VDNU9NbUtJY3JybzRJZThoSEtpcjVjLjJBOTZXa29NdmIwQURSYk0-/SIG=12ede36kg/**http%3A//www.gainesville.com/article/20090513/articles/905131010%26tc=yahoo</clickurl>
      <date>2009/05/14</date>
      <language>english</language>
      <source>The Gainesville Sun</source>
      <sourceurl>http://www.gainesville.com/</sourceurl>
      <time>21:16:50</time>
      <title>Biotech trade show draws strong turnout</title>
      <url>http://www.gainesville.com/article/20090513/articles/905131010&amp;tc=yahoo</url>
    </result>
    <result xmlns="http://www.inktomi.com/">
      <abstract>VANCOUVER, BRITISH COLUMBIA--(Marketwire - May 14, 2009) - Allon Therapeutics Inc. (TSX:NPC) reported today in its First Quarter 2009 operating results that the Company is on track to achieve its 2009 milestones, including completing a partnership with a major pharmaceutical company and advancing the clinical development of lead neuroprotective product candidate davunetide intranasal (AL-108) ...</abstract>
      <clickurl>http://lrd.yahooapis.com/_ylc=X3oDMTVjdG04ZXZ1BF9TAzIwMjMxNTI3MDIEYXBwaWQDWGpiSkhFX1YzNEguNldqRmdXSjBEUlJpVUdWSHVwRTJMWkFKM1o1Nnpmc04uT2pPS2VrZmNVcTZDR3VUTkdQc0gzTS0EY2xpZW50A2Jvc3MEc2VydmljZQNCT1NTBHNsawN0aXRsZQRzcmNwdmlkA1VDNU9NbUtJY3JybzRJZThoSEtpcjVjLjJBOTZXa29NdmIwQURSYk0-/SIG=1272cla75/**http%3A//www.marketwire.com/mw/release.do%3Fid=990087%26sourceType=3</clickurl>
      <date>2009/05/14</date>
      <language>english</language>
      <source>Marketwire</source>
      <sourceurl>http://www.marketwire.com/</sourceurl>
      <time>21:06:17</time>
      <title>Allon Therapeutics Releases First Quarter Operating Results</title>
      <url>http://www.marketwire.com/mw/release.do?id=990087&amp;sourceType=3</url>
    </result>
    <result xmlns="http://www.inktomi.com/">
      <abstract>Commercial crops of biotech sugarcane are one step closer to becoming a reality in Australia through new and improved genetic transformation technologies.</abstract>
      <clickurl>http://lrd.yahooapis.com/_ylc=X3oDMTVjdG04ZXZ1BF9TAzIwMjMxNTI3MDIEYXBwaWQDWGpiSkhFX1YzNEguNldqRmdXSjBEUlJpVUdWSHVwRTJMWkFKM1o1Nnpmc04uT2pPS2VrZmNVcTZDR3VUTkdQc0gzTS0EY2xpZW50A2Jvc3MEc2VydmljZQNCT1NTBHNsawN0aXRsZQRzcmNwdmlkA1VDNU9NbUtJY3JybzRJZThoSEtpcjVjLjJBOTZXa29NdmIwQURSYk0-/SIG=139iihgnm/**http%3A//nqr.farmonline.com.au/news/state/sugar/general/gm-cane-one-step-closer/1511778.aspx%3Fsrc=rss</clickurl>
      <date>2009/05/14</date>
      <language>english</language>
      <source>North Queensland Register</source>
      <sourceurl>http://nqr.farmonline.com.au/</sourceurl>
      <time>19:04:06</time>
      <title>GM cane one step closer</title>
      <url>http://nqr.farmonline.com.au/news/state/sugar/general/gm-cane-one-step-closer/1511778.aspx?src=rss</url>
    </result>
    <result xmlns="http://www.inktomi.com/">
      <abstract>NEW YORK (GenomeWeb News) — The Minnesota State Legislature has approved $16 million in funding for a biomedical research partnership between the University of Minnesota and the Mayo Foundation.</abstract>
      <clickurl>http://lrd.yahooapis.com/_ylc=X3oDMTVjdG04ZXZ1BF9TAzIwMjMxNTI3MDIEYXBwaWQDWGpiSkhFX1YzNEguNldqRmdXSjBEUlJpVUdWSHVwRTJMWkFKM1o1Nnpmc04uT2pPS2VrZmNVcTZDR3VUTkdQc0gzTS0EY2xpZW50A2Jvc3MEc2VydmljZQNCT1NTBHNsawN0aXRsZQRzcmNwdmlkA1VDNU9NbUtJY3JybzRJZThoSEtpcjVjLjJBOTZXa29NdmIwQURSYk0-/SIG=12ijqf36u/**http%3A//www.genomeweb.com/minnesota-senate-passes-16m-medical-genomics-biotech</clickurl>
      <date>2009/05/14</date>
      <language>english</language>
      <source>GenomeWeb News</source>
      <sourceurl>http://www.genomeweb.com/</sourceurl>
      <time>18:48:03</time>
      <title>Minnesota Senate Passes $16M for Medical Genomics, Biotech</title>
      <url>http://www.genomeweb.com/minnesota-senate-passes-16m-medical-genomics-biotech</url>
    </result>

  • Creating Flex applications without MXML but with AS3

    To me it seems logical that if I want to build an application
    I should use AS3 to create reusable components, classes, the
    layout, etc.
    .. however, searching around on the web I exclusively find
    Flex tutorials and examples using MXML. This is also true for the
    books (e.g. Adobe Flex 2 - Training from the source") -- why is
    this?
    Is it wrong of me to think it'd be best to create everything
    in AS3? Do anyone have links to tutorials etc. where they use AS3
    to build Flex applications?

    Although I have not seen tutorials about this I did create a
    test app using the following approach:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns:lib="components"
    width="100%"
    height="100%"
    creationComplete="initGrid()"
    scroll="false"
    >
    <mx:Script>
    <![CDATA[
    ..... AS 3 code here to create/populate app - datagrid in my
    case
    ]]>
    </mx:Script>
    <mx:VBox id="_box" width="100%">
    <mx:Button id="hideShowCols" label="Hide Empty Columns"
    click="doColumnAction();"/>
    <mx:DataGrid id="delinquenciesGrid"
    alternatingItemColors="[#cce6ff, #e8ffff]"
    alpha="0.5"
    lockedColumnCount="3"
    allowMultipleSelection="true"
    rowCount="20"
    headerColors="[#cccccc]"
    fontFamily="Arial"
    visible="false"
    preinitialize="detectClick();"
    >
    </mx:DataGrid>
    </mx:VBox>
    </mx:Canvas>
    Even the data grid does not need to be "declared" in MXML, it
    was just a faster way to do it for me - you could do
    canvas_id.addChild(...) any element/item that you create in
    AS3.... or in my case i was doing _box.addChild(newGrid)

  • MXML attributes accessed via AS3

    Hi,
    I have a Delphi background and am struggling to learn Flex.
    Understand that MXML and AS3 are effectively equivalent and
    that MXML is translated into AS3.
    However I do not seem to be able to access the same
    properties, events in AS3 as I can access in MXML.
    For example a Button component in MXML - I can access
    properties and events (horizontalCenter, verticalCentre, click
    event) which I do not seem to be able to access in a button object
    instantiated in AS3.
    Could anyone confirm that this difference is real or am I
    missing something OR how can I access these properties, events in
    AS3?

    "MalcolmSkels" <[email protected]> wrote in
    message
    news:gm768m$jqr$[email protected]..
    > Hi,
    >
    > Thanks for the replies ? and patience for such a basic
    query ? which has
    > helped clarify things. It was mainly the Style issue
    that was confusing
    > me. I
    > think I have got it now but would appreciate if someone
    could confirm that
    > I am
    > correct in the following:
    >
    > <mx:Button label=?Test It?
    click=?myButtonClickHandler()?
    > horizontalCenter=?0?
    > VerticalCenter=?0? />
    >
    > 1.
    > In AS3 you cannot access any events of an object other
    than by adding an
    > event
    > listener with the addEventListener method. So although
    there is a click
    > event
    > for a Button which you can access in MXML as in the
    example above there
    > is no
    > direct equivalent in AS3 ? you have to add a listener.
    In fact, this is
    > what
    > the MXML translation does - in AS3 you have to do it
    yourself.
    >
    > As you have both said a lot of properties are Styles and
    can only be
    > accessed
    > in AS3 via the SetStyle method which adds up to a lot of
    work just to set
    > a few
    > properties.
    > Overall I am concluding that AS3 is pretty labour
    intensive and that I
    > should
    > use MXML if at all possible and only drop into AS3 if
    absolutely
    > necessary. Is
    > that correct? (Not intuitive for me)
    If you're setting several properties at once, create an
    object with all the
    properties and use setStyle to set that or just set the
    styleName to a style
    you've set up in advance.
    MPO is that AS3 is more intuitive, because most of the real
    fine tuning
    you'll need to do once you get past the roughing in will only
    be documented
    in the API, and I find that to use it in MXML you often need
    to do a lot of
    translating from the API documentation into how it works in
    MXML, whereas it
    pretty much works in as like it's documented in the API (most
    of the time).

  • Mixing MXML and AS3

    Well I'm just starting with Flex2 and AS3. I have some Flash
    Experience as I created this
    Flash
    app entirely in AS2. All I did was put the different components
    on the stage, and then initialized them in Actionscript. So now
    it's time to re-write it, add a whole bunch of new features, and
    generally just make it cooler.
    But I'm not understanding a few things here. I'd prefer to
    layout the basic structure of my app in a mxml file, but then wire
    everything together using class files written in ActionScript.
    How do you use anything in the mx.controls package inside of
    a ActionScript file? How do you access elements from the mxml file
    in an AS3 class file?
    Can you create mx.controls in an AS3 file?
    I'm currently using FlashDevelop 2.0.2 which has limited AS3
    support while I'm waiting for a staggeringly slow FlexBuilder
    download to get to me. So maybe it's lacking in some things, but
    i'm using the Flex SDK to compile, so I'm sure the errors will
    exist in both places.
    Any insight? Or something I can read?

    One more question - how do I access components that may have
    been placed on the stage within my AS3 code? I realize I can
    probably pass them in at a later time, but I was wondering if I
    could directly access them from the stage?
    My current code gives what appears to be a
    NullPointerException (yeah I'm a Java programmer). Any hints? or is
    it even possible?
    Let's say my main.mxml looks like this...
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns:ff="flex.*"
    paddingTop="0" paddingLeft="0" paddingRight="0"
    paddingBottom="0"
    width="500" height="500"
    horizontalScrollPolicy="off" verticalScrollPolicy="off"
    applicationComplete="onCreationComplete(event);"
    layout="absolute"
    horizontalAlign="left"
    verticalAlign="top"
    >
    <mx:DataGrid id="datagrid" name="datagrid" x="99"
    y="129">
    <mx:columns>
    <mx:DataGridColumn headerText="Column 1"
    dataField="col1"/>
    <mx:DataGridColumn headerText="Column 2"
    dataField="col2"/>
    <mx:DataGridColumn headerText="Column 3"
    dataField="col3"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:Script>
    <![CDATA[
    import mx.events.FlexEvent;
    import mx.containers.Canvas;
    import mx.core.Application;
    import com.garmin.mb.player.PlayerCanvas;
    * the canvas where everything is drawn.
    private var mainCanvas:Canvas;
    private function onCreationComplete(event:FlexEvent):void {
    var main:PlayerCanvas = new PlayerCanvas();
    addChild(main);
    ]]>
    </mx:Script>
    </mx:Application>
    And my PlayerCanvas looks like this...
    package com.mb.player {
    import flash.events.MouseEvent;
    import mx.containers.Canvas;
    import mx.controls.Alert;
    import mx.controls.DataGrid;
    import mx.controls.HSlider;
    import mx.controls.TextInput;
    public class PlayerCanvas extends Canvas {
    * TextInput for nothing of any value;
    private var input:TextInput;
    * Slider that controls the position of the user on the track
    private var slider:HSlider;
    * the data table
    private var datagrid:DataGrid;
    public function PlayerCanvas():void {
    this.buildTextInput();
    this.buildSlider();
    this.datagrid =
    (DataGrid)(parent.getChildByName("datagrid"));
    this.datagrid.x = 20;
    }

  • Mxml to as3

    I want to use AnimateProperty to animate a Shape and I want
    to do it with AS3. To do this I must first learn how to use the
    AnimateProperty class so I used the code below to try to recreate a
    rollOverEffect on a button. It works fine for the mxml button, but
    when I create a button in as3 I cannot use the rollOverEffect
    property which then prohibits me from using the AnimateProperty
    object I created.
    Can I use AnimateProperty in as3 and can I use
    AnimateProperty to animate a Shape that is created in AS3?

    "SiHoop" <[email protected]> wrote in
    message
    news:gl7ecf$qmb$[email protected]..
    >I want to use AnimateProperty to animate a Shape and I
    want to do it with
    >AS3.
    > To do this I must first learn how to use the
    AnimateProperty class so I
    > used
    > the code below to try to recreate a rollOverEffect on a
    button. It works
    > fine
    > for the mxml button, but when I create a button in as3 I
    cannot use the
    > rollOverEffect property which then prohibits me from
    using the
    > AnimateProperty
    > object I created.
    > Can I use AnimateProperty in as3 and can I use
    AnimateProperty to animate
    > a
    > Shape that is created in AS3?
    I think that you have to use setStyle for effects, but I
    believe that Shape
    is too low-level to have such styles.
    HTH;
    Amy

  • Custom AS3 Component / Event Definition for MXML Tag

    Custom AS3 Component / Event Definition for MXML Tag
    Exposing custom event in custom MXML tag.
    I have made an AS3 custom component named,
    'CustomListComponent'.
    Is a list type component extending UIComponent.
    When an item is clicked (selected) I generate a custom event
    named, 'selChange'
    I want the user to be able to use this tag, define a handler
    on the MXML tag.
    I tried using metadata like [Event("selChange")] in the
    component AS3 file with no luck.
    Any help / examples to expose a custom event from an AS3
    custom component to the MXML tag for the end user/developer would
    help significantly.
    Anyone? Thank you.

    Well, That did not take long.
    My mistake, Typo type.
    [Event(nane="selChange", type="flash.events.Event")]
    That is: naNe not naMe :(
    Thank you all for your time and responses.
    I WILL check my code more closely next time I post a
    question.
    P.S.: @VarioPegged : My code is big and not needed now. If
    you would like it anyway just message me. TY

  • [Exclusive] Create AS3 and MXML in your PHP pages - Q and A

    One of the most common PHP scripts is a form.  Before FTML, there has never been a method of truely integrating Flash with PHP.  Flash and PHP have always been seperate sandboxes when developing.  FTML now allows you to write PHP and FTML hand in hand on the same page.  This removes the requirement of additional files or web services for PHP to interact with Flash.
    PHP to Flash: http://reshapemedia.com/ftml/learn/php-to-ftml/
    FTML Getting Started Guide: http://reshapemedia.com/ftml/downloads/getting-started-guide/
    PHP Requirements
    None - simply code as you would normally and include the MXML components rather than HTML.
    Form Requirements
    All Form children must have the [name] property set
    Any UI For child with the [id] property set will be processed with the Form
    Forms should have [relativeChildSize] set to "true"
    Forms support a [method] of "get", "post", "send", "refresh"
    Inputs with a [type] of "text" or "password" support the [enter] key press
    Example PHP File
    Adobe will not let me post the example code so you can view the demo here: http://reshapemedia.com/examples/ftml-form.php
    - Select [View Source] from your menu to see the code.
    Message was edited by: ReshapeMedia

    It's a little hard to understand your question and its context. Can you please upload this page and give us a link so we can see what you are describing?

Maybe you are looking for