How to display a PNG image according to the response from the Web Service?

Hello

I use the web service XML from Weather.com to get the current temperature, temperature 'feels' and the current condition icon number.  Their service provides many (> 20 I think) which represents the current status of PNG files.  How do I install my script AS3 do basically if... then Else instructions based on the returned value icon?  For example, if the value of icon = 20, then view 20. png on stage?  I need match the value of correct PNG icon and then put that PNG (as a clip?) on stage for a predefined timeline section.

Thank you

SID

Hello

I also used this API, and I only use cases or conditions in order to retrieve the values and turn them into a file name.

If you do not use all the available conditions and turning them into an icon, then Yes, you need to do a switch condition.

But if you want to use them all, them you can simply get the condition number and add the '.png' and call the corresponding file directly. Here you can do a test, just in case the condition / icon does not exist (e.g. system failure any)

uicondition.source = String (resultXML.cc.icon) + ".png";

The UILoader is an excellent component for this sort of thing. You can accomplish the same thing with a MovieClip and load an image. It is lighter.

But then again if you want to resize you would code all methods for that.

I hope this helps.

Tags: Adobe Animate

Similar Questions

  • How to create a generic method that calls the Web Service

    Hi I have a question how to create the Web Service client. In design mode, I can't specify static URLs? WSDL and process.

    I found the briliant method in library of apache cxf.

    for example

    DCF JaxWsDynamicClientFactory = JaxWsDynamicClientFactory.newInstance ();
    Customer customer = dcf.createClient ("http://soabpm-vm:8001 / soa-infra/services/default/MailSender/mailsender_client_ep?") WSDL");

    Object [] results;
    try {}
    Results = clientA.invoke (QName new ("http://xmlns.oracle.com/SynchDSBpel20/MailSender/MailSender", "process"), '@', 'body', 'subject');
    } catch (Exception e) {}


    In my case, I should create a method with params (URL? WSDL, URI, name of operation, param1, praram2, param3)


    Y at - it something like CXF in the ADF library?

    If your question has been answered, can you please mark as answer?
    THX
    Antonis

  • Make Image more using the Web Service and Ksoap2

    Hey all, I was wondering if someone can help me with a problem. I use a .net web service that grows on a collection of person objects when a person runs a query from the blackberry phone. To implement this I'm using ksoap2. In my service, I'll send in a string as a parameter. I returned the collection of people that contain the firstname, lastname, address, race, sex. I also try to send a picture. Now, I got this works very well when you do not include the image settings.  In my class on the side of .net in person my class, I have 'image' public property which is a string. I get the bytes of the image and convert it to a base 64 string:

    MemoryStream ms = new MemoryStream();

    System.Drawing.Bitmap.bmp = new System.Drawing.Bitmap (imagePath);

    BMP. Record (MS, System.Drawing.Imaging.ImageFormat.Bmp);

    p.Image = Convert.ToBase64String (ms, GetBuffer());

    BMP. Dispose();

    Mrs. Close();

    Note: in my outings, I see the 64Encoding string.

    On the side of blackberry, I have:

    Byte [] imageArray = ((person) personVector.elementAt (i)).image.getBytes ();

    EncodedImage = bitmap

    EncodedImage.createEncodedImage (imageArray, 0, imageArray.length);

    gridMgr.add (new BitmapField (bitmap.getBitmap ());

    Unfortunately, my number of vector appears as empty and I keep get get a parse error. As I mentioned before, if I remove ownership of the Image on both sides, it works like a charm.  I tried to use just about everything. Any ideas on how to overcome the image using ksoap? I tried to make the image property in the two classes as arrays of bytes, but he had no success. My problem when you use the byte array was in the class of person on the side of the blackberry for the PropertyInfo, that I didn't know what to use (for example STRING_CLASS, OBJECT_CLASS, LONG_CLASS); in any case, neither worked. What do you suggest me?

    I was able to do successfully the bytes of the image the device in the following way in my seriealize class.

    In the getProperty method, I use the following:

    info.type = MarshalBase64.BYTE_ARRAY_CLASS;

  • How to display two or more files on the screen at the same time in format "cascade" or "tile"?

    How to display two or more files on the screen at the same time in format "cascade" or "tile"?

    What types of files,

    He each file separately.

    Right-click your taskbar, and then click the option side by side...

    Breaking of Windows,

    http://Windows.Microsoft.com/en-us/Windows7/products/features/snap

    http://Windows.Microsoft.com/en-us/Windows7/arrange-Windows-side-by-side-on-the-desktop-using-snap

  • How to display this window that lists all the devices of storage connected to my PC?

    How to display this window that lists all the devices of storage connected to my PC? It lists each device, how much space is used and how much is free? I sometimes open it by accident, but I can never find it when I'm looking for it.

    original title: storage devices

    Beginning

    Control Panel

    If you the small icons view do the following:

    Administration tools

    Computer management

    Storage

    Disk Managment

    If you have the category view do the following:

    System and security

    Administration tools

    Computer management

    Storage

    Disk management

  • How to display prices with which we won the most?

    Hello guys!

    I try to learn a few new skills in oracle sql if I was looking for examples on the web. I found this one, with 6 questions. I did all the tables and all the connections. I knew solve 5 questions but that, finally one seems too difficult for me.

    I don't know how to display tables with which we won the most. We do need to check what Denis is rendered which course and anyone who paid that invoice, what kind of prices was also on this Bill (normal od student).

    I would be really happy if you guys could help me.

    Thank you very much!

    Here is the printscreen of my E-R model and my oracle sql code:

    http://imgur.com/oM5IbTL,
    http://pastebin.com/c1CqF3K8

    If you don't understand anything, despite my bad English or anythning else, feel free to ask. I would be really happy if we could solve this problem!

    As far as I know, bill and section have no impact on this problem.  As Frank said, this looks like a Top - N type problem.  You is a way to get answer:

    dev1 > select gains, num_students, lesson_name, course_name

    2 from (select course_name, lesson_name, num_students, gains,

    3 dense_rank() ON rn (salary desc order)

    4 of (select c.name course_name, l.lesson_name,)

    5 count (vr.id) num_students,

    6 sum recipes (p.price)

    7 of course c

    8 Join Conference l

    9 l.fk_course = c.id

    Join the 10 visit vg

    11 on l.id = vg.fk_lecture

    join 12 visitor RV

    13 on vg.fk_visitor = vr.id

    price of 14 p join

    15 p.fk_course = c.id

    Group 16 by c.name, l.lesson_name))

    where the 17 rn = 1;

    LESSON_NAME NUM_STUDENTS PROFIT COURSE_NAME

    ------------------ --------------------- ------------ ----------

    C++, programming 3 750 programming

    Java programming programming 3 750

    If you really don't want that one line returned with a tie, then you replace dense_rank, row_number or do something like:

    Select course_name, lesson_name, num_students, recipes

    from (select c.name course_name, l.lesson_name,)

    Count (VR.ID) num_students,

    Sum revenue (p.Price)

    of course c

    join the l Conference

    on l.fk_course = c.id

    Join visit vg

    on vg.fk_lecture = l.id

    Join the vr visitor

    On vg.fk_visitor = vr.id

    Join the price p

    on p.fk_course = c.id

    C.name group, l.lesson_name

    order by 4 desc)

    where rownum = 1;

    This structure returns a single line in the case of links, but there is no way to predict which of the related rows will be returned.

    John

  • How to display time in 010403 format if the entry is transmitted as ' 1 hour, 4 minutes, 3 seconds"sql query

    How to display time in 010403 format if the entry is transmitted as ' 1 hour, 4 minutes, 3 seconds"sql query @.

    Hello

    You can try:

    Select lpad (regexp_substr ('1 hour, 4 minutes, 3 seconds ',' [[: digit:]] + ""), 2, '0')

    || LPAD (regexp_substr ('1 hour, 4 minutes, 3 seconds ',' [[: digit:]] +', 1, 2), 2, '0')

    || LPAD (regexp_substr ('1 hour, 4 minutes, 3 seconds ',' [[: digit:]] +' 1, 3), 2, '0')

    Double;

    but this requires maximum 99 hours/minutes/seconds ago in your entry.

  • How to stop the success recorded by the web service to display two times answer


    I use the HTTP communication to send the entire PDF document to a web service.  I'm not having problems with the actual presentation.

    However, the status message "registered success' that is returned by the web service displayed twice.  Why?

    This is the response from the web service code.

    Context.Response.Clear)

    Context.Response.Buffer = True

    Context.Response.ContentType = "application/vnd. FDF.

    Context.Response.Write ("%FDF-1.2" & CRLF)

    Context.Response.Write ("1 0 obj < <" & CRLF)

    Context.Response.Write ("/ FDF < <" & CRLF)

    Context.Response.Write ("/ status (form successfully registered)" & CRLF ")

    Context.Response.Write ("> >" & CRLF)

    Context.Response.Write ("> >" & CRLF)

    Context.Response.Write ("endobj" & CRLF)

    Context.Response.Write ("trailer" & CRLF)

    Context.Response.Write ("< < / Root 1 0 R > >" & CRLF)

    Context.Response.Write("%%EOF")

    Context.Response.End)

    Thank you

    Diane Asberry

    I've upgraded to Adobe Reader XI and the problem disappeared.

    Thanks for your help.

    Diane Asberry

  • How to call the web service?

    Hello

    I want to know how to call the web service from my application HTML5 & javascript.

    Please help me find this detail as what I can access easily. and I want to access web services online (a method of it) I'm not concered with how background Web service takes place.

    I just want that when you call a web service method, I will return the result.

    Please try this out for a WebService call

    var xmlhttp;
    xmlhttp = new XMLHttpRequest();
    xmlhttp.open("get","your url",true);
    xmlhttp.setRequestHeader("Accept","application/json");
    xmlhttp.setRequestHeader("Content-type", "application/json");
    xmlhttp.onreadystatechange=function() {
     if (xmlhttp.readyState==4) {
      if (xmlhttp.status == 200) {
        console.log(xmlhttp.responseText);
      }
     }
    }
    xmlhttp.send();
    

    This will display the result of the invocation of webservice. The url is the application that you deploy and the type can be get/post. If xmlhttp.send (post) takes argument for the display of the data. You can call it by clicking a button in HTML.

  • several images capture and read their path to send the byte array to the web service

    Hello

    Have a problem when the image capture, the requirement is to open the camera and capture multiple images, and once done it should send the array of bytes to the web service, wrote the class with reader and Video Control of the code and then using the saved file to store image API, but when the user capture multiple images it replaces previous if I keep the path to say dynamic by using the date and time then how I just know what images are recently captured and their path, one time I know that the path of recently captured using new fileconnection images can read the image byte array.

    Hi Nishant,

    find the attached code. In this demo, you will find:

    (1) the use of the listner log file system

    (2) how to move data from one folder to another.

    (3) how to read file system byteArray.

  • How to use the web service to update the data?

    Hi team,

    Need help in establishing a procedure for updating data using the web service, in the first instance, I think that it's the same reading webservice but I will produce an error:

    29273 00000 - "the HTTP request failed.

    * Cause: The UTL_HTTP package cannot run the HTTP request.

    * Action: Use get_detailed_sqlerrm to check the detailed error message.

    Correct the error and restart the HTTP request.

    using this tag soap_request.

    < ns1:Request >

    < ns1:header >

    < ns1:InterfaceName > OSMMVNECreateOrder < / ns1:InterfaceName >

    < ns1:InterfaceId > OSM - XXX < / ns1:InterfaceId >

    < ns1:CorrelationId > TEST-06262015 < / ns1:CorrelationId >

    < / ns1:header >

    < ns1:Mvno > MTI < / ns1:Mvno >

    < ns1:orderId > < / ns1:orderId >

    < ns1:orderType > CHANGE_STATUS < / ns1:orderType >

    < ns1:orderDetails >

    < ns1:subscriberId > 9469273 < / ns1:subscriberId >

    < ns1:newStatusId > 2 < / ns1:newStatusId >

    < / ns1:orderDetails >

    < / ns1:Request >

    the < ns1:subscriberId > 9469273 < / ns1:subscriberId > the Subscriber must search and

    < ns1:newStatusId > 2 < / ns1:newStatusId > will replace the current state.



    any suggestion on how to do it?



    Best regards

    Nelz Ki

    There is no difference between calling a web service to write data, against the appellant for reading data. SOAP is SOAP. He cares not.

    Example to interact with a web service is in Re: PLSQL webservice call

    Regarding your error - stack display Tower full of error to see what said the trace of the error. The data you've posted unfortunately no sense to isolate the error.

  • How to consume the web service using PLSQL in 11g

    Hello

    I created a site using jDeveloper, web services which when I put in the web browser and press enter, it will display the settings screen and when I pass the value for the parameter, and then it displays the output of the XML returned by the PL/SQL (called in the Web Service) package. Now, I want to call this webservice in PL/SQL and read XML data and fill in the staging table. Can anyone suggest me how to achieve this functionality by using Oracle PL/SQL

    I use the database 11g and jDeveloper Version :-Studio Edition version 10.1.3.0

    Thank you very much in advance.

    Vijay

    The WSDL file describes the web service.

    To obtain the WSDL, you enter the URL of the web service and add some ? WSDL to the URL. This indicates the web service to return to its definition.

    For example

    URL of the Web Service: http://wsf.cdyne.com/WeatherWS/Weather.asmx

    WSDL URL: http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL

    When you read (using 'web browser' UTL_HTTPpackage) the XML response from the web service, read as strings (PL/SQL varchar2, size 32 K max).

    You should read the answer as the strings, then writing/writeappend these channels in a CLOB (using the DBMS_LOB package). If you are VERY sure that the web service call ALWAYS returns an XML of less than 32 k, you can skip using a CLOB.

    Whatever it is, read you the response from the web service in the form of text (such as plain text, it is what is sent). The next step on your part is to parse text into an XML DOM (document object model) - and storing the DOM in an Oracle XmlType variable.

    When in a DOM, you can use Oracle XML functions to extract the attributes and values of the key element of the response from the web service.

  • How do you add a google calendar for the web site of muse, the updates are synchronized

    How do you add a google calendar for the web site of muse, the updates are synchronized?

    You can add Google Calendar using iframe which Google provides if you go to calendar settings.

    Once you insert this code into the page of Muse by object > insert HTML, the calendar will be displayed on the page.

    https://support.Google.com/calendar/answer/41207?hl=en

    Thank you

    Sanjit

  • How can I fnd my claim code and the reprint of the web services information sheet

    Hi, I have a HP Deskjet 3520 and try to put in place the eprint.  I read the suggestions on the forum and the FAQ but I can't locate the web services information sheet I need to reprint for claim code.

    Could not find anything under Printer Control Panel either. Please advise!

    Thank you!!

    Hi Chris88,

    Welcome to the HP Support forums.  I appreciate that you try to configure the ePrint on your Deskjet 3520 printer feature.

    If you have the inkjet printer Deskjet 3520 with a C8994 product number this printer does not have the ePrint service.  The Deskjet 3520 printer only has USB connection and ePrint to function the printer must have an independent internet connection through a wireless or a wired ethernet network.  I've included the specifications of the printer for your reference.

    If you have the e-all-in-one printer Deskjet 3520 then we obtain the claim code.  You can request the information sheet of web services from the front panel of the printer, and there the claim code printed in blue. Instructions on how to get it can be found in the section titled "to print a document using ePrint' in your on page 15 user's guide.  Please follow the instructions in step 1.

    HP Deskjet 3520 inkjet printer specifications

    User's Guide e-All-in-One Series HP Deskjet 3520

  • I lost my msn icon after the upgrade to windows 7. How I connect msn plsu? What is the web address?

    I lost my msn icon after the upgrade to windows 7. How I connect msn plsu? What is the web address?

    Hello

    I suggest you to contact MSN customer support for assistance.

    Here is the link for "how to contact MSN Support.

    http://support.Microsoft.com/kb/940784

    I hope that helps!

Maybe you are looking for

  • How can I selectively sharing apple?

    I share an Apple ID with my boyfriend and my sister. I like to have collective playlists on Apple music with my boyfriend that we can add and subtract to, but to do that I have to share. The only problem with that is that when I turn on sharing, I ge

  • Disc SSD of Dell enterprice specifications

    Hello from Dell support. I want to buy the SSD for our r420 PowerEdge server. For the use of SQL Server 2008 r2. We find this a 400 GB SSD drive: 209-27-DESD4G3A Part number: 400-26754   But I can't find the specifications of this SSD drive in the we

  • RAID 1 or 10

    Hello, I was put in charge two servers that use RAID, but I'm not too knowledgeable about RAID. Above all I am looking for peace of mind.As I understand it, RAID 1, and 10 have fault tolerance and a disk can be replaced if she have questions. We have

  • Error of the ripple: Oh Snap! Build request failed with the message: CreateProcessW

    Hello I installed the Mobile Emulator 0.9.1 ripple with SDK for Tablet 2.2.0.5 WebWorks, following the instructions exacly on a Windows 7 64-bit machine. If I try to package virtually any application (HelloWorld, weather, examples, something more com

  • why we can not put windows 7 on our new computers?

    why we can not put windows 7 on our new computers?