ActionScript 3.0 :: Papervision Matrix3D Method - Rotation Restrictions

Jun 25, 2009

I'm studying John Lindquist's example from here: [URL] I'm trying to figure out how to add restrict his matrix3d method, so the sphere has limited movement.

Code:
Select all override protected function onRenderTick(event:Event=null):void {
var currentMousePoint:Point = new Point(viewport.containerSprite.mouseX, viewport.containerSprite.mouseY);
if(isMouseDown) {
var difference:Point = currentMousePoint.subtract(previousMousePoint);
[Code] .....

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Matrix3D Rotation Being Odd?

Nov 4, 2009

'm trying to make a "room" in flash in which you can "move" around in.I set up the room with flash cs4 3d functionality.

SWF:
http://www.swfcabin.com/open/1257388415
(use arrows)

[code]....

View 1 Replies

AS3 :: Flex - How To Do 3D Rotation Around Center Using Matrix3D

Dec 14, 2009

I am trying to rotate a Sprite in three dimensions around its centerpoint, and I am struggling to understand some of the behavior of matrix3D.

Ive overridden the set rotationX, rotationY, and rotationZ methods of the Sprite as follows:

override public function set rotationX (_rotationX:Number) : void {
this.transform.matrix3D.prependTranslation(this.width/2.0, this.height/2.0, 0);
this.transform.matrix3D.prependRotation(-this.rotationX, Vector3D.X_AXIS);

[Code].....

I am using prependTranslation to correct the centerpoint of the rotation, and the first prependRotation to cancel out any previously-applied rotation.

Testing it out, rotationX works exactly as expected, and the Sprite rotates around its horizontal axis.

rotationY and rotationZ also appear to work fine. However, there is one problem: whenever rotationY or rotationZ are set, all of the other rotation values change as well. This is not a problem with rotationX -- if I set rotationX, nothing else changes. But if I set rotationY or rotationZ all the rotation values change, which is a problem for my app (which is trying to save and restore values).

I think I am just lacking some understanding about what is going on with matrix3D. How can I implement this so there is no interdependence between the values?

View 2 Replies

Actionscript 3.0 :: Matrix3d Local To Global Coordinates For Rotation?

Feb 4, 2010

I made a cube with as3. I wanted it to rotate in the Y Axis according to the horizontal mouse movement. It works nice when this is all I want. But if I try to also make it rotate on the X axis with the vertical mouse movement, things get screwy.

This happens because the transformations are added in the global coordinates, not the local ones. So, for Example, if I wanted the cube to rotate 30 degrees along its Y axis, I have to find a way to translate that into the global coordinates, and then apply that to the matrix3D of each face. I need a local to global translator.

[Code]...

View 1 Replies

Actionscript 3.0 :: Papervision / Cube / Rotation And Easing

Dec 13, 2008

I'm at the moment trying to recreate a menu system that I found on URL... as you can see, the menu you get after you've choosen a language is a 3d menu rotating so its always looking at the cursor, but as you will notice, the motion has a little bit of easing to it, which I'm currently trying to recreate using the cube you make with the "Papervision3D 2.0 Interactive Cube" from GotoAndLearn();URL...and here is the code behind that drives the rotation:URL...Now, my problem is that I'm having a hard time figuring out how to create a tween effect on his, resulting in a bit out of sync rotation that slowly stops instead of just following my pointer in an instant.

View 12 Replies

ActionScript 3.0 :: Papervision Restrict Rotation Of A Plane

Jan 11, 2009

A longtime AS2 developer finally making the transition to AS3 and Papervision all in one big leap.Working from Lee Brimelow's awesome pv2 tutorial as a base I've been able to create a plane with a movieclip mapped to it. What I'd ideally like to do is limit the rotation of the plane to maximum of -45 to 45 degrees on the X and Y.[code]I've tried using basic conditionals to restrict p.rotationX and p.rotationY but they seem to be ignored.

View 6 Replies

Actionscript 3 :: 360 Rotation Degrees To 2d Object From 3d Papervision Object

Mar 11, 2010

I have a papervision camera of which turns using keyboard input, I have a radar of which I would like to orientate to direction when the camera turns.I have it all working apart from mapping my (camera) DisplayObject3D.rotationY to RadarInterface.rotation correctly.The camera (or any 3d object) works with values I'm finding hard:Clockwise: 0 to 89, 89 to 0, -0 to -89, -89 to -0 doing a complete 360.So if I were to turn 180 degrees I'd go from 0 to 90 and back down to 0 again.

View 1 Replies

Actionscript 3 :: Load A Papervision/Flex Application (SWF) As A Material On A Papervision Plane?

Mar 24, 2011

I am trying to build a portfolio application similar to the used by Whitevoid. I am using Flex 4 and Papervision3D 2. I have everything working except for one issue. When I try to load an external SWF as a material on one of the planes, I can see any native Flex or Flash components in their correct positions, but the papervision objects are not being rendered properly. It looks like the viewport is not being set in the nested swf. I have posted my code for loading the swf below.

private function loadMovie(path:String=""):void
{
loader = new Loader();
request = new URLRequest(path);

[Code]....

Below I have posted two pictures. The first is a shot of the application running by itself. The second is the application as a MovieMaterial on a Plane. You can see how the button created as a spark object in the mxml stays in the correct position, but papervision sphere (which is rotating) is in the wrong location.

View 1 Replies

ActionScript 3.0 :: Matrix3D Bug When Assigning RawData?

Jan 2, 2009

I'm assigning raw matrix values through Matrix3D.rawData.When assigning certain matrices it yields the following error:

ArgumentError: Error #2188: Invalid raw matrix. Matrix must be invertible.

However, I believe the matrix data I'm passing represent an invertible matrix!Is this a (known) bug? Or is the matrix not invertible and is my math failing me?

View 15 Replies

Professional :: .swf To .mov With Many Restrictions?

Jan 11, 2010

I am trying to convert a .swf to .mov in Mac Leopard, and I have many rules to follow for this particular purpose.
 
.mov must be 640x480 or 720x480under 50 MB(my restriction) needs to look really good  I have tried the following:
 
Export from Flash to .mov - I get 300 MB and it looks pretty badThis converter [URL] couldn't even take my .swf for some reasonThis converter [URL] works (37 MB) but the quality is pretty lowBring the .swf into Premiere and then export, which works great, but the file is 737 MB - even when I lower the quality all the way down to 1 

View 5 Replies

ActionScript 3.0 :: Create 3D Aplications Using Matrix3D Class?

Jan 6, 2009

I am trying to experiment with new CS4 and AS3 to create 3D aplications using matrix3D class.i recently encountered a problem in the Code and I am unable to compile it even. URL:[URL]

Error Notification in FLA:
1119: Access of possibly undefined property XAXIS through a reference with static type Class.

[code]....

View 1 Replies

ActionScript 3.0 :: Vector / Matrix3D Incorrect When In Browser?

Oct 27, 2009

I have a simple 3D tween that I created to 3D rotate a bitmap logo (in a movieclip) on it's x axis. It works great during testing but I noticed that when I tested it on the website that the pivot point was totally off! I had to use the matrix.prependTranslation() method to alter the pivot point so that the clip would rotate & remain centered. This is totally broken when I run in the browser but works great outside of the browser?

[Code]...

View 1 Replies

Object Following Mouse With Restrictions

Apr 29, 2009

I have a basic question. It seems like it should be simple but I am having a lot of problems resolving this on my own. The following code is what i used for an 'eyeball' on a Teddybear illustration.

[Code]...

View 1 Replies

C# :: Domain Restrictions For Swfloader?

Jan 19, 2010

I have a swf movie player located in [URL]. Normally this a.swf is used by a html page, the swf file is embedded in a [URL]. The website is not built by me but I know there is a restriction that only the html in [URL] can play the video . Now what I want to do is embed the a.swf into a c# project using swfloader, I will set the source property of swfloader to [URL]. My question is will the c# project be able to play to video file the same as in the html page?

View 1 Replies

ActionScript 3.0 :: Flash Matrix3D/Vector3D Not Working Online

Jun 19, 2010

I've created a game in Flash and I'm using Matrix3D and Vector3D. It works perfectly locally, but as soon as I put it on a server, the graphics don't render and I only see a thin line where a sphere should be.

I've done all the imports, but nothing seems to get it working!

View 1 Replies

ActionScript 2.0 :: Restrictions Of HTML Inside SWF

Feb 1, 2007

A client wants to show complete html-pages inside a Flash movie. I've seen somewhere that this is possible through an IFrame, but then you can just rightclick the frame to view the source, and that's not what the client's looking for. I know it's possible to parse simple html tags in Flash in a TextField, such as <b></b> <a href=""></a> etc etc, but what are the restrictions? For example, all css should work, even flash movies inside the html page should work. I think they're asking too much, so what exactly is possible and what's not?

View 6 Replies

ActionScript 2.0 :: Height And Width Restrictions For Loadmovie

Mar 13, 2010

I have this playing in a larger .swf which is 1000x1000.

The second swf is supposed to be 400x400.

I am wondering how to put restrictions with loadmovie?

loadMovieNum("gallery.swf", 1);

thats the code i have.

View 9 Replies

ActionScript 2.0 :: Box To Follow By Mouse + Ease + Restrictions

Feb 25, 2003

I have this box which is a MC and it is called "orangebox". Now I want this box to follow my mouse, but only over a certain region. I put a rectanlge MC over the area I want the box to follow. On that rectange I put this code...

PHP Code:

on (rollOver) {
startDrag("_root.orangebox", true, 60, 362, 742, 362);
}

That works fine and dandy, but I want it to ease when it follows, not stay on the mouse. I think it will give it a cooler look. The code Kirupa has for ease is...

[Code]...

View 4 Replies

ActionScript 3.0 :: Detect End Of External Swf - Button Restrictions?

Jun 7, 2010

I'm newly transitioning from AS2 to AS3, and trying to figure out the proper way to detect the end of an external swf, or, essentially put "restrictions" on next buttons for a flash site.Basically, I have a training course where the user watches a little demo then clicks "next" to proceed to the next slide. This works wonderfully so far; however, I need to restrict the next button from being active until the demo has finished playing (so they can't skip ahead).The way this is structurally set up is I have a main container (mainContainer.swf) that loads in external content through an empty MC (contentMC) and cycles through an array (content1.swf, content2.swf, content3.swf) and so on...I have tried comparing the currentFrame to totalFrames of the external swf before activating the next button, but with no luck. Again, new to AS3 so probably have the syntax wrong...

if (contentMC.currentFrame == contentMC.totalFrames) {
trace("end of external swf");
//next button code here...continue cycling through array...

[code]....

View 3 Replies

ActionScript 3.0 :: Styling TextField With CSS (restrictions/limitations)?

Nov 15, 2010

I'm dynamically loading a CSS file and text file to populate a TextField. As far as the default styles are concerned, no problem!But as soon as I try stuff like p.title, the style is not applied. Is this a restriction of the CSS support that Flash/Flex offers? Do I have to resort to the "simpel-style-selectors" like ".title" or "p" in my CSS?

Works:

Code:
.title { color:#FF0000; }

Doesn't work:

Code:
p.title { color:#FF0000; }

ps: I know that Flash doesn't support everything that CSS has to offer, but I'm looking for confirmation of someone who can tell me for a fact that the above p.class-selector is not supported.

View 1 Replies

ActionScript 3.0 :: Variable Identifier Limitations - Any Length Restrictions?

Aug 20, 2010

Googling and trying, I've found: Variables identifiers cant begin with numbers and can only contain letters, numbers and the _ character. I was wondering if there is a length restriction.

View 7 Replies

Flex :: What Restrictions/workarounds Are Needed For Third Parties External Swf?

Jun 19, 2009

We are loading external swf content into an adobe air application. Content is provided by an increasing number of third parties.Being third party content, it will be loaded in a separate security domain (trustContent=false) and a sibling app domain (loadForCompatibility=true). We are doing this using the Loader class.What are the features/options/approaches that would cause problems when using the swf as external content?

I am interested in any kind of issues, as we have already reproduced issues with content that occur regardless of the app domain / security domain where its loaded ( and occurs also in both Loader and SWFLoader).

View 2 Replies

ActionScript 2.0 :: Creating Movement With Mouse Cursor But With Restrictions?

Jun 28, 2009

I have the following code which works fine but I would like to set a restriction on how far the movie will travel on it's x and y axis. How can this be achieved?

Code:
speed = .99;
setInterval(CursorMovement, 40);
function CursorMovement() {

[Code]....

View 1 Replies

ActionScript 3.0 :: Rotation Center Is In Left Of The Image - Aren't 3D Rotation From Transform Panel

Jan 7, 2010

I have a movieclip and when I do 3D rotation from Transform panel, It rotates perfect, center is in the middle of image, and when I apply mc.rotationY, rotation center is in left of the image, aren't 3D rotation from Transform panel and mc.rotationY from AS same? what's up?

View 2 Replies

Actionscript 3 :: Augmented Reality Flartoolkit Rotation - Trace The Rotation Of The Marker

Mar 23, 2011

I'm trying to do some augmented reality projects with flartoolkit . I can now put simple 3d objects on my marker and it works fine , but I wanna give my project some events that the user can interact with. I'm trying to trace the rotation of the marker. there's a container:DisplayObject3D which my application uses to add the 3d objects , I traced this :"trace(container.rotationZ)" but it's just returning 0 . I studied another AR application's source code and it was using the rotation of it's container object without problem .and I think I should mention that I'm using the exercise file of seb lee delisle papervision3d course from [URL]. anyone has any experience with flartoolkit? the main functions of my my code is as below:

[Code]...

View 1 Replies

ActionScript 3.0 :: 3D Rotation Of Nested Movieclips, Separate Of Parent Rotation?

Aug 11, 2010

Is it possible to have the child movieclip rotate separate of the  rotation  properties assigned to the parent? so ultimately giving the  child  element it's own axis?I've customized Lee Brimelows (gotoandlearn.com) 3D carousel to spin  on  the x axis to make it a vertical carousel. I've also rotated that by 45 degrees on the y axis to see all the items, and wrote a snippet of   code to hide the left portion of the carousel. The entire  carousel is contained within the 'container' movieclip, and  inside of  that are my carousel items (as seen below), with the larger  item being  the item in focus.

On rollover of the item in focus, I want to rotate it so it faces the   viewer (as seen below),basically removing the 45 degree rotation   applied to the container.The problem i'm running into is when you rotate the container (changing   the rotationX of the container), the axis basically rotates with it, so   when i rollover the next item 'in focus', the following happens..(in  the  example where it appears how it want it to, the carousel is at a   rotationX of 0, so it works fine)

View 2 Replies

ActionScript 1/2 :: Inconsistent Rotation - 270 Degrees Of Rotation Disappear?

Apr 21, 2009

Program A has a cannon that aims to line up with where-ever the mouse is pointing, in 360 degrees, and fires when the mouse is is clicked. Program B has an eye instead of a cannon that should in theory do similar functions when the capslock key is toggled, but instead only has a 90 degree range of motion from the Right of the eye toward the bottom (quadrant 4 only). Where did the ther 270 degrees of rotation disappear to?

[Code]...

View 4 Replies

ActionScript 2.0 :: Create A 3d Rotation Much Like The Widely Used Carousel Only The Rotation?

Aug 11, 2006

i.m trying to create a 3d rotation much like the widely used carousel only the rotation i desire consist of four upright(90 degrees) movieclips resting on a slanted, 30 degree plane which rotate onEnterFrame or following a tween on a oval like path - then pause for a given number of seconds at the four movieclips positions equal in distance on the plane

function around() {
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s = this._y /(centerY+radiusY);

[code]....

View 7 Replies

IDE :: Z - Rotation X And Rotation Y Missing In Motion Editor Panel

Feb 23, 2009

Why isn't there the Z, rotation X and rotation Y fields in my motion editor panel?

View 1 Replies

ActionScript 3.0 :: Rotating With Matrix3D Around A "camera"

Nov 4, 2009

I'm trying to make a "room" in flash in which you can "move" around in. I set up the room with flash cs4 3d functionality. SWF:[URL] Problem: Rotation of the camera moves the room along X and Y axis.

[Code].....

View 1 Replies







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