Jump to content
Search Community

Safari / Firefox act differently with loaderMax?

grit test
Moderator Tag

Recommended Posts

I have a project in which a lot of images are loaded from a CMS and thought I'd try your all-new loaderMax to get things more or less organized.

 

No I might abuse the whole loadermax-concept a bit because the program structure is as follows:

 

main file:

-loads xml with xx items

-every item starts a sprite:

->sprite object which has its own loadermax queue and generates its graphics according to data from the xml stream>

 

so to speak I use a new loadermax queue for each sprite with just a simple image item in the queue (I just wanted to use the handy scale options on load complete), I don't know if this can cause problems?

 

(I'm developing on OSX by the way...) On firefox browser this is no problem, all images load fine

 

on safari 5 however all images through loadermax appear broken. I don't think this is the plugin cancelled thingy I read somewhere else

 

strange thing is - when I try some development thingies in safari 5 (reqource monitor) it shows a 404 error on the loadermax initiation. when I click on the image the server also says 'not found' but when I refresh the same url in the address bar the image loads perfectly..

 

maybe you can make any sense on this header info:

 

Request Method:GET

Status Code:404 Not Found

Request Headers

User-Agent:Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16

Response Headers

Accept-Ranges:bytes

Connection:close

Content-Length:952

Content-Type:text/html

Date:Fri, 25 Jun 2010 10:06:58 GMT

Etag:"31da007c-3b8-857f7080"

Last-Modified:Tue, 04 Nov 2008 08:05:06 GMT

Server:Apache/2.0.54 (Fedora)

X-Pad:avoid browser bug

 

so what's the X-Pad thingy? When I set Safari 5 in explorer 8 mode everything loads dandy... What to do in avoiding this safari bug? is this a server config option or what?

 

Thanks!

Link to comment
Share on other sites

Not sure, but I suspect it may have to do with Safari not liking when Flash cancels a load. By default, "auditSize" is true, so when you start loading a LoaderMax, it loops through its children and if it finds any that don't have an "estimatedBytes" defined, it will open a URLStream and load just enough of the file to determine how big it is (bytesTotal). It then closes the connection immediately and moves on. According to Adobe's docs, this is a perfectly acceptable thing to do but it seems as though Safari may not like it. You have 2 options to prevent the quick open/close URLStream stuff: either set auditSize:false on the LoaderMax instance(s) or better yet, define an estimatedBytes for each of your loaders.

 

By the way, you do NOT need to create a LoaderMax container for each loader. That's just a convenience for when you're managing a queue of loaders. It's perfectly acceptable to just create a single loader (like an ImageLoader) and load() that independently. See what I mean? In fact, you can even do both - you can put a loader into a LoaderMax and also call load() independently on it if you need to.

Link to comment
Share on other sites

I added the estimatedsize because I read it in the other post indeed, but it still wasn't ok. I now removed the 'auditSize' and safari now also loads in 'safari 5.0 mode' - thanks!

Link to comment
Share on other sites

  • 1 month later...

Hello,

 

I'm having another bug with Safari 5: the function onComplete doesn't work, and I tried everything....

 

Here is my xml

<?xml version="1.0" encoding="UTF-8"?>




     		Caricature - 29,7x42cm




     		'd(R)ead', croquis - 15x18cm




     		'Dessine-moi un mouton' - 29,7x21cm




     		Croquis, 21x29,7cm




     		Fresque, Forum de Liège - 3x35m




     		'Les géants' -100x150cm




     		'On n'est pas Delvaux' - 100x150cm




     		'Le dormeur' - 100x150cm




     		'Du seau au sot, il n'y a qu'un pas' - 100x150cm




     		'Le lendemain de la veille' - 100x150cm




     		'Le marchand de poupées' - 75x150cm




     		'Le convoi exceptionnel' - 100x150cm




     		'Les trois âges de l'Homme et de l'Industrie' - 75x225cm




     		'Les trois âges de l'Homme et de l'Industrie' - Détail




     		'Les trois âges de l'Homme et de l'Industrie' - Détail
-->  





     		blog d'Eric Platteau (Design uniquement) - Réalisé chez Emakina




     		Tyndall (Développement uniquement) - Réalisé chez Emakina"




     		Les photos de la cigogne (Développement uniquement)




     		Hunting Views




     		sylvie Linotte, psychologue cognitivo-comportementaliste




     		Area Santé




     		Epistat - Cours d'été




     		ADESP




     		Registre National des Cardiopathies Ischémiques






     		Very space invaders - Flash




     		Vet Week - Jeu en Flash réalisé chez Emakina




     		Dessin vectoriel - Illustrator




     		squash avec une amie - Photoshop




     		uncle Sam - Dessin et Photoshop




 

My AS3 loader

_loaderXML = new XMLLoader("../xml/xmlList2.xml", {name:"xmlList", onOpen:_initLoad,  skipFailed :true, estimatedBytes:4666738, onProgress:_xmlLoaderProgress, onChildComplete: _onChildComplete, onError:errorHandler, onComplete:_xmlLoaderComplete});

 

...and my AS3 onComplete function

private function _xmlLoaderComplete(e : Event) : void

{

MonsterDebugger.trace(this, e.target.bytesLoaded);

_loader.text = "loader complete";

}

 

Activity report is Ok, the trace of loaded thing is ok, but no onComplete function... I tried "private function _xmlLoaderComplete(e : LoaderEvent)" too.

You can see the result here: http://catherinearnould.sio4.net/gallery/swf/

 

An idea?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...