TwelvestoneFlash

Sandy: skinning a sprite with a button (AS2)


Sign in

  • Waiting for Godot ( 730 k posts )
    Just conversation.
  • Thunder Dome ( 23 k posts )
    Photoshop Tennis and Collabs.
  • Photography ( 5.1 k posts )
    For all you shutterbugs, sh...
  • Flash ( 18 k posts )
    ActionScripting to tweens, ...
  • Front End ( 5.9 k posts )
    general front end design an...
  • Back End ( 9.7 k posts )
    serverside scripting, progr...
  • Projects and Theory ( 12 k posts )
    This forum is for discussio...
  • FAQ ( 269 posts )
    All those nagging questions...
  • Design ( 17 k posts )
    graphics & all aspects of g...
  • Purgatory ( 3.6 k posts )
    12stone Jail, feel free to ...
scudsucker
 
2007-10-08

Hi,

Its been a while since I was doing any flash and I have got rusty.

AS2.

I am using the Sandy 3D library by Thomas Pfeiffer.

Is there a was to add a button to the "skin" of a sprite?

Basically what I want is a set of "billboards" - flat planes (Sprite2D(); ?) each containing a loaded in swf, with which the user must be able to interact.

So far my efforts have got an animation running as the skin of a sprite, but there is a button inside the clip I used for teh skin. I can see it but I cannot actually press it.

Or, perhaps, I am barking up the wrong tree, and should be attaching the clip rather than using it as a skin?

Edit - I see papervision can do this (http://www.rockonflash.com/blog/?p=64) - does anyone know how I can get a copy as it is still in private beta?

persist
 
2007-10-08

putting a press event on an item in your animation hasn't worked?

scudsucker
 
2007-10-08

Nope.

The button can be seen, but is not active - it doesnt even show the "hand" cursor.

I imagine this is because the animation is a "skin" - but it seems to me that the facility to have interactive elements in a sprite would be a huge advantage.

pyrogen
 
2007-10-09

i think the skin is just a bitmap representation of the actual object that is being distorted in a 3d world. so in essence the you cannot interact with the bitmap copy of the origional object you are displaying, you would need to add interactivity to the container the object is rendering in.

and if you need to constantly update the render of a skin, you would need to just have the object container trigger the skin btn event so the visual image is updated and reflected with the event.

of course i am no expert in how Sandy handles these events, nor wether or not they a native way to handle events on objects. but you get the idea

scudsucker
 
2007-10-10

Gosh. Looks like I am in trouble!

Oh, well.. will make a plan. I can always write my own 3d engine!

persist
 
2007-10-10

is it always clickable? can you track the x and y coordinate of the face itself and create overlays?

pyrogen
 
2007-10-10

peep this

HOT XXX PV3D PORN

not sandy, btu you can add interactive elements to materials

pyrogen
 
2007-10-10

and here is one for sandy

HOT XXX SANDY PORN

scudsucker
 
2007-10-11

Genius.

Thank you thank you thank you!

JLM
 
2007-10-12

Scudsucker

I think Sandy is supposed to be better than papervision for AS2, but I have only really used papervision AS2 and the Sandy distort class. So my advice is based only on my knowledge of papervision3d.

Buttons in papervision, create 3 planes and change the 'visible' (no underscore or use Tweener with _alpha) property of each to simulate the states. It would be better to use seperate material/plane for the buttons since you want the mesh for any words on a button to be reasonable good and you want the edges of a button to be clean. For buttons, after creating a plane from a material from a bitmapdata you can attach mouse events to the planes.container. Note in papervision I have found that hiding showing planes is faster than modifying the material of a plane.

As3 papervision has an interactive manager but as far as I know it has not been implemented in AS2.

As for source files etc... I have started an AS2 papervision google group let me know if you want to join it

forumname a t justinfront dot net

you can view pages and discussions but I limited joining to being via me just to keep spam out.

I have started a few pages the first has some info on source files of the main svn http://groups.google.co.uk/group/pv3d_as2group/web/0---as2-source?hl=en

other pages show some stuff on settup, I will try to get something up on buttons soon.

But there are some on the list that will help you, you can even use pretty much all as1 code to control papervision, if you find it easier, there is a few as1 examples posted.

scudsucker
 
2007-10-14

Thanks. I am far more AS1 friendly and dont really have time to learn a whole new language (AS3)

However, I really really want to... I'll send you a mail. ( have never used google groups, have no idea how to join..)

Cheers,

Anthony

JLM
 
2007-10-15

If your client can use AS3 then you should since the speed functionality increase is 10x plus, I have an interaction example from the pv3d as3 course I can dig out. If you post a focused question to the As2 group I am sure they may even be able to provide some as1 ideas/examples, I hope to post an As2 button example sometime this week.

Sorry, you must be a member to post to a conversation. Either log in or sign up to get involved.
TwelvestoneFlash

Sandy: skinning a sprite with a button (AS2)