?
Solved

Flash Movie causing major browser problems

Posted on 2003-03-13
15
Medium Priority
?
230 Views
Last Modified: 2010-04-03
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
Comment
Question by:GapingWound
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 6
15 Comments
 
LVL 22

Expert Comment

by:rascalpants
ID: 8130617
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
 
LVL 1

Author Comment

by:GapingWound
ID: 8130678
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
 
LVL 22

Expert Comment

by:rascalpants
ID: 8130748
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Author Comment

by:GapingWound
ID: 8130859
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
 
LVL 22

Expert Comment

by:rascalpants
ID: 8131132
"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
 
LVL 22

Expert Comment

by:rascalpants
ID: 8131136
meaning, are you useing a looping movieclip to load the variables again....  that kind of stuff...


rp
0
 
LVL 1

Author Comment

by:GapingWound
ID: 8131235
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
 
LVL 22

Expert Comment

by:rascalpants
ID: 8131270
okay... so everything sound cool... not sure what the problem is...

what is the link to the application?


rp
0
 
LVL 1

Author Comment

by:GapingWound
ID: 8132881
Unfortunately, I had to take the movie off the site because it was causing a whole lot of havock.
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 8136201
I am not sure how I can help you without testing your files...

rp
0
 
LVL 1

Author Comment

by:GapingWound
ID: 8137544
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
 
LVL 22

Accepted Solution

by:
rascalpants earned 225 total points
ID: 8137768
I thought it didn't sound like a flash problem...


:)


rp
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 8314483
GapingWound,


you need to close this question out...

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


rp
0
 
LVL 1

Author Comment

by:GapingWound
ID: 8314584
Points awarded for trying :)
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 8314658
thanks... I was just trying to clean up the Flash Forum, so I will accept the points for that :)


rp
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses
Course of the Month14 days, 14 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question