[Papervision3D] Trying to access methods in a class attached to a PreciseMovieAssetMaterial on a Cube
Noah Aronsson-Brown
noah at rdai.com
Wed Oct 17 09:34:54 PDT 2007
I was able to communicate between two swf's one using a document class, and
the other with timeline script using the LocalConnection class.
you set up a LocalConnection var in both scripts like so:
var conn:LocalConnection = new LocalConnection();
you open a line of connection and test it in the client script like so:
conn.client = this;
try {
conn.connect("myConnection");
trace("connection successful");
} catch (error:ArgumentError) {
trace("Can't connect...the connection name is already being
used by another SWF");
trace(error);
}
then in order to access or trigger properties or functions, you use this
syntax:
conn.send("myConnection", "closeSkip");
you can also pass arguments after the function name eg:
conn.send("myConnection", "closeSkip", arg1, arg2);
Hope this is what you're looking for?
Noah
Dave Lenz wrote:
>
> Hi everyone...
>
> I'm trying to access a class which I've attached to a MovieClip which
> I then used as a material through PreciseMovieAssetMaterial. I did
> this with:
>
> private var back:PreciseMovieAssetMaterial;
>
> and then some function with something like:
>
> back = new PreciseMovieAssetMaterial
> ("com.ypmits.pictviewer.MovieAsset");
> front = new BitmapAssetMaterial("bleu");
> grey = new ColorMaterial(0x333333, 100);
> kubusMaterialList = new MaterialsList();
> kubusMaterialList.addMaterial(front, "front");
> kubusMaterialList.addMaterial(back, "back");
> kubusMaterialList.addMaterial(grey, "left");
> kubusMaterialList.addMaterial(grey, "right");
> kubusMaterialList.addMaterial(grey, "bottom");
> kubusMaterialList.addMaterial(grey, "top");
> kubus = new Cube(kubusMaterialList, 400,20,300);
> scene3D.addChild(kubus);
>
> As you can see I've put a classpath on the back. How do I access
> methods, properties etc. which are in the class
> 'com.ypmits.pictviewer.MovieAsset' in the back-material?
> For instance there's a FLVPlayback component in the MovieAsset-class
> which I want to pause/play from somewhere on the stage.
> I've tried using 'back.texture' and 'back.movie' but both don't work...
>
> I'm pretty stuck :(
>
> Greetings
> Dave Lenz
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
--
View this message in context: http://www.nabble.com/Trying-to-access-methods-in-a-class-attached-to-a-PreciseMovieAssetMaterial-on-a-Cube-tf4640762.html#a13257083
Sent from the Papervision3D mailing list archive at Nabble.com.
More information about the Papervision3D
mailing list