ActionScript 3.0 :: Use StartDrag With A Movieclip That Contains 3D Cube?
Dec 20, 2009
I'm trying to use startDrag with a movie clip that contains a 3D cube (comprised of 3D planes). It only moves the face of the cube, but not the other sides. Can one use startDrag in 3D space, or is there another method?
View 2 Replies
Similar Posts:
May 19, 2011
as you can see, I have a container MC which I have added to the stage. I set its drag constraints using a Rectangle(). I then add the 'cat' child movieclip to the container, and I want this to be dragable too. However, as soon as I click on my cat when testing the MC. It shoots to point x=0 y=0 on the stage and doesn't move.
The container MC can be moved without any trouble.
If I remove the rectangle bounds from the containers startdrag() function. both MC's can be dragged without any issue.
//panning ability
my_x = 800 - myImage.width;
my_y = 480 - myImage.height;
[Code]....
View 3 Replies
Feb 11, 2011
i have an .as class that extends mx.containers.Canvas (it's a draggable border of a resizable component), it becomes draggable on MOUSE_DOWN and stops being draggable on MOUSE_UP, MOUSE_OUT and ROLL_OUT. before calling startDrag() i create a Rectangle to define the drag area, i also have a _dragging: Boolean variable to control if it's draggable at the moment. the problem is that when i click this border it jumps to a negative coordinate without calling startDrag or switching _dragging to true.
i've overriden get x, set x, get y, set y and move() methods in order to solve it but the only thing i got was the fact that position changes without calling coords setters or move(), but at the moment it's changed a getter is called and returns new (negative) value so my question is what happens on startDrag() and how to filter unwanted incoming coords values?
View 3 Replies
Apr 6, 2012
I created a rotating cube using the below code and add bitmaps as sides of the cube. I was wondering if it's possibly to assign movie clips as sides of the cube so I can have some interaction with them.
[Code]...
View 1 Replies
Feb 8, 2012
Does 3d work in flash? If so, links to a quick tutorial? All I want to figure out is how would one draw a block on stage. Bonus points if you can tell me how I can have 6 movieclip on each of the 6 faces on the cube.
View 2 Replies
Aug 10, 2011
A friend need's to create a flash banner like this site. i write this action to a movie clip, but the clip have to be on movement.
[Code]...
Is there a way to use the startDrag function on a movieclip on movement?
View 1 Replies
Jan 11, 2010
I'm trying to add a tooltip of sorts to a mc. the mc has the buttonMode set to true and when I rollover it I want it to display another movie clip as a tooltip. I've worked out how to do this with startDrag. The problem is that unless i remove the event listener for rollover the mouse flickers and won't work properly. I fixed this by removing the event listener in the same function, which works great. The problem is that I have to add and event listener for rollout, but the flickering starts again when its added.
Here's the code I have so far:
clapperHit_mc.addEventListener(MouseEvent.ROLL_OVER, videoCursor);
clapperHit_mc.buttonMode = true;
function videoCursor(event:MouseEvent):void {
videoCursor_mc.startDrag(true);
videoCursor_mc.visible = true;
videoCursor_mc.gotoAndPlay(1);
View 2 Replies
Mar 11, 2004
i want to use the simple startDrag-function to drag a movieclip. when the option to lock the movieclip is set to false, there's no problem but when i set this option to true, so the movieclip should follow the mouse locked to the center, my movieclip just disappears. i used this code:
[Code]...
View 5 Replies
Oct 8, 2010
I am working on a simple drag and drop game which works fine by itself.
But the problem is that when this slide is loaded into a bigger gameloader swf. The x axis does not update itself.
Thus when the draggerable gets drag, it moves in relative to gameloader's stage size instead of its own stage size..
Is there any ways that I can lock coordinates of the X and Y axis to that of the game instead of the gameloader?
View 0 Replies
Sep 18, 2009
making a cube menu like this? [URL] post here or mail me to evilmini_me_2002@[URL] or add me on msn: metilic@[URL], ty for your time
View 1 Replies
Feb 10, 2009
I want to load a completely different .swf into a 50 *50 Red cube which is called a.swf.However i want the newly loaded .swf which is called b.swf to appear in a.swf as its background only so you can still see the red cube .When i try to do this all i get is that the new b.swf completely replaces the old a.swf which becomes completely invisible.I have tried using masks and also holders for the new b.swf but still can not acheive my goal.
View 1 Replies
Sep 9, 2009
I got the nice 3d cube from eric Lin. [URL]It would be very cool if the cube can build itself, before it starts rotating. So that 6 faces(left on the stage) transform to one cube(right on the stage).
View 0 Replies
Jul 6, 2010
i'm trying to use for the first time papervision.I'm able to add a cube to the scene. now i wanna add interaction at the cube. i try with
Code:
InteractiveScene3DEvent.OBJECT_PRESS
but it doesn't do anything.another thing that i've not understand is that if delete this instruction:
Code:
renderer.renderScene(scene, camera, viewport);
i don't see anything.This is the code:
Code:
import org.papervision3d.view.Viewport3D;
import org.papervision3d.cameras.*;
import org.papervision3d.scenes.Scene3D;
[code]...
View 5 Replies
Oct 3, 2011
A cube that will rotate automatically .Images from XML will be shown to each side of the cube and each side to have a url so when you click on it to redirect you to a website.More specific, something like this might help you understand more clearly.. 3D Cube Banner Rotator in the activeden(I can't post a URL yet).Without texts,shadows etc.
View 5 Replies
Aug 17, 2009
I'm new to 3D in Flash, I've worked for a while with basic CS4 3D functions (rotation flat objects basically).
Now, I want to create a cube dynamically and start working with it.Since I don't want to start messing around with Papervision or Away3D for a basic cube.
I wanted to know how I can create a cube using AS3 in CS4?
View 11 Replies
Feb 1, 2010
I need to make a 3D cube menu. All 6 faces should be a link to another scene (or basically just a link to anything). For rotation wise, it should turn towards the left when the user click and drag the cursor from left to right.[URL]
View 1 Replies
Sep 24, 2009
I want to make a rotating cube with rounded edges.I already saw lots of cube sources, but i need one with rounded edges.My maths actionscript is not so good.
View 1 Replies
Jun 28, 2010
I've got a 3d cube that rotates but when the the front side of the cube is in the back during the rotation, it blocks the view of the back side because it's child index is still higher. Is there anyways around it, I tried detecting the sides coordinates by using globalToLocal3D but the z property is always 0. below is my code, just copy and paste if and you'll see what I mean
var cube:Sprite;
var frontSide:Shape;
var rightSide:Shape;
var leftSide:Shape;
[Code]....
View 1 Replies
May 16, 2010
I'm trying to create a Rubik's Cube in Flash & Papervision and i'm really stuck here. I'm up to the point where i can rotate any plane of cubes once, but after that...it's messed up because all local coordinate systems are messy.I dont really know where to go from here, can anybody give any advice on what do do? I'm not looking for 'read about transformation matrices', i know i should (and i am doing that), but i'm not really sure what to look for.My idea is that, after each rotation, i should fix each coordinate system of each cube again, but i have no idea how. Any hints on what i want to achieve (in words)
View 3 Replies
Aug 11, 2011
when I try to render a cube using Away3D + Molehill, I only get a white default screen, I followed the instructions here: hhe only thing I did not do, was the part that talks about the patch, cuz If I do that I get errors like when I try to import the Sprite class, for example.Im using FB 4.5.!
This is my code:
package
{
[code].....
View 1 Replies
Jan 31, 2012
I'm trying to build game like [url]... in actionscript 3 (flash builder).I am able to create an array of bricks (that are visible on game start), but I have no idea how to find a group of bricks in array.[code]...
View 1 Replies
Jan 27, 2009
I have a Cube, and I want to change it's width depending on it's container width...
ActionScript Code:
private var _sceneWidth:Number = 500;
override public function set width(value:Number):void
[code]....
View 1 Replies
Oct 28, 2009
I got a problem with a nice rotating cube(from ericlin) on the mac. This is the link: [URL] When i click outside the swf movie(in html) the cube becomes nuts and rotates very very fast. I only have problem on mac. I already tried things like this, but no succes
[Code]....
View 0 Replies
Sep 20, 2010
Ive created very similar cube in papervision except bitmap on walls.how can i rotate my cube like in appendix?
View 2 Replies
May 4, 2011
I can get the cube root of a number by setting the index to a third:
ActionScript Code:
Math.pow(27, 1/3)
In this case though, the result is NaN
ActionScript Code:
Math.pow(-27, 1/3)
Why doesn't flash just assume that the result I am after is the simple result of -3? Also, how can I get around this?
View 4 Replies
Jul 11, 2011
I thought I'd have a mess with the 3D stuff in CS4 as it's not something I generally have to go anywhere near. I decided to make a dice, so 6 nice and easy square sides with obvious numbers on.
As I like to keep things simple I thought I'd go for a container movieclip and stick the 6 sides in that, rotated and positioned, to form the cube in the container. All I'd then have to do is spin the container and it would look perfect. Well the first part was easy, but when I rotate the container the Z order of the sides goes funky, they maintain the Z position they in effect got when added to the container, so side 6 is always on top of side 1 etc.
This obviously struck me as a bit mental and I'm sure others must have come across this before, any immediate thoughts? I was thinking about maybe just doing some back face culling but then my brain froze a bit about trying to figure the windings out of the faces within the container and translating those to a global co-ordinate space.
View 0 Replies
Aug 18, 2011
I am building a 3D cube everything its fine.. but this code, loads the cube again the container. It must leave the cube alone, (the cube its on holderMC container). The content of my page its going to be in holderMContent container:
function faceClick(e:MouseEvent):void{
var loadit = new Loader();
holderMContent.addChild(loadit);
loadit.load(new URLRequest("contacto.swf"));
}
I need contacto.swf to loads over my main.swf its almost done, but why it loads the cube in that container.
View 1 Replies
Oct 9, 2011
I want to pot a movie on a moving 3d Cube. A want tha same movie on all faces. I've imported the movie... but the I do not know how can I put it on the faces of the cube.
_cube = new Cube(new MaterialsList({all:_mov}), 40, 0, 40);
But I think is not a MaterialsList.... or what?
View 2 Replies
May 2, 2010
I'm following the tutorial "PAPERVISION3D Basics Tutorial". I'm developing on mac and i've setup the global class path in the ActionScript 3.0 settings in the preferences panel like this:
[Code]...
View 7 Replies
Dec 9, 2011
I"m trying to reload all the sides of cube on the fly. I'm using an example I found on here and just modifying it. I've tried a couple different ways, but it seems each time after I load the material it will no longer spin how initial one did and leftovers of the old one remain and keep spinning. This is my first time playing with papervision so I'm sure it's somehting simple I'm doing wrong. I've attached the .fla file, it's saved for CS5
View 1 Replies