A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: XML binding issue

  1. #1
    Animator
    Join Date
    Jan 2001
    Location
    Dubai
    Posts
    200

    XML binding issue

    Hi all

    My flash file is linked with the XML to retrieve data in it. When user loads the page for the first time they are not getting undefined instead of the values from XML, but when they refresh the p age they get the values.

    Can anyone identify this issue and provide any solution please?

    Thanks
    F.
    [email protected]
    I won't change directions and i won't change my mind, How much difference does it made?

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    and your code for loading the xml file is............?? something like..............?

    PHP Code:
    _xml = new XML();
    _xml.ignoreWhite true;
    _xml.load("some.xml?vers="+new Date().getTime()); // cache buster

    _xml.onLoad = function(){ // fires when data transfer is completed.
    //parse the data and populate the Flash file


  3. #3
    Animator
    Join Date
    Jan 2001
    Location
    Dubai
    Posts
    200
    I have used a slider component which i am attaching at the first frame of my movie, here is the code at the first frame:

    PHP Code:
    if (_root.slider == undefined) {
        
    _root.attachMovie("ThumbnailSlider""slider"_root.getNextHighestDepth(), {_x:14,_y:200,_visible:false});

    xmlPath "http://www.showtime.com/Movies.xml?vers="+new Date().getTime()); // cache buster";
            
    thumbWidth 115;
            
    thumbHeight 70;
        }
        
    this.slider.setSize(770,70)
    with (_root.slider)
        { 
    I just have added your given cache buster code to check, please check and let me know if i have done it correctly.

    Thanks
    Fahad
    [email protected]
    I won't change directions and i won't change my mind, How much difference does it made?

  4. #4
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    looks OK
    so somewhere you have ..

    _xml.load(xmlPath); // ??

    please note that appended variables will FAIL when testing offline
    you MUST upload to a server and test

  5. #5
    Animator
    Join Date
    Jan 2001
    Location
    Dubai
    Posts
    200
    Here is what i have done :

    if (_root.slider == undefined) {
    _root.attachMovie("ThumbnailSlider", "slider", _root.getNextHighestDepth(), {_x:14,_y:200,_visible:false});
    with (_root.slider)
    {

    xmlPath = "http://www.showtime.com/Movies.xml?vers="+new Date().getTime();+"";
    }
    this.slider.setSize(770,70)
    That seems working after uploading it on server, correct me if i am wrong.

    Thanks
    F.
    [email protected]
    I won't change directions and i won't change my mind, How much difference does it made?

Tags for this Thread

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center