hanging when loading asp value pairs

Hi there

I'm trying to load a bunch of asp pages into Flash using loadvars.

When i load this certain page in browsers, it crashes maybe every 4 out of 5 times. (Specifically what happens is - in IE it just stops, in Moz it says "Plug-in has performed an illegal operation etc")

When i test it locally in Flash (like go "test movie", it loads sweet every time)

the asp page is here :


a test version of the flash movie is here :


here's the code i'm using to load the asp page:

System.useCodepage = true;
function makeProduct(ProductID, TagLine, ProductDesc, ProductName, GenderID, RangeID, Visited) {
        this.ProductID = ProductID;
        this.TagLine = TagLine;
        this.ProductDesc = ProductDesc;
        this.ProductName = ProductName;
        this.GenderID = GenderID;
        this.RangeID = RangeID;
        this.Visited = Visited;
function getRanges() {
        RangeSend = new LoadVars();
        RangeSend.onLoad = getRangesHandler;
function getRangesHandler(success) {
        traceout.htmlText = "start";
        var Range = [];
        var ProductID, TagLine, ProductDesc, ProductName, GenderID, RangeID, ProdColourID, Code, Colour1ID, Colour2ID, SmImage, LgImage, Visited;
        if (success) {
                for (var i = 0; i<RangeSend.ProductCount; i++) {
                        ProductID = RangeSend["ProductID"+i];
                        TagLine = RangeSend["TagLine"+i];
                        ProductDesc = RangeSend["ProductDesc"+i];
                        ProductName = RangeSend["ProductName"+i];
                        GenderID = RangeSend["GenderID"+i];
                        RangeID = RangeSend["RangeID"+i];
                        Visited = false;
                        newProd = new makeProduct(ProductID, TagLine, ProductDesc, ProductName, GenderID, RangeID, Visited);
                        Range[i] = newProd;
                        delete newProd;
                        traceout.htmlText += Range[i].ProductName;
                traceout.htmlText += "done";
                // continue on if it's worked...
        } else {
                loadFunc.htmlText = "<b>SORRY, RANGE FAILED. PLEASE TRY AGAIN.</b>";

It's really weird, cos i've used pretty much identical functions to load everything else and it doesn't crash. I think therefore it may be a weird character in the asp encoding that Flash doesn't like, something like that?

Any help would be sooooooo appreciated. Thanks in advance


ps if it doesn't crash the first time refresh it a couple of times ..
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

new makeProduct(ProductID, TagLine, ProductDesc, ProductName, GenderID, RangeID, Visited);

I think this line might be whats causing your problems...makeProduct is a function...not a class...and using the new operator tries to make a new object and flash gets confused when u try to make an onbject out of a function. remove the "new" and see if things go better?
It has something to do with the amount of data loading. Try to load less than 64k of data..

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
FractureAuthor Commented:
Hi guys

Thanks for your suggestions.

Drakkon - i tried taking the "new" out - so my code was like this:

                  newProd = makeProduct(ProductID, TagLine, ProductDesc, ProductName, GenderID, RangeID, Visited);
                  RangeTest[i] = newProd;
                  delete newProd;

Didn't work. it just added everything to the array as "undefined". I think that code is pretty solid, it's worked for me on a lot of other sites and on all the other load functions on this site. Here is the page where i adapted it from :


Negatyve - I actually came across that 64k thing on forums yesterday. We scaled the page back.. last time i checked it was on 48983 bytes, and it's still crashing all the browsers.

Any other suggestions? Thanks
FractureAuthor Commented:
Hi Guys,

Well we cracked it! It was the size of the page but it seems to be erroring on anything over 40 k.  Strange considering the information out there.  Possibly somehow it is adding data on to the page when it loads taking it over the 64k.  We are just stoked it works now.  

Negatyve you get the points because the first part of your answer was indeed spot on!  

Cheers mate,

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.