Flash :: Away3d To Render A Surface From Given Array Of 3d Points?

Dec 14, 2010

So I have some 3d points generator that gives points like

{1,1,1}
{1,2,3}
{1,3,3}

[code].....

View 1 Replies


Similar Posts:


Flash :: Nothing Happens When Try To Render A Cube Using Away3D?

Aug 11, 2011

when I try to render a cube using Away3D + Molehill, I only get a white default screen, I followed the instructions here: hhe only thing I did not do, was the part that talks about the patch, cuz If I do that I get errors like when I try to import the Sprite class, for example.Im using FB 4.5.!

This is my code:
package
{

[code].....

View 1 Replies

Flash :: Collision And Bounce Detection From Array Of Points

Sep 18, 2011

I have an array of points that I will use to generate a closed polygonal fence on the outside of a game stage (2D). I wish to have collision detection between this fence and a bouncing ball-like object on the inside. Additionally, I would like to be able to arbitrarily add/remove/redraw the fence in realtime and have the collision detection still operate realistically. I have considered drawing a Sprite/Shape from the points and doing a HitTest at each frame to check whether to bounce or not. My question: is this the best/correct way to accomplish this goal? Consider something like JezzBall with diagonal lines of any angle a simulation of what I'm trying to do.

View 2 Replies

Actionscript 3 :: Flash - Create An Array Of Coordinate Points?

Dec 12, 2011

I want to create a simple array of points, representing a clockwise set of coordinates at 45 degree increments, such that the array would be (starting from 12 o'clock):

var coordArray : Array = [
new Point(0,-1),
new Point(1,-1),
new Point(1,0),[code]........

I'm looking for the most efficient way of creating this array (ideally with the coordinates themselves generated through some sort of equation). What's the best way to do this? All I want to do with these is create a coordinate on the stage relative to the clips current coordinate in which to move, based on that clips, such that if the move distance for clips was 50px, and the clip had a depth of 0, it would move 50px in the coordArray[0] position, or 0*50 in the x direction, and -50px in the y direction (0,-1).

View 1 Replies

ActionScript 3.0 :: Flash Finding Best Fit Slope Of A Bitmap Surface

Jan 24, 2012

I was wondering if anyone knows of a way to isolate the pixels that are adjacent to a certain color pixel in a BitmapData. For example, if there was a BitmapData that looked something like this:[code]I was wondering if there was a proven and efficient way of doing this, because I am trying to make a collision engine of sorts that can give me the collision normal of the best fit slope of a given bitmap image. In the scenario of the last example, the slope would be 1/1, or -45 degrees. The way I have it now, I am isolating the adjacent pixels by blurring the entire image, looping through all of the pixels, and storing the gray ones in an array. from there I can determine the best fit slope of the surface of the image. The only thing is that this seems like a lot of work for the CPU. Is there a better way to isolate the black pixels adjacent to white ones than blurring the image and looping through every pixel?

View 12 Replies

Flash :: Away3d Remove From Memory?

Mar 1, 2010

I am building a website which loads some collada objects for each area. But I couldn't manage to clean the memory. It seems impossible to kill the objects.

I've found some samples implementing destroy() methods for away3d internal classes, but they're not working as well.

View 2 Replies

Flash :: Cannot Apply Material To A *.obj In Away3d?

Aug 10, 2010

I cannot apply a texture to an object, I don't know why.( AS3 blender export script and Collada Import is not working for me either )

var loader:Loader3D = new Loader3D();
loader.addEventListener( Loader3DEvent.LOAD_SUCCESS,
handler_loadSuccess );
var parser:Obj = new Obj();
loader.loadGeometry( "assets/objects/Test.obj", parser );

[Code]...

View 1 Replies

Flash :: How To Get The Top Level Child In Away3D

May 16, 2011

i have a small question concerning away3D. I have some cubes with the exact same dimensions that are positioned in the same place. When i click on the stack of cubes, i want to register a click on the cube i added last. Instead of doing this, the click is registered on the cube i added first.

I have found a way to alter the cubes position in the container and have tried putting the element at the end (code below) and start of the childrenArray, but nothing seems to work. I am kinda really stuck here, so if anyone knows how to get the top level element when clicking on the stack, i'd be happy to hear.

[Code]...

View 1 Replies

ActionScript 3.0 :: Setup An Array Of Cue Points?

Mar 28, 2011

I'm trying to set up an array of cue points and when each cue point is reached, it triggers an event. I've got the array set up, but am having difficulty setting up the action events.

[Code]...

View 3 Replies

Away3D Vs Sandy 3D And Other Flash 3D Engines For Mobile?

Jun 25, 2010

What are the pros and cons of various Flash 3D engines with regards to performance on mobile devices? Which do you prefer -- which have you tried (examples of apps developed) implementing on mobile devices?

View 1 Replies

ActionScript 3.0 :: Flash CS5.5 / Away3D - Texture Could Not Be Found

Dec 13, 2011

I've been trying to test out Away3D engine on Flash CS5.5, and I've been getting lots of errors. I have downloaded playerglobal.swc and placed it, edited player xml file and configured it for flash to use FP11. In Flash, I have chosen Flash player 11 to be used. But when I try to create a new View3D object:
var view:View3D=new View3D();
I get an output error (not a compiler error) of:
VerifyError: Error #1014: Class flash.display3D.textures::Texture could not be found.

View 1 Replies

Flash :: Port Away3d Scene With Animation Into PV3d?

Jul 25, 2010

How to port Away3d scene with animation into PV3d? Are there any tutorials on how to do that?

View 1 Replies

Flash - Where To Get Comparing List Of Papervision3d Versus Away3d

Dec 18, 2010

So I know that PV3d looks quite dead. But it is documented over the internet much better. So I decided to develope my product using old but good PV3d engine. Time goes on so I plan to port it sooner or later to Away3d. So I need a list of things that aere not in Away3d that I have in PV3d. And a list of generall use diffrencies (use of cameras, viewports, etc). So where to get comparing list of papervision3d vs Away3d?

View 1 Replies

Flash :: Away3d WireframeMaterial: Setting The Wire's Width?

Feb 26, 2011

I am having a difficult time setting the width of a WireframeMaterial. Things were working well until I upgraded to from 2.5 to 3.6

I am doing: var mat = WireframeMaterial(0xff0000, {width:4, alpha:alphaValue});

but that's not working at all the width is still set to 1

View 1 Replies

Flash :: Apply Bend On A Cube Using DMod And Away3D?

May 10, 2011

I am having some problems with the away3D library. I want to apply a bend to a cube using AS3DMod, but i can't seem to get it working. My cubes kind of get mutilated when i want to bend them :p they bend to all directions and i can't seem to find a pattern in the bending.

[Code]...

View 1 Replies

Flash :: Clipping Due To Segmentation In Plane Primitive In Away3d

Nov 28, 2011

I have a Plane and I try tweening a MovieClipSprite on it. I run into trouble when I try to tween near the points where both segment triangles meet (I have kept both segments as 1), While moving near these points the Sprite disappears. I can tell it goes beneath the Plane because when it reappears it does so gradually and I can see it's lower half appearing as it moves away from these points. Increasing the segments obviously deteriorates the performance further as this begins to happen at other points as well. I am pasting some relevant code var planeMaterial:BitmapMaterial = new BitmapMaterial(texture.bitmapData, {smooth: true, precision: 4});

[Code]....

View 1 Replies

ActionScript 2.0 :: F8P: Loading On-screen Points Into An Array With A Loop?

May 2, 2007

I want to make an array that holds objects, each object containing an x- and y-value representing the location of each mc on screen. The mcs will not move. How do I reference each mc using a variable with a loop?

For example, if I have the mcs mc_0, mc_1, mc_2, mc_3, ... mc_49

I want to...

Code:

var n = 50;
var myArray:Array = new Array();
for (i = 0; i < n; i++){
myArray.push(

[code]....

View 1 Replies

ActionScript 3.0 :: MovieClip Collision With Points Stored In An Array?

Jun 8, 2011

Im a bit stumped on this. I have a movie clip named mcMain that the player controls, and i want him to have it detect collisions at certain points of the screen (like at a certain X and Y co-ordinates). I have an array that contains those values, which is shown below:

Code:
//Array that holds x position of points
var xPoint:Array = new Array(150,400,200,300,100);

[code].....

View 3 Replies

ActionScript 2.0 :: Creating Array - Called Points Shown As Undefined

Aug 14, 2004

I'm trying to create an array, and this is the code I'm using:
Code:
function create_spiral(len, rad, turns, num, theArray) {
theArray = [];
var inx = len/num;
var iny = ((360*turns)*(Math.PI/180))/num;
var inz = iny;
[Code] ....

And I'm calling it with:
Code:
create_spiral(200, 10, 3, 100, points)
ideally, I would then have an array, called points, which would be full of numbers. But when I run a trace it shows as undefined.

View 2 Replies

Actionscript :: Assemble Array Of Continuous Points For A Contour Line Using Conrec

Mar 31, 2011

I am trying to implement contour lines in ActionScript using Conrec. I have looked at both the java and javascript implementation and am still stuck.URL...Conrec will take grid data and assemble continuous contour lines. The problem is that it does not necessarily draw those lines in a continuous fashion. For example, it will draw A->B and then C->B and then C->D instead of A, B, C, D, etc.The javascript implementation seems to be accounting for this and serializing the instructions into an array of draw points. Which is what I too want to accomplish in the end. That is it takes the instructions from the core Conrec logic (eg: A->B, C->B, C->D, etc) and organizes it into an A, B, C, D series. I think it will also return the series as a multi-dimensional array to accommodate broken lines (eg: [[A, B, C, D], [E, F, G]]). This last functionality is what I need to do in Actionscript.This last part is where I am stuck. Ignore Conrec for now (I have given up on finding an Actionscript implementation), how can I organize these instructions into a collection of serial points? When Conrec gives me "draw point from X->Y" how can I first check if X or Y are already in a series and append either X or Y (whichever is not in the series) into the series? AND if neither are in the series, start a NEW series with X, Y as the starting set. Then check subsequent instructions against all existing series and connect series if they now start and stop on the same point? Also, I need to be able to allow for a series to close itself (eg: A, B, C, A) -- a loop (is that even possible?!).

I'm not sure if there is a technical term for what I want to do beyond "concatenation". I also hope someone out there has done this with Conrec and can give me some pointers.In the meantime, I am going to continue to plug away at this and see if I can come up with something but I am not confident in my abilities.If you know another way to draw contour lines from grid data, I am open to alternatives. But I have to be able to implement it in Actionscript.

View 3 Replies

Actionscript 3 :: Calculating Evenly Distributed Points On A Line Of Points

Oct 3, 2011

I have been tasked with trying to create a drawing tool that draws dotted lines as you drag the mouse across the stage. I can easily capture the points on MouseEvent.MOUSE_MOVE and store them in a vector and then draw the points as dots:

The problem is that I need to calculate evenly distributed points on an ever growing Vector of points so I can only draw the line between say every 5th point (say using modulus). I have been battling away with Bezier curve equations both Quadratic and Cubic but still can't quite figure out how to convert my Vector of points into an evenly distributed Vector of Points without sucking the life from the CPU.

View 1 Replies

Flex :: Playbook AIR SDK Images On Surface

Jul 21, 2011

I am trying to write a Playbook app using the AIR SDK, I need a surface of some kind that I can load a large image onto, then subsequently place some smaller images on top of and add the whole lot to a ScrollPane so I can pan it around the screen. I have tried by adding the image to a sprite and displaying that in a group in the application but the image does not show up. What is the correct surface kind I should be using here and how should I be loading the images? (currently using "Embed" and loading the image into a BitmapAsset.)

var scroll:ScrollPane = new ScrollPane();
scroll.setScrollContent(image);
scroll.update();
scroll.graphics.beginBitmapFill(icon.bitmapData);
scroll.graphics.drawRect(100,100,56,56);
scroll.graphics.endFill();
scroll.update();

This code causes a non-moving icon to be drawn behind the scrollContent, I want to add something on top of the scroll content that moves with it.

View 2 Replies

ActionScript 3.0 :: MovieClip Co-ordinates And Surface?

Apr 22, 2010

There is something i do not understand, i'm making a Tetris like game and i want borders (limits) but when put an height and width to my MovieClip nothing appears.

Code:
public class Thugtris_V2 extends MovieClip
{
var ts:ThugtrisShapes;//ShapeManager.GetInstance().CreateShape(ThugtrisShapes.RLSHAPE);[code]....

I have second problem, i check my coordinates of my dropping shapes and my shape disapeared from the screen,fell completely down, and it's last coordinates were : pos = (x=-6, y=371).My bottom is suppose to be at 440? The entire screen does not "measure" 400 pixels? How can u get a negative coordinate,are'nt the coordinates suppose to be like texture coordinates, only positive and (0,0) is at the top left corner?How do u measure the pixels limits of the top DisplayObject? How are the coordinates actually "setuped"? Like cartesian but only the upper part?

View 5 Replies

ActionScript 2.0 :: Actor On Rotating Surface?

Sep 23, 2006

I'm working on a game, and I'm a bit stuck on something that I think I'm really close to solving.

I have an actor, which I can move around on a platform (Top-down view)

The platform rotates, and I want the actor to receive the x- and y acceleration, so that it appears to be on top of the platform, and thus rotate together with it. I don't want the actor to rotate 'inside' the platform, because of some other constraints

View 1 Replies

ActionScript 2.0 :: Any Way To Add Reflective Surface Effect?

Aug 23, 2007

I am working on a firework move look's coolfire works are dynamic. Is there a way I could add a type of reflective surface kind of like water to show he reflection?

View 4 Replies

ActionScript 3.0 :: 3D Charting In Flex Surface?

Mar 28, 2010

Do you have any recommendation for a free 3D charting library in Flex. To be more precise, I only need to draw surface (for now). Basically, I just need a chart that displays three axes (one should be timeline, and two should be linear axises) and the surface.

From what I have seen so far, two most popular free Flesh 3D libraries are Papervision3D and Away3D. Also, I've found one IBM library - ILOG Elixir that looks really nice, but it's proprietary (although, I haven't seen any surface examples for Elixir neither).

From what I have seen, Papervision3D and Away3D should do much more then 3D charting, but I haven't seen any examples on how to draw surfaces in any of them (except this line chart in 3D: [URL]..So, if anyone has a link to a documentation or some examples that would be great. Also, I'm interested to hear your opinion and recommendations on this topic.

View 3 Replies

ActionScript 3.0 :: Rotating Enemies Along A Curved Surface?

Apr 14, 2009

This one concept has been bugging me for days now and I can't seem to solve it. You see, I'm trying to rotate my enemies along an uneven surface. So far, they follow along it perfectly, using my hitTestPoint collision checks.But I don't know how to rotate the collision points and thus rotate the movieclip along the curve so it remains clipped to the ground like in Fancy Pants Adventure 2 or a tanks game.Here is what it looks like right now

View 3 Replies

ActionScript 3.0 :: A Drip Effect For Drawing Surface

Sep 2, 2010

I would love to get some help or advice on how to create an effect in a drawing application. I want to build a drawing application, which is not that difficult. I've found several resources on these type of applications. What I want to do is "merge" 2 examples that I've found. This drawing application makes sense to me and I feel I can modify it to my liking. (sorry in advance I cant post links)

[Code]....

View 0 Replies

ActionScript 2.0 :: Mouse Pointer Reflection On Surface

Mar 20, 2004

I'm working on a new site: [URL]. However, I've got some problems with my reflection of the mouse-pointer. The problem is that I don't know how to create the fake 3D effect, because now when you move your mouse over "Identity" the reflection is above the real mouse. I was thinking to put a mask, so the reflection cannot go above the real mouse, but then there is no reflection.

View 14 Replies

ActionScript 2.0 :: Surface Collision - The Block Go Through The Walls

Oct 12, 2004

I make this simple system to simulate a colision of a block in "walls" and bounce like a pong ball. To use drag the orange square and release to start the movement. But i have a problem, sometimes the colision not happen and the block go through the walls, i try less the time of setInterval that verify the colisions but not solve my problem. colision system -> [URL]

View 3 Replies







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