Skip navigation

One of my collaborations is with Gareth Leeding, who’s working on a multi-screen interactive game based on Orwellian totalitarian ideas and voyeurism, he’s called it ‘Start the Surveillance’.

I’ve been called in to do some design and Flash dev, lately trying recall my Lingo skills from last year’s 3D Shockwave project to establish a smooth communication between Actionscript and Director so to use Flash-based interactivity with Director’s better video support across a stage large enough to cross the desired five screens.

After much trial and error Gareth found the basic principle for sending Lingo via Actionscript was to use the getURL action. Usually in Flash it’s used to send Web addresses to the browser. Essentially what it does seems to be instead of talking to the actual browser, it sends the URL parameter to its _parent container – which generally is a browser. When it’s used in a .swf, embedded within a Director file, that .dir is then the parent so that receives the data. This data can be passed Lingo. For example:

function initDir() {
getURL(“lingo: go to the frame”);

So we’ve then experimented in different ways to send more actions, finding a few problems with multi-line commands, whether sending multiple URL parameters:

function initDir() {
getURL(“lingo: go to the frame”);
getURL(“lingo: myVar = 10”);

or sending multiple line strings with the special expressions:

function initDir() {
getURL(“lingo: go to the frame \n myVar = 10”);
// the expression “\n” calls a new line

Neither worked as intended so I started experimenting with other methods, then realising the most efficient and probably most straightforward way is actually to use the embedded Actionscript to call local Director functions. This way Director can then handle not only large volumes of functions, each of multiple lines, but the entire script can be written as a single cast member and accessible throughout the whole project – not needing to call variables or functions from Flash at various points so it can do all the calculations etc. locally as well. Not entirely sure why we didn’t think of that earlier.. hmm.

With a little help from Doug the code is seemingly as easy as:

function initDir() {
getURL(“lingo: myDirFunction”);

calling myDirFunction() in the .dir – seemingly that easy – it’s still not working  We’ve had a word with Mark who thinks it may be some version issues. We’ll keep at it, if this gets nailed Gareth is away.


One Comment

  1. Your primary error was deciding on creating a production using Director :/

One Trackback/Pingback

  1. By One Quick Fix « hibbins on 14 Apr 2007 at 12:38 am

    […] hibbins « We Can Work it Out […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: