alternative navigator.pushView

Hello

I have two points of view

View 1 a lot of moveable elements

View 2 has some parameters

When I drag some elements on the stage and then use navigator.pushview (view2) and then navigator.popView () it goes back to View1 but all the elements that were on the scene gets RESET.

I have

creationComplete = "init ()" on View1 "

So I guess that when you remove a stack of nav everything gets reset... to the difference in the development of the iPhone?

Any ideas how to get around that without saving the States of all objects

So what I did was used this

var view:MyView = new MyView();
navigator.addElement(view);

It works very well... without transition, but I have a useless.

Tags: BlackBerry Developers

Similar Questions

  • Navigational decision can be made programmatically without the user clicking on?

    I use JDeveloper 10.1.3.4 and have a question about the flow of the custom page - turn by program to one of the pages according to the data of the user.

    I have a table that contains a number of columns to store data on users. I created a view (LoggedInStudent) of this table object and overrides the prepareSession() method in the module of the application.

    When a student logs in, the first thing the application does is that the prepareSession() method passes the student user ID to the SQL statement in the view of the LoggedInStudent object to reduce the cache view to just one line that belongs to the user by studying.

    The very next thing that the application needs to do is to navigate the user to one of the five pages based on the data in the same a row of LoggedInStudent. And that's where I'm stuck.

    In the diagram of faces - config.xml, I added a JSF (welcome.jsp) page with a case of welcome.jsp navigation to each of the other five pages, to put a command button on the page of welcome.jsp, and in the context menu this button chose "create binding method for Action."

    In the file Welcome.java, whatever browsing of result - the commandButton1_action() method returns the name, is the next page, the user will be covered, very well. All he need do is to obtain the rank of LoggedInStudent, look at the inside attributes, write the logic and return the name of the result right. The only problem is: how to get this line in this class of Welcome.java?

    Alternatively, navigation of page flow might be made in the request form? How? In the application module that one line of the LoggedInStudent is available at your fingertips.

    I am a beginner with JDeveloper. 10.1.3 is centered on the page and navigation seems to be cleaner and easier then in 10.1.2. In online demos all navigation is event-driven: If there are five pages, the user can go from the current page, there's probably five buttons or links, it is the user who makes the decision that one to click. I believe JDeveloper should also support programmatically decide on what next page to navigate to.

    I would appreciate if an experienced developer can help me and thank you very much in advance.



    Newman

    Hello

    You can access all what you defined in your template project also in your Welcome.java file, basically named managed bean. for example how to access the instance of the application module you can see here in the documentation: http://download.oracle.com/docs/cd/B32110_01/web.1013/b25947/bcservices.htm#sthref681

    Google more in this forum how to access your view object and the current line and the value of the attribute in a similar way...

    Kind regards

    Branislav

  • Flash Builder 4.6 App by tabs

    Hello

    I did experiment with a TabbedView app.  If I put a button on each of the 2 views, views are put in the same space of view instead of the other tab.  Is there a way to get the second tab to get the focus when the button is pressed?  As is the button pushing now to the view in the first tab.

    From a view

    navigator.popAll ();
    navigator.pushView (ListView);

    The other view

    navigator.popAll ();
    navigator.pushView (ItemsView);

    The second tab don't quite get used.  Everything seems to be done in the first tab.

    Neil

    Try using this:

    FlexGlobals.topLevelApplication.tabbedNavigator.selectedIndex = 1;

    1 is the number of the desired tab in this case

  • Best practices for the application of page multi Landscape/Portrait

    Hello
    I am looking for information on track to develop auto guide demand in pure actionscript with new components of qnx.fuse, but there is not a good example in real code. Every time I tried to make it resizable layout to get deformated fluid only components in portrait or landscape mode.

    I have a simple application with the point main and 3 displays:

    public class Main extends NavigatorSprite
    {
        public function Main()
        {
            addEventListener(Event.ADDED_TO_STAGE, init); 
    
            stage.nativeWindow.visible = true;
            stage.scaleMode = StageScaleMode.NO_SCALE;
            stage.align = StageAlign.TOP_LEFT;
            stage.nativeWindow.activate();
        }
        private function init(e:Event):void
        {
            removeEventListener(Event.ADDED_TO_STAGE, init);
            navigator.pushView(View1);
        }
    }
    
    public class View1 extends ViewSprite
    {
    
        private var container:Container;
        private var button_two:LabelButton;
        private var button_three:LabelButton;
    
        public function View1
        {
            addEventListener(Event.ADDED_TO_STAGE, init);
        }
    
        private function init(e:Event):void
        {
            removeEventListener(Event.ADDED_TO_STAGE, init);
    
            container = new Container();
            var layout:RowLayout = new RowLayout();
            container.layout = layout;
    
            button_two = new LabelButton();
            button_two.label = "to page 2";
            button_two.width = 150;
            button_two.height = 45;
            button_two.addEventListener(MouseEvent.CLICK, handleTwoClicked);
            container.addChild(button_two);
    
            button_three = new LabelButton();
            button_three.label = "to page 3";
            button_three.width = 150;
            button_three.height = 45;
            button_three.addEventListener(MouseEvent.CLICK, handleThreeClicked);
            container.addChild(button_three);
    
            addChild(container);
        } 
    
        private function handleTwoClicked(e:Event):void
        {
            navigator.pushView(View2);
        }
    
        private function handleThreeClicked(e:Event):void
        {
            navigator.pushView(View3);
        }
    }
    
    public class View2 extends ViewSprite
    {
    
        private var container:Container;
        private var back:BackButton;
    
        public function View2
        {
            addEventListener(Event.ADDED_TO_STAGE, init);
        }
    
        private function init(e:Event):void
        {
            removeEventListener(Event.ADDED_TO_STAGE, init);
    
            container = new Container();
            var layout:RowLayout = new RowLayout();
            container.layout = layout;
    
            back = new BackButton();
            back.label = "Back";
            back.width = 100;
            back.height = 45;
            back.addEventListener(MouseEvent.CLICK, goBack);
            container.addChild(back);
    
            addChild(container);
        } 
    
        private function goBack(e:Event):void
        {
            navigator.popView();
        }
    }
    
    public class View3 extends ViewSprite
    {
    
        private var container:Container;
        private var back:BackButton;
    
        public function View3
        {
            addEventListener(Event.ADDED_TO_STAGE, init);
        }
    
        private function init(e:Event):void
        {
            removeEventListener(Event.ADDED_TO_STAGE, init);
    
            container = new Container();
            var layout:RowLayout = new RowLayout();
            container.layout = layout;
    
            back = new BackButton();
            back.label = "Back";
            back.width = 100;
            back.height = 45;
            back.addEventListener(MouseEvent.CLICK, goBack);
            container.addChild(back);
    
            addChild(container);
        } 
    
        private function goBack(e:Event):void
        {
            navigator.popView();
        }
    }
    

    Is there for example some best practices how to modify this code to have pages and components with the same sizes in portrait and landscape? On presentation buttons size always 150 width and height 45 and wil containers have stageWidth and stageHeight.

    Thank you if someone could help with this problem

    Hello

    Try listening to a shift in focus screen with this code:

    stage.addEventListener(Event.RESIZE, onResizeHandler, false, 0, true);
    

    You can only change the width/height of your components to the event based on the width/height of the floor.

    I will guard against specifying specific sizes, if you want your code to work on devices BB10. I recommend using %'s.

    Kind regards

    Dustin

  • use a file .as for the code

    Hello

    I am new to the development of the playbook

    I installed Flash Builder and the SDK of the Playbook. Now, I have a button on the screen with the following measures:

    <>cript >
            protected function button1_clickHandler(event:MouseEvent):void
    {
    navigator.pushView (MyNewView);
    }
    ]]>
        cript >

    This works very well, but how do I call a method from another .as file?

    Thank you.

    Hibbert

    I do not explain too well as the announcement of the playbook is clunky.

    
    http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView">
    
        
            
        
    
        
            
        
        
    
    

    It is a new project with a single view and a single button. The click event of the button is assigned to the button1_clickHandler() method.

    in the views folder I create this class

    package views
    {
        public class Another
        {
            public function Another()
            {
                trace("Constructor called");
            }
             public function Bother():void
            {
                trace("BotherCalled");
            }
        }
    }
    

    Note package is seen, now depending on how you want to do this, you can create an instance of the class using a var, or indicate that the method is static.

  • How to add a transition to the output of the application

    Hi guys,.

    When I use navigator.pushView (View) there is a nice sliding transition between two points of view. However, when I use Nativeapplication.exit() () the app ends suddenly, without Visual transition. The PlayBook itself uses a transition when the user completes an app that has been reduced to a minimum (from the Task Manager). I was wonderfing if we can add some nice visual transitions when you leave an app thanks!

    There has been many past discussions you can find.

    There is no consensus.  A lot of apps will not have an output characteristic, then users will certainly learn quickly that they just slide down to reduce, then slide or press to close.

    For some applications, an Exit button or widget is appropriate.  For others, it makes little sense.  Look at your own application and explore how users will work with it and make your own decision.

    The market will lead us, but for now, just guess...

  • Object oriented programming

    I'm unable to transfer data from one point of view to another using objects.

    I have 2 views named FirstView.mxml and SecondView.mxml.

    I have 1 actionscript file named Pass.as

    Any help is very appreciated.

    Pass.As

    package components

    {

    public class Pass

    {

    [Bindable]

    public var first: String;

    public var second: String;

    public void Pass()

    {

    }

    public void setFirst(first:String):void

    {

    This.First = first;

    }

    public void setSecond(second:String):void

    {

    This.second = second;

    }

    public function getFirst (): String

    {

    back in the first place;

    }

    public function getSecond (): String

    {

    back then;

    }

    public void count with all (): String

    {

    first of all return + "" + second;

    }

    }

    }

    FirstView.mxml

    <? XML version = "1.0" encoding = "utf-8"? >

    " < = xmlns:fx s:View ' http://ns.Adobe.com/MXML/2009 "

    xmlns:s = "library://ns.adobe.com/flex/spark".

    title = 'FirstView.

    xmlns:components = "components.*" >

    < fx:Script >

    <! [CDATA]

    import components. Pass;

    [Bindable]

    public var pass: Pass;

    protected function handleClick(event:MouseEvent):void

    {

    pass = new Pass();

    pass.setSecond (inputbox2.text);

    pass.setFirst (inputbox1.text);

    navigator.pushView (SecondView);

    }

    []] >

    < / fx:Script >

    < fx:Declarations >

    <! - Place non-visual elements (e.g., services, items of value) here - >

    < / fx:Declarations >

    < s:Label text = "enter your identification number" x = "10" y = "10" >

    < / s:Label >

    < s:TextInput id = "inputbox1" x = "10" y = "33" >

    < / s:TextInput >

    < s:TextInput id = "inputbox2" x = "10" y = "145" >

    < / s:TextInput >

    < s:Button label = "Search" click = "handleClick (event)" x = "10" y = "362" > "

    < / s:Button >

    < / s:View >

    SecondView.mxml

    <? XML version = "1.0" encoding = "utf-8"? >

    " < = xmlns:fx s:View ' http://ns.Adobe.com/MXML/2009 "

    xmlns:s = "library://ns.adobe.com/flex/spark".

    title = "SecondView".

    xmlns:components = "components.*" >

    < fx:Script >

    <! [CDATA]

    import components. Pass;

    [Bindable]

    public var passData:Pass = new Pass().

    protected function handleClick(event:MouseEvent):void

    {

    Label3.text = passData.getAll ();

    }

    []] >

    < / fx:Script >

    < fx:Declarations >

    <! - Place non-visual elements (e.g., services, items of value) here - >

    < / fx:Declarations >

    < s:Label text = "{passData.getFirst ()}" = '10' XY '45' = > "

    < / s:Label >

    < s:Label text = "{passData.getSecond ()}" = '10' XY '145' = > "

    < / s:Label >

    < s:Label id = "label3" x = "10" y = "245" >

    < / s:Label >

    < s:Button label = "Search" click = "handleClick (event)" x = "10" y = "362" > "

    < / s:Button >

    < / s:View >

    you have 2 instances of passage here.

    in FirstView instead of the call

    navigator.pushView (SecondView);

    call

    navigator.pushView (SecondView, col);

    in SecondView instead of creating a new instance of the Pass you can access past created in FirstView through the property Explorer data in Secondview

    for example

    SecondView.mxml

    http://ns.Adobe.com/MXML/2009.

    xmlns:s = "library://ns.adobe.com/flex/spark".

    title = "SecondView".

    xmlns:components = "components.*" >

    import components. Pass;

    [Bindable]

    protected function handleClick(event:MouseEvent):void

    {

    Label3.text = (data in the form of Pass) .getAll ();

    }

    ]]>

  • How to change the default orientation?

    Hello

    I am new to Adobe Flash Builder and am currently a mobile application for a school project. I was wondering how to change the default application in landscape mode orientation. I tried to go into my app.xml and change the proportions in mode landscape with no luck, and it is very difficult to find answers on the internet. I would greatly appreciate your help.

    Code HomeView.mxml:

    <? XML version = "1.0" encoding = "utf-8"? >

    " < = xmlns:fx s:View ' http://ns.Adobe.com/MXML/2009 "

    xmlns:s = "library://ns.adobe.com/flex/spark".

    actionBarVisible = "false" tabBarVisible = "false" title = "HomeView" >

    < fx:Declarations >

    < / fx:Declarations >

    < s:Image left = "0" right = "0" top = low "0" = "0" scaleMode = 'zoom' smooth = 'true '.

    smoothingQuality = 'high' source="@Embed('file:///C:/Users/Owner/Downloads/48127-solarsystem-teaser.jpg')" / > "

    < s:Button = "-5" x = "0" width = "410" height = "1504.

    skinClass = "spark.skins.mobile.TransparentNavigationButtonSkin" click ="navigator.pushView (Sun)" / > "

    < s:Button = "444" x = "852" width = '80' height = '80 '.

    skinClass = "spark.skins.mobile.TransparentNavigationButtonSkin" click ="navigator.pushView (Mercury)" / > "

    < s:Button "628" = x y = "742" width = "120" height = "124".

    skinClass = "spark.skins.mobile.TransparentNavigationButtonSkin" click ="navigator.pushView (Venus)" / > "

    < s:Button "836" = x y = "632" width = "127" height = "117".

    skinClass = "spark.skins.mobile.TransparentNavigationButtonSkin" click ="navigator.pushView (Earth)" / > "

    < s:Button "994" = x y = "506" width = "99" height = "96".

    skinClass = "spark.skins.mobile.TransparentNavigationButtonSkin" click ="navigator.pushView (March)" / > "

    < s:Button "1255" = x y = "464" width = "298" height = "279".

    skinClass = "spark.skins.mobile.TransparentNavigationButtonSkin" click ="navigator.pushView (Jupiter)" / > "

    < s:Button "1626" = x y = '302' width = '274' height = '270 '.

    skinClass = "spark.skins.mobile.TransparentNavigationButtonSkin" click ="navigator.pushView (Saturn)" / > "

    < s:Button "1965" = x y = "196" width = "175" height = "174".

    skinClass = "spark.skins.mobile.TransparentNavigationButtonSkin" click ="navigator.pushView (Uranus)" / > "

    < s:Button "2201" = x y = "66" width = "175" height = "174".

    skinClass = "spark.skins.mobile.TransparentNavigationButtonSkin" click ="navigator.pushView (Neptune)" / > "

    < / s:View >

    App.xml code:

    <!-the original proportions of the application at the launch ('portrait' or 'landscape').

    As an option. Mobile only. By default, it is the natural orientation of the device->

    <!-landscape < aspectRatio > < / aspectRatio >->

    <!-if the app will start to auto-orienter the launch. As an option. Mobile

    only. Default value false->

    <!-false < autoOrients > < / autoOrients >->

    I need to make sure the app is constantly in the landscape.

    Thanks again.

    8 student

    In XML, while is a comment.  You must remove the :

    landscape

    fake

  • Disorders of event listener

    I'm pretty new to flash builder, as I am to change an application that has been contracted in offshore.  I've added a new service, but never hit my interlocutor, I used a violin to see that he succeed querys webservice events but the success (or failure) never fire.

    protected function view1_viewActivateHandler(event:ViewNavigatorEvent):void

    {

    var serviceManager:Refer_EarnServiceManager = new Refer_EarnServiceManager();

    serviceManager.addEventListener (Refer_EarnWebServiceEvent.RECOMMENDED_BUSINESS_SERVICE, onR ecommendedBusinessSuccess);

    serviceManager.addEventListener (FaultEvent.FAULT, onRecommendedBusinessFail);

    serviceManager.getRecommendedBusinesses (BusinessVO (data) .intBusinessID); IntBusinessID BusinessVO (data)

    showBusy();

    }

    private void onRecommendedBusinessSuccess(event:Refer_EarnWebServiceEvent):void

    {

    hideBusy();

    AppModel.getInstance () .recommendedbusinessList = event.result

    var arrcol:ArrayCollection = Refer_EarnWebServiceParser.parseRecommendedBusinessResult (event.result);

    appModel.recommendedbusinessList = arrcol;

    If (arrcol. Length > 1)

    {

    navigator.pushView (Refer_EarnChooseBusiness2, arrcol);

    hideBusy();

    }

    on the other

    {

    navigator.pushView (Refer_EarnMainView, arrcol [0] as BusinessVO);

    hideBusy();

    }

    }

    Found the answer: there was a "dispatch" function that I missed.

    case ApplicationConstants.WEB_SERVICE_RECOMMENDED_BUSINESS: {dispatchEvent (new Refer_EarnWebServiceEvent (Refer_EarnWebServiceEvent.RECOMMENDED_BUSINESS_SERVICE, xmlObj));                          break;                     }

  • Closure of a SkinnablePopUpContainer in actionscript

    I have a SkinnablePopUpContainer as follows:

    " < fx:Component className ="AlertMsg">

    < s:SkinnablePopUpContainer x = '70"y ="300""">

    " < s:TitleWindow fontSize ="16"title ="MyTitle"horizontalCenter ="0"close ="close ()"> "

    "" "" < s:VGroup horizontalAlign = "center" paddingTop ="8" paddingBottom = "8" paddingLeft ="8" paddingRight = "8" gap ="5" width = "100%">

    " < s:Label textAlign ="center"fontSize ="16"

                                                                          text=" MyText " />

    " < s:Button label ="OK"click ="close ()"/ >

    < / s:VGroup >

    < / s:TitleWindow >

    < / s:SkinnablePopUpContainer >

    < / fx:Component >

    It is a mobile application. When I drag and navigator.pushView another opinion, the alert remains on your screen.

    Someone knows how to close the alert in the actionscript code?

    Seems a silly question, but I can't object to clode refernce it :-(

    TIA,

    Phil.

    Don't know why, but:

    I used the following to create the popup alert:

    (new AlertMsg()) .the (this, false)

    So, I used the following method:

    var alert: AlertMsg = new AlertMsg();

    Alert.Open (this, true);

    PopUpManager.centerPopUp (alert);

    I can't drag to move another opinion, until I close the alert, which is exactly what I want.

    So, solved under centering pop-up!

  • Mobile: The spark fade effect works is not on the device

    Hello:

    I have a TabbedViewNavigatorApplication with Flex SDK 4.6 that has four ViewNavigator (tabs). In the first, his original point of view has a list of spark with custom IconItemRenderer and by clicking on an element, the browser pushes another opinion. I applied a spark effect to make a fade on the current view before pushing a new (on the EFFECT_END event).

    It's the definition of the effect:

    < fx:Declarations >

    < s: Fade duration = "{ParamsModel.timeoutFadeOut}" id = "fadeOutEffect" alphaFrom = alphaTo "1.0" = "0" / > "

    < / fx:Declarations >

    And that is launched when the user clicks on an item in the list:

    public void loadView(view:*,_data:Object):void

    {

    Avoid the transition between slides by default between views

    tabbedNavigator.activeView.navigator.defaultPushTransition = null;

    Add listener to detect the end of the fade effect

    fadeOutEffect.addEventListener (EffectEvent.EFFECT_END, function(event:EffectEvent):void

    {

    Delete this listener until the next call to 'loadView() '.

    IEventDispatcher (event.currentTarget) .removeEventListener (event.type, arguments.callee);

    After erasing is completed, press the new view

    tabbedNavigator.activeView.navigator.pushView (display, data);

    }

    Play the fade on the current active view effect

    fadeOutEffect.play ([tabbedNavigator.activeView]);

    }

    In fact, this short code smooth on the emulator, but I can´t see no fade effect on the device. I mean, it s not that the effect works buggy or slow. He doesn´t bland at all. West a time (exactly the duration of the effect) where nothing happens, and then the new view load without any effect. What Miss me? I really miss a kind of "emulated hardware installation" on the emulator definitely know if what I see on the computer will work (in terms of performance) on the device... I easily spend 50% the time coding and 50% this kind of continuous performance of fixing problems.

    EDIT: In one of the tabs, a custom list has a gradient background. I Don t know why, but this background is the only element that seems to be affected by the fade effect. Gently, she turns to alpha: 0, but his Don t containing elements.

    Thanks in advance!

    I can´t believe it... While writing the previous post, I thought of a really simple solution and compiled to give it a try. It works perfectly!

    As simple as setting the property "cacheAsBitmap" to "true" on the spark lists points of view!

  • Event listeners overall for all views in a ViewNavigatorApplication

    Hello

    As the subject says, I have a ViewNavigatorApplication and I'm trying to set up a 'global' event listener for all views. Which I am able to do, however I have problems...

    In my first review, I attribute this listening port:

    NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN, handleKeys);

    And I also have this feature:

    public void handleKeys(event:KeyboardEvent):void {}

    If (event.keyCode == Keyboard.MENU) {}

    trace '(menu press');

    navigator.pushView (MainMenuView);

    }

    }

    It works very well from the first sight. But when I change the view, I get an exception on pushView (navigator is null). I think I understand why, so what's the best practice for something like this? How can I have access to the browser component spark of this function when it is called from a different view? Or is there a better way to go about this?

    Thank you!

    Try to put the code in the main mxml:

    http://ns.Adobe.com/MXML/2009.

    xmlns:s = "library://ns.adobe.com/flex/spark".

    xmlns:MX = "library://ns.adobe.com/flex/mx".

    firstView = 'Home'

    applicationComplete = "init ()" > "

    private function init (): void {}

    this.addEventListener (KeyboardEvent.KEY_DOWN, handleKeys);

    }

    private void handleKeys(event:KeyboardEvent):void {}

  • Transition of views on iOS devices

    Hi all!!

    I've looked everywhere for this problem, seams that some people have one another don't, or at least doesn't mention.

    I'm trying to Flex (4.5.1 now) to do some tests and studies with the possibility of biuls's mobile applications that run on Android and iPhone.

    I made a simple 2 discovers the application with a button on reproduced one. The buttons have a click event that push and pop the second point of view.

    Everything works great and is very easy to do.

    On the Simulator, all transitions are performed smoothly, but when I release an IPA file and install it on my iPhone (4 with iOS 5.0) or (1 with 5.0 iOS) the performance of the application is really bad. I mean, transitions like runing on 5 frames per second.

    Already tried to change the frameRate, cashAsBitmap and nothing seams to change performance whose views are sliding.

    The code is very simple:

    View 1:

    < s:View ' xmlns:fx = ' http://ns.Adobe.com/MXML/2009 "

    "" xmlns:s = "library://ns.adobe.com/flex/spark" title ="HomeView" cacheAsBitmap = "true""">

    < fx:Script >

    <! [CDATA]

    protected function button1_clickHandler(event:MouseEvent):void

    {

    / / TODO self-generated stub method

    navigator.pushView (View2);

    }

    []] >

    < / fx:Script >

    < fx:Declarations >

    " < s:SlideViewTransition id ="slideTransition"" duration = "1000" "" / > "

    < / fx:Declarations >

    "" < s:Button x = "157" y ="52" label = "go to the second point of view"click = "button1_clickHandler (event)"/ >

    < / s:View >

    View 2:

    < s:View ' xmlns:fx = ' http://ns.Adobe.com/MXML/2009 "

    "" xmlns:s = "library://ns.adobe.com/flex/spark" title ="View2" cacheAsBitmap = "true""">

    < fx:Script >

    <! [CDATA]

    protected function button1_clickHandler(event:MouseEvent):void

    {

    / / TODO self-generated stub method

    navigator.popView ();

    }

    []] >

    < / fx:Script >

    < fx:Declarations >

    <! - Place non-visual elements (e.g., services, items of value) here - >

    < / fx:Declarations >

    "" < s:Button x = "235" y ="55" label = "Go Back"click = "button1_clickHandler (event)"/ >

    < / s:View >

    I have I don't do wrong me? I'm I missing something?

    Hopw you have the solution for this...


    To switch between the CPU and GPU, open your file xxxx - app.xml, uncomment the tag and enter cpu or gpu.

    This article does a good job of explaining cacheAsBitmap and cacheAsBitmapMatrix, but note that some things may have changed a little in the Air 2.6 and newer:

    Unlike what one would expect, CPU is often better than GPU on mobile. It depends on what you are doing. In the case of doubt: measure and experiment!

  • HTTPService fail to send parameters

    Flash Builder 4.5

    Flash Player 10.3

    Windows 7 pro 64-bit

    problem,

    I send an object as parameters http, but it never come on the web server.

    help welcomed.

    more information,

    Flash builder network monito shows the http request to include parameters.

    Wireshark shows that there are no parameters in the http request.

    source code

    < fx:Script >

    <! [CDATA]

    import com.adobe.serialization.json.JSON;

    import com.adobe.serializers.json.JSONEncoder;

    Import mx.rpc.events.FaultEvent;

    Import mx.rpc.events.ResultEvent;

    Import mx.rpc.http.HTTPService;

    protected function button1_clickHandler(event:MouseEvent):void

    {

    var streamParams:Object = new Object;

    streamParams.title = "demo";

    streamParams.quality = 1;

    vidictionService.contentType = "application/json";

    vidictionService.send (streamParams);

    }

    protected function httpResultHandler(evt:ResultEvent):void

    {

    trace ("InitView.httpResultHandler ()" + evt.result.toString () ");

    navigator.pushView (seen. MobileLiveHomeView, {streamParams:evt.result});}

    }

    protected function httpFaultHandler(evt:FaultEvent):void

    {

    trace ("InitView.httpFaultHandler ()" + evt.toString () ");

    }

    []] >

    < / fx:Script >

    < fx:Declarations >

    < s:HTTPService id = "vidictionService".

                           url=" http://192.168.2.104:9000/stream/record "

    Fault = "httpFaultHandler (Event)" "

    result = "httpResultHandler (Event)" "

    resultFormat ="object"

    showBusyCursor = "true" / >

    < / fx:Declarations >

    < s:Button low = "10" label = "Publish" click = "button1_clickHandler (event)" horizontalCenter = "0" / > "

    found the solution:

    vidictionService.method = "POST";

    vidictionService.send (JSON.encode (streamParams));

  • ERROR: "1119: access of the selectedItem of the property possibly undefined...".

    Well, I am new to Flash Builder 4.5 here so I'm developing a mobile application for practice...

    Here is the configuration:

    I have a tabbed display application. In a point of view, I have a list that is populated with data from an XML file (bugs - creepy crawly kind not Ghost in the machine type). What I'm trying to do, is call a new view when a user touches an element in the list. The new view contains data on the bug itself.

    The problem I have is that, in the bugList_changeHandler, I get the error:

    ERROR: "1119: access of the selectedItem of the property possibly not defined through a reference with static type services.bugslist:BugsList.".

    Here is my function:

    Import spark.events.IndexChangeEvent;

    protected function bugsList_changeHandler(event:IndexChangeEvent):void {}

    navigator.pushView (views. (BugsDetailView, bugsList.selectedItem);

    }

    Here is my list:

    < s:List id = "Bugs" width = '100% '.

    " creationComplete =" Bugs_creationCompleteHandler (event) "labelField ="name"change =" bugsList_changeHandler (event) "verticalScrollPolicy ="off">

    < s:itemRenderer >

    < fx:Component >

    < s:IconItemRenderer messageField = 'loc '.

    iconField = "img" iconWidth = "60".

    iconHeight = "60" decorator = "images/right.png" >

    < / s:IconItemRenderer >

    < / fx:Component >

    < / s:itemRenderer >

    < s:AsyncListView list = "{getDataResult.lastResult}" / >

    And on the detail view, here's my list:

    < s:VGroup >

    < s:Label text = "{data.img}" / >

    < s:Label text = "{data.name}" / >

    < s:Label text = "{data.price}" / >

    < s:Label text = "{data.loc}" / >

    < s:Label text = "{data.time}" / >

    < s:Label text = "{data .months}" / >

    < s:Label text = "{data.rare}" / >

    < / s:VGroup >

    And for good measure, here's a sample of my XML file:

    <? XML version = "1.0" encoding = "UTF-8"? >

    < bugs >

    < Bug No. = 'agrias' >

    < img >http://www.jasonwoodcock.biz/adc/cf/bugs/agrias-butterfly.png< / img >

    < name > Butterfly Agrias < / name >

    < price > 3 000 bells < / price >

    < loc > near water (not during rain) < / loc >

    < month > June - Sep < / month >

    < time > 08:00 - 17:00 < / time >

    < Rare > Yes < / rare >

    < / bug >

    And bonus points, name the game so that this app is...

    your list has a different name for the selectedItem as you try to spend

    navigator.pushView (seen. BugsDetailView,bugsList.selectedItem);

Maybe you are looking for