Flash AS3 Com Problem

the standard way of communicating with flash seems not to work with AS3. variable are recognized by vvvv but flash doesnt react to anything.

any idea ?

maybe the devs can help, how does vvvv access the variables, any documentation so we can nail down the problem and find a workaround…

cheers

vvvv just passes the data from the pins to the Get_FlashVars and Set_FlashVars method of IShockwaveFlash interface of the Flash.ocx
So i guess macromedia changed something when introducting AS3.

This is principally the same ocx that Internet Explorer uses to display flash in web pages, so i presume if there is something broken with later flash versions, you would get the same kind of problems with any JavaScript-Flash interactions in within IE.

Anyway googling for flash.ocx shows a lot of stuff and some rather serious security concerns.

the flash activex control is exposing to simple functions:
SetVariable(name, value)
GetVariable(name)

so you say GetVariable() still seems to work but not SetVariable()? if you find documentation on changes regarding the activex control please post them here.

thanx for the reply guys

U7, if you learn anything, please post, I am in the process of learning Flash CS3 with main purpose to communicate with vvvv, and your post was a shock for me!!

found something, unfortunatelly its not a solution
LINK

vvvv + as3 is exactly behaving as mentioned in that report. there are alternatives such as localconnection and EI but not as convenient as the old method.

a workaround would be a as2 file connecting via localconnection to the as3 container.

oh man, i hate flash

You can access to limited number of object properties.
in VVV use
mc._x
mc._y
mc._name

and in AS3 you can get like this

var mc:MovieClip = new MovieClip();
mc.name = “mc” //this line is important
varible = mc.x

the problem is you can only pass Number Variables, I can pass string with “name” variable, but only can use this once and the movieclip “name” change and dont work anymore.

can you provide a v4 + flash example ?
cheers

Send you an exaple v4p swf and fla

var mc1:MovieClip = new MovieClip();
mc1.name = “mc1” //important Line
addChild(mc1) //important Line

i make a simple change, you can pass an string in name variable, and when you capture the value, restore the name original value

if(mc1.name != “mc1”){t0.text = mc1.name;mc1.name = “mc1”}

Cheers

vartest.rar (7.3 kB)

cheers mate, looks like this is working, great !

but i can’t recompile the swf due to varClass is missing…couldnt find anything about it with google. what is varClass ?

chris

UUU sorry.
varClass its only an extension of MovieClip.
I try this to see if i can use more variables like experiment, but it fail and only works with mentioned vars.

Only declare Movieclip agaist varClass and you can sucesfull make this work.

An update without varClass…

vartest.rar (7.6 kB)

cool, it works ! very nice and brilliant work on this problem.
chris

see this thread for an event handled, scalable, AS3 solution using OSC and flosc

vvvv_OSC_AS3.zip (11.2 kB)

Ah, this is good news as I plan to upgrade to Flash CS4 very soon, thanks for the tips guys.