[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • Last Modified:

Flash Movie causing major browser problems

Greetings,
I am having a problem with a presence detection movie that I wrote for a site I am working on.

This movie is used on user search pages, and is displayed one time for each user. There may be up to 10 instances of the movie on any given page. The movie is called thusly: isonline.swf?id=XXXX&user=XXXX where user is the actual user doing the search, and id is the user that is being looked at.

The problem I am having is that when I view a search page using IE 6, image support breaks for all subsequent page loads. If the image is cached, it loads fine, but you will not see any other "new" images until you restart the browser.
Under Netscape 6.2 and 7, the browser locks up completely. The *weird* part is that the movie does work. It shows the users that are online, offline and DND, AND updates accordingly, even when the browser stuff breaks.

This is my first flash project, and I'm pretty sure I'm doing *something* wrong, But I have no idea what it is.

The script isonline.php simply queries the database to see if the user with id "myID" is online or not. This script returns one of three values:
0 user is offline
1 user is online
2 user is DND

There are a total of 4 frames and they are all identical to frame 1, with the exception that setInterval is set to 15000 for frames 2, 3 and 4, and
the images are different.

here's my AS code.

Frame 1

_root.onEnterFrame = stop();
myID= _root.id;
myUID= _root.user;
Launcher._visible=false;
Launcher2._visible=false;
function GoBack() {
loadVariables("../isonline.php?id="+myID, "_root");
               trace(iso);
                         if(iso == "1"){
                              _root.gotoAndStop(3);
                         }
                         if(iso == "0"){
                              _root.gotoAndStop(2);
                         }
                         if(iso == "2"){
                              _root.gotoAndStop(4);
                         }
}
APause = setInterval(GoBack, 1000);


Any help would be greatly appreciated.
Keith Greene
0
GapingWound
Asked:
GapingWound
  • 9
  • 6
1 Solution
 
rascalpantsCommented:
maybe the problem has to do with the variables being cached...


use something like this so the variables are not cached...  

loadVariables("../isonline.php?nocache="+random(100000), "_root");


and send the variables using post...


I think I am understanding what you are trying to do...


rp
0
 
GapingWoundAuthor Commented:
Rascalpants, I doubt the vars are being cached. The movie does function. When you are viewing a search results page, if one of the users in the list logs in, within 15 seconds, "his" movie shows him online. If he logs off, it will change to offline. That much works. The problem is that it renders the browser unusable. IE will no longer show new images, and NS just locks.
0
 
rascalpantsCommented:
actually the vars will cache unless you call a new one "unique" on every load...


I have no clue as to if that will solve your problem, but I like to start with the basics first...

AH!  then your SWF are being cached?  how can you display new images dynamically if the SWF is cached...


maybe I am just not understanding what your problem is...

my bad...


rp  


0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
GapingWoundAuthor Commented:
Tha pages that use the SWF are php pages and they all have nocache headers.

The SWF itself doesn't have dynamic images. It only has 3 images, 1 for online, 1 for offline and 1 for DND.

The images that are breaking are in the browser. For instance, if you load the search results page in IE, then type in the URL to a website that you have never visited, NONE of the images on that site will show up. Only images that exist in the browser cache will show up, until you restart IE.

If you load the search results page in NS 6.2 or 7, you aren't going anywhere else. Task manager shows NS as running, and the flash movies update as people go on/offline, but NS will not respond to any user input at all.

I have removed the SWF files from the search results page, and the page behaves properly, no more broken IE images or locked up NS.

Thanks,
Keith
0
 
rascalpantsCommented:
"Tha pages that use the SWF are php pages and they all have nocache headers."

that does not make any difference...  I have tried every method out there, and the SWF will still cache...


anyway...

so how are you passing the variables into flash?  no need to get specific, I am just try to diagnose...

rp

0
 
rascalpantsCommented:
meaning, are you useing a looping movieclip to load the variables again....  that kind of stuff...


rp
0
 
GapingWoundAuthor Commented:
The movie is called thusly: isonline.swf?id=XXXX&user=XXXX where user is the actual user doing the search, and id is the user that is being looked at.

Yes the movie clip will loop once per second on the first frame until it gets the "iso" variable. The iso var will be 1 if the user is online, 0 if the user is offline and 2 if the user is DND.
Once it gets the var, it will _root.gotoAndStop(X) to the appropriate frame.

The 3 additional frames are pretty much identical to the first frame except that they only loop every 15 seconds, and the image is different.
0
 
rascalpantsCommented:
okay... so everything sound cool... not sure what the problem is...

what is the link to the application?


rp
0
 
GapingWoundAuthor Commented:
Unfortunately, I had to take the movie off the site because it was causing a whole lot of havock.
0
 
rascalpantsCommented:
I am not sure how I can help you without testing your files...

rp
0
 
GapingWoundAuthor Commented:
Well, it turns out it isn't the flash after all. After removing ALL other flash movies from the site, it still breaks. It has to be somewhere else in one of my scripts.
Since it's my images that are breaking, I'm going to start with my img.php.
0
 
rascalpantsCommented:
I thought it didn't sound like a flash problem...


:)


rp
0
 
rascalpantsCommented:
GapingWound,


you need to close this question out...

please come back and comment or award the points...


rp
0
 
GapingWoundAuthor Commented:
Points awarded for trying :)
0
 
rascalpantsCommented:
thanks... I was just trying to clean up the Flash Forum, so I will accept the points for that :)


rp
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 9
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now