Blog

Sandy 3.0 – Mouse interaction with the texture of a Shape3D

Hello there,

Still for the same project I’m working on, I needed mouse interaction on the texture of 3D objects.
So kiroukou and I started developing it.

Here is a example :)
It’s working but will need some polish and debugging, as it’s still a work in progress.

Use the arrow key and the Numpad 8 and 2.

I have put a mouse_over and mouse_click event on the red shape of the sphere texture.
The scrollbar next the textfield on the Plane3D is a flash component.

++ :)

  • Tom

    This is exactly the sort of thing I am trying to get going at the moment. I’ll keep plugging at the moment, but I would love to see an example of how you put this together?

    So far my approach has been using MovieMaterial with the relevant components in the movieclip, and using a rather convoluted means of determining which component relates to a click on the 3D model.

    As I said, I’ll keep research and plugging away but some basic source would be much appreciated.

    cheers mate!

  • Tom

    This is exactly the sort of thing I am trying to get going at the moment. I’ll keep plugging at the moment, but I would love to see an example of how you put this together?

    So far my approach has been using MovieMaterial with the relevant components in the movieclip, and using a rather convoluted means of determining which component relates to a click on the 3D model.

    As I said, I’ll keep research and plugging away but some basic source would be much appreciated.

    cheers mate!

  • zeflasher

    Hello Tom,

    You can find the source in the Sandy 3 svn here
    http://code.google.com/p/sandy/source

    I will update soon some other functionalities like having the buttonMode working for buttons + text links in text fields ( I just nee to commit them :) )

    Don’t hesitate to come on the mailling list too, or ask question in the forum on flashsandy.org

    C ya mate.

  • zeflasher

    Hello Tom,

    You can find the source in the Sandy 3 svn here
    http://code.google.com/p/sandy/source

    I will update soon some other functionalities like having the buttonMode working for buttons + text links in text fields ( I just nee to commit them :) )

    Don’t hesitate to come on the mailling list too, or ask question in the forum on flashsandy.org

    C ya mate.

  • Pingback: [UPDATE] Sandy 3.0.1 release | ideux()

  • Arunava

    Hi Mate,

    Its great to see your example. I am trying out a similar sort of thing using a 3d sphere and a moviclip (an external swf imported to library) from the library. I also used the “.enableInteractivity = true;” property as mentioned in the “Sandy3d” tutorial on Moviematerial interactivity. The swf is appearing as a skin, however it is not interactive. Will be able to throw some light on it?
    I also tried to get your example code from the path “http://code.google.com/p/sandy/source”, but was unable to locate it. If possible, will be able to give the link for your source code?

    Please help!!

    Thanks in advance,
    Arunava

  • Arunava

    Hi Mate,

    Its great to see your example. I am trying out a similar sort of thing using a 3d sphere and a moviclip (an external swf imported to library) from the library. I also used the “.enableInteractivity = true;” property as mentioned in the “Sandy3d” tutorial on Moviematerial interactivity. The swf is appearing as a skin, however it is not interactive. Will be able to throw some light on it?
    I also tried to get your example code from the path “http://code.google.com/p/sandy/source”, but was unable to locate it. If possible, will be able to give the link for your source code?

    Please help!!

    Thanks in advance,
    Arunava

  • Arunava

    Hi Mate,

    Thanks for the demo. I am trying out something like this, without any luck. I imported an external swf containing a button in the library and tried to use it as a skin on a 3d sphere. The code is something like this:
    sphere.appearance= new Appearance(new MovieMaterial(new f()));
    where f() is the instance name for the MovieClip (linkage identifier present in library)

    The skin is appearing, however the interactivity of the button is lost.

    I also used the “enableInteractivity = true;” property, as per Sandy tutorial. Still its not working. Will you be able to shed any light?
    I also tried to get your source code from the above link, but I am not able to get it. Will it be possible for you to share your source code?

    Thanks in advance.
    Arunava

  • Arunava

    Hi Mate,

    Thanks for the demo. I am trying out something like this, without any luck. I imported an external swf containing a button in the library and tried to use it as a skin on a 3d sphere. The code is something like this:
    sphere.appearance= new Appearance(new MovieMaterial(new f()));
    where f() is the instance name for the MovieClip (linkage identifier present in library)

    The skin is appearing, however the interactivity of the button is lost.

    I also used the “enableInteractivity = true;” property, as per Sandy tutorial. Still its not working. Will you be able to shed any light?
    I also tried to get your source code from the above link, but I am not able to get it. Will it be possible for you to share your source code?

    Thanks in advance.
    Arunava

  • zeflasher

    Hello Arunava.

    First thx for your feedbacks. So regarding the source code of the example. I don’t seem to find it anymore :/. Anyway this example has been built on “work in progress” classes. Those classes and the way they were bounded to sandy classes has changed when they have been fully integrated into sandy by kiroukou.
    So the best thing you should do is going here: http://code.google.com/p/sandy/source/browse/trunk/sandy/as3/trunk/examples/flashCS3/Demo_Interactivity/ where you’ll find an interactivity example.
    Looking at the example you’ll see this code
    [as]
    var s:Sphere = new Sphere(“sphere”,100,10,10);
    s.enableEvents = true;
    s.addEventListener ( MouseEvent.MOUSE_DOWN, _draw );
    [/as]
    surely what you are looking for…

    Take care

  • zeflasher

    Hello Arunava.

    First thx for your feedbacks. So regarding the source code of the example. I don’t seem to find it anymore :/. Anyway this example has been built on “work in progress” classes. Those classes and the way they were bounded to sandy classes has changed when they have been fully integrated into sandy by kiroukou.
    So the best thing you should do is going here: http://code.google.com/p/sandy/source/browse/trunk/sandy/as3/trunk/examples/flashCS3/Demo_Interactivity/ where you’ll find an interactivity example.
    Looking at the example you’ll see this code
    [as]
    var s:Sphere = new Sphere(“sphere”,100,10,10);
    s.enableEvents = true;
    s.addEventListener ( MouseEvent.MOUSE_DOWN, _draw );
    [/as]
    surely what you are looking for…

    Take care

  • Pingback: Dev by MX Sandy 3 0 Mouse interaction with the texture of a Shape3D | Shed Kits()