How can I animate movements while orbit controls? - html

I am working on a project of elbow and I need to use movement of parts(.obj) file on click. For help here is URL of my project on glitch - “https://glitch.com/edit/#!/bead-big-purchase”
I am expecting that when I click the object while using orbit control and movements it should work normally but it’s not.

Related

Cocos2dx scene in child window

The application I am writing is not a game, but does require many of the features one would use in a game... displaying a 2D scene, moving the camera to pan and zoom, rotating or otherwise animating objects within the scene. But the display of the scene will be controlled via numerous regular windows controls.
The best comparison I can think of right now is a level editor. The majority of the user interface is a standard window with panes that contain different controls. The scene is contained in another child window. When the user makes adjustments such as camera location, the scene responds accordingly.
So far, everything I've seen about cocos is geared around a single window. Is it possible to embed a scene into a child window as I've described?
You can add your custom layer to your main scene using Director::getInstance()->getRunningScene()->addChild(...) function

Away3D rotate scene with mouse

I have a simple scene using the Away3D library and the scene display a simple shape. I'm now dealing with Mouse Events trying to get the effect of rotating the 3D object based on the main coordinates system, but i do not get how to get the initial values when mouse is pressed and what to assign when mouse is moving.
Anyone can help me?
Look at the Intermediate Globe example in the Away3D repository. There is an HoverController class that should have all the functionality you need to handle mouse inputs and rotate the camera around your 3D shape.

ActionScript: fruit ninja swipe

I'm trying to build the fruit ninja type swipe to some of my buttons in Flash CS6 and ActionScript3.
In trying to figure it out this is what I have come up with:
get the coordinates of where the user first put his finger mouse down,
then where we lifted it
see if your button touches any of those coordinates (if yes, execute that button code)
run some kind of animation between the first two coordinates (mouse down, mouse up points)
am I on the right track?
Also, has anyone already done this so that I can look at their code?
Thanks!
Check out this series on the subject by the great Emanuele Feronato, using the physics library Box2d:
Slicing, splitting and cutting objects with box2d
Part 2: Actually split the object
Part 4: Using real graphics
(I couldn't find part 3 but I don't think we're missing anything too important there). Hope this helps!

Are there any libraries providing mouse-driven zoom/pan for pure AS3 projects?

Today I wanted to add mouse-driven zoom and pan functionality to a pure AS3 project - something like the Google Maps interface. I was surprised that I couldn't find a good package or library to do this already - I'm using FlashDevelop rather than Flash CS3, so the nice VCam tool available as an FLA is no use.
There's nothing very complicated involved in implementing zoom/pan, although it can be fiddly and time-consuming to get right, but since zooming and panning are pretty common things to want to do I wondered if anyone could suggest a 'correct' way to do this in the Flash world, or a good library available that I haven't been able to find.
I found exactly what I was looking for in the flare library's PanZoomControl:
Interactive control for panning and
zooming a "camera". Any sprite can be
treated as a camera onto its drawing
content and display list children. To pan and zoom
over a collection of objects, simply
add a PanZoomControl for the sprite
holding the collection.
var s:Sprite; // a sprite holding a collection of items
new PanZoomControl().attach(s); // attach pan and zoom controls to the sprite
The mouse controls are also implemented as you'd expect:
Once a PanZoomControl has been
created, panning is performed by
clicking and dragging. Zooming is
performed either by scrolling the
mouse wheel or by clicking and
dragging vertically while the control
key is pressed.
You could use a 3D library such as Papervision3D or FIVe3D. Then just move your camera based on different mouse events/gestures. Or use the built in z-axis in FlashPlayer 10 to get the zoom effect.

AS3 - how to start all over again a flash movie

This may be very simple, but I have no idea how to do this.
I created a photo gallery in AS3, everything is on one keyframe. In this photo gallery I have a link to home. My goal is, when someone clicks the "home" link I want everything to start over. Any ideas on how to do this in AS3?
Appreaciate it.
L.
call flash player container
usually the HTML page and use JavaScript to reload the flash player
flash.external.ExternalInterface.call(jsFuncRestart);
jsFuncRestart is a JavaScript function in the HTML file
and now in the js function just create a new object and replace the current flash object
with the new one
You probably animate everything with as3, right? Then just make a reset function that puts all the images back to their original place and start the animation all over.