CreationComplete Problems

If I try to get a mxml componet that has a datagrid in it to
render data how do I get the main application page to pull the data
with the creation complete in the application file?
Here is the componet (resume2.mxml) file code.
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="
http://www.adobe.com/2006/mxml"
width="476" height="230">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
[Bindable]
private var getSkills:ArrayCollection;
private function skillsRPC(event:ResultEvent):void {
getSkills = event.result.main.secondary;
]]>
</mx:Script>
<mx:HTTPService id="mySkills" url="data/skills.xml"
result="skillsRPC(event)"/>
<mx:Label text="Skills:" fontSize="17" fontFamily="Times
New Roman" enabled="true"
fontWeight="bold" fontStyle="italic" color="#800000"
textDecoration="underline"/>
<mx:DataGrid id="myGrid" x="5" y="29" width="100%"
height="194" dataProvider="{getSkills}">
<mx:columns>
<mx:DataGridColumn headerText="Primary Set"
dataField="skill1" fontSize="10" fontStyle="normal"
fontGridFitType="pixel"/>
<mx:DataGridColumn headerText="Secondary Set"
dataField="skill2" fontSize="10" fontStyle="normal"
fontGridFitType="pixel"/>
</mx:columns>
</mx:DataGrid>
</mx:Canvas>
Here is the main application file code.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute"
backgroundGradientColors="[#999966, #ffffff]"
xmlns:ns1="components.*"
creationComplete="resume2.skillsRPC.event.send()"
viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
public function getMessageBoard(event:MouseEvent):void {
var u:URLRequest = new URLRequest("
http://www.goldmineservices.com/discussion/index.cfm");
navigateToURL(u, "_blank");
public function getResume(event:MouseEvent):void {
var url:URLRequest = new URLRequest("
http://www.goldmineservices.com/Current_Resume.doc");
url.method = "GET";
navigateToURL(url, "_blank");
public function getPublished(event:MouseEvent):void {
var sysConURL:URLRequest = new URLRequest("
http://mxdj.sys-con.com/read/256086_p.htm");
sysConURL.method = "GET";
navigateToURL(sysConURL, "_blank");
]]>
</mx:Script>
<mx:Style source="assets/main.css"/>
<mx:Image source="assets/logo.png" width="300"
height="50"/>
<mx:Panel width="1100" title="Software Solutions for the
Next Iteration of the WEB!"
fontSize="13" color="#800000" horizontalAlign="left"
top="54" left="9" cornerRadius="14">
<mx:HBox backgroundColor="#cccc99">
<mx:Accordion id="myResume" resizeToContent="true" x="68"
y="58" width="500" backgroundColor="#cccc99">
<ns1:Intro id="Intro" label="GMS - Mission Statement"
x="68" y="58" width="500" height="453"/>
<ns1:resume1 id="resume1" label="Resume Objective" x="68"
y="58" width="540"/>
<ns1:resume2 id="resume2" label="Resume Skills" x="68"
y="58" width="540"/>
<ns1:resume3 id="resume3" label="Resume Current Taskings"
x="68" y="58" width="540"/>
<ns1:resume7 id="resume7" label="Pursuits and Studies"
x="68" y="58" width="540"/>
<ns1:resume4 id="resume4" label="Resume Development
Projects - (2005)" x="68" y="58" width="540"/>
<ns1:resume5 id="resume5" label="Resume Projects 2002 -
2004" x="68" y="58" width="540"/>
<ns1:resume6 id="resume6" label="Resume Early Projects to
Current" x="68" y="58" width="540"/>
<ns1:resumeEducation id="Education" label="Resume
Education" x="68" y="58" width="540"/>
</mx:Accordion>
<mx:TabNavigator id="myNavigation" resizeToContent="true"
x="613" y="58" width="563" backgroundColor="#cccc99">
<ns1:Sql id="Sql" label="SQL" x="68" y="58"
width="500"/>
<ns1:Flex id="Flex" label="Web2" x="68" y="58"
width="500"/>
<ns1:DotNet id="DotNet" label="ASP.NET" x="68" y="58"
width="500"/>
<ns1:ColdFusion id="CFMX" label="CFMX" x="68" y="58"
width="500"/>
<ns1:Webservices id="webservices" label="WebServices"
x="68" y="58" width="480"/>
<ns1:SOA id="soa" label="SOA" x="68" y="58"
width="480"/>
<ns1:Contact id="contact" label="Contact" x="68" y="58"
width="450"/>
</mx:TabNavigator>
</mx:HBox>
<mx:HBox x="613" y="666" width="20%">
<mx:LinkButton x="64" y="519" id="messageBoard"
label="Discussion Board" enabled="true"
click="getMessageBoard(event)"/>
<mx:LinkButton x="175" y="519" label="Downloadable
Resume" enabled="true" click="getResume(event)"/>
<mx:LinkButton x="180" y="519" label="Publication"
enabled="true" click="getPublished(event)"/>
</mx:HBox>
<mx:Image source="assets/poweredbyCFD.jpg" width="169"
height="31" x="613" y="690"/>
</mx:Panel>
</mx:Application>
The creation complete above is incorrect.
Thanks in advance.
Gene

I finally figured it out.
Everything I can do at the component.
Here is an example...
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="
http://www.adobe.com/2006/mxml"
width="476" height="390"
initialize="myClasses.send()">
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.collections.ArrayCollection;
[Bindable]
private var education:ArrayCollection;
private function myEducation(event:ResultEvent):void {
education = myClasses.lastResult.main.classnameone;
]]>
</mx:Script>
<mx:HTTPService id="myClasses" url="data/classes.xml"
result="myEducation(event)"/>
<mx:Label text="Classes and Training:" fontSize="17"
fontFamily="Times New Roman" enabled="true"
fontWeight="bold" fontStyle="italic" color="#800000"
textDecoration="underline"/>
<mx:DataGrid id="myGrid" x="5" y="29" width="100%"
height="353" dataProvider="{education}">
<mx:columns>
<mx:DataGridColumn headerText="Name" dataField="skill2"
fontSize="10" fontStyle="normal"/>
</mx:columns>
</mx:DataGrid>
</mx:Canvas>

Similar Messages

  • All the xml and arrays are getting NULL Problem

    Hello guys
    I am working on a project which uses xml loading, e4x and array manipulation extensively, and it was going good but now I got stuck on a strange problem.  Whole code was fine and application was working and responding in a desired way, but then mystourisly it stopped working and started to retun NULL values to almost all the actionscript (internal) Arrays and XML varibales.
    Now Whenever i load xml file and assign the loaded values to internal xml variables, internal values get only NULL instead of data.
    Same is the situation with Arrays, I created some components in mxml, and when i passed them to arrays by reference, code gets compiled successfully, but again Array has only null values [that code was working fine too]
    I am wondering if Adobe Flex did a silenced update or something similar and it is the result of that things !
    I am using Adobe Flex 3.2 with SDK 3.3 on windows Vista Ultimate.
    Please check this attached project, Import it and see if you face the same problem
    Thanks
    Link to Problem Project
    http://isolatedperson.googlepages.com/problemXperiment.zip
    Problem Screenshot
    http://isolatedperson.googlepages.com/xmlissue.JPG

    Use HTTPService to load the data. You'll have fewer problems.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application creationComplete="dataSvc.send();"
      xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
         <mx:Script>
              <![CDATA[
                import mx.collections.XMLListCollection;
                import mx.rpc.events.ResultEvent;
                [Bindable] private var xlc:XMLListCollection;
                   private function loadXML(evt:ResultEvent):void{
                    xlc =  new XMLListCollection(evt.result.individual.@id as XMLList);
              ]]>
         </mx:Script>
         <mx:HTTPService resultFormat="e4x" result="loadXML(event)" url="alirazaTree.xml" id="dataSvc"/>
         <mx:ComboBox id="cbx" dataProvider="{xlc}"/>
    </mx:Application>

  • Problem with releater and event handling

    Hi Flex genius,
    I have been struggling for the whole day with a problem connected to repeater.
    I have a text field:
    <mx:Text id="shortText" width="300"  text="{newTeaser.currentItem.shortDescription}" styleName="Scandinavian" fontSize="12"  />
    and a label:
    <mx:Label   id="readMoreLabel" x="13" text="{newTeaser.currentItem.readMore}" color="#3C4593" />
    both inside a  Repeater which fetches from an XML:
    <mx:Repeater id="newTeaser" dataProvider="{eventsData}">
    The Repeater works fine, but I need to add a click on the label id="readMoreLabel" that replace the shortText.text with  {newTeaser.currentItem.longDescription} instead of {newTeaser.currentItem.shortDescription}.
    i am quite new in Flex, so I guess I miss some fundamentals.
    Thanks for your help.
    Max

    This code works, and notice the trace(), you CAN have IDs for the controls in the repeater, and you can access them as an array, though I do not make use of this capability in my solution.
    If this post answers your question or helps, please mark it as such.
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com
    Flex / AIR Development, Training, and Support Services
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
      creationComplete="dataService.send();">
      <mx:Script>
        <![CDATA[
          import mx.rpc.events.ResultEvent;
          import mx.collections.XMLListCollection;
          import mx.controls.Text;
          [Bindable] private var eventsData:XMLListCollection;
          private function dataHandler(evt:ResultEvent):void{
            eventsData = new XMLListCollection(evt.result..item as XMLList);       
          private function clickHandler(evt:MouseEvent):void{
            var txt:Text = VBox(evt.currentTarget.parent).getChildAt(0) as Text;
            for each(var xml:XML in eventsData){
              if(xml.shortDescription == txt.text){
                txt.text = xml.longDescription;
            for each(var obj1:Text in shortText){
              trace("shortText: " + obj1.text);
        ]]>
      </mx:Script>
      <mx:HTTPService id="dataService" url="data.xml" resultFormat="e4x" result="dataHandler(event);"/>
      <mx:Repeater id="newTeaser" dataProvider="{eventsData}">
        <mx:VBox width="100%">
          <mx:Text id="shortText" width="100%"  text="{newTeaser.currentItem.shortDescription}"/>
          <mx:Label id="readMoreLabel" text="{newTeaser.currentItem.readMore}" color="#3C4593"
            click="clickHandler(event);"/>   
        </mx:VBox>
      </mx:Repeater>
    </mx:Application>
    <?xml version="1.0" encoding="utf-8"?>
    <teasers>
      <item>
        <shortDescription>This is short desc one.</shortDescription>
        <readMore>Read More One</readMore>
        <longDescription>This is long desc one.</longDescription>
      </item>
      <item>
        <shortDescription>This is short desc two.</shortDescription>
        <readMore>Read More two</readMore>
        <longDescription>This is long desc two.</longDescription>
      </item>
      <item>
        <shortDescription>This is short desc three.</shortDescription>
        <readMore>Read More three</readMore>
        <longDescription>This is long desc three.</longDescription>
      </item>
    </teasers>

  • Problem with FTE in DataTips of PlotChart (missing texts)

    Hi @all,
    we have decided to use the Flex 4.1 and Flash text engine in our projects.
    Now I have the following problem with the dataTips: the texts are appearing only partly if datatips of more than one point are showing. The behavior is not regularly.
    Here is my code for testing (compiler options: hook at "Use Flash Text engine in MX components":
    <?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="init()">
      <fx:Declarations>
        <mx:SolidColor id="sc1" color="#EC6605" alpha=".3"/>
        <mx:SolidColorStroke id="s1" color="#EC6605" weight="1"/>
      </fx:Declarations>
      <fx:Script>
        <![CDATA[
          import mx.charts.HitData;
          import mx.collections.ArrayCollection;
          [Bindable]
          private var seriesAverageScores:ArrayCollection = new ArrayCollection(new Array());
          private static const tipDataString:String = "zeile 1 zeile 1 zeile 1\nzeile 2 zeile 2 zeile 2\nzeile 3 zeile 3 zeile 3\nzeile 4 zeile 4 zeile 4\n -\n -\n -";
          private function init():void {
            seriesAverageScores.addItem({x: 1, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 2, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 3, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 1.1, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 2, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 3, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 1.05, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 2, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 3, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 0.95, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 2, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 3, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 1.2, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 2, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 3, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 1.15, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 2, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 3, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 1.12, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 2, y: 2, dataTip: tipDataString});
          private function dataTipFunction_average(hd:HitData):String {
            var val:String;
            var d:Object = hd.item as Object;
            return d.dataTip;
        ]]>
      </fx:Script>
      <s:VGroup width="100%"
        height="100%">
        <mx:PlotChart id="myChart1" width="100%" height="100%"
          dataTipFunction="dataTipFunction_average" showDataTips="true">
          <mx:verticalAxis>
            <mx:LinearAxis title="TurnOvers" padding="0.1" minimum="0" maximum="50"/>
          </mx:verticalAxis>
          <mx:horizontalAxis>
          <mx:LinearAxis title="Scores" padding="0.1" minimum="0" maximum="10"/>
          </mx:horizontalAxis>
          <mx:series>
            <mx:PlotSeries dataProvider="{seriesAverageScores}"
              name="series 1" fill="{sc1}" stroke="{s1}"
              displayName="Average Scores per customer"
              xField="x"
              yField="y">
            </mx:PlotSeries>
          </mx:series>
        </mx:PlotChart>
      </s:VGroup>
    </s:Application>
    Has anyone an idea how to solve this ?
    Thanks, Lutz

    Has noone an idea?
    The same problem exists with Legends. For this there was a help from Adobe with a style.
    Isn't there a comparable solution for this malfunction?

  • Simple button background problem

    Good day,
    I'm new to flex and MXML. I've gone through the initial difficulties of getting familiar with the IDE and programming language. Now that this is done, I'm really starting to enjoy it.
    I'm currently facing what is probably a basic problem. I've created an MXML Button component. When I instanciate it somewhere in another component, it comes up with a weird square background under my button, like this :
    My button is a single line component, like this :
    <s:Button label="Measure" skinClass="skins.MeasureDistanceSkin" width="70" height="25" click="OnClick(event);" creationComplete="Init(event);" />
    My button instanciation line looks like this :
    <MeasureButton map="{map}" left="110" top="42" width="80" height="33" id="MyButton" />
    Can anyone give me a hand with this?
    Thanks,
    Bruno

    You couldn't have made trillions of buttons that work using that code in AS3.  It would have to be something more like the following to work in AS3...
    stop();
    btn_page2.addEventListener(MouseEvent.CLICK, gotoPage2);
    function gotoPage2(e:MouseEvent):void {
         gotoAndPlay(99);
    Switched places in the btn_page2 line and changed Void (AS2) to void (AS3)

  • Problem using images in a button skin

    So, I have a weird problem. I need to be able to see a button in design mode. My button is a custom component (a ButtonBase) with a skin. So, I left is a tiny bit of the default skin so that you can see what it looked like in design mode. Now, the paths to the images that will be used for the various states of the button are binded to strings passed from another subcomponent. There was no other way to get what we needed done, so it stays messy. Anyway, I don't get things to display correctly. Here's the code, and after an image for what I'm getting:
    [CODE]
    <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
                             xmlns:s="library://ns.adobe.com/flex/spark"
                             xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
                             xmlns:mx="library://ns.adobe.com/flex/mx"
                             minWidth="21" minHeight="21" alpha.disabled="0.5"
                             preinitialize="initImageVars()" creationComplete="init()">
        <!-- host component -->
        <fx:Metadata>
            <![CDATA[
            [HostComponent("customComponents.ToggleButtonCustom")]
            ]]>
        </fx:Metadata>
        <!-- states -->
        <s:states>
            <s:State name="up" />
            <s:State name="down" />
            <s:State name="selected" />
            <s:State name="disabled" />
            <s:State name="over" />
        </s:states>
        <fx:Script>
            <![CDATA[        
                import mx.controls.Alert;
                /* First thing's first: we need to initialize our global and accessable components. */
                [Bindable]
                public var upButtonPath:String = "";
                [Bindable]
                public var downButtonPath:String = "";
                [Bindable]
                public var activeButtonPath:String = "";
                [Bindable]
                public var disabledButtonPath:String = "";
                [Bindable]
                protected var label:String = "";
                private function initImageVars():void
                    upButtonPath = "assets/" + this.hostComponent.upButtonPath;
                    downButtonPath = "assets/" + this.hostComponent.downButtonPath;
                    activeButtonPath = "assets/" + this.hostComponent.activeButtonPath;
                    disabledButtonPath = "assets/" + this.hostComponent.disabledButtonPath;
                private function init():void
                    /* Give values to public variables */
                    //upButtonPath = "Up.png";
                    //downButtonPath = "Down.png";
                    //activeButtonPath = "Active.png";
                    label = this.hostComponent.label;
                /* Define the skin elements that should not be colorized. For button, the graphics are colorized but the label is not. */
                static private const exclusions:Array = ["labelDisplay"];
                override public function get colorizeExclusions():Array {return exclusions;}
                override protected function initializationComplete():void
                    useChromeColor = true;
                    super.initializationComplete();
                private var cornerRadius:Number = 2;
            ]]>       
        </fx:Script>
        <!-- layer 1: fill -->
        <s:Rect id="fill" left="1" right="1" top="1" bottom="1" radiusX="2">
            <s:fill>
                <s:LinearGradient rotation="90">
                    <s:GradientEntry color="0xFFFFFF"
                                                     color.down="0xAAAAAA"
                                                     color.selected="0xBBBDBD"
                                                     alpha="0.85" />
                    <s:GradientEntry color="0xD8D8D8"
                                                     color.down="0x929496"
                                                     color.selected="0x9FA0A1"
                                                     alpha="0.85" />
                </s:LinearGradient>
            </s:fill>
        </s:Rect>
        <mx:ViewStack id="buttonImage" x="0" y="0"
                                    selectedIndex="0" selectedIndex.down="1" selectedIndex.selected="2"    selectedIndex.disabled="3">
            <s:NavigatorContent id="upState">
                <mx:Image source="{upButtonPath}" width="500" height="500" />
            </s:NavigatorContent>
            <s:NavigatorContent id="downState">
                <mx:Image source="{downButtonPath}" />
            </s:NavigatorContent>
            <s:NavigatorContent id="activeSate">
                <mx:Image source="{activeButtonPath}" />
            </s:NavigatorContent>
            <s:NavigatorContent id="disabledState">
                <mx:Image source="{disabledButtonPath}" />
            </s:NavigatorContent>
        </mx:ViewStack>
        <s:Label id="labelDisplay" text="{label}"
                         textAlign="center"
                         verticalAlign="middle"
                         maxDisplayedLines="3"
                         horizontalCenter="0" verticalCenter="1"
                         left="10" right="10" top="2" bottom="2">
        </s:Label>
    </s:SparkSkin>
    [/CODE]
    That gives me this image:
    And if I use the following code to resize it, I get this:
    [CODE]
    /* From the component, called from init(), which is called on creationComplete */
    private function resizeEverything():void
      var dummyImage:Image = new Image();
      var pathToDummy:String = "assets" + upButtonPath;
      dummyImage.source = pathToDummy;
      thisBtn.height = dummyImage.height;
      thisBtn.width = dummyImage.width;
      dummyImage = null;
    [/CODE]
    If you have any idea what to do with this, let me know. I set the buttons to the exact height and width of the images I'm using when I first call them. I don't know how else to manage this. I want the faded white to be an exact mirror of the image, so that designers (not me) can move them around on design mode. Thank you!

    Figured it out. The images I was given had large amounts of padding, and when I tried to auto-resize the buttons, Flash could never grab the image and therefore couldn't size off it, so the size of the component was forced to 0,0. It's all good now.

  • Problem with printing after migrating from 3.5 to 4.1

    Hello everyone,
    I'm currently working on an application that was recently migrated (by someone else) from Flex 3.5 to Flex 4.1 and I discovered the printing doesn't work properly anymore. So I tried to find out what the problem was and after many tries, I came to the conclusion that the problem was within the following line:
    printJob.addObject(myPrintView,FlexPrintJobScaleType.MATCH_WIDTH);
    (Of course "myPrintView" is not the real name used in the app but that's not important)
    I searched on the Internet and this line is supposed to work in 4.1, isn't it? However, the printed version cuts my PrintAdvancedDataGrid approximately in half. I tried to change the width property from myPrintView but the grid is still cut at the same place, its cells are just distorted.
    FYI, you can find a part of the code right here:
    var printJob:FlexPrintJob = new FlexPrintJob();
                        if (printJob.start()) {
         //A lot of code to build the print view
    myPrintView.width=1280;
    printJob.addObject(myPrintView,FlexPrintJobScaleType.MATCH_WIDTH);
    printJob.send();
    myPanel.removeChild(myPrintView);
    Any help would be appreciated.
    Regards,
    Gudril

    While looking for a solution on the Internet I found some people having troubles because of the structure of their AdvancedDataGrid. My problem doesn't come from any example I've seen but maybe it's still linked to that, so here's an AdvancedDataGrid that's being printed in my app:
                                                    <mx:PrintAdvancedDataGrid dataProvider="{dataRayon}" sortExpertMode="true" id="dataGridRayon" width="100%" itemClick="dispatchEvent(new KpiEvent(DATAGRID_RAYON_CLICK,event));" itemDoubleClick="dispatchEvent(new KpiEvent(DATAGRID_RAYON_CLICK,event));" creationComplete="resizeGridRayon();" >
                                                      <mx:columns>
                                                                <mx:AdvancedDataGridColumn id="rownumRayon"  width="25"  sortable="false" labelFunction="getRowNumRayon" fontWeight="bold"/>
                                                                <mx:AdvancedDataGridColumn id="rayonCoRgrp" textAlign="center" width="75" headerText="{resourceManager.getString('rentabilitePanel', 'CODE')}" dataField="co_rgrp_produits" />
                                                                <mx:AdvancedDataGridColumn textAlign="left" width="240" headerText="{resourceManager.getString('rentabilitePanel', 'SOUS_SECTEURS')}" dataField="libelle" id="hTDataGridRayon" />
                                                                <mx:AdvancedDataGridColumn id="rayonMeVenteHt" textAlign="right" width="100" headerText="{resourceManager.getString('rentabilitePanel', 'MONTANT_VENTE_HT')}" dataField="meVenteHt" formatter="{currencyFormatter}" sortCompareFunction="{function(obj1:Object, obj2:Object):int{return mySortFunc(obj1, obj2, 'meVenteHt');}}"  />
                                                                <mx:AdvancedDataGridColumn id="rayonMargeAvtDem" textAlign="right" width="75" headerText="{resourceManager.getString('rentabilitePanel', 'MARGE_AVT_DEM')}" dataField="margeAvtDem" formatter="{currencyFormatter}" sortCompareFunction="{function(obj1:Object, obj2:Object):int{return mySortFunc(obj1, obj2, 'margeAvtDem');}}"  />
                                                                <mx:AdvancedDataGridColumn id="rayonPMargeAvtDem" textAlign="right" width="80" headerText="{resourceManager.getString('rentabilitePanel', 'POUR_MARGE_AVT_DEM')}" dataField="margeAvtDemP" formatter="{pourcentageFormatterFloat}" sortCompareFunction="{function(obj1:Object, obj2:Object):int{return mySortFunc(obj1, obj2, 'margeAvtDemP');}}"  />
                                                                <mx:AdvancedDataGridColumn id="rayonDemarqueHt" textAlign="right" width="100" headerText="{resourceManager.getString('rentabilitePanel', 'DEMARQUE_HT')}" dataField="demarque" formatter="{currencyFormatterFloat1Dec}" sortCompareFunction="{function(obj1:Object, obj2:Object):int{return mySortFunc(obj1, obj2, 'demarque');}}"  />
                                                                <mx:AdvancedDataGridColumn id="rayonPDemarqueHt" textAlign="right" width="85" headerText="{resourceManager.getString('rentabilitePanel', 'POUR_DEMARQUE_HT')}" dataField="demarqueP"  formatter="{pourcentageFormatterFloat}" sortCompareFunction="{function(obj1:Object, obj2:Object):int{return mySortFunc(obj1, obj2, 'demarqueP');}}"  />
                                                                <mx:AdvancedDataGridColumn id="rayonMargeAprDem" textAlign="right" width="100" headerText="{resourceManager.getString('rentabilitePanel', 'MARGE_APR_DEM')}" dataField="margeAprDem" formatter="{currencyFormatter}" sortCompareFunction="{function(obj1:Object, obj2:Object):int{return mySortFunc(obj1, obj2, 'margeAprDem');}}"  />
                                                                <mx:AdvancedDataGridColumn id="rayonPMargeAprDem" textAlign="right" width="115" headerText="{resourceManager.getString('rentabilitePanel', 'POUR_MARGE_APR_DEM')}" dataField="margeAprDemP" formatter="{pourcentageFormatterFloat}" sortCompareFunction="{function(obj1:Object, obj2:Object):int{return mySortFunc(obj1, obj2, 'margeAprDemP');}}"  />
                                                      </mx:columns>
                                            </mx:PrintAdvancedDataGrid>
    I also realised I wasn't very clear on the outcome of my doPrint() function. When I said the grid was cut in half, I was talking about half the columns not showing on the printed version, not half the rows. Actually even a column being cut in half. I hope these precisions made my problem a bit clearer and somebody will be able to help me in any way (even just hints).
    Thanks for your help.
    Regards,
    Gudril

  • Data provider problem in custom item renderer

    I have a complex, custom item renderer for a list. I add
    items that I extracted from an xml to the data provider using the
    IList interface. But when displaying the list, the items are all
    screwed up. Each rendered item has some parts which are initialized
    as different components depending on the values from the xml. This
    initialization is called in the item renderer for the
    creationComplete event.
    The weird thing is that when I output the dataProvider to
    check its values, some of the items have internal uids sometimes
    and sometimes they don't. If I output the dataProvider right after
    I add the items to it, none of them get internal uids. But from the
    initialize method, some of them do and some don't.
    To make things weirder, sometimes, as I scroll up and down
    the list, the dynamic components get all switched up. I'm either
    having a problem with internal uids or with the creation policies
    for lists. Or it's probably some simpler mistake I have yet to see.
    Anyone have any idea where the problem could lie? Any help is
    greatly appreciated.

    Any successful render must:
    1) override the set data property of the component
    Further, best practice is to store any data you need in the
    override set data(), and call invalidateProperties(). Then do the
    actual work in an override commitProperties() function.
    The framework is smart about when to call commitProperties
    efficiently. set data() gets called much more often.
    Tracy

  • Chart flickering problem when updating members of dataProvider

    Hi all,
    I'm having an issue with a PieChart, where the dataProvider
    i'm using is getting updated under the hood and it's causing the
    labels to drop in and out. Specifically, it looks like in the
    updateDisplayList() method of PieSeries, there's a call to clear
    the "labelLayer". I could have sworn i'd seen an example of an
    updating pie chart that did not have a problem of flickering
    labels, but i can't seem to figure out how to get rid of this
    annoyance.
    Here is a sample application that demonstrates what i'm
    facing. Anyone have any ideas on how to get the labels to stick
    around yet display the updated values?
    Thanks,
    ./paul
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    width="500" height="300" creationComplete="init()">
    <mx:Script>
    <![CDATA[
    import mx.events.CollectionEventKind;
    import mx.events.CollectionEvent;
    import flash.utils.getTimer;
    import mx.events.PropertyChangeEvent;
    import mx.formatters.NumberFormatter;
    import mx.collections.ArrayCollection;
    private var timer:Timer = new Timer(3000,1);
    private var fireUpdate:Boolean = true;
    private var ac:ArrayCollection = new ArrayCollection(
    [ { "name":"record A", "mydata": 30 },
    { "name":"record B", "mydata": 60 },
    { "name":"record C", "mydata": 70 },
    { "name":"record D", "mydata": 80 },
    { "name":"record E", "mydata": 40 },
    { "name":"record F", "mydata": 90 } ]);
    private var percentFormat:NumberFormatter = new
    NumberFormatter();
    private function init():void
    timer.addEventListener( TimerEvent.TIMER, onTimerEvent );
    percentFormat.precision = 0;
    mychart.dataProvider = ac;
    grid.dataProvider = ac;
    pieSeries.field = "mydata";
    timer.start();
    private function onTimerEvent( evt:TimerEvent ):void
    for each( var r:Object in ac )
    r.mydata = int(((Math.random() * 0.1) + 0.95) *
    Number(r.mydata)); // plus or minus 5%
    trace( getTimer() + ": " + r.name + " -> " + r.mydata );
    if( fireUpdate )
    var cevt:CollectionEvent = new CollectionEvent(
    CollectionEvent.COLLECTION_CHANGE );
    cevt.kind = CollectionEventKind.UPDATE;
    ac.dispatchEvent( cevt );
    statusLabel.text = "Last Updated: " + getTimer();
    timer.reset();
    timer.start();
    public function labelFunc(data:Object, field:String,
    index:Number, percentValue:Number):String
    return data.name + " (" + percentFormat.format(percentValue)
    + "%)";
    private function toggleUpdateEvent():void
    fireUpdate = !fireUpdate;
    if( fireUpdate ) evtToggle.label = "Turn Off UpdateEvent";
    else evtToggle.label = "Turn ON UpdateEvent"
    ]]>
    </mx:Script>
    <mx:VBox width="100%" height="100%" >
    <mx:HBox>
    <mx:Button id="evtToggle" label="Turn Off UpdateEvent"
    click="toggleUpdateEvent()" />
    <mx:Label id="statusLabel" />
    </mx:HBox>
    <mx:HBox width="100%" height="100%">
    <mx:PieChart id="mychart" width="50%" height="100%">
    <mx:series>
    <mx:PieSeries id="pieSeries" labelFunction="labelFunc"
    labelPosition="insideWithCallout" showDataEffect="eff"/>
    </mx:series>
    <mx:SeriesInterpolate id="eff" duration="1000"/>
    </mx:PieChart>
    <mx:DataGrid id="grid" width="50%" height="100%">
    <mx:columns>
    <mx:DataGridColumn dataField="name" />
    <mx:DataGridColumn dataField="mydata" />
    </mx:columns>
    </mx:DataGrid>
    </mx:HBox>
    </mx:VBox>
    </mx:Application>

    Hi
    Please select the right Operating system and download the graphic driver and then update the Bios from the link given below and check if the issue is resolved.
    Link
    Also easy to find out if this is a Hardware issue once unit is powered on keep tapping F10 key and see if the display is the same if yes you might have to replace the screen.
    Let us know how it goes!
    "I work for HP."
    ****Click the (purple thumbs up icon in the lower right corner of a post) to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    Regards
    Manjunath

  • Im haveing a problem with google map in my adobe edge web page file project

    ok iv set my google map for a certain address in adobe edge however when I load the file in a internet browser the map is scrolled further away from the address and marker that is placed on the address.
    the problem is that when I load the page the map is not on target it looks like this
    the map should look like this
    here is the link to download the site project files
    https://www.dropbox.com/s/5mtq1medqd1bh5w/storewebsite2.zip
    Also im having this problem with it it when I load the map its on target when I  place this code in a trigger on the timeline
    var container = sym.$("container");
    var   map = '<iframe width="'+container.width()+'"   height="'+container.height()+'" frameborder="0" scrolling="no"   marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=7120+Boul      +St+Laurent,+Montreal,+QC,+Canada&aq=0&oq=7120+boul+st&sll=45.534114,  -    73.617124&sspn=0.006907,0.016512&ie=UTF8&hq=&hnear=7120+Boulevard+Sai  n   t-Laurent,+Montr%C3%A9al,+Communaut%C3%A9-Urbaine-de-Montr%C3%A9al,+Q u    %C3%A9bec+H2S,+Canada&t=m&z=14&ll=45.534114,-73.617124&output=embed"></iframe><br /><small><a href="https://maps.google.com/maps?f=q&source=embed&hl=en&geocode=&q=7120+Bo      ul+St+Laurent,+Montreal,+QC,+Canada&aq=0&oq=7120+boul+st&sll=45.53411  4    ,-73.617124&sspn=0.006907,0.016512&ie=UTF8&hq=&hnear=7120+Boulevard+S  a   int-Laurent,+Montr%C3%A9al,+Communaut%C3%A9-Urbaine-de-Montr%C3%A9al, +   Qu%C3%A9bec+H2S,+Canada&t=m&z=14&ll=45.534114,-73.617124" style="color:#0000FF;text-align:left">View Larger Map</a></small>'
    container.html(map)
    however when I place the code in creationcomplete it plays the google map off target to a different address. Any ideas

    Please correct your download file - it will not open/unzip - it says it is currupted or damaged.
    D

  • XML generation problem?

    Hi I'm relatively new to Flex 2 and I have a question.
    I'm generating an xml file from an oracle view and hope to
    use it as the basis for a chart/data grid.
    My generation process yields data something like this:
    <list>
    <commodity name="Laptop Computer" total="0">
    <warehouse name="California" onhand="10"/>
    <warehouse name="Viriginia" onhand="20"/>
    <warehouse name="Washington" onhand="0"/>
    </commodity>
    <commodity name="Desktop Computer" total="0">
    <warehouse name="Washington" onhand="9"/>
    </commodity>
    </list>
    I've taken this generated xml and put it into a local file
    for now.
    When I attempt to load this data I get this error:
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at TestFileAccess/TestFileAccess::resultHandler()
    at TestFileAccess/__srv_result()
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/flash.net:URLLoader::onComplete()
    My mxml file looks something like this:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" xmlns="*" paddingTop="3"
    creationComplete="initApp()" pageTitle="Warehouse Levels">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.rpc.events.*;
    [Bindable]
    private var commodData:Array;
    [Bindable]
    private var warehouseData:Array;
    [Bindable]
    public var slicedCommodData:ArrayCollection;
    private function initApp():void
    srv.send();
    slicedCommodData = new ArrayCollection();
    private function resultHandler(event:ResultEvent):void
    commodData = event.result.list.name.source as Array;
    warehouseData = new Array(commodData.length);
    slicedCommodData.source = commodData;
    var commodTotal:Number;
    for (var x:Number = 0; x < commodData.length; x++)
    warehouseData[x] = {name: commodData[x].name, onhand:0};
    var warehouses:Array = commodData[x].warehouse.source as
    Array;
    commodTotal = 0;
    for (var j:Number = 0; j < warehouses.length; j++)
    commodTotal += warehouses[j].onhand;
    commodData[x].total = commodTotal;
    ]]>
    </mx:Script>
    <mx:HTTPService id="srv" url="result.xml"
    useProxy="false" result="resultHandler(event)"/>
    <mx:Panel layout="absolute">
    <mx:ColumnChart id="WarehouseTotals"
    dataProvider="{slicedCommodData.source}">
    <mx:horizontalAxis>
    <mx:CategoryAxis dataProvider="{slicedCommodData.source}"
    categoryField="Name"/>
    </mx:horizontalAxis>
    <mx:series>
    <mx:ColumnSeries xField="Name" yField="Total"/>
    </mx:series>
    </mx:ColumnChart>
    <mx:DataGrid dataProvider="{slicedCommodData.source}">
    <mx:columns>
    <mx:DataGridColumn headerText="Commodity"
    dataField="Name"/>
    <mx:DataGridColumn headerText="Total"
    dataField="Total"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Panel>
    </mx:Application>
    I'm wondering if something is wrong with my generated xml
    data or if its something else. I did notice that my xml generation
    doesn't always produce 3 warehouse tags for every commodity. Could
    this be the problem?
    Also, the reason the commodity tag's total is always 0 in the
    xml is because this information is not captured in the view...I use
    mxml to calculate that.
    Thanks!

    It seems that I played with it for a while and fixed it. The
    problem was my xml data and the format my httpservice was
    returning. First my xml data needed to be enclosed by <data>
    and </data> tags not <list> and </list> tags.
    Second my httpservice needed to have a result format of e4x. This
    also caused me to have to change how I was handling the individual
    xml properties of the data.
    Anyway the fixed code looks like this for anyone that cares
    and has gotten a similar error.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns="*" paddingTop="3" creationComplete="initApp()"
    pageTitle="Warehouse Levels">
    <mx:Script>
    <![CDATA[
    import mx.collections.XMLListCollection;
    import mx.rpc.events.*;
    [Bindable]
    private var commodData:XMLList;
    [Bindable]
    public var slicedCommodData:XMLListCollection;
    private function initApp():void
    srv.send();
    private function resultHandler(event:ResultEvent):void
    commodData = event.result.commodity;
    slicedCommodData = new XMLListCollection(commodData);
    var commodTotal:Number;
    var nextNum:Number;
    for (var x:Number = 0; x < commodData.length(); x++)
    var warehouses:XMLList = commodData[x].warehouse as XMLList;
    commodTotal = 0;
    for (var j:Number = 0; j < warehouses.length(); j++)
    nextNum = 0;
    nextNum = new Number(warehouses[j].@onhand);
    commodTotal = commodTotal + nextNum;
    var firstItem:Object = slicedCommodData.getItemAt(i);
    firstItem.@total = commodTotal;
    ]]>
    </mx:Script>
    <mx:HTTPService id="srv" url="result.xml"
    resultFormat="e4x" result="resultHandler(event)"/>
    <mx:HDividedBox width="50%" height="100%">
    <mx:ColumnChart id="WarehouseTotals"
    dataProvider="{slicedCommodData}">
    <mx:horizontalAxis>
    <mx:CategoryAxis dataProvider="{slicedCommodData}"
    categoryField="@name"/>
    </mx:horizontalAxis>
    <mx:series>
    <mx:ColumnSeries xField="@name" yField="@total"/>
    </mx:series>
    </mx:ColumnChart>
    </mx:HDividedBox>
    <mx:HDividedBox width="50%" height="100%">
    <mx:DataGrid dataProvider="{slicedCommodData}">
    <mx:columns>
    <mx:DataGridColumn headerText="Commodity"
    dataField="@name"/>
    <mx:DataGridColumn headerText="Total"
    dataField="@total"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:HDividedBox>
    </mx:Application>
    Thanks for all of your help!

  • Stacked 100% bar chart - Problem with datatips for zero value data points

    I have a stacked 100% bar chart that shows datatips in Flex 4.   However, I don't want it to show datatips for
    data points with zero values.   Flex 4 shows the datatip for a zero value data point on the left side of a bar if the data point is not the first in the series.
    Here's the code that illustrates this problem.    Of particular concern is the July bar.    Because of the zero value data point problem, it's not possible to see the datatip for "aaa".
    Any ideas on how we can hide/remove the datatips for zero value data points ?        Thanks.
    <?xml version="1.0"?>
    <s:Application
    xmlns:fx="
    http://ns.adobe.com/mxml/2009"xmlns:mx="
    library://ns.adobe.com/flex/mx"xmlns:s="
    library://ns.adobe.com/flex/spark"creationComplete="initApp()"
    height="
    1050" width="600">
    <s:layout>
    <s:VerticalLayout/>
    </s:layout>
    <fx:Script><![CDATA[ 
    import mx.collections.ArrayCollection;[
    Bindable] 
    private var yearlyData:ArrayCollection = new ArrayCollection([{month:
    "Aug", a:1, b:10, c:1, d:10, e:0},{month:
    "July", a:1, b:10, c:10, d:10, e:0},{month:
    "June", a:10, b:10, c:10, d:10, e:0},{month:
    "May", a:10, b:10, c:10, d:0, e:10},{month:
    "April", a:10, b:10, c:0, d:10, e:10},{month:
    "March", a:10, b:0, c:10, d:10, e:10},{month:
    "February", a:0, b:10, c:10, d:10, e:10},{month:
    "January", a:10, b:10, c:10, d:10, e:10}]);
    private function initApp():void {}
    ]]>
    </fx:Script>
    <s:Panel title="Stacked Bar Chart - Problems with DataTips for Zero Value Items" id="panel1">
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <mx:BarChart id="myChart" type="stacked"dataProvider="
    {yearlyData}" showDataTips="true">
    <mx:verticalAxis>
     <mx:CategoryAxis categoryField="month"/>
     </mx:verticalAxis>
     <mx:series>
     <mx:BarSeries
    xField="a"displayName="
    aaa"/>
     <mx:BarSeries
    xField="b"displayName="
    bbb"/>
     <mx:BarSeries
    xField="c"displayName="
    ccc"/>
     <mx:BarSeries
    xField="d"displayName="
    ddd"/>
     <mx:BarSeries
    xField="e"displayName="
    eee"/>
     </mx:series>
     </mx:BarChart>
     <mx:Legend dataProvider="{myChart}"/>
     </s:Panel>
     <s:RichText width="700">
     <s:br></s:br>
     <s:p fontWeight="bold">The problem:</s:p>
     <s:p>Datatips for zero value data points appear on left side of bar (if data point is not the first point in series).</s:p>
     <s:br></s:br>
     <s:p fontWeight="bold">For example:</s:p>
     <s:p>1) For "June", eee = 0, mouse over the left side of the bar to see a datatip for "eee". Not good.</s:p>
     <s:br></s:br>
     <s:p>2) For "July", eee = 0 and aaa = 1, can't see the datatip for "aaa", instead "eee" shows. Real bad.</s:p>
     <s:br></s:br>
     <s:p>3) For "Feb", aaa = 0, datatip for "aaa" (first point) does not show. This is good.</s:p>
     <s:br></s:br>
     <s:p>4) For "Mar", bbb = 0, datatip for "bbb" shows on the left side of the bar. Not good.</s:p>
     <s:br></s:br>
     <s:p fontWeight="bold">Challenge:</s:p>
     <s:p>How can we hide/remove datatips for zero value data points?</s:p>
     <s:br></s:br>
     </s:RichText></s:Application>

    FYI.
    Still have the issue after upgrading to the latest Flex Builder 4.0.1 with SDK 4.1.0 build 16076.   
    Posted this as a bug in the Adobe Flex Bug and Issue Management system.     JIRA
    http://bugs.adobe.com/jira/browse/FLEXDMV-2478
    Which is a clone of a similar issue with Flex 3 ...
    http://bugs.adobe.com/jira/browse/FLEXDMV-1984

  • Text Layout Framework columncount Undo problem

    Text Layout Framework columncount Undo problem ::
        The number of times columncount is changed it gets applied to textflow
    and those number of operation is stored in undoStack(UndoManger).But when i
    undo it, it comes back to intial state, without undoin step by step.
    I have given my source code..
    Y so or any other alternative to achieve this..
    Thanx in advance..  
    <?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" creationComplete="init()">
        <fx:Script>
            <![CDATA[
                import flashx.textLayout.container.ContainerController;
                import flashx.textLayout.conversion.ITextImporter;
                import flashx.textLayout.conversion.TextConverter;
                import flashx.textLayout.edit.EditManager;
                import flashx.textLayout.edit.IEditManager;
                import flashx.textLayout.edit.ISelectionManager;
                import flashx.textLayout.edit.SelectionState;
                import flashx.textLayout.elements.InlineGraphicElement;
                import flashx.textLayout.elements.ParagraphElement;
                import flashx.textLayout.elements.TextFlow;
                import flashx.textLayout.events.SelectionEvent;
                import flashx.textLayout.events.StatusChangeEvent;
                import flashx.textLayout.formats.Direction;
                import flashx.textLayout.formats.TextLayoutFormat;
                import flashx.undo.UndoManager;
                import mx.collections.ArrayCollection;
                import mx.controls.Alert;
                import mx.controls.CheckBox;
                import mx.events.FlexEvent;
                import mx.events.SliderEvent;
                import spark.components.Group;
                import spark.components.TextArea;
                import spark.core.SpriteVisualElement;
                public var directions:ArrayCollection = new
    ArrayCollection(
                        {label:"Left-to-Right",
    data:Direction.LTR},
                        {label:"Right-to-Left",
    data:Direction.RTL}
                private var _textContainer:SpriteVisualElement = null;
                private static const textInput:XML = <TextFlow
    xmlns="http://ns.adobe.com/textLayout/2008">
                    <div>
                        <p><span>The Text Layout Framework is
    an extensible library, built on the new text engine in Adobe Flash Player 10,
    which delivers advanced, easy-to-integrate typographic and text layout features
    for rich, sophisticated and innovative typography on the web.
                    Some benefits provided by this framework
    include: 1) rich typographical controls, including kerning, ligatures,
    typographic case, digit case, digit width and discretionary hyphens
                    2) cut, copy, paste, undo and standard keyboard
    and mouse gestures for editing 3) selection, editing and flowing text across
    multiple columns and linked containers
                    4) bidirectional text, vertical text and over
    30 writing scripts including Arabic, Hebrew, Chinese, Japanese, Korean, Thai,
    Lao, Vietnamese, and others
                    5) vertical text, Tate-Chu-Yoko (horizontal
    within vertical text) and justifier for East Asian typography. Try editing this
    text and playing with the options below! Notice an inline image is also
    included.</span></p>
                    </div>
                    </TextFlow>;
                private var _textFlow:TextFlow;
                private function init():void {
                    _textContainer = new SpriteVisualElement();
                    canvas.addElement(_textContainer);
                    var importer:ITextImporter =
    TextConverter.getImporter(TextConverter.TEXT_LAYOUT_FORMAT);
                    _textFlow = importer.importToFlow(textInput);
                    _textFlow.flowComposer.addController(new
    ContainerController(_textContainer, canvas.width-40, canvas.height));
                    _textFlow.interactionManager = new
    EditManager(new UndoManager());
                    _textFlow.flowComposer.updateAllControllers();
                private function changeNoColumns(event:Event):void {
                    var tlf:TextLayoutFormat = new
    TextLayoutFormat();
                    tlf.columnCount = cols.value;
                    tlf.columnGap = 15;
                    tlf.direction = direction.selectedItem.data;
                    var em:EditManager =
    _textFlow.interactionManager as EditManager;
                    em.selectAll();
                    (_textFlow.interactionManager as
    EditManager).applyFormat(tlf,tlf,tlf);
                    _textFlow.flowComposer.updateAllControllers();
                protected function
    undo_clickHandler(event:MouseEvent):void
                    var em:EditManager =
    _textFlow.interactionManager as EditManager;
                    trace("Can undo " + em.undoManager.canUndo() +
    " can redo " + em.undoManager.canRedo());
                    em.undo();
                protected function
    redo_clickHandler(event:MouseEvent):void
                    var em:EditManager =
    _textFlow.interactionManager as EditManager;
                    trace("Can undo " + em.undoManager.canUndo() +
    " can redo " + em.undoManager.canRedo());
                    em.redo();
            ]]>
        </fx:Script>
        <s:Panel title="Text Layout Framework Sample" width="100%"
    height="100%">
            <s:layout>
                <s:VerticalLayout paddingTop="8" paddingLeft="8"/>
            </s:layout>
            <s:VGroup>
                <s:Group id="canvas" width="600" height="200" />
                <s:HGroup width="100%" verticalAlign="middle">
                    <s:Label text="# Columns:"/>
                    <s:NumericStepper id="cols"  minimum="1"
    maximum="20" snapInterval="1" change="changeNoColumns(event)" />
                    <s:Label text="Text Direction:"/>
                    <s:DropDownList id="direction"
    change="changeTextDirection(event)" dataProvider="{directions}"
    selectedItem="{directions[0]}"/>
                    <s:Button label="Undo"
    click="undo_clickHandler(event)"/>
                    <s:Button label="Redo"
    click="redo_clickHandler(event)"/>
                </s:HGroup>
            </s:VGroup>
        </s:Panel>
    </s:WindowedApplication>

    It cannot be reproduced with TLF 3.0 + SDK 4.5.

  • Problem with module loading another module

    I have run into what appears to be a bug in Adobe Flex 3.3, but would like others opinion.  I have a simple application which loads a module.
    If a user checks a box, then the module loads a submodule and calls a funtion in that submodule which modifies the UI slightly.
    It really is simple code, but not easy to explain, so bear with me on this :-)  All code is attached.  Rename from *.txt to *.mxml.
    I have added an event listener to the submodule loader for the ModuleEvent.READY event so that I can call a function in it once it is loaded (the function modifies the UI):
    private function onModuleReady(event:Event):void{     Alert.show(
    "Module load successful", "Success");
         if (loader2.child is SubModule) {
              var module:SubModule = loader2.child as SubModule;          module.createCompleteHandler();
              module.modifyUI(pnlMain);
         }else {          Alert.show(
    "loader is NOT SubModule", "Failure");     }
    Stepping through the debugger, loader2.child IS INDEED a SubModule Class, yet I consistantly step into the else clause.  As I debugged this, I added a similar event listener for the READY even on the loading of the first module.  By just defining a new function in the main module, this code now works.  I don't have to actually call that function, just define it, meaning that if I comment out the entire function onModuleReady (the one defined in the main application that is just printing out a trace), I get the error stated above.
    <?xml version="1.0" encoding="utf-8"?><mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="createCompleteHandler()">
    <mx:Script>
    <![CDATA[
    importMainModule; 
    importmx.events.ModuleEvent; 
    private function createCompleteHandler():void{loader.url =
    "MainModule.swf";
    // loader.addEventListener(ModuleEvent.READY, onModuleReady);loader.loadModule();
    private function onModuleReady(event:Event):void{ 
    if (loader.child isMainModule) { 
    trace("here");}
    Please try the attached code, and try running it with the function onModuleReady implelented in the Application body and with it removed.  Why would defining a function that is never called for the first module affect the second module?

    I figured this out.  I needed to add loader.applicationDomain = ApplicationDomain.currentDomain;
    This fixes the problem.
     

  • Facing some runtime problem in new AIR 2.0Beta2 SDK and same application work in OLD AIR 2.0Beta1 SD

    Severity:
    Runtime Error
    Reproducibility:
    Every Time
    Discoverability:
    High
    Found in Version:
    SDK Flex 3 (Released)
    Affected OS(s):
    Windows              - XP
    Steps to Reproduce:
    « Hide
      Steps to reproduce:
    1. Run the Application 
    2. At the creation complete I am referring "StorageVolumeInfo" i.e. StorageVolumeInfo.storageVolumeInfo.addEventListener(StorageVolumeChangeEvent.STORAGE_VOL UME_MOUNT, onVolumeMount);
    3.
      Actual Results:
      I am getting runtime ERROR as below:
    VerifyError: Error #1014: Class flash.filesystem::StorageVolume could not be found.
    at _FreepandasV2WatcherSetupUtil$/init()
    at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::docFrameHandler()[C:\autobuild\3.4.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:3213]
    at mx.managers::SystemManager/docFrameListener()[C:\autobuild\3.4.0\frameworks\projects\fram ework\src\mx\managers\SystemManager.as:3065]
      Expected Results:
       I am using ADOBE AIR 2.0Beta2 version SDK.
    The same application is run in Last SDK i.e AIR 2.0Beta1
      Workaround (if any):
      I am using ADOBE AIR 2.0Beta2 version.
    Can you please help me out...
    Thank you

    My settings with air 3.3:
    <renderMode>gpu</renderMode>
    <aspectRatio>portrait</aspectRatio>
              <autoOrients>false</autoOrients>
            <fullScreen>true</fullScreen>
            <visible>true</visible>
            <softKeyboardBehavior>none</softKeyboardBehavior>
        </initialWindow>
    It only displays a white screen with a small gray square (1/5 of the screen size - top left).
    A scrollbar is visible if you drag the screen and the sound is playing...
    I tried this settings:
    <aspectRatio>portrait</aspectRatio>
            <renderMode>gpu</renderMode>
              <autoOrients>true</autoOrients>
            <fullScreen>true</fullScreen>
            <visible>true</visible>
            <softKeyboardBehavior>none</softKeyboardBehavior>
        </initialWindow>
    It won't work...
    Edit:
    I also tested the new sdk http://www.adobe.com/products/air/sdk/ with gpu mode.
    iPhone works fine but the iPad version always crashes.
    The app opened up but if I try to load a level created with box2d the app always closes (crashs).
    I think that is a gpu ram issue?
    Is this a iPad issue or air?
    Edit 2:
    I changed the creationcomplete event to viewactivate. The transition now looks really worse but the levels are loading.
    I also deleted all the elements before changing the view (removeElement and removeChild).
    The third step I made was to use weak eventListener obj.addEventListener("event, function, false,0,true);
    I think that iOS systems have the problem of less gpu ram than android devices ...

Maybe you are looking for

  • After enabling the Built-in Administrator account, it is not shown on Welcome screen

    Hello, I have Windows 7 Starter SP1. I have previously successfully enabled and then logged on, to the built-in administrator account,  and then when I had finished using it, disabled it again. Unfortunately today, I found that when I enabled the bui

  • What is the role of BIS server in blackberry?

    What is the role of BIS server in blackberry? i need the answer in detail? Thanks in advance Solved! Go to Solution.

  • Importing VGA 640x480 into Imovie09

    I recently bought a Panasonic GH-1 and shot some video in MOTION JPEG VGA 640x480. Next I discovered that my Powerbook G-4 was too old and slow to do much editing so I bought a new MacBook Pro. Now I find that I can't import the video into iMovie09.

  • Opens as a copy in Excel 2011

    There are a few files that are floating around my company that open as a copy when opened in Excel 2011 on a Mac. These are old files and the original creator can not be contacted to find out if something special was done to it. If opened on a Window

  • Can't anchor TOC pane

    I'm using RoboHelp x5. In my CHM file, you can actually move the entire TOC pane up and down and left and right. (I'm not talking about the ordinary functionality that lets you expand or contract how much of the titles you see.) I'm talking about the