Media files prevent Flash from fully loading external XML file

Im trying to debug a flash widget we created, and it loads
fine on the 20 odd computers we tested on EXCEPT for one computer
where, the application doesn't load an external XML file that calls
for 3 small mp3 files and a FLV file to load as well.
In a debugger, we noticed that when it tried to load these
mp3 files it was getting a Forbidden access message. The FLV just
prevents the FLV player from showing up at all (not even the skin).
Can anyone figure out why, that it would work over all the
other computers and NOT the one? On that person's computer, we
tried it in IE, Firefox, even Chrome and the application doesn't
load. We even cleared the cache, did a hard refresh and still
nothing.
However, the other computers work just fine.
ALL the computers have the latest Flash software installed.
What could cause this problem?

Actually what worked was removing 'xmldoc' from the php script. So $data =$GLOBALS["HTTP_RAW_POST_DATA"]; instead of $data = xmldoc($GLOBALS["HTTP_RAW_POST_DATA"]);
Couldn't find anything about 'xmldoc'. Is it used for anything in php?
Anyway, the loading error went away, but then I got into problems with getting the return echoed values back. The textfield stayed empty even when saving the data.txt file worked.
I then placed the <stuff> tags between <root> tags and then flash got the sentences between the <stuff> tags back. Why does Flash need the returned xml output to be between <root> tags for it to see the content between the <stuff> tags? So why do I need to use echo("<root><stuff>Server unable to create file.</stuff></root>"); instead of cho("<stuff>Server unable to create file.</stuff>");?

Similar Messages

  • Firefox flash plugin not loading external xml file?

    I have a Flash based website that uses an external xml file
    to load the interface and navigation. When I view the site in
    Firefox it never seems to load the xml file therefore the interface
    doesn't load.
    Any ideas?

    Hi,
    I have followed your instructions and could able to get it working for firefox. The sameway i tried with mozilla, but not working. This time, I didnt see any errors but it is not working as expected (no animations / images displayed)
    So could you please help me.
    My system config. is X86 Solaris 5.10.
    bash-3.00# pwd
    /usr/sfw/lib/mozilla/plugins
    bash-3.00# elfdump -e libflashplayer.so
    ELF Header
      ei_magic:   { 0x7f, E, L, F }
      ei_class:   ELFCLASS32          ei_data:      ELFDATA2LSB
      e_machine:  EM_386              e_version:    EV_CURRENT
      e_type:     ET_DYN
      e_flags:                     0
      e_entry:                  0x94  e_ehsize:     52  e_shstrndx:   37
      e_shoff:              0x7fb4ac  e_shentsize:  40  e_shnum:      39
      e_phoff:                  0x34  e_phentsize:  32  e_phnum:       3Thanks
    Ram.

  • Load external XML file

    I am trying to write a test program. I have a program that is
    going to get it's data from an XML file when it is first loaded.
    That XML file is going to be a local file that sit's in same folder
    as the flex program (rather than online or through a url address).
    Basically, I'm trying to find a way to open or load that file, then
    parse through it and store the xml data, then close the xml file
    (rather than using an rss feed). Everything I'm finding is only
    telling me how to load the data in through a url address. Is there
    any simple way to open a text or xml file?

    i'm goign crazzzzy here.
    i have a list, that reads XML.
    i want that list to update on production without me having to
    build the project all the time, but by just uploading a new XML
    file.
    i think the function i need is this:
    [code]
    private function LoadMyXML():void
    var myXML:XML = new XML();
    var XML_URL:String = "xml/AO_Other.xml";
    var myXMLURL:URLRequest = new URLRequest(XML_URL);
    var myLoader:URLLoader = new URLLoader(myXMLURL);
    myLoader.addEventListener("complete", xmlLoaded);
    function xmlLoaded(evtObj:Event)
    myXML = XML(myLoader.data);
    trace("Data loaded.");
    [/code]
    my xml looks like this:
    [code]
    <AO_OTHER>
    <category title="Administrative Groups">
    <link title="Administrative Groups" url="sadfsf"/>
    </category>
    <category title="AO Survey Results">
    <link title="AO Survey Results" url="sdfsdf202.pdf"/>
    </category>
    </AO_OTHER>
    [/code]
    and the error i keep getting is htis:
    TypeError: Error #1090: XML parser failure: element is
    malformed.
    at
    TabTest/private:LoadMyXML/xmlLoaded()[C:\Flex\SearchTest\TabTest.mxml:25]
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/flash.net:URLLoader::onComplete()
    what am i doing wrong?
    am i even going though this the right way?
    thanks!

  • Updating flash from a dynamically changing XML file

    Creating a non-interactive status display: I want to have the
    flash display reflect data in a server-based XML-file. So far this
    is easy. But I want the display to change everytime the XML file
    changes-- in order to reflect status changes. I've used an
    XMLConnector and specified it and the trigger in the first frame.
    The Flash code catches and shows the XML values initially . But
    when I edit the XML file, the new values are never picked up by
    Flash- its almost as though the values are cached. How do I get
    Flash to regularly be updated from a changing XML file? I've also
    tried putting the trigger in a loop- but that doesn't work
    either.

    I DID find a solution with setInterval, but there is still a
    problem of a diffeent sort.
    When using XMLConnector, it appears that
    XMLConnector.trigger() is the thing that goes out and gets new data
    from the server. so:
    function checkForData():Void {
    myXML.trigger();
    <<handle new values of bound data>>
    var intervalID:Number = setInterval(checkForData, 10000);
    works very well by executing the trigger every 10000
    timeunits. This all works when run in the Flash Player. However, if
    I embed the thing in a webpage (with either FireFox or IE7 or 6),
    It stops triggering after the first time. Interestingly if I also
    run the Flash Player version, then the web version keeps updating,
    but stops if I kill the Player. So, I'm wondering: whats up with
    this?

  • Sending variable value from php to flash to load an xml file

    I would like to load an XML file from the location locally or on the server being unaware of the name of the file. I am using PHP for sending the filename to Flash.
    The below is the PHP code:
    <?php
    filesInDir('C:\Documents and Settings\457305\My Documents\shrikant\Flash Tutorials\webassist');
    function filesInDir($tdir)
            $dirs = scandir($tdir);
            foreach($dirs as $file)
                    if (($file == '.')||($file == '..'))
                    elseif (is_dir($tdir.'/'.$file))
                            filesInDir($tdir.'/'.$file);
                    else
                            echo "fileName=$file";
    ?>
    And below is the loading Actionscript code:
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.Event;
    import flash.net.URLVariables;
    stop();
    // Define the PHP file to be loaded
    var phpFile:String = "http://localhost/webassist/test.php";
    var cons_xml:XML;
    var xmlLoader:URLLoader = new URLLoader();
    // Specify dataFormat property of the URLLoader to be "VARIABLES"
    // This ensures variables loaded into Flash with same variable names
    xmlLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
    xmlLoader.load(new URLRequest(phpFile));
    xmlLoader.addEventListener(Event.COMPLETE, processXML);
    function processXML(evt:Event):void
              trace(evt.target.data.fileName);
              //cons_xml = new XML(evt.target.data.fileName);
              //gotoAndPlay(2);
    When I trace the evt.target.data it displays "fileName=mainOpenEndedXML%2Exml" and when I trace evt.target.data.fileName the fileName is properly displayed as "mainOpenEndedXML.xml".
    But in the next two lines where the loading occurs it does not load the file i.e the swf file from xml doesn't play.
    I have been searching the Internet for answers but not able to find any solutions.
    The loading works properly if i directly insert the xml file in the code and the swf's in the XML file play propertly. The below is the code for the same:
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.Event;
    import flash.net.URLVariables;
    stop();
    var cons_xml:XML;
    var xmlLoader:URLLoader = new URLLoader();
    xmlLoader.load(new URLRequest("mainOpenEndedXML.xml"));
    xmlLoader.addEventListener(Event.COMPLETE, processXML);
    function processXML(evt:Event):void
              cons_xml = new XML(evt.target.data);
              gotoAndPlay(2);
    Any help on this would be greatly appreciated

    Yes. you already said that, but I guess you don't understand what I said.  You are loading the PHP fle to get the filename, but nowhere are you taking that filename and loading the file that was named. 
    You need to do two loading operations.  The first one to get the filename, and the second to load the file with that name.  Maybe if you name the PHP file loader phpLoader instead of xmlLoader it will start to make more sense to you.  Something like the following...
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.Event;
    import flash.net.URLVariables;
    stop();
    // Define the PHP file to be loaded
    var phpFile:String = "http://localhost/webassist/test.php";
    var phpLoader:URLLoader = new URLLoader();
    // Specify dataFormat property of the URLLoader to be "VARIABLES"
    // This ensures variables loaded into Flash with same variable names
    phpLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
    phpLoader.load(new URLRequest(phpFile));
    phpLoader.addEventListener(Event.COMPLETE, processPHP);
    function processPHP(evt:Event):void
             var xmlLoader:URLLoader = new URLLoader();
             xmlLoader.load(new URLRequest(String(evt.target.data.fileName)));
             xmlLoader.addEventListener(Event.COMPLETE, processXML);
    var cons_xml:XML;
    function processXML(evt:Event):void
              cons_xml = new XML(evt.target.data);
              gotoAndPlay(2);

  • Using Flashvars to load external mp3 files

    I am trying to find a very good step by step tutorial on using "Flashvars" to load external mp3 files, I have been searching on google and the many I have found fall short in some way or another. From what I have been able to gather, I have tried using the code in red (commented out), which works, and modify it to use "Flashvars". The code that works, the mp3 file is hard coded, but my goal is to use "Flashvars" which I am attempting to do in the code following the code in red. I am also including the html code. Any help will be greatly appreciated.
    Thanks,
    David
    var soundReq:URLRequest = new URLRequest("mardi_gras2.mp3");
    var sound:Sound = new Sound();
    sound.load(soundReq);
    sound.addEventListener(Event.COMPLETE, onComplete);
    function onComplete(event:Event):void
        sound.play();
    var soundReq:URLRequest = new URLRequest(root.loaderInfo.parameters.audio);
    var sound:Sound = new Sound();
    sound.load(soundReq);
    sound.addEventListener(Event.COMPLETE, onComplete);
    function onComplete(event:Event):void
        sound.play();
    HTML CODE
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="550" height="400" id="mySoundvars" align="middle">
        <param name="allowScriptAccess" value="sameDomain" />
        <param name="allowFullScreen" value="false" />
        <param name="movie" value="mySoundvars.swf" />
       <param name="FlashVars" value="audio=mardi_gras2.mp3" />
        <param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />    <embed src="mySoundvars.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="mySoundvars" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" FlashVars="audio=mardi_gras2.mp3" />

    Ok waterlovinguy,
    I went back to my original code, and I got things to work... I think my whole issue was with the HTML CODE. So I decided to use the "SWFObject generator". I had never used it before, frankly I had never heard of it until I started my searches on "Flashvars".
    Thank you very much for all your assistance, PEACE,
    David
    Final Codes below
    var my_var:String = new String();
    my_var = root.loaderInfo.parameters.myflashvar;
    myText.text = my_var;
    var soundReq:URLRequest = new URLRequest(root.loaderInfo.parameters.audio);
    var sound:Sound = new Sound();
    var soundControl:SoundChannel = new SoundChannel;
    sound.load(soundReq);
    play_btn.addEventListener(MouseEvent.CLICK, playSound);
    stop_btn.addEventListener(MouseEvent.CLICK, stopSound);
    function playSound(event:MouseEvent):void
        SoundMixer.stopAll();
        soundControl = sound.play();
    function stopSound(event:MouseEvent):void
        soundControl.stop();
    HTML Code
                    <!>>
                    <!<![endif]>
                        http://www.adobe.com/go/getflashplayer
                        </a>
                    <!>>
                    </object>
                    <!<![endif]>
                </object

  • External XML files in Flash iPhone apps

    Hi everyone. I know that apple has loosened up on what is and isn't allowed on the app store these days, such as flash. I was thinking of writing an app that would call upon a web based xml file to call up pictures to display in the iPhone.
    I know Apple doesn't allow apps that call upon external scripts but it's not an executable script, its a list of images and where they are stored. Does anybody have any input on whether Apple may have a problem with this?
    Cheers

    don't know.
    I'm not sure of the differences between actionscript in flash and javascript in the browser but you could call for an XML file to be sent as json data from the script if accessing external XML files directly is not allowed.
    Problem is that XML can contain anything you want it too... it could contain a script itself.

  • Trouble with loading external mp3 files

    I apologize for the length of the post. I hope this is clear
    of what I am trying to explain.
    My problem deals with getting "undefined" when I press a
    button to load an external mp3 files. The following is what my XML
    childNode looks like:
    <option phonetic="Soundless, or A" name="aleph"
    cursive="alephCursive.swf" block="alephBlock.swf"
    audio="char1.mp3"/>
    Every attribute loads the way I've programmed them, except
    for the last one "audio".
    The following is what my actionscript looks like loading in
    these attributes:
    Everything is happening inside the onLoad event for my XML
    file.
    var xmlContent = this.firstChild.firstChild;
    audioContent = new Array();
    for (var i = 0;
    i<this.firstChild.firstChild.childNodes.length; i++) {
    nextEntry = xmlContent.childNodes
    audioContent = [nextEntry.attributes.phonetic,
    nextEntry.attributes.name, nextEntry.attributes.cursive,
    extEntry.attributes.block, nextEntry.attributes.audio];
    The code above simply adds each attribute to the audioContent
    array. Each element traces out correctly.
    The following code is how I am using these attributes:
    for (var i = 0; i<audioLength; i++) {
    audioContainer.attachMovie("container4", "audioItem"+i, i);
    // Create a shortcut reference to the present movie clip
    thisClip = audioContainer["audioItem"+i];
    thisClip.myTxt1.htmlText = audioContent[0];
    thisClip.myTxt2.htmlText = audioContent
    [1];
    thisClip.cursive_mc =
    loadThis(assetPath+audioContent[2], thisClip.cursive_mc);
    thisClip.block_mc = loadThis(assetPath+audioContent
    [3], thisClip.block_mc);
    thisClip.speaker_mc.attachMovie("speaker", "speaker_mc",
    this.getNextHighestDepth());
    thisClip.speaker_mc.speaker_mc.onRollOver = function() {
    this.nextFrame();
    thisClip.speaker_mc.speaker_mc.onRollOut = function() {
    this.prevFrame();
    thisClip.speaker_mc.speaker_mc.onRelease = function() {
    mySnd.loadSound(audioPath+audioContent[4],true);
    Loading the text works inside the htmlText. Using a function
    loadThis to load external swf files works corerctly and even
    attaching a linked movieclip from my library called "speaker" works
    correctly.
    The problem comes from pressing the speaker movieclip that
    the output traces "undefined" instead of the external mp3 file.
    I appreciate any help. Thanks.

    As Ned said the problem might be with the file structure on the server. Other problems may be with spelling. You computer may not be case sensitive to the names of the .swf files that you are loading, but your server might. So, on your computer when you are testing, second.swf is the same as Second.swf, or even second.SWF. But, on the server each of these variations is seen as a different file. Another problem is that when you are loading files from the same computer in testing, those files are close and so they load very quickly from your computer. When the files have to travel from the server, there will likely be a measurable period of time before the file is ready to be shown. This is particularly problematic with video that is embedded into an .swf. The whole file will need to be downloaded and uncompressed before it is available to play. If you stream the video as an external file, you can shorten the wait considerably.

  • When I try to drag the iphoto library to the external disk a forbidden (circle with slash through it) icon appear. Why do you suppose it is preventing me from adding to external drive? These are pictures I have taken. I believe it cannot find the origina

    When I try to drag the iphoto library to the external disk a forbidden (circle with slash through it) icon appear. Why do you suppose it is preventing me from adding to external drive? These are pictures I have taken. I believe it cannot find the original file.  Please help.
    Thanks.

    What happens if you try to  Option-drag the library to the EHD?  The same icon?
    Make sure the EHD is formatted Mac OS X Extended (journaled) with Ownership set to be ignored:
    OT

  • Loading an xml file from jws : a nightmare !

    Hi all:
    I'm trying to load a xml file packed inside a jar file, and when i call getresource it keeps always returning null !!!
    When i run the application (not in JWS) the file is loaded, but when i run it from a jnlp file with jws no !!
    I tried all possible solutions wihout success :(
    the last portion of code i used is :
    ClassLoader cl = this.getClass().getClassLoader();
         URL xmlFile=cl.getResource("configure.xml"); why is it working when run from Eclipse but fails when using jws ?
    I packed all my .class files together with xml file in one jar.
    please help me ! this stuff is driving me crazy :(
    thanks.

    Hi phasse !
    Yes I've fortenatly managed to solve my problem .here is the desription:
    Actually my problem was not with loading the xml file but in reading it .
    my problem was in the statement builder.parse(xmlFile.getPath()); this will not work with jws .I replaced this with : Document document = null;
              try {
                    ClassLoader cl = this.getClass().getClassLoader();
                   DocumentBuilderFactory factory = DocumentBuilderFactory
                             .newInstance();
                   DocumentBuilder builder = factory.newDocumentBuilder();
                      document=builder.parse(cl.getResourceAsStream("resources/configure.xml"));I would suggest to use ClassLoader and getResourceAsStream("xmlfile") method .
    I hope this would be helpfull for you .Good luck !

  • Loading an xml file from an xml file

    I'm trying to load an xml file from an xml file, but I'm
    having problems. My first xml file is really simple - it only
    contains one attribute with the name of another xml file in it
    (eventually I will have multiple xml files in here and run a loop
    on them...this is why I want to load an xml file from an xml file).
    Currently, with the code below, I can get the main xml file
    to load ("main.xml"), but I cannot get the secondary xml files to
    load FROM the main.xml.
    I want to then take childNode values from the secondary xml
    file and use them within my .swf in text boxes and whatnot.
    Any guidance? I think I'm going wrong on the line where I'm
    saying "i.newxml.load(i.attributes.location);"
    - How can I get this to work?

    johnypeter:
    I tried changing the code inside the loop to use just
    "newxml" instead of "i.newxml", and I declared with "var newxml =
    new XML();" - was this what you were thinking?
    kglad:
    The reason I tried to use the loadXML() function in the loop
    was so that for each node in my "main.xml" it would load the new
    xml file listed - this is a no-no? Do you have any ideas as to what
    I could do?
    For the for-loop, what should I change in it? I'm not great
    with loops so I tried to modify some code from another loop I found
    in another forum thread - not the right way to do it here?
    Also, what should I trace? The value of the _root.address, or
    i.attributes.location? I have created dynamic text boxes on my
    stage to see if the correct value from the xml file loads (ie. the
    name of the xml file within the xml file) and it does, but now I
    don't know how to put that information into ANOTHER loadXML()
    function and get the node information from it - does that make
    sense???
    Below are the examples of the xml files I am using. In the
    first one, main.xml, I will have a list of multiple xml files, each
    with the same nodes and elements as in the details.xml file
    (different values, of course).
    This is just to give you an example of what I'm trying to
    accomplish - pulling ALL the addresses and phone numbers from
    multiple xml files. I cannot manually collect this information, as
    it is dynamic, and will be updated in each individual details.xml.
    I was hoping to collect the information by simply adding to and
    updating ONE xml file - main.xml.
    Do you think this can be done? Am I going about it the wrong
    way? I'm quite limited in AS knowledge, which is why I'm piecing
    together code from other posts!

  • How to load External swf file in AIR

    I try this code its working in computer but when I publish this file in .apk or .ipa , my external swf file is not opening
    (I include my external file as well)
    places_btn.addEventListener(MouseEvent.MOUSE_DOWN, newvid);
    function newvid(event:MouseEvent) {
         trace("you clicked me");
         var loadit = new Loader();
         addChild(loadit);
         loadit.load(new URLRequest("scene02.swf"));

    thx boss its working great
    I have 3 scenes; load scene code is working great
    1. How can I unload the scene?
    2. Can I unload all scenes or one by one?
    can I unload some think like this
    Load scene 2 , unload scene 1 and scene 3
    Load scene 3, unload other all scene
    i try this
    load2.addEventListener(MouseEvent.MOUSE_DOWN, newvid);
    function newvid(event:MouseEvent) {
              trace("you clicked me");
              var loadit = new Loader();
              addChild(loadit);
        var _lc:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
        loadit.load(new URLRequest("scene02.swf"), _lc);
              loadit.unload();
    load3.addEventListener(MouseEvent.MOUSE_DOWN, newvid1);
    function newvid1(event:MouseEvent) {
              trace("you clicked me");
              var loadit = new Loader();
              addChild(loadit);
        var _lc:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
        loadit.load(new URLRequest("scene03.swf"), _lc);
              loadit.unload("scene01.swf scene02.swf");

  • Loading external .swf files issue...

    Hi,
    I'm working on a simple example of loading external swf files with some ActionScript.
    I've placed an instance of List Component and gave it an instance name of loadList. Using Component Inspector, I assigned data for 4 external files as below:
    Next, I've added a UILoader component (instance name - loadWindow). The code that is supposed to load the content into UILoader is this:
    loadList.addEventListener(Event.CHANGE, selectItem);
    function selectItem(e:Event):void
        loadWindow.source = e.target.selectedItem.data;
    When I run it in a FlashPlayer, it only loads the first 2 swf files....  (I checked the files and all files are fine).
    I hope to get some light on the issue so any help will be appreciated.

    Try tracing e.target.selectedItem.data to make sure it's what you expect.
    Also, have you tried using the load() method instead of the source property?

  • Missing files prevent pic from printing

    missing files prevent me from printing my pictures even though file is NOT missing

    If you were using Time Machine your backups are deleted at regular intervals to make room for the next backup.
    Solution: don't use Time Machine.

  • Prevent data from being loaded into certain dimensions

    Is there any way to prevent data from being loaded into certain dimensions? For example, if I have 2 dimensions: Scenario and Date, I only want a given Scenario to accept data in certain date ranges.
    Thanks,
    Jason

    I'll assume you mean by load rules. If you are talking about sending data from Excel, then the first one only is the answer.
    There are two ways I can think of doing this.
    1. create filters with write access to certain intersections and use an Id associated to that filter to load the data
    2. Use selection/rejection criteria in the load rule to limit what can be loaded
    As a bonus
    3. If you are using SQL interface loads, set up a table with what data is allowed to be leded.

Maybe you are looking for