RE: [flexcoders] flash 10 3D - bug or feature

2009-03-11 Thread Kenneth Sutherland
Yip I know nobody has replied to this but I have a solution of sorts. If
anyone can explain what on earth is going on I'd like to know.

 

I have a function that does only this and it does NOT work. (doesn't
work in the sense I'm trying to rotate around the center point of the
object) The translation moves the object so the point I wish to rotate
is over point (0, 0, 0)

  

private function iDontWork() : void {

object.transform.matrix3D.appendTranslation(150, 0,0);

object.transform.matrix3D.appendRotation(36, Vector3D.Y_AXIS);

object.transform.matrix3D.appendTranslation(-150, 0,0);

}

 

I have another function that does only this and it DOES work. J

 

private function IDoWork() : void {

translateOnly();

rotateOnly();

translateOnly(); 

   

}

 

private function rotateOnly() : void {

  object.transform.matrix3D.appendRotation(36, Vector3D.Y_AXIS);

}



private var valueToMove : Number = 150;

private var translateUpOrDown : Boolean = false;

private function translateOnly() : void {

  if(translateUpOrDown){

object.transform.matrix3D.appendTranslation(valueToMove, 0,
0);

translateUpOrDown = false;

  } else {

object.transform.matrix3D.appendTranslation(-valueToMove,
-0,0);

translateUpOrDown = true;

 }

}





Any ideas why one works and the other doesn't.  They are both the same
just one splits the transformations into separate functions and the
other does not. Bug or feature??

 

Cheers.

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Kenneth Sutherland
Sent: 10 March 2009 14:21
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] flash 10 3D

 

I've not managed to rotate a Box on some arbitrary point.  If anyone
knows how to do this, that would be great.

What I've tried so far to get it to rotate on its Y axis in the middle
of the Box.

 

myBox.appendTranslation( -(theBox.width/2), 0, 0);

myBox.appendRotation(angleToRotate, Vector3D.Y_AXIS);

myBox.appendTranslation( (theBox.width/2), 0, 0);

 

This does not work, it always rotates around its registration point, no
matter what the translation values are.

I've tried various combinations of prepend  append, I've tried quite a
few variations including adding a point for the third parameter on the
appendRotation but the only way I've managed to get it to rotate
correctly is if the Box is positioned at (0, 0, 0) inside the
application.  So I tried changing the x, y  z of the box then doing the
rotation and then resetting the x, y  z but still didn't work.  I tried
changing the translation to translate the box's width/2 and what its x
coord was but again no joy.

 

Anyone any ideas.

 

Cheers Kenneth.

 

 

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Kenneth Sutherland
Sent: 09 March 2009 16:08
To: flexcoders@yahoogroups.com
Subject: [flexcoders] flash 10 3D

 

I'm trying to get to grips with some of the new 3D features in flash
player 10 and I'm having limited success. So I'm looking for some
helpful tutorials/examples.  I've seen a few that are to do with gumbo,
but I'm not looking at that yet. Just flex 3.2/3.3 examples.

 

Some of the sites I've seen useful info on so far are.

 

http://www.yswfblog.com/blog/2008/11/12/3d-with-flash-10-part-2/

 

http://www.flex888.com/934/tutorial-for-3d-using-flash-10.html

 

http://polygeek.com/1508_flex_flash-10-3d-examples-of-rotating-component
s

 

http://www.neuroproductions.be/experiments/the-new-drawing-api-rocks/

 

http://blog.dcholth.com/

 

If you know of any other good ones, let me know.

 

Cheers.

 

 



realise

.


Kenneth Sutherland

Technical Developer

Realise Ltd
Quay House, 142 Commercial Street, Leith, Edinburgh EH6 6LB
Tel 0131 476 7432
www.realise.com http://www.realise.com/ 

Check out some of our recent flex work:
* Focus on funds UK http://www.focusonfunds.co.uk/ 
* Focus on funds Europe
http://europe.standardlifeinvestments.com/distributor/products_and_serv
ices/going_further_focus_on_funds/index.html 
* Fund selector
http://uk.standardlifeinvestments.com/ifa/adviser_support/index.html 

* Video view
http://uk.standardlifeinvestments.com/ifa/market_views/video_view_and_m
p3s/index.html 
Realise are sponsors of the Marketing Society Scotland.
Realise Limited is registered in Scotland, SC172507.

 

 



Disclaimer 



This electronic message contains information which may be privileged and
confidential. The information is intended to be for the use of the
individual(s) or entity named above. If you are not the intended
recipient, be aware that any disclosure, copying, distribution or use of
the contents of this information is prohibited. If you have received
this electronic message in error, please notify us by telephone on 0131
476 6000 and delete

RE: [flexcoders] flash 10 3D

2009-03-10 Thread Kenneth Sutherland
I've not managed to rotate a Box on some arbitrary point.  If anyone
knows how to do this, that would be great.

What I've tried so far to get it to rotate on its Y axis in the middle
of the Box.

 

myBox.appendTranslation( -(theBox.width/2), 0, 0);

myBox.appendRotation(angleToRotate, Vector3D.Y_AXIS);

myBox.appendTranslation( (theBox.width/2), 0, 0);

 

This does not work, it always rotates around its registration point, no
matter what the translation values are.

I've tried various combinations of prepend  append, I've tried quite a
few variations including adding a point for the third parameter on the
appendRotation but the only way I've managed to get it to rotate
correctly is if the Box is positioned at (0, 0, 0) inside the
application.  So I tried changing the x, y  z of the box then doing the
rotation and then resetting the x, y  z but still didn't work.  I tried
changing the translation to translate the box's width/2 and what its x
coord was but again no joy.

 

Anyone any ideas.

 

Cheers Kenneth.

 

 

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Kenneth Sutherland
Sent: 09 March 2009 16:08
To: flexcoders@yahoogroups.com
Subject: [flexcoders] flash 10 3D

 

I'm trying to get to grips with some of the new 3D features in flash
player 10 and I'm having limited success. So I'm looking for some
helpful tutorials/examples.  I've seen a few that are to do with gumbo,
but I'm not looking at that yet. Just flex 3.2/3.3 examples.

 

Some of the sites I've seen useful info on so far are.

 

http://www.yswfblog.com/blog/2008/11/12/3d-with-flash-10-part-2/

 

http://www.flex888.com/934/tutorial-for-3d-using-flash-10.html

 

http://polygeek.com/1508_flex_flash-10-3d-examples-of-rotating-component
s

 

http://www.neuroproductions.be/experiments/the-new-drawing-api-rocks/

 

http://blog.dcholth.com/

 

If you know of any other good ones, let me know.

 

Cheers.

 

 



realise

.


Kenneth Sutherland

Technical Developer

Realise Ltd
Quay House, 142 Commercial Street, Leith, Edinburgh EH6 6LB
Tel 0131 476 7432
www.realise.com http://www.realise.com/ 

Check out some of our recent flex work:
* Focus on funds UK http://www.focusonfunds.co.uk/ 
* Focus on funds Europe
http://europe.standardlifeinvestments.com/distributor/products_and_serv
ices/going_further_focus_on_funds/index.html 
* Fund selector
http://uk.standardlifeinvestments.com/ifa/adviser_support/index.html 

* Video view
http://uk.standardlifeinvestments.com/ifa/market_views/video_view_and_m
p3s/index.html 
Realise are sponsors of the Marketing Society Scotland.
Realise Limited is registered in Scotland, SC172507.

 

 



Disclaimer 



This electronic message contains information which may be privileged and
confidential. The information is intended to be for the use of the
individual(s) or entity named above. If you are not the intended
recipient, be aware that any disclosure, copying, distribution or use of
the contents of this information is prohibited. If you have received
this electronic message in error, please notify us by telephone on 0131
476 6000 and delete the material from your computer.
Registered in Scotland number: SC 172507.
Registered office address: Quay House 142 Commercial Street Edinburgh
EH6 6LB.

This email message has been scanned for viruses by Mimecast.





Disclaimer 
---
This electronic message contains information which may be privileged and 
confidential. The information is intended to be for the use of the 
individual(s) or entity named above. If you are not the intended recipient, be 
aware that any disclosure, copying, distribution or use of the contents of this 
information is prohibited. If you have received this electronic message in 
error, please notify us by telephone on 0131 476 6000 and delete the material 
from your computer. 
Registered in Scotland number: SC 172507. 
Registered office address: Quay House 142 Commercial Street Edinburgh EH6 6LB. 

This email message has been scanned for viruses by Mimecast.
---