Monthly Archives: April 2007

Well, two.. actually.

Did some *amazing* acting for Gareth’s project on Sunday and a little filming when his acting efforts were required.

But in another collaboration I’m working with Barry Pace on his project Greens at Twenty After, a interactive short that explores a new format of film he has conceptualised.

He’s recently been to Cornwall to work with some recording artists for an original score for the piece. Tonight we were digitally captured the recordings from an old 4-track mixer that he can now send on to his sound engineer who’ll mix down the final audio for the film.

My main contribution though will be developing a platform for the project’s delivery. As important as the film itself are Barry’s ideas regarding the whole philosophy of platforms of interactive narrative, their commercial exploitability and success – this was in part the focus of his dissertation. Essentially he intends that more films could ultimately be created for a platform specific to interactive films such as his, that utilise high-speed bandwidth in a currently unexplored way.

My job then is to seemingly connect an offline application seamlessly to texts primarily stored online, unobtrusively, to blur the (present) very apparent boundaries between film, online texts, even games, creating the opportunity to enable a convergence of functionality and hopefully, success.

Following up a previous post, I’ve now managed to fully render the virtual networks connecting users and boards in all directions.

Last Friday I went to Matt Northam with some issues nesting repeat regions to achieve this, basically I had an SQL query returning the ‘boards’ of which user was part of, based on session variables, then needing to use those results in a second query matching other users who are also part of these user groups – the first post explains this a bit better. Anyway we couldn’t fix it, the first repeat region would execute but the ‘inner’ would go unrecognised.

Later on though, I tried again instead with completely creating the second recordset (the inner query) actually within the outer repeat region, meaning the SQL would be executed each time the loop is initialised, guaranteeing it being refreshed – and it worked. It was then an intricate case of appending and aggregating arrays of the recognised users into larger container arrays – essentially because one user could relate to another user through multiple connections – then looping through these to display them properly.

With some tweaking this was replicated for the Immediate Network based on finding users connecting to groups that you have created, then formatting everything so usernames and board names are links to relevant pages.

A lot of conditional statements and some hand-coded PHP and SQL were needed but the end result is quite useful.

Also on Friday I spoke to Matt about some problems passing PHP variables to Flash. With absolutely no reason that either of us could find, Flash was accepting some variables – static, sessions and POST variables – and completely ignoring those defined by the GET method, which was needed. In the end we used the <param> and <embed> tags to pass variables directly, rather than using the Actionscript of before to read an echo output from the PHP. GET variables worked fine this way.

This now means I have a complete communication between the SQL through PHP to Flash with a pretty clean retrieval from the database when I need it. The way in which Flash Media Server assigns instances to .swf visits means I can also handle the large majority of user authentication through the PHP/HTML that I’ve been developing so far, perhaps only to use further Actionscript authentication as additional verification.

Gareth’s problem is sorted.

My last post shelled out the issues we were having with calling functions local to Director from embedded .swf cast members using Actionscript. With much trial and error attaching Lingo to various places within the .dir file – to the .swf cast member on the stage, the stage itself, the frame etc. – the problem actually seemed to be with the type of script handling the functions.

My Lingo lingo isn’t perfect so excuse any wrong terms in this explanation but essentially it seems assigning scripts to those mentioned places are then attached sprite behaviours, determining self-contained intrinsic actions. I got the function calling to work by storing very basic actions in a stand-alone cast member, unattached to stage, frame, .swf etc. The cast then recognises this as a movie script – obviously there’s some difference in the way Director executes them, but it seems to do the trick either way.

Gareth is pretty pleased with the results, I’ve left him with finding the equivalent method of sending asset-specific parameters to the functions to interpret them in different ways. This means Director can store sets of functions by class – sets for handling button, people, variables, movies and so on, hopefully condensing the amount of code transferring both ways and being ultimately performed at runtime.

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.

Oh yeah also good luck to everyone who entered the Computer Arts thingy – literally only one entry last year hopefully we’ll get a bit more representation this year.

Hope the Easter post didn’t ruin everything.

I get up in the evening and I ain’t got nothing to say.