Loading Flash AS3/XML into Flex 3

I'm seriously at a loss.
I'm loading a Flash AS3 SWF into Flex via SWFloader and it
will not load the xml data the file normally loads. The Flash file
is fairly basic and loads XML data from a local file.
I've tried all sorts of scoping within the Flash file
pointing to the xml file just in case but still nothing. What do I
need to do to get this file to read the XML through Flex 3?
<mx:SWFLoader x="9" y="14" width="140" height="90"
source="swfs/sponsors/top_sponsors.swf"/>
The xml file is in the same directory.

The migration of this file to proper AS3 is brutal. It would
be easier to just rewrite the whole thing in flex. Screw it.

Similar Messages

  • I Need a Pageflip Book for Flash AS3 Website (non-flex based)?

    Hello,
    I am rebuilding my website from a simple html based website to a Flash AS3 website. The problem I've run into is that I can not get my flex based flipbook onto my Flash AS3 website.
    Apparently AS3 is not flex base compatible. Does anyone know a pageflip book program I can use in Flash AS3? Oh, one more thing. I do not know computer code. I need something like Bannerzest. Thank you.

    for example , I have a book ..
    which has these chapters....
    Introducing Adobe Flex 2
    Working with MXML in Adobe Flex 2
    Working with ActionScript in Adobe Flex 2
    Nowhere , in this book ...integration with J2EE application has been described .
    can we really use it for J2EE application ? or I am chasing in wrong direction ?

  • Loading a solution file into flex

    I seem to be having difficulty loading ex10_solution.zip into
    the flex builder. I went wrong somewhere in my own code and wanted
    to load this into flex for comparison, however, when I import from
    the archive, flex asks me to update the path variables. I tried to
    change the root folder to Coldfusion8/wwwroot/WEB-INF/flex/, but
    this didn't work. This is also specifically where the files that
    flex is looking for are located. I'm guessing it's a file
    permission issue (i'm using mac osX leopard), but I'm not sure
    which permissions to change exactly, any help would be great!
    Thanks

    You can create a new Flex project. Then paste all of the
    files into your new flex project.

  • Flash/AS3/XML - not loading after XML edits

    HI all,
    I apologize in advance for not being able to give a lot of information. I'm working with a proprietary template for e-learning and trying to get it to work. But, regardless, here's the situation.
    Building e-learning using a Flash and AS3 template that has several parts and relies on one XML file for all content. There is an index (Flash) page that serves as the shell for the entire module. That index page 'hosts' a language selection menu, main menu, and the stage for .swf files that are 'pages' of each chapter. Each 'page' has several 'clips' inside of it (images, text, audio, etc.).
    The XML is structured as such (N = number of items total, X = specific number of that item):
    <xml>
         <course (with title and several other attributes)>
              <chapter type="chapter" title="Title of Chapter">
                   <page>
                        <file><![CDATA[pagedirectory/pageX...N.swf]]></file>
                        <clipX1...N audio='audiodirectory/audio_X...N'> <![CDATA[If there is any on-screen text, this is where it goes.]]></clipX...N>
                        <ccX...N><![CDATA[This is for the closed captioning; all script/audio text is here.]]></ccX...N>
                   </page>
              </chapter>
    etc. for as many chapters as there are.
    The XML file structure is a little odd, but it works...usually. For some reason though, I broke it.
    I put in "chapter 0" which is the introduction. Everything runs smoothly, but then when I add another chapter, the main menu won't load. I assumed this to be something in my XML syntax; however, I've checked over it, including the new stuff I added. BTW: The main menu is populated by the "Chapter" attributes in the XML.
    So, I guess my question is two-fold, and I understand that I may only get very general answers (or questions that relate to specifics):
    Are there things in XML files that when used by AS/Flash simply don't work? I've already checked for "&" and other characters... but are there some other ones?
    Any other guesses as to why the main menu loads when only one chapter is in the XML, but not when there are two? Again, I've check for tag accuracy, etc. What could I be missing though?
    Thanks!
    Andy

    Update. Flash preview gives me this error:
    "TypeError: Error #1085: The element type "cc5" must be terminated by the matching end-tag "</cc5>"."
    I have checked all "cc5" tags in the XML and all are closed by </cc5> ... ?
    AS

  • Load variables from XML into Flash

    I was wondering how to load variables from an XML document to
    a Flash file? I am familiar with the code to do it for a text file,
    but was wondering how to do it for XML.
    Many thanks in advance!
    JJ

    Thanks for the recommendation on the site. What I am trying
    to do is load varaibles from an XML file into text boxes in my
    flash movie.
    Here is my loading:
    var my_xml = new XML();
    my_xml.ignoreWhite = true;
    my_xml.onLoad = function(success){
    if (success) {
    gotoAndStop("slide01");
    my_xml.load("narration.xml");
    this is what I have on my frame with the text boxes (the text
    boxes are also have the variable name in the variable area)
    var narration = my_xml.picture01;
    var my_title = my_xml.my_title;
    var my_date = my_xml.my_date;
    should I do my_date.text = my_xml.my_date; instead?
    my xml doc looks like this
    <?xml version="1.0" encoding="iso-8859-1"?>
    <picture01>This is the text for picture
    01</picture01>
    <picture02>This is the text for picture
    02</picture02>
    <my_title>Las Vegas</my_title>
    <my_date>October</my_date>
    Any help on this would be GREATLY appreciated!
    Text
    my_date.text = my_xml.my_date;

  • Problem in load data from XML in Flex 4

    Hi Everyone,
    I tried all the possible ways which ever i know to load the data from XML to Flash Builder (Flex 4). Actually i want to load the data from XML to Datagrid. The project is executed without any error and warnings but the data is not loaded into datagrid. i will paste the coding below if anyone know the solution please let me know. Waiting for reply.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
         xmlns:s="library://ns.adobe.com/flex/spark"
         xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="userRequest.send(); ">
    <fx:Declarations>
         <s:HTTPService id="userRequest" url="xdata.xml" useProxy="false" resultFormat="e4x" />
    </fx:Declarations>
    <mx:DataGrid id="dgUserRequest" x="20" y="160" dataProvider="{userRequest.lastResult.user}" >
         <mx:columns>
              <mx:DataGridColumn headerText="User ID" dataField="id"/>
              <mx:DataGridColumn headerText="User Name" dataField="name"/>
         </mx:columns>
    </mx:DataGrid> 
    </s:Application>

    It is better to add result handler to the HttpService and debug to see the actual structure of the xml.

  • Issues with loading flash as3 animation in Captivate

    Hello Everyone,
    I have a flash file that pulls together two external swf files and displays them one after the other. This flash file has only the AS3 code to display the two external swf files. The external swfs are in the same folder as the final flash file. When I insert the final flash animation into Captivate using the Insert-->animation feature in Captivate, and view the published the file, the swf file starts automatically playing right from the first slide till the end of the project. The swf file is actually placed in the second slide of Captivate. Has anyone had similar experience? Am I missing something?
    Thank you.

    In all probability there's something wrong with your AS3 code and it's not working once you add your loader SWF into a Captivate movie.  This may be due to the fact that the Captivate movie is also a Flash Movie Clip too.  So if your AS3 code has the loader looking for the other two SWFs at the same level it's never going to find them once you add it into Captivate because it's buried one level too far down.  Change your AS3 code to allow for this and things might start working.

  • Flash AS3 & XML

    I was wondering if someone can help me.  I am doing a project that consists of AS3 in flash an importing an external xml data that will populate dynamic data in text fields in my flash project.  The xml is all ready set up  (pre exsisting)  data. The structure of the XML Code looks like this:
    <GlobalDynamicData xmlns:xsi"http://www.w3.org/2001/xmlschema-instance">
    <schema version 1.0.0>version 1</schemaversion>
    <DynamicDataFields>
    <DynamicDataField>
    <DataField> AlertOn</DataField>
    <DataValue>0</DataValue
    <DataValueChange>2010-08-07</DataValueChange>
    </DynamicDataFields>
    <DynamicDataFields>
    <DynamicDataField>
    <DataField> AlertImage1</DataField>
    <DataValue>example.jpg</DataValue
    <DataValueChange>2010-08-07</DataValueChange>
    </DynamicDataFields>
    </GlobalDynamicData>
    Yes,  as you can see the XML  was created  with the same  "DynamicDataField" and "DataField"  for all information data.  (There is 4 pages of data with the same structure) I am confused and I dont know how to create the ActionScript to pull this data in my .swf    The only way I know how to dynamically populate text fields using XML and actionscript  is the code below:
    My action script-------->
    my xml document is called: CMS_GD_AlertData.xml
    <XML>
          <ConfigureItems>
    <ConfigureItems>
    <owner_name> example</owner_name>
    <steve_name>  example2   </steve_name>
    <jack_name>   example3   </jack_name>
    <ken_name>   example4   </ken_name>
    <AlertVicOther> example 5</AlertVicOther>
    Then my instance name for the dynamic text box is called: ownerName_txt, steve_txt, jack_text......  (etc)
    var myXML:XML = new XML();
    var XML_URL:String = "CMS_GD_AlertData.xml";
    var myXMLURL:URLRequest = new URLRequest(XML_URL);
    var myLoader:URLLoader = new URLLoader(myXMLURL);
    myLoader.addEventListener("complete", xmlLoaded);
    function xmlLoaded(event:Event):void {
        myXML = XML(myLoader.data);
    var xmlDoc:XMLDocument = new XMLDocument();
        xmlDoc.ignoreWhite = true;
        var menuXML:XML = XML(myLoader.data);
        xmlDoc.parseXML(menuXML.toXMLString());
    for each (var ConfigItems:XML in myXML..ConfigureItems) {
            // Set the external values into local vars for simpler script use below
        var ownerName:String = ConfigItems.owner_name.toString();
    var steveName:String = ConfigItems.steve_name.toString();
    var jackName:String = ConfigItems.jack_name.toString();
    var AlertVicOther:String = ConfigItems.AlertVicOther.toString();
        var bgColor:String = ConfigItems.background_color.toString();
        var bgSize:Number = ConfigItems.background_size.toString();
            // And apply those variables now to the stage elements or whatever the use
        ownerName_txt.text = ownerName;
    steve_txt.text = steveName;
    jack_text.text = jackName;
    message_text.text = AlertVicOther;
        myBG.width = bgSize;
        myBG.height = bgSize;
            myBG.gotoAndStop(bgColor);
    which works fine, 
    My question to everyone is How do tell flash to pull specific dynamic data if all the datafields are exactly the same... I would think all data fields that are named have to be diffrent  so when you script the code you are telling flash to go to that data source and pull from that record.  if you have the same naming convention how does flash know which one to pull from if they all have the same name..
    Please help.
    thank you

    Try to work thru the tutorial linked below, and maybe you can gain some insight as to how to deal with an xml structure that has multiple sets of data.
    http://www.gotoandlearn.com/play.php?id=64

  • Is it possible to Load External SWF files into Flex Mobile projects?

    Hi Guys,
    I'm trying to load an external asset in this cse (a SWF file) into my flex project (Apple IOS IPAD), don't get any luck. Can any one suggest a solution ?

    In Apple's words, "No interpreted code may be downloaded or used in an Application except for code that is interpreted and run by Apple's Documented APIs and built-in interpreter(s)".
    Hence external swfs cannot be loaded in iOS.

  • How to Load a html page into Flex the application?

    I want to load separate html page in to my flex application.
    for example
    think I am in my shopping cart and I wanna buy something and pay for that.Then I am try to pay they will load a separate html page into my shoipping cart.
    How can I do that inside flex application?
    Any ideas are appreciated..
    thnx

    Hi snkd,
    You need to make use of iframe to load html content in Flex application.
    Check out the link below...there is also source code included..
    http://www.deitte.com/archives/2006/08/finally_updated.htm
    Thanks,
    Bhasker

  • How can I Load Real-Time XML into SWF

    Hi,
    I am a newbie and I need to load data from an XML file but the data is changed constantly. Is there a way to have the SWF refresh instead of caching the XML content at the first load.
    My current code is as following:
    var index:Number = 0;
    var myxml:XML = new XML();
    myxml.ignoreWhite = true;
    myxml.onLoad = function(success:Boolean):Void{
              loadData();
              setInterval(loadData, 3000);
    function loadData(){
              var messages:XMLNode = myxml.firstChild;
              if(index >= messages.childNodes.length)
                        index = 0;
              var my_message:XMLNode = messages.childNodes[index];
              _root.status_1.htmlText = my_message.childNodes[0].firstChild.nodeValue;
              _root.status_2.htmlText = my_message.childNodes[1].firstChild.nodeValue;
              _root.status_3.htmlText = my_message.childNodes[2].firstChild.nodeValue;
              _root.status_4.htmlText = my_message.childNodes[3].firstChild.nodeValue;
              _root.status_5.htmlText = my_message.childNodes[4].firstChild.nodeValue;
              _root.status_6.htmlText = my_message.childNodes[5].firstChild.nodeValue;
                index++;
    myxml.load("data.xml");
    BTW: the XML is going to be on a remote site.
    Thanks

    you can append a changing varialbe to the data.xml file name to prevent cache retrieval and you can use a loop to periodically load the data but your biggest issue will be loading a cross-domain xml file.  you will need to add cross-domain policy files to the xml hosting site or use a server-side file to serve as a gateway between your swf and the xml file.

  • How to use .as files from AS3 project into Flex project

    I'm new.
    I created a ActionScript 3 project
    I created 2  .as  files, which put up a Sprite which moved around.  It worked fine.
    Now, I want to put that onto my web-site.
    So I created a Flex Builder 3 project.
    I moved those 2 .as files into it.
    I added code to access and display the moving Sprite.
    But, each attempt gave me an empty screen.
    My main confusion is the following:
    I have class  BaseClass in file 1
    and  SubBaseClass extends BaseClass in file 2.
    Within the Flex project  .mxml  file, how do I reference the  SubBaseClass so that the object will appear?
    I tried things like:
    <mx:Application ... completionComplete="init()" >
    <mx:Script>
    <![CDATA[
    public function init():void
      var myclass:SubBaseClass = new SubBaseClass();
      addChild(myclass);
    etc (ending stuff)
    What do I need to do to make this work
    Thanks
    ---- john

    I have done what you have recommended, the ear file is successfully created.
    However when I deploy to the J2EE server, I get the following error.
    Result
    => deployment aborted : file:/C:/DOCUME~1/xxxxx/LOCALS~1/Temp/temp41836xBtrService.ear
    Aborted: development component 'xBtrService'/'abc.com'/'localhost'/'2005.06.22.17.30.10':
    Caught exception during application deployment from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Cannot deploy application abc.com/xBtrService.. Reason: Exception during generation of components of application abc.com/xBtrService in container EJBContainer.; nested exception is:      com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Exception during generation of components of application abc.com/xBtrService in container EJBContainer.
    (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).REMEXC)
    Deployment exception : The deployment of at least one item aborted.
    Thanks,
    Manik

  • Loading Large XML into Oracle Database

    Hi,
    I am fairly new to XML DB. I have been successful in registering a schema to a table in the Database. Now, I have to load the appropriate XML into that table. I am using the Simple Bulk Loader program found on this oracle site, however, when I load my XML file I get the following error: ORA-21700: object does not exist or is marked for delete.
    So, I figured maybe simple bulk loader cannot handle large files? So I reduced my XML file and loaded it with the program and it worked. However, does anyone know how I can load large files into my registered schema table.
    Thanks,
    Prerna :o)

    Did you specify genTables true or false when registering the XML Schema ?
    Does you XML schema contain a recursive definition
    Is it possible that after reducing the size of the document you no longer have nodes that contain recursive structures...

  • Embed AS3 swf into a AS2 FLA?

    HI, I have a flash site designed in AS2 and want to embed a
    AS3 video player in it. If I republish the AS2 site to AS3 the
    website doesnt function, and if I load the AS3 swf into the
    website, the Player doesnt function.
    I need the AS2 functionality on the website and I need the
    advanced AS3 functionality on the video Player.
    Is there any way to get these two guys to talk to each
    other?

    Creating a 3rd fla, to load the AS2 Fla and the AS3 FLA just
    aint gonna fly. This website is updated daily and its just too much
    of a maintenance nightmare.
    However, I do want to use Wabbits suggestion but I dont know
    how to create a web object.
    The GetURL function opens the swf on its own, which I dont
    want to do. I want it to open the AS3 SWF in a small window within
    the page.
    Can someone help please? Thanks in advance,

  • Getting the ESRIA Dashboard to import correctly into Flex Builder 3.

    Hi there,
    I'm new to flex and am trying to load the source code into
    Flex Builder 3 for the example at the following URL.
    http://www.adobe.com/devnet/flex/samples/dashboard/dashboard.html
    However, I keep receiving the following error:
    * unable to open 'C:\projects\Dashboard\libs'
    Is there something missing here.
    The demo works online.
    Thanks,
    Anthony

    I finally found a solution that works via http://forums.adobe.com/thread/830358
    Basically this is what the mxml file looks like:
    "FlixelExample" being the .as file that start the game I created.
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                                     xmlns:s="library://ns.adobe.com/flex/spark"
                                     xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="800" minHeight="600"
                                     applicationComplete="init();">
      <fx:Script>
                        private var object:FlixelExample;
                        private function init():void {
                                  object = new FlixelExample();
                                  stage.addChild(object);
      </fx:Script>
      <fx:Declarations>
      <!-- Place non-visual elements (e.g., services, value objects) here -->
      </fx:Declarations>
    </s:WindowedApplication>
    Thanks,
    Rob

Maybe you are looking for

  • CcBPM, how to capture error message in the exception branch ?

    Hi, Can I capture error message in the exception branch ? how to do that ? because i want to raise the alert including with the error message ? Cheers Fernand

  • IDX1 : Is it necessary for SOAP - XI - RFC?

    hi, I have designed an integration scenario in which my web application will send request using SOAP over HTTP protocol. The XI system will host a web service and by generating the WSDL i will generate the proxy class using which I will comunicate wi

  • Conditional Build Tags - How Many is Too Many?

    Has anyone ever run into problems generating a project because of too many conditional build tags? I'm new to this and considering using quite a few in a particular project - unless I find that overuse will compromise the project on the backend. I'd

  • MRD Error on Mac

    Sometimes I connect fine. Others I cannot. Sometimes I AM connected and in the middle of work, then it freezes and the error message comes. Here is the error message I am getting: "Unable to connect to remote PC. Please verify Remote Desktop is enabl

  • Palm Desktop Software for Mac Oddity

    I'm curious as to why the Month View shows the 'Un-timed' events in a staggered layout across the week thus eliminating the view of anything below that is just out of the day's window view. As in: file:///Users/patrickforbes/Desktop/Picture%201.png T