×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    13

    Question Flash Lite Problem Loading Remote XML

    Hi All. I have a simple Flash Lite 3, Actionscript 3 app that runs in CS4 and Device Central, but when I port the swf to a Nokia 6220 Classic, all dynamic text fields, that should be filled with data from a remote xml file on a web site, come up as "undefined", which I assume means empty.

    I have also tested this in the Nokia Remote Device Access and get the same issue. I thought it might be the edition, but I also tried on a 5th edition device and experienced the same issue.

    I have tried crossdomain.xml for security .. no luck ... and I have googled myself silly trying to find an answer.

    Has anyone come across this problem before?

    Thanks for your help.

  2. #2
    Nokia Developer Champion
    Join Date
    Jul 2008
    Location
    Pakistan
    Posts
    1,065

    Smile Re: Flash Lite Problem Loading Remote XML

    Flash Lite 3, Actionscript 3
    Flash Lite 3.x doesnt support AS 3 .It only supports AS 2. So, first use AS 2 in ur coding. Moreover, there is a security sandbox issue(or "FEATURE") in Flash Lite 3.0 which can be solved by exporting ur file under "ACCESS NETWORK ONLY" publish settings. OR by putting ur swf file in a trusted directory "C:\\data\\others\\trusted" or "E:\\others\\trusted".

    Best Regards,
    SajiSoft

  3. #3
    Registered User
    Join Date
    Jan 2010
    Posts
    13

    Re: Flash Lite Problem Loading Remote XML

    Hey Sajisoft. Thanks for the reply. I have now recoded this in Flash Lite 2, Actionscript 2, and have ensure that the publish settings are set to Network Access Only. I still get the same result. All fields are filled with "undefined" Any other ideas? Thanks for your help.

  4. #4
    Nokia Developer Champion
    Join Date
    Jul 2008
    Location
    Pakistan
    Posts
    1,065

    Smile Re: Flash Lite Problem Loading Remote XML

    Quote Originally Posted by cprice View Post
    Hey Sajisoft. Thanks for the reply. I have now recoded this in Flash Lite 2, Actionscript 2, and have ensure that the publish settings are set to Network Access Only. I still get the same result. All fields are filled with "undefined" Any other ideas? Thanks for your help.
    It seems that u dont have a security sandbox issue then. Just do a very simple test by using the sample given here :
    XML in Flash
    and if it is working fine for you then there should be a bug in your code or xml and we can try to fix it.

    Best Regards,
    SajiSoft

  5. #5
    Registered User
    Join Date
    Jan 2010
    Posts
    13

    Question Re: Flash Lite Problem Loading Remote XML

    Hi Sajisoft. If I run the simple example with Flash Player 10, and Actionscript 2, I get the correct output of the XML to the output window. If I run the same example in Flash Lite 3, Actionscript 2, I get "FTPS033: A Call to loadVariables(mydocument.xml) found, limitations might apply" to the output window, and no XML. Maybe that's the problem? Maybe the XML never gets loaded?

    Thanks again for your continued assistance.

  6. #6
    Nokia Developer Champion
    Join Date
    Jul 2008
    Location
    Pakistan
    Posts
    1,065

    Smile Re: Flash Lite Problem Loading Remote XML

    This is not an error but a warning. According to Adobe Documentation:
    The emulator detected a loadVariables() function call, which may have some run-time restrictions when played on the selected device. Test your SWF file on a device to ensure that the command functions as expected.
    Source : Device Central Help
    Just test it on the real device .Moreover, dont forget to put a crossdomain.xml file in the root of ur internet server & export ur swf under Access Network Settings Only . For quick tests, u can try a test.xml placed in my free server at http://sajisoft.site11.com/files/test.xml. i.e just write this code on ur timeline and put a dynamic text on stage with instance name "mytxt":
    Code:
    var my_xml = new XML();
    my_xml.onLoad = function(success){
    if (success){
    	_root.mytxt.text = this; //trace statement may not work in this case
    }
    }
    my_xml.load("http://sajisoft.site11.com/files/test.xml");
    It is working for me on Device Central & on 5800 XM .

    Best Regards,
    SajiSoft

  7. #7
    Registered User
    Join Date
    Jan 2010
    Posts
    13

    Question Re: Flash Lite Problem Loading Remote XML

    Hi Sajisoft. I tried the code the you supplied. I can see the xml on your server. When I use the following URL http://www.nort.us.com/xml/updated.xml, I can see the XML in the emulator, but it is blank on the phone. Any ideas? I do have a crossdomain.xml in the root of www.nort.us.com.

    Thanks again.

  8. #8
    Nokia Developer Champion
    Join Date
    Jul 2008
    Location
    Pakistan
    Posts
    1,065

    Smile Re: Flash Lite Problem Loading Remote XML

    Your xml is working fine on 5800 (with Flash Lite 3.0) from trusted folder or messaging.M sure u try it with trusted folder .

    Best Regards,
    SajiSoft

  9. #9
    Registered User
    Join Date
    Jan 2010
    Posts
    13

    Smile Re: Flash Lite Problem Loading Remote XML

    Hi Sajisoft. All is workign now. Fantastic. The problem was the trusted folder. The memory card didn't have one, so once I created that, and moved the .swf files to that folder all worked. Even my original application! There wasn't anything wrong with my code in the first place. Just the location of the file.

    Thanks for all your help. It is really appreciated.

  10. #10
    Registered User
    Join Date
    Jul 2010
    Posts
    2

    Re: Flash Lite Problem Loading Remote XML

    Please any one help me..

    I am trying to load this xml file in flash lite.But it is not loading.
    In device central its working fine.
    http://220.224.228.249/acs/gallery1.xml

  11. #11
    Registered User
    Join Date
    Jun 2010
    Posts
    21

    Re: Flash Lite Problem Loading Remote XML

    Sajisoft nailed it on the head for me......so thanks for that. I had mine published to access the network, but didn't have a crossdomain.xml on my webserver. I do now, and it works! Thanks!

Similar Threads

  1. Flash Lite 3.0 NetConnection problem
    By vitali.bozhko in forum [Archived] Flash Lite on Nokia Devices
    Replies: 7
    Last Post: 2009-06-30, 16:31
  2. problem making flash lite menu/theme for N95
    By joni99 in forum [Archived] Flash Lite on Nokia Devices
    Replies: 4
    Last Post: 2008-08-11, 15:21
  3. I have a problem in chat using Kuneri Lite and Flash Lite.
    By Felipe.Sampaio in forum [Archived] Flash Lite on Nokia Devices
    Replies: 1
    Last Post: 2008-07-09, 07:40
  4. Embedded Flash Lite & Key events & problem with red button
    By EagleSW in forum [Archived] Flash Lite on Nokia Devices
    Replies: 3
    Last Post: 2008-01-11, 18:53
  5. FLASH LITE BACKGROUND NOT LOADING
    By slimpixi in forum [Archived] Flash Lite on Nokia Devices
    Replies: 2
    Last Post: 2008-01-03, 18:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •