Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,257 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,204 people online right now. Registration is fast and FREE... Join Now!




Actionscript: Using flash to start a javascript applet where the movie

 
Reply to this topicStart new topic

Actionscript: Using flash to start a javascript applet where the movie

Bungleigh
10 Oct, 2008 - 04:41 PM
Post #1

New D.I.C Head
*

Joined: 10 Oct, 2008
Posts: 1

Hello!

I have an arcade site that requires new games be uploaded in .swf format. I want to add another game that runs in a javascript applet. (nintendo emulator that runs in user browser, game file is server side)

The javascript that the .swf must display on the page is

CODE

<applet name="vNES" code="vNES.class" archive="/vnes/vnes.jar" width="512" height="480">
<param name="sound" value="on" />
<param name="timeemulation" value="on"/ >
<param name="fps" value="off" />
<param name="stereo" value="off" />
<param name="rom" value="kungfu.nes" />
<param name="showsoundbuffer" value="off" />
<param name="scale" value="on" />
<param name="scanlines" value="off" />
<param name="nicesound" value="on" />
<param name="romsize" value="24592" />
</applet>


I was told by someone that I can use document.write to enter my code to the page as the CMS creates it, but I'm failing miserably and just can't figure it out. I tried this as he suggested, but I get "parse error Invalid Expression"
CODE

var js:String = "java script:document.write(All_Of_Your_HTML);";
getURL(js);


Can anyone please point me in the right direction? I've been pulling my hair out for over a week trying to get this to work. Any help will be greatly appreciated!!!
User is offlineProfile CardPM
+Quote Post

BetaWar
RE: Actionscript: Using Flash To Start A Javascript Applet Where The Movie
10 Oct, 2008 - 05:05 PM
Post #2

#include <soul.h>
Group Icon

Joined: 7 Sep, 2006
Posts: 2,020



Thanked: 81 times
Dream Kudos: 1175
My Contributions
I would suggest googling "Flash/ Javascript communications" There are quite a few things out there (already made) that allow you to talk between flash and JS (like call JS functions from flash and vice-versa).

One thing that may help in finding things on this is calling the game a Java applet, because Javascript is run totally in browser and doesn't require compiling (which Java does), that is the reason you have .class files and things of that sort.

Here is the first result I got when I googled it:
http://kb.adobe.com/selfservice/viewConten...rnalId=tn_15683

It is from adobe and looks to be what you are talking about wanting to do.

HTH
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 04:31AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month