Loading image when using URL query

I asked for help, for anyone who might be able to * cough * JRab * cough *.

.... I want to show a small gif of loading when my app is in the middle of sending a URLrequest, so it seems that my application is something, while demand happens... because when the application load it takes a few seconds to get there and also to update the content displayed...

Any help?

Hey tensioncore,.

the ActivityIndicator like all preloaded, including the image he. If you want a custom image, you will need to do the setSkin() method. but I didn't yet. Here's a sample code to test the feature. There is no need of an IF ELSE statement. the corresponding code is nice and clean, and definitely in my top 5 list QNX api hah

ActivityTest.as:

package
{
    import flash.display.Bitmap;
    import flash.display.Loader;
    import flash.display.LoaderInfo;
    import flash.display.Sprite;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
    import flash.events.ErrorEvent;
    import flash.events.Event;
    import flash.events.IOErrorEvent;
    import flash.events.MouseEvent;
    import flash.net.URLRequest;

    import qnx.ui.buttons.LabelButton;
    import qnx.ui.display.Image;
    import qnx.ui.progress.ActivityIndicator;

    [SWF(width="1024",height="600",backgroundColor="#e8e8e8",frameRate="30")]
    public class ActivityTest extends Sprite
    {
        private var _loader:Loader;
        private var _urlRequest:URLRequest;
        private var _image:Image;

        private var _btn:LabelButton;

        private var _activityIndicator:ActivityIndicator;

        public function ActivityTest()
        {
            super();

            // support autoOrients
            stage.align = StageAlign.TOP_LEFT;
            stage.scaleMode = StageScaleMode.NO_SCALE;

            /**
             * Set up the image placeholder
             */

            _image = new Image();
            _image.setPosition(10,10);

            addChild(_image);

            /**
             * Set up the activity indicator
             * Make sure to do setSize so it gets created
             */

            _activityIndicator = new ActivityIndicator();
            _activityIndicator.setSize(100,100);
            _activityIndicator.setPosition((stage.stageWidth / 2) - (_activityIndicator.width / 2), (stage.stageHeight / 2) - (_activityIndicator.height / 2));

            /**
             * Sample loader getting google's homepage image
             */

            _loader = new Loader();
            _urlRequest = new URLRequest("http://www.google.com/images/logos/ps_logo2.png");

            _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
            _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onError);

            /**
             * Button that starts things
             */

            _btn = new LabelButton();

            _btn.label = "Load Image";
            _btn.setSize(150,52);
            _btn.setPosition(10,150);

            addChild(_btn);

            _btn.addEventListener(MouseEvent.CLICK, onClick);

        }

        private function onClick(e:MouseEvent):void
        {
            /**
             * Start the animation and show the indicator on screen
             */
            _activityIndicator.animate(true);

            addChild(_activityIndicator);

            /**
             * Begin the image loading
             */

            _loader.load(_urlRequest);

            _btn.enabled = false;
        }

        private function onComplete(e:Event):void
        {
            /**
             * Stop the animation after image loaded successfully
             * and get rid of it
             */
            _activityIndicator.animate(false);

            removeChild(_activityIndicator);

            /**
             * set the image to the downloaded image
             */

            var bitmap:Bitmap = Bitmap(LoaderInfo(e.target).content);

            _image.setImage(bitmap);
        }

        private function onError(e:ErrorEvent):void
        {
            /**
             * If there was an error. stop the indicator
             */
            _activityIndicator.animate(false);

            removeChild(_activityIndicator);

            trace("error: " + e);
        }
    }
}

There are comments throughout. Basically, this application downloads googles image when you click on load image. and then when its downloading, it displays the activity indicator and get rid of it, when it finishes / generates an error.

hope that a few things cleared up. Good luck!

Tags: BlackBerry Developers

Similar Questions

  • HX850 - no adjustment of the image when using netflix

    Hello

    Is it possible to adjust the picture settings when using netflix? All the buttons on the remote seem to be blocked when netflix is running. It is very annoying because I can't disable cinemotion making all movies look like they were saved by a kid with some * camcorder.

    Adjustment of image quality with 'common' setting also does not affect the settings of the image when the netflix app is running.

    THX!

    Hello FA5_FLIP.
    Welcome to the community of Sony and thanks for the post.

    Setings photo on TV are not accessible when you watch Internet channels.

    Fact the image appears in poor quality when the various videos of Netflix streaming and streaming of various videos like YouTube, Amazon etc. Internet services?

    Are the same Netflix videos appear fine when transmitted in an another TV or computer?
    Check if the speed of the Internet meets the requirements of 2.5 Mbps for SD videos streaming and 10 Mbps for streaming HD videos.

    Try to update the Firmware of the TV to the latest version.

    Try to separate the TV from Netflix account and even add a link to it.
    Follow the steps below to remove the TV has Netflix.

    https://us.en.KB.Sony.com/app/answers/detail/A_ID/32176

    Thank you.

  • abstractWSDL points to the physical host name when using URL loadbalanced

    Document tracking "Oracle® Fusion Middleware Enterprise Deployment Guide for Oracle SOA Suite 11 g Release 1 (11.1.1) E12036-04" to implement soa suite 11 g PS2 in two node cluster environment.

    Hostname SOA physical server (SOAHOST1 & SOAHOST2)

    More SOA is configured with the virtual host name (SOAHOST1VHN1 & SOAHOST2VHN1 Port: 8001) and loadbalancer URL is http://soa.mycompany.com:7777.

    Successfully completed installation and the steps of post-installation as update callbackServerURL and serverURL to http://soa.mycompany.com:7777

    Also updated HttpServerURL as http://soa.mycompany.com:7777.

    Composite SOA successfully deployed to the cluster from jdeveloper soa and tested control of Fusion middleware 11g (EM) webservices. And his works fine.

    When I goto page to Test Composite, the WSDL and endpoint URL appear as expected is http://soa.mycompany.com:7777 / soa-infra/services/default/ccValidation/getStatusByCC? WSDL and http://soa.mycompany.com:7777 / soa-infra/services/default/ccValidation/getStatusByCC


    But when I access the WSDL in the abstractWSDL browser is having hostname of the server that is mentioned below. Cause this problem by calling this webservice of some other jdeveloper 11g bpel processes. When I enter the url http://soa.mycompany.com:7777 WSDL / soa-infra /... in Web service activity (after placing the activity in the corridor of "External References") and wire BPEL to webservice, WSDL url in webservice is changed to http://soahost1.mycompany.com:8001 / soa-infra /... and wiring is faulty.

    Since soa suite managed server is configured with the virtual host name, the wsdl file is accessible only by using their virtual hostnames (SOAHOST1VHN1 & SOAHOST2VHN1) and load balancer url. Access WSDL using the physical hostname soahost1 would result in "Page not found" error. Why Jdeveloper isn't able to wire bpel with webservice component.

    Question:

    Is there any configuration that I need to change for this problem?

    Thanks in advance.

    Kind regards
    Kumar

    ===========================================

    <? XML version = "1.0" encoding = "UTF-8"? >
    -< wsdl:definitions name = "getStatusByCC" targetNamespace = "http://oracle.com/sca/soapservice/CreditCardValidation/ccValidation/getStatusByCC" xmlns:tns = "http://oracle.com/sca/soapservice/CreditCardValidation/ccValidation/getStatusByCC" xmlns:inp1 = "http://www.globalcompany.com/ns/CCAuthorizationService" xmlns:wsdl = "http://schemas.xmlsoap.org/wsdl/" xmlns:flt1 = "http://www.globalcompany.com/ns/CCAuthorizationService" xmlns:out1 = "http://www.globalcompany.com/ns/CCAuthorizationService" >
    -< wsdl:documentation >
    _ * < abstractWSDL > < /abstractWSDL > http://soahost1.mycompany.com:8001/soa-infra/services/default/ccValidation!1.0/getStatusByCC.wsdl * _
    < / wsdl:documentation >
    -< wsdl: types >
    -< scheme xmlns = "http://www.w3.org/2001/XMLSchema" >
    < import namespace = "http://www.globalcompany.com/ns/CCAuthorizationService" schemaLocation = "http://soa.mycompany.com:7777/soa-infra/services/default/ccValidation/getStatusByCC?XSD=xsd/creditcheck.xsd" / >
    < / schema >
    -< scheme xmlns = "http://www.w3.org/2001/XMLSchema" >
    < import namespace = "http://www.globalcompany.com/ns/CCAuthorizationService" schemaLocation = "http://soa.mycompany.com:7777/soa-infra/services/default/ccValidation/getStatusByCC?XSD=xsd/creditcheck.xsd" / >
    < / schema >
    -< scheme xmlns = "http://www.w3.org/2001/XMLSchema" >
    < import namespace = "http://www.globalcompany.com/ns/CCAuthorizationService" schemaLocation = "http://soa.mycompany.com:7777/soa-infra/services/default/ccValidation/getStatusByCC?XSD=xsd/creditcheck.xsd" / >
    < / schema >
    < / wsdl: types >

    ======================================================

    Try to define the interface host and port of Front-ends such as specified in the link below

    http://download.Oracle.com/docs/CD/E12840_01/WLS/docs103/webserv/setenv.html#wp220945

    Address: soap in the dynamic wsdl document is determined according to the following priority:

    # If the Web Service is deployed on a cluster and the cluster host Frontend, Frontend HTTP Port, and the Port HTTPS Frontend are defined, WebLogic Server then uses these values in the server of the dynamic WSDL address.

    # If the previous cluster values are not defined, but the Host Frontend, Frontend HTTP Port and HTTPS front-end Port values are defined for the server on which the Web Service is deployed, WebLogic Server then uses these values in the address of the server.

    # If these values are not defined for the cluster or an individual server, WebLogic Server then uses the address of the server the query WSDL in the dynamic WSDL.

  • Background in the body images; the use of query to select different images

    Hello

    IK have a site fluiddesign DW; background image in the body:

    < head >

    {body

    background: non-repetition Center url('img/background_mack_venezia.jpg') set;

    background-size: cover;

    -moz-background-size: cover;

    -o-background-size: cover;

    -webkit-background-size: cover;

    }

    < / style >

    < / head >

    I want the background image does not appear on mobilke devices.

    In the css file, I put:

    / * Mobile layout: 480px and below. */

    IMG, object, embed, {video

    Max-width: 100%;

    }

    {body

    Background: none;

    background-color: #595959;

    }

    But it does not work. Background image is always displayed and no background color in "display MÖBEL.

    And how to use different images on a page for the different windows, with query?

    Thank you very much in advance!

    My bad.  I left a semicolon between the url and the #hex color.  Remove and it should work.

    background: #595959 url(img/background_mack_venezia.jpg) non-repetition sets the Center;



    Nancy O.

  • dirty scan image when using the charger - m225 printer

    use of m225dw printer for 4 months now. scan of the magazine images have vertical lines all over the place in the document.  Please advise how to clean the part of the supply. I don't think I have the same problem when scanning using the glass. Please tell us how to clean the description step by step including feeder (?) for parts, etc.

    The fix is usually very simple...

    When you get the lines while using the ADF documents and not from the scanner glass, it is because there are a few pieces of paper/dust/something in the small drop of glass at the bottom of the glass.

    Lift the cover and you will see this tape from a window, just under the side where the paper feeds.  Where is the scanner parks actually 'see' the paper as it rolls.

    Carefully remove the pieces with a can of compressed air or a brush.  They line up right where the scratches are usually.

    I had this problem with my 8600 before HP and found the answer here on the Forum!

    WyreNut

  • Text the PIN in the center of the image when using fluid width

    Dear fellow users Adobe Muse,

    I have a some problems pasting blocks of text for the picture frames when you use layout fluid width.

    What I want is to have three images side by side and a text centered on each photo.

    When my browser window resizing pictures fit perfectly, but the text does not follow.

    I tried to classify, but it does not help.


    Is it possible to lock text block so that it is always at the center of an image?


    See the images under (the first showing what I'm after and the other showing what it looks like when resizing)

    1.jpg

    2.jpg

    Try the workaround mentioned in this post: Re: text on reactive image?

    Best,

    Anna

  • centering of images when using, do scroll effects

    Hello!

    I used scrolling effects to get images to scroll horizontally, but it only fits on my screen resolution.

    When zoomed out or using a bigger screen, the images stick upwards.

    while I would be centered vertically.

    See: www.jonascarstens.de/beta

    How to get to it?

    Jonas

    Yes, I think you're stuck between a rock and the anvil... in order to have scrolling effects you need to the page is larger than the browser window (if scrolling is possible) but for the widget in the center of the page vertically the page must be shorter than the browser window... I don't think there's a way to get exactly what you are looking for using Muse.

  • Chrome, not loading images when the site is online... the charge very well when working locally

    Hi, I'm working on a fairly simple site - basically just a series of images on the page, without effects, etc. Images of care very well when tested on chrome locally, but once the site is online, they do not load. see here for example

    Well seems to work on other browsers.

    Thanks for the help!

    Sorry, nevermind, seems to have suddenly started working on his own.

  • Using URL query of database parameters

    Hey,.

    I am currently using 11.1.1.6.0, an application framework ADF and Oracle Database 11 g Jdeveloper.

    So my problem is that I have a table of information on emissions (Syscode, Version number, Date of completion, developer name) and I want to be able to bind the client to a specific database entry. So I guess the best way would be to move the two parameters in the URL, the systemCode and the versionNumber to display information. The two variables, I pass the excellent work, but I don't know how to query the database to get the rest of the information such as, date of completion, the developer name, etc. etc. Any help would be great!

    Thanks in advance for your help,
    Dustin

    Discover the first part of the series URL: https://blogs.oracle.com/shay/entry/passing_parameters_to_adf_appl

  • How to display the loading Image when you press a first level tab

    I have a long report which is directly related to a first level tab and want to display an image that makes the user aware that the application is running and load the data.

    Tried to use the plugin loading of Tobias Arnold icon, but it does not occur under this type of event.

    No idea how to use this plugin with a tab without submitting the page.

    Jeff

    23 theme is OK, the class = attribute "tab_link" on the tabs. I added that and now it works.

  • No preview image when using the filter flow therefore cannot see the changes I make up by clicking on the window of fluidity.  No way of knowing what is happening to the image while it is happening.

    Re: the fluidity in the last update PS CC filter.  When you use the filters of flow, how can I see the changes that I do while I'm using the filter tools, as I've always been able to do before?  Now, if I use the tool dilation or contraction tool, etc., I can't see the effect of what I did until I click on the window of fluidity and make to the main screen of PS.  This makes the tools unnecessary fluidity.

    Also check if see the background is checked.

  • Distorted image when using Lightroom and Bridge

    Any of you have seen something like that?

    Happens with the images in CC Bridge and Lightroom CC.

    As you can see, the preview is fine, but the image via the mode of development is not. It opens very well with Photoshop. Our IT guys have installed and reinstalled and it still does the same thing.

    Thank you

    Chris

    funky.jpg

    Hi Chris,

    Greetings!

    Try these steps

    Open Lightroom

    Click on edit-> preferences-> Performance

    Uncheck the box use graphics processor.

    Click Ok

    Close Lightroom and reopen.

    Now, try

    Concerning

    Jitendra

  • Load FLV in SWF URL query string

    I would like to load any flv that I have on the server in a a SWF, with a value of the URLS or FlashVars. What I don't know how to do, is get the actionscript Setup to read the value and put it in something like this:

    NS. Play (myVideoName);

    instead of the usual way:

    NS. Play ("somevideo.flv");

    So far, I have the following code:

    var nc:NetConnection = new NetConnection();
    NC. Connect (null);

    var ns:NetStream = new NetStream (nc);

    theVideo.attachedVideo (ns);

    NS. Play (?);

    Thanks to anyone in advance.

    Any name you give the variable (in the URL string or FlashVars) is available at the root of your movie as soon as it initializes. So, if your URL looks like this:

    http://www.MyURL.com/mySWF.swf?myVideoName=myVid.FLV

    Then you should be able to access that variable in the way you suggest... ns.play (myVideoName)... as soon as the scenario main loads... you can place this code in an onLoad function just to make sure.

    Hope that helps!

  • Satellite P850/P855 - sound/Image when using the media shift

    Hello

    While I'm listening on spotify or see a movie, theres a small lag every 10 or 20 minutes.
    I bought this laptop 3 days ago and have not used that much. No idea how can I fix?

    Would that be something wrong in the material?
    By

    On the virtual path that is not easy to say what the problem is but, to be honest I put t think it is hardware related issue.

    Maybe this small shift is the result of some substantive activities. I put t know how you've set up your laptop and what is running in the background, but you can do test and sop unnecessary background activities before you start the video player.

    What antivirus do you use?

  • Load image into ImageView using file:///

    Hello

    According to this article http://supportforums.blackberry.com/t5/Cascades-Development-Knowledge/The-Different-Methods-of-Loadi... we should be able to load images QML using file:/// and absolute path.

    For the life of me I can't load an image not only of shared/accounts/1000/shared/subfolders, but even of the application data folder.

    Can someone share * work * example of loading images in ImageView using file:///

    Thank you.

    https://developer.BlackBerry.com/Cascades/documentation/UI/Image_Resources/content.html

Maybe you are looking for