PDA

View Full Version : Flash to trigger javascript?



FlashFish
July 11th, 2002, 02:06 PM
ive got some javascript that makes the browser shake on the press of a button. I wanna trigger this shake when my flash movie reaches a certain frame. is this possible? This is (i think) the code...

<script language="JavaScript1.2">

<!-- Begin
function shake(n) {
if (self.moveBy) {
for (i = 15; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,i);
self.moveBy(i,0);
self.moveBy(0,-i);
self.moveBy(-i,0);
}
}
}
}
// End -->

</script></p>
<p align="center"><font face="Comic Sans MS, arial"><!-- AdSpace site=amused pageid=21575--> <script
language="javascript"
src="http://adforce.ads.imgis.com/?addyn|2.0|275|82145|1|1|target=blank;KEY=key1+key 2+key3+key4;loc=700;">
</script>
<noscript></noscript></IFRAME><!-- /AdSpace --> </font></p>
<form>
<p align="center"><font face="Comic Sans MS, arial"><input
type="button" name="hit me!" value=" I Dare "
onclick="shake(5)"> </font></p>
</form>

FlashFish
July 11th, 2002, 02:08 PM
Hey, thats not quite right.... ill find the whole code later, but is it possible in theory?

FlashFish
July 11th, 2002, 02:16 PM
(script language="JavaScript1.2">

(!-- Begin
function shake(n) {
if (self.moveBy) {
for (i = 15; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,i);
self.moveBy(i,0);
self.moveBy(0,-i);
self.moveBy(-i,0);
}
}
}
}
// End -->

(/script>(/p>
(p align="center"><font face="Comic Sans MS, arial">(!-- AdSpace site=amused pageid=21575--> (script
language="javascript"
src="http://adforce.ads.imgis.com/?addyn|2.0|275|82145|1|1|target=blank;KEY=key1+key 2+key3+key4;loc=700;">
(/script>
(noscript>(/noscript>(/IFRAME>(!-- /AdSpace --> (/font>(/p>
(form>
(p align="center">(font face="Comic Sans MS, arial">(input
type="button" name="hit me!" value=" I Dare "
onclick="shake(5)"> (/font>(/p>
(/form>





(=<.