Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8923205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:03:27+00:00 2026-06-15T07:03:27+00:00

I have a flash/flex object that is generating xml based on user interactions. I

  • 0

I have a flash/flex object that is generating xml based on user interactions.
I want to pass an xml string to javascript so that it can make a web service call.

How do I pass the XML back to Javascript?

examples:

html:

     <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"
                id="My">
 <param name="movie" value="My.swf" />
            <param name="quality" value="high" />
            <param name="bgcolor" value="#ffffff" />
            <param name="allowScriptAccess" value="sameDomain" />
            <param name="allowFullScreen" value="true" />
      </object>

javascript to initialized

 var swfVersionStr = "10.2.0";
 var xiSwfUrlStr = "playerProductInstall.swf";
 var flashvars = {};

 var attributes = {};
 flashvars.servicePath = "services/";
 flashvars.isSaved = "false";
 flashvars.savedXML;
 var params=   {
            quality = "high";
            bgcolor = "#ffffff";
            allowscriptaccess = "sameDomain";
            allowfullscreen = "true";
            wmode = "transparent";
        };

  swfobject.embedSWF(
                "My.swf", "flashContent",
                "100%", "100%",
                swfVersionStr, xiSwfUrlStr,
                flashvars, params, attributes);

Javascript to get XML from flash/flex

var flashObject = document.contentWindow.getFlashObject();
flashObject.saveXml();
var xmlFromFlex = flashObject.savedXML; /*This is where I don't know how to get/set*/
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T07:03:33+00:00Added an answer on June 15, 2026 at 7:03 am

    You need to use ExternalInterface.call:

    import flash.external.*; 
    var JSvalue:String; 
    JSvalue = ExternalInterface.call('JsTestFunction','Work_Damn_It'); 
    

    More information available here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to clear a Flex flash.utils.Dictionary ? I have a Dictionary that
I have a Flash/Flex object (Flashlight-VNC), which I would like to dynamically resize to
i have a mobile application that i am creating in Adobe Flex (Flash Builder
In flex (flash builder 4) I have a Date() property that I am passing
I am using Flex 3 under Flash Player 9. I have a datagrid that
I have a flash (flex) web application and when it first loads the cursos
I have a flash app using the flex framework - I would like to
I have a Joomla site and a Flash app (in Flex, if it matters).
I have two noobish questions about Flash, Actionscript, Flex etc. 1) With these technologies
I have a flash element (I know, but please don't) with a settings.xml file.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.