ActionScript 3.0 :: RotationX And RotationY And RotationZ And PerspectiveProjection Together Break MouseEvent?

Apr 21, 2009

When I change the rotation of a movie clip, and apply PerspectiveProjection, all mouse events applied to that movie clip and all the movie clips inside that movie clip break.The mouse event bellow will not work for me.
 
a_mc.rotationX = 1;
a_mc.rotationY = 1;
a_mc.rotationZ = 1;[code]........

View 2 Replies


Similar Posts:


ActionScript 3.0 :: RotationY/PerspectiveProjection/width Calculation?

Dec 18, 2009

Basically I have used PerspectiveProjection so I may rotate multiple images about their centre so they don't appear differently rotated because of their x-position on the stage.My problem is calculating the width of the rotated images. When I rotate an image 45 degrees, my width ends up being ~146, but based on the following (my comments from my code), it should be closer to 141:

Code:
// ^C
// / |

[code]......

View 7 Replies

ActionScript 3.0 :: What Do ScaleX / ScaleY / RotationX / And RotationY Do

Aug 2, 2009

What do scaleX, scaleY, rotationX, and rotationY do?I'd like to test it out myself but I'm completely new to Flash CS4 and I don't know how to control these values outside of ActionScript

View 3 Replies

ActionScript 3.0 :: RotationY And RotationX Causing A Flickering?

May 26, 2010

I'm using(tweening) the rotationY and rotationX properties on movieclips a layer above a background, bitmap or video, in two respective projects. There is a flickering of the movieclips and some bizarre distortion going on. I can't seem to find anything on the web about this, -has anyone else encountered this problem? Is it a known bug? Is there a workaround?

View 2 Replies

ActionScript 3.0 :: Sprite Becomes Blurry When Changing RotationZ?

Oct 28, 2009

Does anyone know what might be causing this?  Perspective angle seems to have no affect.

View 3 Replies

ActionScript 3.0 :: After Applying TextField.rotationZ Gyphs Become Blurry

Jun 21, 2009

Below is a code with my example. If you zoom in you'll notice that text is not as sharp as it is if you uncomment this line (txtFld.rotationZ = 90). Is there any way I can improve sharpness on font glyphs so after rotating they will look the same as before?

[Code]...

View 2 Replies

ActionScript 3.0 :: Using Local3DToGlobal With PerspectiveProjection?

May 8, 2010

I'm using local3DToGlobal with PerspectiveProjection.  My problem is that when I don't use PerspectiveProjection local3DToGlobal works as expected. But when I use PerspectiveProjection local3DToGlobal appears to give a random Point that doesn't make sense to me.  However, if I have the local3DToGlobal in a function that's called with the Event.ENTER_FRAME it works as expected.
 
The red circle is suppose to follow the black circle end of the stick graphic. The red circle is using regular x and y positions, while the stick is using x, y and z (3D). If you call the onEnterFrameMethod directly the red circle wont wrap the circle end of the stick.  If you comment out the PerspectiveProjection code, then the red circle will wrap the circle end of the stick.  If you uncomment the PerspectiveProjection code, and then use an event listener to call the onEnterFrameMethod, the red circle will wrap the circle end of the stick.
 
package
{
import flash.display.Sprite;
import flash.events.Event;
import flash.geom.Point;

[code]....

View 1 Replies

ActionScript 3.0 :: ProjectionCenter Does Not Affect PerspectiveProjection?

Dec 28, 2009

I am manually drawing 3D lines on screens. I am NOT using the native X Y Z properties of Sprite.private var displayCoordinates:Vector.<Number> = new Vector.<Number>;

private var displayMatrix:Matrix3D = new Matrix3D();
var pperspectiveProjection = new PerspectiveProjection();
pp.projectionCenter = new Point(sizeX/2,sizeY/2);

[code].....

View 1 Replies

Flex - Display Object That Has Been Transformed With A PerspectiveProjection?

Jul 20, 2010

I'm currently transforming some objects to make them appear far away using a PerspectiveTransform. This works well, but I have no way of knowing where on the screen the object is displayed. The x and y coordinates are the coordinates of the object if it were at z=0. How can I compute the display coordinates of my component?

View 1 Replies

Flash :: AS3 MouseEvent.MOUSE_MOVE Event Stops Responding After MouseEvent.CLICK Call?

Nov 6, 2010

I have several stage event handlers to enable mouseovers over several dynamically generated moviecilps on the stage that then change their alpha to indicate the mouse is over that particular mc... fairly trivial (mcOver handler). Additionally, I also want to know what MC is clicked, so I update a public variable (public var activemc:Number) with the ID of the dynamic movieclip when the mouse is over it (using a hitTest to check, which is why the EventListener is added to stage and not to the MC), which is checked in the mcClicked handler:This is in the constructor:

//stage.addEventListener(MouseEvent.MOUSE_DOWN, startDrawing);
//stage.addEventListener(MouseEvent.MOUSE_UP, stopDrawing);
stage.addEventListener(MouseEvent.MOUSE_MOVE, mcOver);[code]....

However, the mouseover behaviour (alpha 0 when over, alpha 1 when out) stops working as soon as I click on any movieclip on the stage, and the mcClicked ID checking (below) stops working completely. I don't know if this is to do with focus:

private function mcClicked(event:MouseEvent):void {
myTextField.text = String(activemc); // activemc is a public var:Number with the movieclip //ID
}

I then tried adding the event handler for the stage mouse_move again and this gets the mouseover working again but only for 1 more click, after which it stops again:

private function mcClicked(event:MouseEvent):void {
myTextField.text = String(activemc); // activemc is a public var:Number with the movieclip //ID
stage.addEventListener(MouseEvent.MOUSE_MOVE, mcOver);

View 1 Replies

ActionScript 3.0 :: Get MouseEvent.ROLL_OVER Or MouseEvent.MOUSE_OVER To Pass Through To MovieClip Underneath

Jul 9, 2009

I have a MovieClip (call it base_mc) which is under a bunch of other MovieClips (call them subclips). The MovieClips on top are all mouseEnabled with MOUSE_OVER, CLICK, etc, event handlers. I want to capture the event of MOUSE_OVER (or ROLL_OVER) on the base_mc as well. Any time I am over one of the subclips I am also over the base_mc clip. How can I capture this event?

View 2 Replies

ActionScript 3.0 :: Flex - Diffrence In MouseEvent.CLICK & MouseEvent.MOUSE_DOWN?

Oct 21, 2010

I'd like to know what is the difference between MouseEvent.CLICK & MouseEvent.MOUSE_DOWN. Because when i use MouseEvent.MOUSE_DOWN for a button to set full-screen view its doesn't work, instead of this MouseEvent.CLICK works. So what was the reason.

View 3 Replies

ActionScript 3.0 :: MouseEvent.MOUSEDOWN Works But MouseEvent.CLICK Doesn't

Nov 6, 2010

I'm making a button for the first time, and I wanted to use a full click to drive it. However, when I use addEventListener(MouseEvent.CLICK, onClickHandler); nothing happens when I click on it. When I use (with the rest of the code being identical) addEventListener(MouseEvent. MOUSE_ down, onClickHandler); it works like a charm.

View 6 Replies

ActionScript 3.0 :: Correction Applied To The Rotation Y Angle When Using PerspectiveProjection?

Dec 28, 2010

I have a stage with and height of :600x400 On this stage i have 3 squares that have a centerpoint in the middle. The square are 90 (width) and 80 (height)The first square is aligned to the left site and the second one in the middle and the third one on the right  The perspectiveProjection is setup using the middle of the stage as it projectionCenter.When i rotate all squares to 90 degrees (rotationY) than only the middle one is now not visible anymore, at that point i want to switch the image inside the square. But at 90 degrees the left and right squares are not invisible..  For the left square that point wouldbe at 90 - 22, and the right one 90 + 22.   Is there a way to calculate the correction value (22) in this example?
 
What i don't want is to give every square it's own perspectiveProjecten , then it would work but you have a completely different3D rotation.The only thing that goes wrong in my example is that the image from the left and right square are not changed at the right time, because 90 degrees on the left square does not mean it it not visible at that point.
 
And here is the code:
 
import flash.display.MovieClip;import flash.geom.Point;import flash.geom.PerspectiveProjection;import fl.transitions.*;import fl.transitions.easing.*
var squares:Array = [c1, c2, c3];

[code]....

View 13 Replies

ActionScript 3.0 :: Difference Between MouseEvent.MOUSE_UP And MouseEvent.CLICK?

Apr 7, 2009

What is the difference between MouseEvent.MOUSE_UP and MouseEvent.CLICK? Why should I use one of these over the other? 

Code:myButton_btn.addEventListener(MouseEvent.MOUSE_UP, fNavigate, false, 0, true);
myButton_btn.addEventListener(MouseEvent.CLICK, fNavigate, false, 0, true);

View 3 Replies

Actionscript 3 :: Cancelling MouseEvent.CLICK After MouseEvent.MOUSE-DOWN

Aug 11, 2011

I have a MOUSE_DOWN handler that creates a CLICK event listener on a child object. Naturally, as soon as you release the mouse button, if you happen to be over the child object, the CLICK event fires.I was disappointed to discover that event.stopImmediatePropagation doesn't interrupt the CLICK event from registering the MOUSE_DOWN as part of its detection cycle. It makes sense that it doesn't but still... disappointing.A MouseEvent.CLICK consists of detecting a MOUSE_DOWN on the object and then if it's followed by a MOUSE_UP without leaving the object, he event fires. I had hoped that by cancelling the MOUSE_DOWN event, it would clear that out of the CLICK buffer, but no such potatoes, alas.This could all be handled with a flag and a couple more MOUSE_UP and MOUSE_DOWN handlers, but dang, smacks of effort

View 2 Replies

ActionScript 3.0 :: MouseEvent Target MouseEvent RelatedObject?

Jul 24, 2009

I have the following:
 
rwBtn.addEventListener(MouseEvent.MOUSE_OVER, audioOver);
function audioOver(e:MouseEvent):void
{
var thisClip:MovieClip = e.relatedObject;
thisClip.alpha = 0;
}
 
I would like to change the alpha of the clip that is being rolled over. I don't know how to target the clip that is being rolled over. How do I do that?

View 3 Replies

ActionScript 3.0 :: 3D RotationX/Y/Z With Local Coordinate?

Jan 28, 2012

When I use 3D rotation tool, there is an option called global transform, if it turned off, the object would rotate by its own axes, this is exactly what I want. How can I do rotatation like that with AS3 code? Is there any property if changed then rotationX/Y/Z would rotate object by its axes?

View 4 Replies

AS3 :: Flash - Simulating RotationX With Matrix?

May 31, 2011

I have to use Flash CS3, so I can't use the properties rotationX, roationY and rotationZ.I have a movieclip, that looks like this. It is now flat, no 3D rotation or shearing But what I want is that this movieclip has a rotationX, or that it is a bit in perspective like this: As I said, I can't use rotationX, so I have been playing around with Matrix. But I can not get it right.Here is how I try to do it

myMC.transform.matrix = new
Matrix(1,0.15,0.35, 1, 0, 0);

And this is the result get the matrix right, or is there another way?

View 3 Replies

ActionScript 3.0 :: My_mc.rotationX = 50 Does Not Work

Nov 30, 2009

my_mc.rotationX = 50 does not work but my_mc.rotationX += 1 does, when inside an enterframe routine; I have also tried my_mc.transform.matrix3D.appendRotation( 50 , Vector3D.X_AXIS), but also does not work;

View 2 Replies

ActionScript 3.0 :: Fonts In RotationX / Y / Z Unsharp?

May 23, 2010

when you rotate fe. with greensocks engine on the X/Y/Z axis with text movieclips, the final state is never crisp with me.lets say your clip is at rotationX 30and tweens to 0 , in other words it starts at an angle and displays full frontal at ends. no matter what i try, the font has certain parts crips, certain parts blurryI've been spending this sunday with all different kind of fonts, embedding, textfields, fontsizes (as you know certain fonts have their "sweetspot" size, etc, etc, etc, it just doesn't get sharp after the rotation.Funny enough, when i trace out my rotation angle it says 0i even tried an onComplete event to force its properties to zero. but to no avail.

could make a bitmap data file from my text, but come on... why do they implement 3D while the results are off? Really would like to hear some tips here because i am tempting to go back at away3D. I was hoping with flash CS5 their 3D render for textfields would be alot better compared to "crash"Cs4Yep theres a slight annoyed undertone here. To me, it should be fundamental or at the very least, tweak-able like image resizing with "smoothing".

View 5 Replies

ActionScript 3.0 :: RotationX Kills MOUSE_CLICK?

Dec 18, 2010

I'm encountering a weird phenomena. I have a multi nested display object structure. Some of the deeper display objects have MOUSE_CLICK events. But as soon as I set main display item container.rotationX = 5 then the mouse events don't work anymore.

View 10 Replies

ActionScript 3.0 :: RotationX/Y/Z Cause Blurred/pixellated DisplayObject?

Apr 8, 2009

I don't know if this would be more appropriate under the 3D forum but it could go either way. I'm having a problem: when I access the 3D rotation properties of a DisplayObject (specifically a MovieClip containing a Loader and some TextFields), it becomes bitmapped and loses its scalability. Is this supposed to happen, and is there a way to regain scalability after rotationX/Y/Z are set to 0.0?

View 1 Replies

ActionScript 3.0 :: Enterframe StartDrag Not Working With RotationX?

Jun 10, 2009

I created a full flash template website loading external swf's.Lately, I managed to add a fake3D rotation with AS3 and CS4 to this global template with enterFrame.Problem : some of my external swf use a vertical scroller also using an enterframe function based on a startDrag bar with the x / y position of the mouse, the scroller dont work anymore.

View 8 Replies

Flex :: Find Out Moment After RotationX Has Finished?

Feb 1, 2011

i am playing around with the rotationX/Y/Z properties available in flashplayer since version 10. for testing purpose i created a cube and put canvas objects on three sides of it (top, front, bottom) and created a tween to get the values required for turing by 90 deg. turning the cube (a canvas) using rotationX = xx works well when the three side-canvas objects are small and filled with a not-to-complex element hierarchy. when using larger and more complex content it slows down. the next idea was to remove the canvas elements content and replace it by a snapshotimage of the content instead before starting the turn, after the turn is performed the original content is put back on the sides again.

this results in a good perfomance increase. using a tween the last step of rotation is done in the function that is called as the tweenEnd handler. in this function also the process of copying the canvases content back is performed. unfortunately this results in a short hang of the cube right in that last rotation step, the reason for which is that rotation and copying back takes place at the same time. so i could wait for some time after having called cube.rotationX = endValue by using a timer or setTimeout(func, 500), but this is ugly. so my question is: after having called cube.rotationX = endValue a period of time is required to calculate data for the rotation and do the rotation itself. is there a way to find out the point in time when the rotation has ended, so that then the copying can be started ?

View 2 Replies

AS3 :: Function To Arrange Depths Based On Z Position & RotationX

Apr 17, 2011

Any smart people out there who can tell me why this function Im working on to automatically sort the depths of objects placed on the 3D plane is only working intermittently? It seems to work every second or third iteration?[code]Is getChildAt(i) reliable? IE does it return the same order each time it runs or is it based on depth? looking at the manual suggests that it's probably the latter so I guess I'll need to make my own array ordered by the time the sprites were added to the parent and work from there. Is there a better way?

View 1 Replies

ActionScript 3.0 :: Animate Two Images On Axis With RotationX Command?

Aug 15, 2010


I am trying to animated two images on axis with rotationX command. it's working when the picutre comes in 90 degree it gets overlapping. I am attaching the picture for your reference

View 7 Replies

ActionScript 3.0 :: Using Bounds In StartDrag If RotationX Property Is Changed?

Sep 26, 2010

I've created a flash card class in ActionScript that uses a tween to flip the card over the y-axis (i.e., by using rotationX). I also use the bounds property of startDrag so that, when you drag it, its movement is locked on the x-axis. (There's also a method for switching between dragging and flipping, but since that's not broken, there's no need to discuss it further).

Here's my problem. If I haven't yet flipped the flash card over, the card drags fine. If I flip the card over and don't use bounds in startDrag, it works fine. But if the bounds property is set and then I try and drag the flash card after it's been flipped, the movement goes all haywire. It basically jumps back and forth between the two ends of the bounds' rectangle.

Is there any way you can think of to solve this problem? Alternatively, is there any way to use sprites to limit movement? For example, would it be possible to place a pair of one-pixel-thick horizontal lines on the top and bottom side of the flash card, set their alpha to zero, and somehow stop the flash card from moving past the lines?

View 4 Replies

ActionScript 3.0 :: How To RotationY A Loaded Jpeg

May 17, 2011

I am trying to apply rotationY/X/Z to an externally loaded image. The problem is that when I rotate the image in '3D', it does not appear. When I apply normal rotation, the image does appear. I have verified that the jpg is loaded, just does not display after rotationY/X/Z. The code below are snippets of my attempts.

PHP Code:
//LOAD IMAGE
public function load_img():void

[code].....

View 1 Replies

ActionScript 3.0 :: RotationY On MC With Image Inside?

Sep 11, 2009

Is it possible to use rotationY on an MC that has an image inside? I am trying it and it does not seem to work. Is there another way to do this?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved