Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: FLASH: .swf with javascript crashing browser
From: aisling watters
Date: Tue, 15 Sep 1998 20:50:51 +0100

Hi all!
I'm not sure if this is a Javascript problem or a Flash one, but I'm
fairly ok with Javascript and usually manage to debug any problems. I'm
trying to do sound in a web page using a sound-only Flash movie.
Basically, on a mouse over a function gets called, which document.writes
to an invisible layer and embeds the .swf. so the sound gets played at
will. This is the only Flash in the page. And btw it was made in Flash
3, but we tried exporting as Flash 1 and 2 as well and that didn't work
either.

What's wierd is that the page works ok for me on a couple of machines -
all with the same specs/NT4/netscape 4 (in a university lab) - but
crashes the browser on other machines and for other people. So I know
the code works in theory - and in practice, sometimes. When it works it
seems to be totally stable - you can roll over it as many times as you
want - but on the other machines/other profiles it plays the swf once
and then crashes out instantly. Obviously this is not good!! I've tried
just using a wav instead but that didn't work - it didn't crash, just
couldn't hear it (which could be a different matter entirely).

The wierdest thing of all is that on the machines where the whole thing
works, I don't think there is the proper Flash plugin - I can't see any
Flash movies, though I can hear them and links out of them work. Maybe
it's an older plugin. (Our link to the outside world has been down all
day today so I haven't been able to see if I can see Flash on other
servers, or download the latest plugin) On the other machines that have
the proper Flash plugin, where you can normally see and hear Flash
properly, the browser crashes.

Below is a simplified version of the code - this has the same effect on
the browsers:

<SCRIPT LANGUAGE = "JavaScript">
function playaudio() {
document.layers['sound'].document.open('text/html');
document.layers['sound'].document.write('<EMBED SRC="popme.swf">');
document.layers['sound'].document.close();
}
</SCRIPT>
</HEAD>
<BODY>
<layer name = "sound" visibility = "hide"></layer>
<a href ="#" onmouseover="javascript:playaudio()"><img src = "1.gif"
border = 0></a>

Is this a normal problem - is it maybe just a MIME thing? I'm fairly
flummoxed having used loads of different variations and permutations all
day...please help!! It's for a college project which has to be up and
running in 2 weeks(aargh!)- the sound isn't vital but it would be good!
The rest of the page - ie the rollovers- can't be done in Flash, I
don't think, 'cos it's fairly complex javascript going on - which works
fine without the sound. Sorry this has been so long - hopefully someone
can advise?!

Aisling


------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manageratshocker [dot] com. Problems to: owneratshocker [dot] com
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-manageratshocker [dot] com


Replies
  Re: FLASH: .swf with javascript crashing, John Croteau

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]