As a question to Rob about what you said below, i have been trying to
figure out how to put a static background image behind all 3D objects
and later one want a foreground sprite to draw on, but have not asked as
i am still trying to figure out what crazy way to do it..lol
I am looking at the View3D class now to see whats all in there, BUT my
question was do any of these objects able to have a MouseEven3D attached
to them that is able to return an (x,y,z) of where you clicked?
I have tried to put a Sprite 3D in the background, behind all 3D
objects, but it does not seem to fire off a MouseEvent3D, plus it moves
with the camera as you tilt it so that does not work.
I have tried using a Skybox or Skybox6 as it is pretty much a CUBE that
encompasses the entire scene and click on it, but that does not fire off
a mouse even either.
I can add a background image to the stage in Adobe CS5 IDE by dragging
it form the library, or adding it dynamically, or can even add it from
Away3D using the following:
[Embed(source="Image001.jpg")]
private var backImage:Class;
var image:Bitmap = new backImage() as Bitmap;
image.height = 500;
image.width = 500;
this.addChildAt(image, 0); //gets added to MAIN class that extends sprite
BUT, that does not allow any mouse events PLUS it is not added to the
scene or view in a way for it to have an [x,y,z] coordinate.
Ultimatelly it would be nice if the MouseEvent3D has a MOUSE_WHEEL event
in it, BUT for now my ultimate goal is to be able to use the flash
MOUSE_WHEEL to return an [x,y,z] coordinate of where it was rolled on on
the stage and the [x,y,z] coordinates returned somewhere in the far
background view. I have a few crazy ways i am working on it now, and it
involves having to convert from one coordinate system to another, BUT in
the mean time, was curious about what you said and if the "background",
"overlay" or "foreground" methods in View3D allow anyway to add an even
to it.
Thank you :))))
On 5/18/2010 9:49 AM, Rob Bateman wrote:
as an aside, if you ever want to add overlaid sprites to an away3d
view using the same coordinates seen in the view3d sprite, you can use
the view3d foreground property - which contains a sprite always added
to the top level of the contained view3d children
Rob
On Tue, May 18, 2010 at 2:40 PM, Fabrice3D <[email protected]
<mailto:[email protected]>> wrote:
I've already answered this question not 2 days ago.
also added that this is As3 general question...
read flash doc on display.bitmap();
Fabrice
On May 18, 2010, at 3:28 PM, toshmosh wrote:
> and how can i assign a particular picture to movie clip or
sprite.Can
> you give me an example please?
>
> On May 18, 3:45 pm, savagelook <[email protected]
<mailto:[email protected]>> wrote:
>> Yeah, add your heads up display (HUD) items directly to the main
>> application sprite that contains your view3D. A sprite or
movieclip
>> would work. This would show your hero's health as a MovieClip,
which
>> you would have to create before this, in the top right corner
of the
>> application with 10 pixels of padding, assuming that "this" is your
>> main application sprite:
>>
>> myHealthMovieClip.x = this.width - myHealthMovieClip.width - 10;
>> myHealthMovieClip.y = 10;
>> this.addChild(view);
>> this.addChild(myHealthMovieClip);
>>
>> On May 18, 8:08 am, Fabrice3D <[email protected]
<mailto:[email protected]>> wrote:
>>
>>> If you mean how it must look like or how it will work: its up
to you.
>>
>>> but if you mean that the class "health" as Movieclip should be
displayed as overlay above the 3d scenery.
>>> simply addChild your "health" class/mc after you have added
the view3D. If you add it befofre, it will be there, but
underneath it.
>>
>>> Fabrice
>>
>>> On May 18, 2010, at 12:35 PM, Vesselin Russinov wrote:
>>
>>>> hi all! i think the subject wasn't good enough but i don't
know how to
>>>> explain it.
>>>> So, i want to make 3d game where my hero will have some
health and
>>>> maybe mana or some kind of that, but i don't know how to make the
>>>> health to be visible all the time at my top right corner.
could u help
>>>> me with this?
--
Rob Bateman
Flash Development & Consultancy
[email protected] <mailto:[email protected]>
www.infiniteturtles.co.uk <http://www.infiniteturtles.co.uk>
www.away3d.com <http://www.away3d.com>