Is it possible to call a movieClip from the Flash library using XML?

Instead of using "test_1.swf" or "test_2.jpg" in the <IMAGE> tags shown below, we are wanting to call a movieClip from the same library as the .FLA via XML.
Is this possible using XML and AS3?
< ?xml version="1.0" encoding="UTF-8"?>
< all>
     < GROUP>
          <IMAGE>test_1.swf</IMAGE>
          <QUESTION>Question example #1</QUESTION>
          <OPTION1>Option A example</OPTION1>
          <OPTION2>Option B example/OPTION2>
          <OPTION3>Option C example</OPTION3>
          <IMAGE>test_2.jpg</IMAGE> 
          <QUESTION>Question example #2</QUESTION>
          <OPTION1>Option A example</OPTION1>
          <OPTION2>Option B example/OPTION2>
          <OPTION3>Option C example</OPTION3>
     < /GROUP>
< /all>

data.xml:
< ?xml version="1.0" encoding="UTF-8"?>
< all>
     < GROUP>
          <IMAGE>MC1</IMAGE>
          <QUESTION>Question example #1</QUESTION>
          <OPTION1>Option A example</OPTION1>
          <OPTION2>Option B example/OPTION2>
          <OPTION3>Option C example</OPTION3>
          <IMAGE>MC2</IMAGE> 
          <QUESTION>Question example #2</QUESTION>
          <OPTION1>Option A example</OPTION1>
          <OPTION2>Option B example/OPTION2>
          <OPTION3>Option C example</OPTION3>
     < /GROUP>
< /all>
// a.s.
var urlLoader:URLLoader=new URLLoader();
urlLoader.addEventListener(Event.COMPLETE,completeF);
urlLoader.load(new URLRequest("data.xml"));
function completeF(e:Event):void{
var xml:XML=XML(e.data);
var instance:*=stringToClassInstanceF(xml.GROUP.IMAGE[0]);
addChild(instance);
function stringToClassInstanceF(s:String):*{
var C:Class=Class(getDefinitionByName(s));
return new C();

Similar Messages

  • Possible to call a transaction from a planning book using a macro button?

    Hi All,
    Is it somehow possible to call a transaction using a macro button in the planning book? Also, the current selection should be passed as input parameters to the transaction.
    In my example, I am trying to run the transaction /SAPAPO/MC90 - Release to Supply Network Planning from the Demand Planning  Planning Book/Data View. This way if planners need to change forecasts mid month for specific selections, they can easily transfer to SNP without having to go out of interactive planning.
    Thank you,
    Maria

    Hello Maria,
              It's possible to call a transaction from a planning book using a macro button.
    What you can do is ..... Create a function module and inside it use the command "Call Transaction Tcode"  (ABAPer can do this) to call ur specific transaction. And this module can in turn be called from your macro. Please find the below link which explanis how to call a function module from a macro. Do let me know if you need more information on this.
    Calling a function module from APO Macro
    Regards,
    Siva.

  • Is it possible to create a table from the input of an XML file

    Hi,
    Must the table exist when I try to parse data from an XML file, or can I tell the parser to create the table if it doesn't exists.
    thanks
    Rune Haavik

    Rune,
    XML Parsing on Java side does not require any table(s) to be present.
    If you are talking about PLSQL parsers, then I guess you can catch the exception in your PLSQL block and then create a table. This falls in the SQL realm.
    I hope this answers your question.

  • How can i call a method from the a subdirectory using packages

    This is my directory structure:
    java
    --p1
    --One.java
    --p2
    --Two.java
    package java.p1;
    import p2.Two;
    public class One
         public static void main(String args[])
              Two obj = new Two();
              obj.p();
    package java.p2;
    public class Two
         public void p()
              System.out.println("p method");
    ERRORS !!
    C:\Documents and Settings\ashutosh\Desktop\java\p1\One.java:3: package p2 does not exist
    import p2.Two;
              ^
    C:\Documents and Settings\ashutosh\Desktop\java\p1\One.java:9: cannot find symbol
    symbol  : class Two
    location: class java.p1.One
              Two obj = new Two();
                    ^
    C:\Documents and Settings\ashutosh\Desktop\java\p1\One.java:9: cannot find symbol
    symbol  : class Two
    location: class java.p1.One
              Two obj = new Two();
                                  ^Help me out. Thanks.

    jinchuriki123 wrote:
    This is my directory structure:
    java
    --p1
    --One.java
    --p2
    --Two.java
    package java.p1;
    import p2.Two;
    public class One
         public static void main(String args[])
              Two obj = new Two();
              obj.p();
    package java.p2;
    public class Two
         public void p()
              System.out.println("p method");
    ERRORS !!
    C:\Documents and Settings\ashutosh\Desktop\java\p1\One.java:3: package p2 does not exist
    import p2.Two;
    ^
    C:\Documents and Settings\ashutosh\Desktop\java\p1\One.java:9: cannot find symbol
    symbol  : class Two
    location: class java.p1.One
              Two obj = new Two();
    ^
    C:\Documents and Settings\ashutosh\Desktop\java\p1\One.java:9: cannot find symbol
    symbol  : class Two
    location: class java.p1.One
              Two obj = new Two();
    ^Help me out. Thanks.You don't have a class p2.Two, You do have a class java.p2.Two. Package paths aren't relative.
    Also, it's recommended not to use package names containing "java" or "javax" (or is it illegal to do so?). Change your package & folder names.
    db

  • Why am I getting the error: error getting license License Server communication problem W_ADEPT_CORE_EXPIRED when I try to download a book from the public library using Adobe Digital Editions. It has been working for a few months, but now I suddenly get th

    I have checked and the Adobe Digital Editions is authorized. The library book doesn't expire for another 14 days.  These have been the only two suggestions that I have found in other forums.  Does anyone have any other suggestions?

    I am having this exact issue. I just downloaded a book and went to open it and got this exact problem.
    I purchased he book through indigo/kobo edition and paid for it and immediately went to open it and am getting the same error
    Error getting License. License Server Communication Problem only mine says  Bad Device key after.
    Not sure why someone has not answered this question yet...i am using windows 7 and this is how i always do it. Never had this problem before when purchasing a book.
    i hope someone answers this soon.

  • Syncing & Streaming from the same Library? - Noob question

    Good Evening - I have a silly noob question that I can't believe I can't find the answer to on my own: I have been trying to determine if it is possible to sync and stream from the same library simultaneously.
    I purchased the 40GB aTV and it has been syncing just fine with my Windows iTunes. I told it not to sync a few albums I never listen to so I wouldn't have issues with other songs or movies. I am upgrading to a new iMac and I am am going to re-rip many of my existing CD's to get them into a consistent audio quality of 192 AAC or above. This is going to push my library size to well over the 40GB limit in just music, not including any movies or TV shows I choose to pull in.
    The manual does not make it obvious (or I am not reading clearly) what happens to items that don't sync over - I assume they are still playable but will have to stream. Is there anyway to mark "preferred" albums or artists that should get synced and not streamed in case the iTunes library is unavailable for whatever reason?
    Also, when I change libraries is the aTV going to completely re-sync even though the music is must going to be migrated?
    Thanks for taking the time to answer these silly questions.

    That's not quite what I was looking for.
    My question remains, what happens to the items that can't be synced from my main library to my aTV? My library is just a smidge bigger than the available space on the aTV and not everything syncs over. Does that mean I won't be able to play those items not synced from my main library...
    As my library grows I don't want to have to choose what does and doesn't get synced from my library by mood. For example, every year my wife buys new christmas music - right now I could exclude it and everything else gets copied over, but come thanksgiving that stuff better be there for her and I don't want to choose other music or movies to remove.
    I guess I will just have to play to try it out.

  • Is it posssible to lunch one application from the client system using JSP

    Is it possible to Lunch one application from the client system using JSP or Servlet .If it is possible then how can we do that ?
    Thanks in advance
    Sil

    If its a java application - yes. You can use jnlp and web start.
    ram.

  • Calling web Service from the Custom Adapter.Is it Possible?

    Hi Experts,
                    I am having requirment in which i have to cal com.sap.aii.mapping.lookup.LookupService for calling web Service from the Custom Adapter.Is it Possible?
    Regards,
    Rajesh.D

    Hi Rajesh..
    Just looking the problem in another angle.. if there is no constraint that you have to use XI specific API to call the web service, why dont you use usual Java API used for calling a web service inside you custom adapter (I have Microsoft background.. donno exactly how it is done in Java,, but in .NET kind of a language it is possible). SInce your adapter is in Java itself and is capable of calling web service.. collect or lookup the data whatever you want and validate...
    Just a thought..
    VJ

  • Is it possible to call web service from ABAP SAP 4.6 c..If yes how

    Hi Friends,
    Is it possible to call web service from ABAP-SAP 4.6 c..If yes Could you please let me know how.
    Thanks in Advance.
    Murali Krishna K
    Edited by: Murali Krishna Kakarla on Jan 26, 2008 7:09 PM
    Edited by: Murali Krishna Kakarla on Jan 26, 2008 7:11 PM

    Olivier CHRETIEN wrote:>
    > Hi Terry,
    >
    > So these function modules must use the SAPHTTPA RFC destination which uses the exe saphttp.exe ?
    >
    > How much abap code lines do you have for a web service call ?
    > Do you have to code the call specifically for each different web service ?
    > Are you able to use the WSDL ?
    >
    > Nice job if you have coded your own private SOAP runtime !
    >
    > But I don't think this is an easy solution for everybody...
    >
    > Regards,
    >
    > Olivier
    Yes, SAPHTTPA (runs on application server) and/or SAPHTTP (runs on front-end pc), one of which, is required for HTTP communication.  So far, nothing too elaborate as far as SOAP goes, but the logic is simplistic.  Here's some sample code:
      DEST = 'SAPHTTPA'.
      TRANSLATE HOST TO LOWER CASE.
      MYURL = 'wssrvTest/Service.asmx/GetByOrderItem'.
      CONCATENATE HOST MYURL INTO MYURL.
      REQUEST_HEADERS-DATA = 
                  'Content-type: application/x-www-form-urlencoded'.
      APPEND REQUEST_HEADERS.
      CLEAR REQUEST_HEADERS.
    *........Convert Order Number to External Format........................
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
           EXPORTING
                INPUT  = ORDER
           IMPORTING
                OUTPUT = ORDER.
    *........Convert Item Number to External Format.........................
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
           EXPORTING
                INPUT  = ITEM
           IMPORTING
                OUTPUT = ITEM.
    *........Convert Material Number to External Format.....................
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
           EXPORTING
                INPUT  = MATERIAL
           IMPORTING
                OUTPUT = MATERIAL.
      CONCATENATE 'sOrder=' ORDER
                   INTO REQUEST_BODY-DATA.
      APPEND REQUEST_BODY.
      CLEAR REQUEST_BODY.
      CONCATENATE '&sItem=' ITEM
                   INTO REQUEST_BODY-DATA.
      APPEND REQUEST_BODY.
      CLEAR REQUEST_BODY.
      CONCATENATE '&sMaterial=' MATERIAL
                  INTO REQUEST_BODY-DATA.
      APPEND REQUEST_BODY.
      CLEAR REQUEST_BODY.
      CALL FUNCTION 'HTTP_POST'
           EXPORTING
                ABSOLUTE_URI          = MYURL
                RFC_DESTINATION       = DEST
                BLANKSTOCRLF          = 'X'
           TABLES
                RESPONSE_ENTITY_BODY  = RESPONSE_BODY
                REQUEST_ENTITY_BODY   = REQUEST_BODY
                RESPONSE_HEADERS      = RESPONSE_HEADERS
                REQUEST_HEADERS       = REQUEST_HEADERS
           EXCEPTIONS
                CONNECT_FAILED        = 1
                TIMEOUT               = 2
                INTERNAL_ERROR        = 3
                TCPIP_ERROR           = 4
                DATA_ERROR            = 5
                SYSTEM_FAILURE        = 6
                COMMUNICATION_FAILURE = 7
                OTHERS                = 8.
      CHECK SY-SUBRC = 0.  "more appropriate msg goes here
      LOOP AT RESPONSE_BODY.
        IF RESPONSE_BODY+0(7) <> '<string' AND
           RESPONSE_BODY+0(8) <> '</string' AND
           RESPONSE_BODY+0(5) <> '<?xml'.
          SPLIT RESPONSE_BODY-DATA AT '=' INTO FIELD_NAME FIELD_VALUE.
          TRANSLATE FIELD_NAME TO UPPER CASE.
          CASE FIELD_NAME.
            WHEN 'HEIGHT'.
              HEIGHT = FIELD_VALUE.
            WHEN 'WIDTH'.
              WIDTH = FIELD_VALUE.
            WHEN 'LENGTH'.
              LENGTH = FIELD_VALUE.
            WHEN 'WEIGHT'.
              WEIGHT = FIELD_VALUE.
            WHEN 'QTY'.
              QTY = FIELD_VALUE.
          ENDCASE.
        ENDIF.
      ENDLOOP.
    Hope this helps...
    Terry
    Edited by: Terry West on Feb 4, 2008 3:08 PM

  • It it possible to call web service from SAP 4.6 c..If yes how

    Hi Friends,
    It it possible to call web service from SAP 4.6 c..If yes how
    Thanks in Advance.
    Murali Krishna K

    It is not possible to directly call a web service from SAP 4.6c.
    Indeed, web service enablement is available as from Web AS 6.20, thus as from SAP R/3 4.7
    So as described above, the solution is indeed to make use of PI(XI) for this.
    Rgds,
    Karim

  • Is it possible to call ctx_doc.filter from Java?

    Hello all,
    Is it possible to call ctx_doc.filter from Java?
    If so, do you have a code sample?
    Thanks,
    Marvin

    I have some Java code using ctx_doc.markup that can help:
    try {
    //make db conn
    OracleCallableStatement stmt =(OracleCallableStatement)conn.prepareCall("begin "+
    "ctx_doc.markup(index_name=>'text_idx', "+
    "textkey=>?,"+
    "text_query=>?,"+
    "restab=>?,"+
    "starttag=> '<a>',"+
    "endtag=> '</a>' "+
    "); " +
    "end; ");
    ... // register other parameters
    stmt.registerOutParameter(3, OracleTypes.CLOB);
    stmt.execute();
    oracle.sql.CLOB text_clob=null;
    text_clob = ((OracleCallableStatement)stmt).getCLOB(3);
    // read the CLOB by chunks
    int chunk_size=text_clob.getChunkSize();
    Reader char_stream = text_clob.getCharacterStream();
    char[] char_array = new char[chunk_size];
    for(int n=char_stream.read(char_array);n>0; n=char_stream.read(char_array)){
    out.print(char_array);}
    }catch (SQLException e)

  • Is it possible to call Java routines from FMS?

    Say I have a game package, most of which
    are written in Java. I am thinking
    to leave the core logics in Java, but
    change the user interface into Flash,
    and serve it over FMS. Now is it
    possible to call Java routines from
    FMS?
    I'd appreciate any suggestions.

    Yes! You can use SOAP(or XML-RPC) to call Java routines.
    Relevant link:
    http://www.adobe.com/devnet/flashmediaserver/articles/fms_web_services_05.html
    Btw, does anyone know if there is XML-RPC package for
    FMS?

  • Is their a possibility to call SDK functions from TestStand directly?

    Hello!
    I want to call a function from the Windows SDK.
    Is this possible?
    Regards,
    Brosig
    Using TestStand 3.5 and Windows XP

    Brosig,
    sadly i dont know what the error with the pdb-file could be. but as far
    as i see from the description to the function found here, there should
    be no such dependency.
    please take a look into the "requirements"-section of the link. it
    seems that kernel32.dll is sufficient for usage of the function. and
    for myself, i never had such problems when using the kernel32.dll.....
    one problem could be the type of the parameter you are using. i know
    that there are sometimes odd issues on SDK when the parameters do not
    fit exactly the needed type.  so make sure that all strings are
    null-terminated and the buffers you pass are preallocated!
    Norbert B.
    Edit: forgot the link.....
    Message Edited by Norbert B on 12-22-2005 09:31 AM
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • TypeError: Error #1006 - Removing MovieClip from the stage

    I have a movie clip that is called to the stage and once the movieclip is finished it calls a function that removes it from the stage. The code works but I get an error message about 4 seconds after the movie clip ends.
    Here’s the error message:
    TypeError: Error #1006: exitWordMicroscopic is not a function.
                    at ASvocabulary_microscopic/frame110()[ASvocabulary_microscopic::frame110:1]
    Here’s the stage code:
    //************************Removes the movieclip from the stage and enables the button.*************************
    function exitWordMicroscopic():void
                    bnt_vocab_microscopic.mouseEnabled = true;
                    removeChild(word_Microscopic);
    //******************************Stage buttons**************************************
    stage.addEventListener(MouseEvent.MOUSE_DOWN, goButtonsHomeRead_1);
    function goButtonsHomeRead_1(event:MouseEvent):void
                    //Vocabulary buttons
                    if (event.target == bnt_vocab_microscopic)
                                    bnt_vocab_microscopic.mouseEnabled = false;
                                    SoundMixer.stopAll();
                                    addChild(word_Microscopic);
                                    word_Microscopic.x = 47;
                                    word_Microscopic.y = 120;
    Here’s the code inside the movie clip. This is what the error message is referring to:
    //****************** Calls function to remove itself from the stage****************************
    Object(parent).exitWordMicroscopic();
    What am I doing wrong?

    Here' how the code looks now:
    Objective: To remove the current movieclip while it's playing so that it does not show on the next (or previous) frame.
    Here’s the stage code:
    var word_Microscopic:ASvocabulary_microscopic = new ASvocabulary_microscopic();
    //Removes the movieclip from the stage and enables the button.
    function exitWordMicroscopic():void
        bnt_vocab_microscopic.mouseEnabled = true;
        removeChild(word_Microscopic);
    //******************************Stage buttons**************************************
    stage.addEventListener(MouseEvent.MOUSE_DOWN, goButtonsHomeRead_1);
    function goButtonsHomeRead_1(event:MouseEvent):void
        //Vocabulary buttons
        if (event.target == bnt_vocab_microscopic)
            SoundMixer.stopAll();
            bnt_vocab_microscopic.mouseEnabled = false;
            addChild(word_Microscopic);
            word_Microscopic.x = 47;
            word_Microscopic.y = 120;
            word_Microscopic.play();
    //This button takes the user to the Main Screen
        if (event.target == bnt_ReadGoHome_1)
           // exitWordMicroscopic(); [If I use this function I get this error ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.]
            SoundMixer.stopAll();
            gotoAndPlay("1","Main");
            stage.removeEventListener(MouseEvent.MOUSE_DOWN, goButtonsHomeRead_1);
    //This takes the user to the next frame.
    if (event.target == GoNext_1)
            SoundMixer.stopAll();
            gotoAndPlay("2");
            stage.removeEventListener(MouseEvent.MOUSE_DOWN, goButtonsHomeRead_1);
    Here’s the code inside the movie clip.
    //****************** Calls function to remove itself from the stage****************************
    Object(parent).exitWordMicroscopic();

  • Randomly generating movieClips from the library onto the stage

    Hi
    I am trying to call objects from the library for a collection game.
    Having major issues with the best way to assign the good objects and the bad objects to later update a score.
    Can anyone help me with how i can first assign the movieClips from the library into a good and bad array and then after randomally fill the stage with them.
    Regards
    James

    again and always when testing in the ide, use the trace() function to debug your code:
    public function checkCollisions()
                                  for (var i:int = objects.length - 1; i >= 0; i--)
                                            if (Point.distance(new Point(gamesprite.car.x,gamesprite.car.y),new Point(objects[i].x,objects[i].y)) < pickupDistance)
                                                      if (objects[i].hitTestobjects(gamesprite.car))
                                                                if (objects[i].typestr == "good")
                                                                          score +=  10;
                                                                          trace(score);
                                                                else
                                                                          score -=  4;
                                                                          trace(score);
                                                                if (score < 0)
                                                                          score = 0;
                                                                scoreDisplay.text = String(score);
    trace(scoreDisplay.text);
                                                                removeChild(objects[i]);
                                                                objects.splice(i,1);
    if you don't see any trace() output, you can conclude that part of your code is not executing.  if see trace output, you can don't see the same value in scoreDisplay, you can conclude you're not seeing your scoreDisplay textfield.

Maybe you are looking for

  • How do I import bookmarks on an XP computer to one with Windows 7, both have Firefox 4.o

    The XP computer is a 5 year old Dell and the Windows 7 is a new HP Pavilion G7 laptop. I was confused over the differences in the appearance of Firefox on both since they are both v4.o. I was able to download my bookmarks to a .json file from my XP c

  • Payroll scipts

    Good day I'm an apps dba and I have been tasked to write the follwing reports and I dont know where to start. Payroll 1.     Report on employee bank account numbers that appear on the vendor master file (Creditors). 2.     Report on where more than o

  • Reinstallation message: Could not locate Resources file in Configuration folder

    I have new computer. Was running XP on old computer for CS4 Web Premium. Uninstalled from XP. Can't install on new machine with Windows 7. Getting error: Could not locate the Resouirces file in Configuration folder for Dreamweaver (and all other prog

  • Vendor list with complete address with contact nos.

    dear i want to export the vendor list with complete address and contact nos. i use <b>mkvz</b> for list of all the vendors but i do not get the address and contact no. pls send the t-code or any setting parameters for the same regds devesh

  • Help with QOS rules while using Actiontec router as a bridge

    In my family's house I have a Verizon Actiontec MI424-WR Rev F currently acting as strictly a modem with WiFi turned off. I connected a Netgear N600 from its LAN port to the Actiontec's LAN port and that is acting as my wireless network. I did this b