realbasic-games
[Top] [All Lists]

Re: Flash in RealBasic

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Flash in RealBasic
From: Stephen Tallent <stephen at tallent dot com>
Date: Wed, 25 May 2005 22:08:01 -0500
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <BAY103-F12D4183DCB7F76B295DD9C10F0 at phx dot gbl>

I would rather send a javascript command to get messages from flash (javascript("button1") for example) to RB. From what I can tell, this isn't easy or might be possible with WebKit. Can anyone post an example that sends messages from Flash to RealBasic?

Your safest bet that will work cross-platform is to use sockets. It is very easy to have an RB socket listening on some port and then have your swf use LoadVars(), XML.Load() or XMLSocket to pass data back and forth between Flash and RB. The nice part about going this route is you only have to rely on webkit and ActiveX for displaying the swf and not passing messages back and forth.

I am considering working around this by just saving a text file to the local hard drive from Flash that RB reads. Not pretty but I believe it would work.

Unfortunately you can't. The Flash player (by itself) doesn't support writing out text files to the local filesystem. There are some obscure hacks that are possible, but not recommended, so you are better off going the socket route.

-stephen
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>