ActionScript 3.0 :: Possible To Clear 3d Sphere?
Aug 27, 2010I'm doing 3d gallery in AS3 and i have run in to huge problem. After ActionScript creates 3d sphere it doesnt go away no mater if i go forward or backwards in timeline.
View 0 RepliesI'm doing 3d gallery in AS3 and i have run in to huge problem. After ActionScript creates 3d sphere it doesnt go away no mater if i go forward or backwards in timeline.
View 0 RepliesI'm working on a game whose background has many layers that each scroll at different speeds.
Inside each layer I have a Sprite, I've started using graphics.beginBitmapFill, but what I've found is that the graphics.clear() function doesn't actually clear the contents set by the previous call to graphics.begin.BitmapFill. Each frame, I adjust the matrix to shift the layer as needed. Then, I call graphics.clear() and graphics.beginBitmapFill() with the adjusted matrix. Since my layers have alphas in the bitmap, I can see the contents that was drawn the previous frame.
Code:
package {
import flash.display.Sprite;
import org.papervision3d.cameras.Camera3D;
[Code].....
I've imported the correct folder in my Edit->Prefences->ActionScript 3.0 settings. I've instantiated an object and it compiles, and I'm not getting any errors but, nothing shows up on the screen.
I am making a splash screen for a program and I have a picture in my head of a spinning sphere with pictures on it.I've already made my sphere and mapped my design onto the sphere in illustrator, although it is not as clear as I wanted.How do i get the sphere into flash and animate it to spin continuously?
View 1 RepliesHow would you do it? Or, else, how would you create a world? I.e. what I need is to place the sphere in the way the distance form the camera to it's center is less then the sphere's radius.
View 2 Repliesi'm trying to achieve the effect of a rotating sphere given a regular 2D texture. the best thing i've seen is a tutorial on emanueleferonato.com which gives this result: emanueleferonato dot com /downloads/mapping09.swf as you can see, it works pretty well when you're moving left/right OR up/down. it fails to simulate realistic rolling when going in any diagonals (since it's a very simplistic illusion). how to render such a sphere given any point on a mercator projection and then have the sphere rotate in an arbitrary (but fixed) direction? this is a bit advanced math stuff.
btw, if anyone's interested, i figured a better displacement map than what is used in the link i showed
i started my search again and immediately bumped into this: [URL] it's library called BitmapSphere and it does exactly what i need it to! also, could admin edit this and put together the link or something? i find it highly annoying that i need 50 posts before being able to post a link
[Code]...
doesnt clear the line when mc1 moved ? How solve tihs problem?
The basic concept: I want to at runtime overlay (or paste or whatever) one bitmap image asset onto another. The original image asset is a texture on a 3d sphere.Example:3D Sphere with earth texture applied to it. Put a cloud on the earth texture and have cloud move along the earth.
Caveats:Can't use any composite materials because I take a serious perf hit. Want to try working only with bitmaps to see if it is faster.I've gotten this far but don't know how to fill rectangle with jpeg file and certainly have no idea where to go from here..earthBitmap= new BitmapData( 256, 256, true); fillRect will only do a color ... I need what fills a rect with jpeg image and how to edit a bitmap on the fly.
I am trying to rotate a sphere with the mouse on the x and y axis but the sphere keeps 'roll'ing and flipping it all around.
package {
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
[code]....
if anyone has any info on animating a point around a "sphere" with actionscript. If anyone has an actionscript equation defining this motion
View 4 Repliesi am developing an application where client can add his photos to appear on a sphere or ball or coffee cup and able to save them and give it for printing using flex. like itasveer.com site. i tried to use away3D but if the image is small it is stretched and added to sphere. i dont want it to strech instead the original image shud appear on the sphere. if it is added to cup it shud cover only the circular part it shud not add this to top and bottom.
View 1 RepliesHow position plane in sphere papervision3d as3 ?
I have a problem , how position a plane in surface of sphere.
The effect I would like to achieve is when the plane around the sphere is clicked, the sphere rotates so that the plane is in the middle of the stage. but there always some problems when i clicked the plane the sphere seems like never rotate to it's back.[code]
View 3 RepliesI want to attach spheres to rotating sphere but I've encountered some rotation problems:
In application u can rotate mainSphere in both x and y axiss'.
If I rotate main sphere in only x axiss or only y axiss, it works correctly. But if I rotate main sphere around both x and y axiss, sphere is attacing the wrong place.
Here is the code:
ActionScript Code:
// these are the spheres containers. Sphere container class extends form object3d
var mainSphere:SphereContainer3D;
var attachingSphere:SphereContainer3D;
[Code].....
I am a newbie to Papervision. I want to design a sphere with 8 holes around one of its diameters. How do I do it? How do I draw anything on a sphere in Papervision?
View 1 RepliesI want to create an animating sphere representing the earth but here is the catch I want the users to be able to spin it round in real time, what tools will do the trick?
View 3 Repliesfor the past two weeks I've been working on coming up with a collision detection system for my game in flash CS4. No matter what I try for some reason I just can't seem to do it, and I don't know how to fix it. This has never been an issue for me, I would even settle for basic rectangle to rectangle collision if I could, but no matter what I do I end up screwing it at all up. Somehow the collision detection either doesn't work at all, works for one side and jumps the guy through the wall on any other side or I think at one point it worked for two sides as long as I didn't hold down more than one movement key.
I've constantly scrapped what I've done over and over, right now I have no source code to present. I'm totally lost and confused, and my deadline for getting this done is today in a few hours. I really wanted to figure this out on my own but honestly I just don't see what I can do, I've got sphere to sphere collision detection working perfectly for my player and other spheres, but the walls are squares lined up to form long rectangles, and I just can't seem to get it to work. I'm dynamically loading the square-wall blocks as tiles to form a dynamically loaded map, and then I'm iterating through each individual block to determine if collision has occurred with the player. I think somehow I'm not managing the results right, or maybe I somehow need to be able to determine which direction the player hit the wall from, but I just don't know how to do it.
I've been staring at the screen for the past 3 hours trying to work something out but nothing is coming to me, example from a flash-type game or something similar I would be very grateful! (I've done this countless times in C++, C#, and java. I don't get what is going on in flash :-(((( )
I want to create a 3D cylinder, sphere, cone using Actionscript for Flash Player 10. Is there any available class? I also want to know how to paint gradient, wrap text and texture around them. It would be nice if these class have these functions. I can't use non DisplayObject in this project so PV3D is not an option
View 2 RepliesI am creating a 3D sphere gallery with ActionScript 3 and the Flash 10 3D (2.5D) APIs. I have found a method that works but is not ideal. I would like to see if there is a better method.
[Code]...
To see this in action, click here. alternate link. Notice that with the default settings, the number of items actually in the sphere are less by 13. I believe is the error introduced by my approximation in the first step.
I am not able to figure out a method for determining what the exact radius of such a sphere should be. I'm hoping to learn either a better method, the correct method, or that what I am trying to do is hard or very hard (in which case I will be happy with what I have).
I am currently building a sphere of images that I'm trying to load from a remote location using XML. I managed to find the source for the sphere and was able to figure out how load the XML into an array of image details.
My problem is that the sphere is made up of images that were loaded into the library and I'm trying to load them in dynamically, i got all the information from XML but i don't understand how to make these dynamic images the same as the ones in the library so i can instantiate the image object.
thumbsArray[0]=[new Bitmap(new Small1(thumbWidth,thumbHeight))];
Small1 = the name of one of the image in the library that makes up the sphere. if i go to the properties of this Small1 image i noticed that its class is called Small1 too. I don't understand this as iv never seen this in actionscript 2.0.
The code below is my attempt at making a image loader object to a bitmap object, that doesnt seem to work my bitmap object becomes null, and throws an error.
SYNTAX / CODE:
function getLoader(url) {
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.CO MPLETE, completeHandler);
[Code]......
I'm creating a ball bouncing in 3d. My problem is that I have a square boundaries. top,bottom, front, back. I tried get the the distance ( of the sphere/radius) but went I * vx , vy , vz by 1 or -1. One of the position is - while the other two might by positive. I need pool ball physics with the boundary be a 3d sphere.
View 9 RepliesI need to know what side of a rotated box my sphere/point is colliding with and at what angle.
I could perform the 4 lines check but I think it will be too cpu consuming. I need it for fast simple physics simulations(bounces)..
I have been programming flash for a while, but I suppose I never really learned flash "correctly", and I have my shortcuts and I cut corners sometimes. I'm now trying to render a sphere.
Code:
circleraduis = 500;
camerax = 275;
cameray = 200;
for (degrees = 0; degrees < 180; degrees += 30) {
xradius = Math.cos (degrees) * (Math.PI / 180) * circleraduis;
yvalue = Math.sin (degrees) * (Math.PI / 180) * circleraduis;
[Code] .....
I am new to working with papervision and just want to add a simple spinning sphere inside a movieclip and have it positioned on the stage where I want it. For some reason when it creates the sphere, it doesn't place it on the registration points, but puts it in the bottom right corner of the stage and is cut off.
Here is ActionScript Code:
var viewport:Viewport3D=new Viewport3D(0,0,true,true);
addChild(viewport);
var renderer:BasicRenderEngine = new BasicRenderEngine();
var scene:Scene3D = new Scene3D();
var camera:Camera3D = new Camera3D();
[Code] .....
I have a flat circular texture in a bitmap for a project I am working on. Its a texture generated with the perlin noise functions. I wish to extrude the centre of the image using displacementmapfilter so the circle appears to be a 3d sphere. There will be no animation on the sphere. I'm not getting anywhere with it though, My code is below with my broken implementation of the displacement filter.
[Code]..
I am creating a wizard-like form. At the end, I give the users an option to start over.At this point, I want to blank out all TextInput fields in the application.I wrote some code that does the trick, but I am wondering if there is a better way?
Code:
private function clearText(obj:Object):void{
try{
[code]....
I have a project I am working on in which I would like to teach how to cash a scratch off card. I have made the scratch and made it so it will "scratch", however my masking technique seems to not be working how it should...
The idea is that the user would "scratch" the card and then hit "Next" after that it would load a new frame (Progress Bar would move) and then do what they need to on that frame, and so on.
However it would seem that Flash is keeping the users "drawing" and still allows them to draw after the first frame, which is not what I want.[code]...
this might be a very simple thing to do, buuuut... I've got two UILoaders on my stage, when you click various buttons it makes various pics appear in them, I want to put a button on my main stage that would clear the images out of the UILoaders when it was clicked, and would just leave them blank. Is this possible?
View 1 RepliesI have a similar problem where I want a text field that by default has the word NAME in it, to become empty when a user clicks on it.
The text field has the instance name 'nam' and is inside a movie with the instance name 'input_text'.
I've searched around and found samples of code where everyone keeps suggesting this:
Code:
textboxinstancename.onSetFocus = function() {
textboxinstancename.text = "";
};
[Code]....
Code:
var moo : Vector.<SomeClass> = new Vector.<SomeClass>();
moo.splice(0);
[code]......