dcsimg
A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: Flash/xml/images not loading in Firefox or Safari

  1. #1
    Junior Member
    Join Date
    Jul 2006
    Posts
    21

    Flash/xml/images not loading in Firefox or Safari

    Hello to anyone who might help...
    I am creating a completely dynamic flash site (example problem: http://www.playdown.com/testing/testing.swf) that's pulling all of its information from xml files. Everything was lovely until I tested it in Firefox and Safari. They don't load the images!?! I went into preferences for the browsers and made them as friendly as possible but still no luck. By visiting http://www.playdown.com/testing/testing.swf you'll see what's happening. It doesn't make any sense to me. Sometimes when I reload the page it works.

    Do Mozilla and Safari have known xml issues?

    Any help in this matter would be greatly appreciated!!

  2. #2
    http://pat.theorigin.net cresquin's Avatar
    Join Date
    Jun 2003
    Location
    Los Angeles, CA
    Posts
    685
    does this fail in both FF for mac and win?

    what does your XML code look like?

    Are you waiting for the XML file to load before you try to load the images?

    Also, what does your load image code look like?

    have you tried tracing the path of the images just previous to the load call?

  3. #3
    Junior Member
    Join Date
    Jul 2006
    Posts
    21
    My xml code is as follows:

    <?xml version="1.0" encoding="iso-8859-1"?>
    <Loacations>
    <LocateOne>
    <PathToImages>http://www.playdown.com/virtual/imgsLocate/locationOne/</PathToImages>
    <NumberOfImages>10</NumberOfImages>
    <Title>LOREM IPSUM DOLOR SIT AMET.</Title>
    <Subtitle>Lorem ipsum dolor sit amet.</Subtitle>
    <Text>Virtus jus in abluo, exerci lenis, eum pertineo fatua ut. Nulla, autem nulla iriure olim verto patria pertineo. Utinam quod te gravis duis ullamcorper et nisl acsi. Luctus praemitto vulpes delenit fere commoveo, probo, pecus, huic imputo immitto. Amet verto, velit dolore distineo eum. Caecus, nunc probo occuro abico eligo, duis vulputate tation minim tego. </Text>
    </LocateOne>
    <LocateTwo>
    <PathToImages>http://www.playdown.com/virtual/imgsLocate/locationTwo/</PathToImages>
    <NumberOfImages>15</NumberOfImages>
    <Title>LOREM IPSUM DOLOR SIT AMET.</Title>
    <Subtitle>Lorem ipsum dolor sit amet.</Subtitle>
    <Text>Virtus jus in abluo, exerci lenis, eum pertineo fatua ut. Nulla, autem nulla iriure olim verto patria pertineo. Utinam quod te gravis duis ullamcorper et nisl acsi. Luctus praemitto vulpes delenit fere commoveo, probo, pecus, huic imputo immitto. Amet verto, velit dolore distineo eum. Caecus, nunc probo occuro abico eligo, duis vulputate tation minim tego. </Text>
    </LocateTwo>
    <LocateThree>
    <PathToImages>http://www.playdown.com/virtual/imgsLocate/locationThree/</PathToImages>
    <NumberOfImages>10</NumberOfImages>
    <Title>LOREM IPSUM DOLOR SIT AMET.</Title>
    <Subtitle>Lorem ipsum dolor sit amet.</Subtitle>
    <Text>Virtus jus in abluo, exerci lenis, eum pertineo fatua ut. Nulla, autem nulla iriure olim verto patria pertineo. Utinam quod te gravis duis ullamcorper et nisl acsi. Luctus praemitto vulpes delenit fere commoveo, probo, pecus, huic imputo immitto. Amet verto, velit dolore distineo eum. Caecus, nunc probo occuro abico eligo, duis vulputate tation minim tego. </Text>
    </LocateThree>
    <LocateFour>
    <PathToImages>http://www.playdown.com/virtual/imgsLocate/locationFour/</PathToImages>
    <NumberOfImages>10</NumberOfImages>
    <Title>LOREM IPSUM DOLOR SIT AMET.</Title>
    <Subtitle>Lorem ipsum dolor sit amet.</Subtitle>
    <Text>Virtus jus in abluo, exerci lenis, eum pertineo fatua ut. Nulla, autem nulla iriure olim verto patria pertineo. Utinam quod te gravis duis ullamcorper et nisl acsi. Luctus praemitto vulpes delenit fere commoveo, probo, pecus, huic imputo immitto. Amet verto, velit dolore distineo eum. Caecus, nunc probo occuro abico eligo, duis vulputate tation minim tego. </Text>
    </LocateFour>
    <LocateFive>
    <PathToImages>http://www.playdown.com/virtual/imgsLocate/locationFive/</PathToImages>
    <NumberOfImages>10</NumberOfImages>
    <Title>LOREM IPSUM DOLOR SIT AMET.</Title>
    <Subtitle>Lorem ipsum dolor sit amet.</Subtitle>
    <Text>Virtus jus in abluo, exerci lenis, eum pertineo fatua ut. Nulla, autem nulla iriure olim verto patria pertineo. Utinam quod te gravis duis ullamcorper et nisl acsi. Luctus praemitto vulpes delenit fere commoveo, probo, pecus, huic imputo immitto. Amet verto, velit dolore distineo eum. Caecus, nunc probo occuro abico eligo, duis vulputate tation minim tego. </Text>
    </LocateFive>
    <LocateSix>
    <PathToImages>http://www.playdown.com/virtual/imgsLocate/locationSix/</PathToImages>
    <NumberOfImages>10</NumberOfImages>
    <Title>LOREM IPSUM DOLOR SIT AMET.</Title>
    <Subtitle>Lorem ipsum dolor sit amet.</Subtitle>
    <Text>Virtus jus in abluo, exerci lenis, eum pertineo fatua ut. Nulla, autem nulla iriure olim verto patria pertineo. Utinam quod te gravis duis ullamcorper et nisl acsi. Luctus praemitto vulpes delenit fere commoveo, probo, pecus, huic imputo immitto. Amet verto, velit dolore distineo eum. Caecus, nunc probo occuro abico eligo, duis vulputate tation minim tego. </Text>
    </LocateSix>
    <LocateSeven>
    <PathToImages>http://www.playdown.com/virtual/imgsLocate/locationSeven/</PathToImages>
    <NumberOfImages>10</NumberOfImages>
    <Title>LOREM IPSUM DOLOR SIT AMET.</Title>
    <Subtitle>Lorem ipsum dolor sit amet.</Subtitle>
    <Text>Virtus jus in abluo, exerci lenis, eum pertineo fatua ut. Nulla, autem nulla iriure olim verto patria pertineo. Utinam quod te gravis duis ullamcorper et nisl acsi. Luctus praemitto vulpes delenit fere commoveo, probo, pecus, huic imputo immitto. Amet verto, velit dolore distineo eum. Caecus, nunc probo occuro abico eligo, duis vulputate tation minim tego. </Text>
    </LocateSeven>
    </Loacations>
    <Advertisement>
    <PathToAd>advertisement/advertisement.gif</PathToAd>
    </Advertisement>
    <BoardsButton>
    <ButtonLink>http://www.testing.com</ButtonLink>
    </BoardsButton>

    ---------------------

    It fails in FF for mac and win.

    Load image looks like:
    pathToImageUp[z] = xmlDoc_xml.firstChild.childNodes[z].childNodes[0].firstChild.nodeValue;
    imagesUp[z] = xmlDoc_xml.firstChild.childNodes[z].childNodes[1].firstChild.nodeValue;

    _root.eventsHold.eventsUpView.duplicateMovieClip(" eventsUpView"+z, 1000+z);
    _root.eventsHold["eventsUpView"+z]._x = i*(_root.eventsHold["eventsUpBG"+z]._width+10)+_root.eventsHold["eventsUpView"+z]._x;
    _root.eventsHold["eventsUpView"+z]._y = k*(_root.eventsHold["eventsUpView"+z]._height+36)+_root.eventsHold["eventsUpView"+z]._y;
    _root.eventsHold["eventsUpView"+z].loadMovie(pathToImageUp[z]+imagesUp[z]);

    ------------

    to get down to the nitty gritty...why would this work in IE and not in FF?
    for FF - what steps should i take to wait for thing to load?
    did you take a look at the file in both browsers? it's an image click through that's dynamically generated. it seems to me that FF is handling the flash file differently!?!

    THANK YOU for looking at this!
    Last edited by skinnyfingers; 06-18-2007 at 03:09 PM.

  4. #4
    http://pat.theorigin.net cresquin's Avatar
    Join Date
    Jun 2003
    Location
    Los Angeles, CA
    Posts
    685
    do you use XML.onLoad to load the images?

    FF does handle flash files a bit differently than IE because their plugin structures are different. Most of the time, thought, they behave relatively similar.

  5. #5
    Junior Member
    Join Date
    Jul 2006
    Posts
    21
    yes...i'm using onLoad. i have to say again...thank you for helping. can you think of a solution? have you followed the link and seen the difference between browsers (IE and FF)? http://www.playdown.com/testing/testing.swf . I am completely dumfounded why it would work in one browser an not another since flash is an application and is self-contained :/

    location_xml = new XML();
    location_xml.ignoreWhite = true;
    location_xml.onLoad = function(sucess) {
    if (sucess) {
    processLocations(location_xml);
    //trace("success");
    }
    };

    location_xml.load('a_locations.xml');

  6. #6
    http://pat.theorigin.net cresquin's Avatar
    Join Date
    Jun 2003
    Location
    Los Angeles, CA
    Posts
    685
    here's something interesting. The images are downloading and caching. Are you moving the iages from offstage or perhaps resizing them when they've loaded? or handling them some other way?

  7. #7
    Junior Member
    Join Date
    Jul 2006
    Posts
    21
    Yes...they're being resized to the constraints of the space...the path to the image is being pulled from xml. Why would it work sometimes and not others. My brain is on the road to -- spent ;/

    Thank you already!

  8. #8
    http://pat.theorigin.net cresquin's Avatar
    Join Date
    Jun 2003
    Location
    Los Angeles, CA
    Posts
    685
    it works sometimes because the images are being grabbed from the cache. The problem as I see it now is probably with your timing when you do the resize. If you try to resize the images even an instant before they are ready to go then you can get some strange errors (your images are probably being resized to 0,0). The problem has likely got to do with a small inconsistancy between the way IE and FF/Safari calculate getBytesLoaded. You are getting a positive indication of a complete load a split second before your images are truely ready to use.

    I suggest switching away from a loadMovie model into a more modern MovieClipLoader model that can more accurately be controlled across platforms.

  9. #9
    Junior Member
    Join Date
    Jul 2006
    Posts
    21
    I'll be trying that first thing tomorrow morning and will let you know how it goes. ... again ... thanks

  10. #10
    Junior Member
    Join Date
    Jul 2006
    Posts
    21
    It worked!!! What a releif! I can't thank you enough...in the future I'll be using the MovieClipLoader model.

  11. #11

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