Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

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

Different Flash results in different browsers

Hi,

I thought .swf operated the same in all browsers on all platforms.  :-)

I'm streaming audio from an external mp3 file, and have made a simple player with PLAY, PAUSE and STOP, with a timer.

Here's my .swf file:

http://www.greganthonymusic.com/music/stream/newtest111304.swf

In IE 6 on a Windows PC, this works fine.  (Once the file loads, you can PAUSE then press PLAY to restart.)

In Netscape 7.2 on a Windows PC, and in IE, Mozilla and Safare on a Mac, when you press PAUSE then press PLAY to restart, the file re-loads and starts from the beginning.

Thoughts?  Thanks.
0
drranson
Asked:
drranson
  • 10
  • 5
1 Solution
 
muso120999Commented:
I don't know anything about your code, but...

are you loading the file onPress of the play button? - it only needs to re-load if your sound file has changed, or the sound object is undefined.
0
 
drransonAuthor Commented:
I am loading the file onPress of the play button.  Again, it doesn't re-load in IE 6 on a Windows PC, but it DOES reload in Netscape 7.2 on a Windows PC, and in IE, Mozilla and Safari on a Mac.

If you would like to see the code, I'd be glad to pass it along.

By the way, how did the file behave in your browser on your platform?
0
 
muso120999Commented:
> By the way, how did the file behave in your browser on your platform?

It replayed the audio (I'm using FireFox 1.0 preview release).  I just wondered that it might be connected with different methods of cacheing between the browsers, which is why I suggested removing the load for subsequent plays (it's redundant code if you are just resuming the audio).

If I'm way off-track with my suggestion, then I think it would be useful to see the FLA if possible...
0
Independent Software Vendors: 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!

 
muso120999Commented:
Incidentally I also have IE6, and it replays the audio - as the same with FireFox.

Might it be that IE has cached an older version of your Flash file, that did work?
0
 
drransonAuthor Commented:
Hmmm.  I don't THINK I have it coded to load on subsequent plays, but I'm not brilliant at this.  How do I get the FLA file to you?
0
 
muso120999Commented:
You could email it: muso at fusionsite dot co dot uk (replace dot and at with symbols)
Or upload it somewhere...
0
 
muso120999Commented:
Actually I've noticed this - in IE6 it does function correctly, as stated, but only after the audio has played to the end at least once...
0
 
elhyCommented:
hmm...mac... have u check that you have the correct plug-in in your mac machine?
0
 
muso120999Commented:
Okay...

1. Delete the code on your Object Layer
2. Change the code on your play button to:

on (press) {
      if ((myMusic == undefined)||(stopped==true)) {
            trace("press "+this+loaded);
            playing = true;
            paused = false;
            stopped = false;
            this.loaded = true;
            myEvent = 0;
            myStreaming = 1;
            myMusic = new Sound();
            myMusic.loadSound("name of music file here.mp3", true);
            myMusic.start();
            myMusicPosition = 0;
            myMusicVolume = 100;
            myMusic.setVolume(myMusicVolume);
      } else {
            if (paused == true) {
                  myMusic.start(myMusicPosition, 0);
            }
            playing = true;
            paused = false;
      }
}


Let me know if you still are having problems though.

muso
0
 
muso120999Commented:
You could also put an additional condition to test whether myMusic==undefined around the lines that initialise and load into it...
          myMusic = new Sound();
          myMusic.loadSound("name of music file here.mp3", true);
0
 
drransonAuthor Commented:
I'll give the code a try tonight and let you know what happens.  Thanks!
0
 
muso120999Commented:
ok
0
 
drransonAuthor Commented:
Excellent! - it works now in IE 6 and Netscape 7.2 on my PC.  I just want to test it on a Mac tomorrow morning.  I'll let you know ASAP.

Here's the link to the swf file:

http://www.greganthonymusic.com/music/stream/newtest111604.swf

My fingers are crossed!
0
 
muso120999Commented:
It 's working for me now at my end (in FireFox and IE6), but I'm not in a position to test it on a mac for you unfortunately
0
 
drransonAuthor Commented:
It works!  I am so grateful for your help.  Thank you!
0
 
muso120999Commented:
No problem!
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 10
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now