I backtracked on this thread...

I guess the questions are:

1) what are you trying to load?

2) what onLoad(success:Boolean) are you using?

Are you using the XML or LoadVars?

Assuming you are using the LoadVars, a more reasonable "timeout" approach would be something like:

//-------------------- code --------------------------
function fileExists() {}
function fileDoesNotExist() {}

var timeout:Number = 10000; // 10 seconds...
var app:MovieClip = this;

var lv:LoadVars = new LoadVars();
lv.onLoad = function(success:Boolean) {
        clearInterval(app.interval);
        if (!success) {
                app.fileDoesNotExist();
        } else {
                app.fileExists();
        }
};

var startTime:Number = getTimer() + timeout;
lv.load(url);

var interval:Number = setInterval(function () {
        var total:Number = app.lv.getBytesTotal();
        if (total > 4) {
                clearInterval(app.interval);
                app.fileExists();
        } else {
                if (getTimer() >= app.startTime) {
                        clearInterval(app.interval);
                        app.fileDoesNotExist();
                }
        }
}, 25);

//-------------------- code --------------------------


On Mar 17, 2006, at 10:31 AM, Yotam Laufer wrote:

[Theres no "reasonable" amount of time on networked connections of
unknown hardware specs...]

And yet timeout times are set somehow... I think it's a subjective decision.
I wouldn't do it like this, but if someone has to?

Yotam.
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to