Flash Upload Update for "A script in this movie is causing Flash Player to run slowly" Problem

Posted by Matt Kull Sun, 22 Apr 2007 19:44:00 GMT

The last version of my flash multiple upload script would spawn an alert box containing the message “A script in this movie is causing Flash Player to run slowly” after the script had been open for 15 seconds. Even if the user chooses to let the script run, the window will pop up again every 15 seconds.

Flash Alert

This obviously is a huge problem, as many users will unknowingly abort the script. You can Read More about the issue through Adobe’s Technotes.

The fix was to add a dummy onEnterFrame event which refreshes the timer. I have updated my code here

The only update was to change how I initialized the movie in multipleUpload.fla, and to attach the onEnterFrame event handler.

import com.vixiom.utils.MultipleUpload

System.security.allowDomain ("*.localhost.com");
var uploadMovie = null; 

_root.onEnterFrame = function() {
    if (this.getBytesLoaded() / this.getBytesTotal() > 0.99) {
        uploadMovie = new MultipleUpload (this.files_dg, this.browse_btn, this.upload_btn, this.cancel_btn, _root.object_type, _root.object_id, _root.token);

        _root.onEnterFrame = function() {
            trace ("onEnterFrame called");
        };
    }
};

Leave a comment, View comments, View trackbacks

Your Comments.

Leave your own response

  1. Crazy replied:

    Thanks for a small explonation, but in any case there’s a lot of problems with this script…

    Posted: 146 days later.
  2. awflasher commented:

    Is that issue totally solved in AS3 implementation?

    Anyway, thanks for your tip :)

    Posted: 193 days later.
  3. Mark replied:

    Keep on blogging, we need you. I’ve got so much useful stuff from your blog and really value you opinion in this stuff.

    Posted: 283 days later.

Your Reply

Comment Form.

Fields denoted with a "*" are required.

You may also like to leave your email or website.
eXTReMe Tracker