problem has been solved.
incorrect behaviour was occuring when an instance of loaded swf was
created by "loader.contentLoaderInfo.applicationDomain.getDefinition"
when I got rid of it , away3dLite works good.
Don't have idea why it makes so big difference but it took me several
hours of testing :(
On 2009-09-14, at 20:33, katopz wrote:
camera fov is calculate from stage width ;) it should be same...for
shell and all child,
if you didn't add width, it should be default value there....not
sure what number is...500x375?
lucky you figure that out, cause it 1.30 am. already here and my
brain already stop working ;p
cheer
2009/9/15 Michał Jarociński <[email protected]>
hmmm.
when I added
[SWF(width="1024", height="768", scaleMode="noScale", align="TL",
showDefaultContextMenu="false", backgroundColor="#15191a",
frameRate="30")]
into ExPlane.as it is ok now.. can't figure it out..
On 2009-09-14, at 20:10, farmazone wrote:
of course
heres example http://67.199.19.156/work/test/Shell.swf
big rectangle at right is created at main root. the smaller one at
left is from loaded swf. exactly the same class. in this exaple the
smaller rect is much bigger than that from my website
heres shell class:
package
{
import flash.display.Sprite;
import pl.mysquare.display.box.Offers3DLite;
import flash.display.Loader;
import flash.net.URLRequest;
[SWF(width="1024", height="768", scaleMode="noScale",
align="TL",
showDefaultContextMenu="false", backgroundColor="#15191a",
frameRate="30")]
public class Shell extends Sprite
{
var l:Loader=new Loader()
public function Shell()
{
super();
addChild(l)
l.load(new URLRequest("ExPlane.swf"));
var off3D:ExPlane=new ExPlane();
addChild(off3D)
off3D.x=300
}
}
}
and ExPlane class :
package
{
import away3dlite.materials.*;
import away3dlite.primitives.*;
import away3dlite.templates.*;
import flash.display.Bitmap;
import flash.display.BlendMode;
public class ExPlane extends BasicTemplate
{
private var plane:Plane;
override protected function onInit():void
{
camera.z = -900;
plane = new Plane(new
ColorMaterial(0xff0000), 269, 330, 1, 1);
plane.bothsides = true;
scene.addChild(plane);
}
override protected function onPreRender():void
{
plane.rotationX++;
}
}
}
On Sep 14, 7:57 pm, katopz <[email protected]> wrote:
This instance is inside a sprite that is inside a
sprite of loaded swf. .. you got a point.
when I create an instance at main root in shell swf... it works ok.
hmmm......look like some test need i think, can you make really
simple one
which produce this problem?
thx
2009/9/15 farmazone <[email protected]>
ok. here's situation.( I compile everything in flex - latest version.
also have latest player).
the example works ok when I compile it as a main class - one swf.
but when I create an instance of this class inside my website I got
very small object. This instance is inside a sprite that is inside a
sprite of loaded swf. .. you got a point.
when I create an instance at main root in shell swf... it works ok.
so? is this a bug?
On Sep 14, 2:39 pm, katopz <[email protected]> wrote:
object is far far away and is very small.
i think you got flash player 20x bug, try update your player and your
CS4,
if you can't, just try compile it in last flex release to avoid that
problem
btw, here's plane example for camera.z = -900;
http://away3d.googlecode.com/svn/trunk/fp10/Examples/Away3DLite/as/
sr...
again, if you still see small thing there, it mean your flash player
is
outdate+bug
hth
2009/9/14 farmazone <[email protected]>
No Peter, this is not working in Lite.
if camera is at z=0 and 3dobject is also z=0 , object is about a half-
size of that what I would like it to be.
if camera z is -900 object is far far away and is very small.
Btw camera.moveTo and moveBackward are not implemented in Lite
version.
On Sep 14, 3:07 am, Peter Kapelyan <[email protected]> wrote:
In Away3D (not lite, not sure about lite yet), the camera setting
(with
default zoom and focus) would be something like:
camera.moveTo(myobject.x,myobject.y,myobject.z);
camera.moveBackward(900);
Also make sure the camera is facing your object. If you see it works
with
LITE also - please let me know!
-Pete
On Sun, Sep 13, 2009 at 4:19 PM, farmazone <[email protected]>
wrote:
hello,
could You write this formula for a custom focus and zoom?
I need it badly to use away3dLite instead of PV3d.
On Sep 12, 3:51 pm, Peter Kapelyan <[email protected]> wrote:
All you need to do is place the camera 900 away from your object
at
the
default focus and zoom. That simple! If you need a formula for a
custom
focus and zoom, let me know, I'll find it.
-Pete
On Fri, Sep 11, 2009 at 10:16 PM, sibhod <
[email protected]
wrote:
I'm attempting to set up my camera and scene in such a way that
a
100x100 plane at (0, 0, 0) will be pixel-precise to a 100x100
sprite.
I've attempted to place the camera at the right zoom and focus
to
get
the proper results but it's not working. This is what I'm
attempting:
camera.z = -camera.zoom * camera.focus;
Has anyone had any luck doing this?
--
___________________
Actionscript 3.0 Flash 3D Graphics Engine
HTTP://AWAY3D.COM
--
___________________
Actionscript 3.0 Flash 3D Graphics Engine
HTTP://AWAY3D.COM
--
katopzhttp://www.sleepydesign.com
--
katopzhttp://www.sleepydesign.com
--
katopz
http://www.sleepydesign.com