[PD] flashserver newbie minimalism
André Schmidt
andre at vju-tv.net
Wed Oct 16 15:55:18 CEST 2002
hi,
as flash/actionscript is very new to me, i started to rip with TAE the
'flashserver.fla' to find out how small script can i use and this is what i
got... please correct my errors. if any, because it worx :)
------"global script" -----------------
/* should this prevent scaling of the flash window & fullscreen ?! /*
fscommand("allowscale", false);
fscommand("fullscreen", false);
/* funtion for sending a variable to pd for e.g. [route] */
function pdsendvars (symbol, value) {
fudi = symbol + " " + value + ";"
pd.send(fudi);
}
/* quite selfexplaining */
server = "localhost";
port = 31337;
/* i assume this is what connects/inits the pd<->flash connection ?! */
pd = new XMLSocket();
pd.connect(server, port);
--------------------------------------------------------------
------"button script"-------------------
on (press) {
pdsendvars('fSizeX', fSizeX);
pdsendvars('fSizeY', fSizeY);
}
------------------------------------------------
(there are two "text input" boxes with varNames 'fSizeX' and 'fSizeY')
...
then in pd i just take the mostleft output of [flashserver] and route it
with [route fSizeX fSizeY]...
...hey, this seems nice simple :)
cheers
-andre
ps. i use flashMX (6.0) and flashPlayer6
pss. you dont know flashserver ->
http://www.akustische-kunst.org/puredata/flash/
-------------- next part --------------
#N canvas 356 79 304 261 12;
#X floatatom 14 108 5 0 0;
#X obj 14 62 route fSizeX fSizeY;
#X floatatom 87 109 5 0 0;
#X obj 14 17 flashserver 31337 2;
#X connect 1 0 0 0;
#X connect 1 1 2 0;
#X connect 3 0 1 0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fl-test2.fla
Type: application/octet-stream
Size: 28160 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20021016/c2fa5939/attachment.obj>
More information about the Pd-list
mailing list