360 Sphere Spin.....
How would you make a sphere spin in the direction your mouse rolls over it? (totally 360)?????
Does anyone know where I can learn from a tut? thanks
FlashKit > Flash Help > Flash MX
Posted on: 01-13-2003, 10:54 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
3D Sphere Animation
Not certain of where to post this, but as it's a practical application of actionscript (it's 100% code), I thought it might be nice here:
http://www.27Bobs.com/Bones/SphereAnimator/title.swf
Just wanted to post a little sampler of what I was doing with my new Sphere Animator mini-app, which should be available for free download within the next week. With it you can create simple animations in 3D space, as well as prepare 3d nav menus, sprites for games, etc. I'm going to end this animation sampler with a menu leading to practical examples as well as a link to the interface itself, but I wanted to show where it was at, as I'm very excited about it. I'm finding it really easy to use, and I hope others might benefit from it. Enjoy!
Oh, and let me know if there's any processing problems, please. Thanks.
--tyard
http://www.27Bobs.com
3D Sphere Problem
Hi,
I have drawn a sphere using actionscript API, and have been able to rotate it left and right. but when I tried to rotate it up and down, some lines were not drawn properly. Can anyone enlighten me?
thanks. Here is the script:
_x = 275;
_y = 200;
d = 400;
pointx = new Array();
pointy = new Array();
pointz = new Array();
numStrips = 10;
degPerStrip = 180/numStrips;
numAround = 20;
trans = Math.PI/180;
degPerAround = 360/numAround;
incAng = 0;
incAng2 = 0;
inc = 0.01;
inc2=0.001;
for (i=0; i<=numStrips; i++) {
pointx[i] = new Array();
pointy[i] = new Array();
pointz[i] = new Array();
for (j=0; j<=numAround; j++) {
//initialising points will speed up processing
pointx[i][j] = 0;
pointy[i][j] = 0;
pointz[i][j] = 0;
}
}
//
_root.createEmptyMovieClip("sphere", 1);
sphere.onEnterFrame = function() {
this.clear();
for (i=0; i<=numStrips; i++) {
for (j=0; j<=numAround; j++) {
ang = j*degPerAround;
if (Key.isDown(Key.LEFT) || Key.isDown(Key.RIGHT)) {
incAng += Key.isDown(Key.LEFT)*inc-Key.isDown(Key.RIGHT)*inc;
}
ang += incAng;
ang2 = i*degPerStrip;
if (Key.isDown(Key.UP) || Key.isDown(Key.DOWN)) {
incAng2 += Key.isDown(Key.UP)*inc2-Key.isDown(Key.DOWN)*inc2;
}
ang2 += incAng2;
if (ang2>180) {
ang2 =ang2-180;
}
rad = Math.sin(ang2*trans)*100;
x = rad*Math.sin(ang*trans);
z = (rad*Math.cos(ang*trans))+500;
y = Math.cos(ang2*trans)*100;
pointx[i][j] = x;
pointy[i][j] = y;
pointz[i][j] = z;
}
}
for (i=0; i<numStrips; i++) {
for (j=0; j<numAround; j++) {
// Grab the 4 points of the quad
x1 = pointx[i][j];
y1 = pointy[i][j];
z1 = pointz[i][j];
x2 = pointx[i+1][j];
y2 = pointy[i+1][j];
z2 = pointz[i+1][j];
x3 = pointx[i+1][j+1];
y3 = pointy[i+1][j+1];
z3 = pointz[i+1][j+1];
x4 = pointx[i][j+1];
y4 = pointy[i][j+1];
z4 = pointz[i][j+1];
// Corner 1, on screen
sx1 = (x1*(z1/d));
sy1 = (y1*(z1/d));
// Corner 2, on screen
sx2 = (x2*(z2/d));
sy2 = (y2*(z2/d));
// Corner 3, on screen
sx3 = (x3*(z3/d));
sy3 = (y3*(z3/d));
// Corner 4, on screen
sx4 = (x4*(z4/d));
sy4 = (y4*(z4/d));
// Test to see if this quad is visible or not
this.lineStyle(1, 0xFF0000, 100);
this.moveTo(sx1, sy1);
this.lineTo(sx2, sy2);
this.lineTo(sx3, sy3);
this.lineTo(sx4, sy4);
}
}
};
Texturing 3D Sphere
Hey Everyone,
I am currently working on a project where i need to create and texture a 3D sphere in Papervision3D. The question that i have is what should the dimensions of the 2D image be in relation to the radius of the sphere. So say my sphere has a radius of 500 what would the width and height of the 2D image be? Does anyone know of a formula available to calculate these dimensions? Thanks.
Sphere Growing Problem...
Hi people!
I got an actionscripting problem:
(a) I have a button, with a movie clip in it (on the over part).
(b)The movie clip consists of a sphere growing (motion tween).
What I want is the sphere to grow larger depending on how near the mouse is to the sphere. i.e. the nearer the mouse is to the sphere, the more it will grow.
Hope you can help me out on this. I tried experimenting with the _xscale and _yscale properties, but got no luck. Hopefully you will have more luck than me . Thank you for your time.
Sphere And Rotating Objects
I'm a little weary about posting this question because I'm such a noob when it comes to Flash and I figure this has been asked before or it's so easy to do that no one will respond this question....but here I go anyway.....
I have an animation of an angel that rotates 360 degrees around a sphere (like the earth orbiting the sun). I created this animation in Flash MX first, but it didn't have enough 3D dept for my taste, so I created the animation in Swift 3D v2. Well I have the angel doing exactly what I want it do in flash (360 rotation with 3D dept) and it looks pretty good. Now here's the problem:
- What I'm actually trying to achive is having 9 angels rotate around the sphere in a 360 degree rotation with a constant loop effect. It would look something like the animated "Universal Picture" logo you see at the movies where the "Universal Picutre" text wraps and the globe and constantly rotates around it.
I have tried everything I can possible think of to achieve this effect, but I just can't seem to pull it off correctly. I can only assume this effect can be pulled off easily with action script, but I have no idea how to do it. I don't mind emailing what I've done (fla or swf) to anyone who can help me out.
Tips, advice, please help!!!
Text Circling A Sphere
Hey guys... i am not even sure if this is doable, but has anyone seen or done animated text circling an object. "in orbit" around a sphere...
thanks!
Andrew
Rotating A Sphere Or Globe
hello everyone!
i have been given a task of rotating a sphere to achieve an effect like rotating planets.
i have been researching for tutorials n help but haven't found much...
i will really appreciate if someone could help me out....
http://au.geocities.com/brutfood/FLASH6/G3globe.swf
this link will give u an idea...
many thanks.
E
Circle On Sphere Surface
Anyone how to do a circle on a spheres surface.
Or a clue on where the maths is wrong?
got this far on 1st attempt, doesn't work on the diagonals works fin on x and y
Code:
var board:Sprite = new Sprite();
var myPoint:Sprite = new Sprite();
var sphere:Sprite = new Sprite();
stage.addChild(board);
board.addChild(sphere);
board.addChild(myPoint);
board.graphics.lineStyle(1,0);
board.graphics.beginFill(0xCCCCCC,0.7);
board.graphics.drawRect(0,0,400,400);
board.graphics.endFill();
board.x = 10;
board.y = 10;
sphere.graphics.beginFill(0xFF00FF,0.7);
sphere.graphics.drawCircle(0,0,100);
sphere.graphics.endFill();
sphere.x = 200;
sphere.y = 200;
myPoint.graphics.lineStyle(1,0);
myPoint.graphics.beginFill(0x0000FF,0.7);
myPoint.graphics.drawCircle(0,0,20);
myPoint.graphics.endFill();
myPoint.x = 200;
myPoint.y = 200;
myPoint.addEventListener(MouseEvent.MOUSE_DOWN, startMove);
function startMove(evt:MouseEvent):void {
stage.addEventListener(MouseEvent.MOUSE_MOVE, pointMove);
}
function pointMove(e:MouseEvent):void {
myPoint.x = board.mouseX;
myPoint.y = board.mouseY;
var centeredX:Number = Math.abs(myPoint.x-(board.width/2));
var centeredY:Number = Math.abs(myPoint.y-(board.width/2));
// a = root (c sqrd - b sqrd)
myPoint.scaleX = (Math.sqrt(Math.pow(sphere.width/2,2)-(Math.pow(centeredX,2))))/100;
myPoint.scaleY = (Math.sqrt(Math.pow(sphere.width/2,2)-(Math.pow(centeredY,2))))/100;
e.updateAfterEvent();
}
stage.addEventListener(MouseEvent.MOUSE_UP, stopMove);
function stopMove(e:MouseEvent):void {
stage.removeEventListener(MouseEvent.MOUSE_MOVE, pointMove);
}
2nd attempt, close but now the scaling seems too much
Code:
var board:Sprite = new Sprite();
var myPoint:Sprite = new Sprite();
var sphere:Sprite = new Sprite();
stage.addChild(board);
board.addChild(sphere);
board.addChild(myPoint);
board.graphics.lineStyle(1,0);
board.graphics.beginFill(0xCCCCCC,0.7);
board.graphics.drawRect(0,0,400,400);
board.graphics.endFill();
board.x = 10;
board.y = 10;
//sphere.graphics.lineStyle(1,0);
sphere.graphics.beginFill(0xFF00FF,0.7);
sphere.graphics.drawCircle(0,0,100);
sphere.graphics.endFill();
sphere.x = 200;
sphere.y = 200;
myPoint.graphics.lineStyle(1,0);
myPoint.graphics.beginFill(0x0000FF,0.7);
myPoint.graphics.drawCircle(0,0,20);
myPoint.graphics.endFill();
myPoint.x = 200;
myPoint.y = 200;
myPoint.addEventListener(MouseEvent.MOUSE_DOWN, startMove);
function startMove(evt:MouseEvent):void {
stage.addEventListener(MouseEvent.MOUSE_MOVE, pointMove);
}
function pointMove(e:MouseEvent):void {
myPoint.x = board.mouseX;
myPoint.y = board.mouseY;
var centeredX:Number = Math.abs(myPoint.x-(board.width/2));
var centeredY:Number = Math.abs(myPoint.y-(board.width/2));
//var X = (Math.sqrt(Math.pow(sphere.width/2,2)-(Math.pow(centeredX,2))))/100;
//var Y = (Math.sqrt(Math.pow(sphere.width/2,2)-(Math.pow(centeredY,2))))/100;
var size = (Math.sqrt((Math.pow(centeredX,2))+(Math.pow(centeredY,2))))/100;
myPoint.scaleX = 1-size
// myPoint.scaleY = 1-size
myPoint.rotation = Math.floor(Math.atan2(myPoint.y-(board.width/2), myPoint.x-(board.width/2))/(Math.PI/180))
e.updateAfterEvent();
}
stage.addEventListener(MouseEvent.MOUSE_UP, stopMove);
function stopMove(e:MouseEvent):void {
stage.removeEventListener(MouseEvent.MOUSE_MOVE, pointMove);
}
Papervision Sphere Rotation
Hi all! I've tried my luck on numerous forums, but no one can seem to help me out...hopefully someone here can.
First, here is a link to the work in progress: http://www.rson5.com/globe
The effect I would like to achieve is when the head of the pin is clicked, the globe rotates so that the pinhead is in the middle of the stage. I have been trying for hours trying to figure out the calculation for getting the globe's rotation relative to the pin's position. Source is below. Done in Papervision 1.5.
Any help would be much appreciated.
Code:
package {
import flash.display.*;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.text.*;
import fl.transitions.Tween;
import fl.transitions.easing.Strong;
// Import Papervision3D
import org.papervision3d.Papervision3D;
import org.papervision3d.scenes.InteractiveScene3D;
import org.papervision3d.events.InteractiveScene3DEvent;
import org.papervision3d.cameras.Camera3D;
import org.papervision3d.objects.DisplayObject3D;
import org.papervision3d.objects.Plane;
import org.papervision3d.objects.Sphere;
import org.papervision3d.objects.Cylinder;
import org.papervision3d.materials.MovieAssetMaterial;
import org.papervision3d.materials.InteractiveColorMaterial;
public class main extends MovieClip {
var container :Sprite;
var scene :InteractiveScene3D;
var camera :Camera3D;
var line :Cylinder;
var mouseDownX=0;
var mouseDownY=0;
var xDiff=0;
var yDiff=0;
var mouseIsDown:Boolean=false;
var radius:Number = 500;
var ax :Number;
var ay :Number;
public function main() {
init3D();
stage.addEventListener(MouseEvent.MOUSE_DOWN,mousePressed);
stage.addEventListener(MouseEvent.MOUSE_UP,mouseReleased);
stage.addEventListener(Event.ENTER_FRAME,loop3D);
}
private function init3D():void {
container = new Sprite();
addChild( container );
container.x = 500;
container.y = 350;
container.buttonMode = true;
scene = new InteractiveScene3D( container );
ism = scene.interactiveSceneManager;
camera = new Camera3D();
camera.zoom = 4;
addWorld();
addPins();
}
private function addWorld():void {
var materialEarth :MovieAssetMaterial = new MovieAssetMaterial( "world" );
materialEarth.smooth = true;
ballPivot=new DisplayObject3D ;
scene.addChild(ballPivot);
ball=new Sphere(materialEarth,radius,30,30);
ballPivot.addChild(ball);
}
private function addPins():void {
var materialSpace :InteractiveColorMaterial = new InteractiveColorMaterial( 0xFFFFFF );
var total:int = 4;
var rad :Number = radius;
for (var i:int = 0; i < total; i++) {
pinContainer = new DisplayObject3D;
var line:Cylinder = new Cylinder( materialSpace, 1, 250, 10, 5 );//elongated cylinder acts as the pin
var lineEnd:Sphere = new Sphere( materialSpace, 15, 15,15 );//small sphere acts as the head of the pin
lineEnd.name = "pin_" + (i+1);
lineEnd.addEventListener(InteractiveScene3DEvent.OBJECT_OVER, handleMainHover);
lineEnd.addEventListener(InteractiveScene3DEvent.OBJECT_CLICK, handleMainClick);
pinContainer.addChild(line);
pinContainer.addChild(lineEnd);
ax = -100 * (i+1);//static positions for the pins temporarily
ay = 100 * (i+1);
line.y = rad;
lineEnd.y = rad+125;
pinContainer.rotationX = ax;
pinContainer.rotationZ = ay;
ball.addChild(pinContainer);
}
}
private function loop3D(event:Event):void {
if (mouseIsDown) {
var currentX=mouseX;
var currentY=mouseY;
if (Math.abs(mouseDownX - currentX) > 1) {
xDiff=(mouseDownX - currentX)/4;
}
yDiff=(mouseDownY - currentY)/4;
}
ball.rotationY+= xDiff;
ballPivot.rotationX-= yDiff;
ballPivot.rotationX=Math.min(60,ballPivot.rotationX);
ballPivot.rotationX=Math.max(-60,ballPivot.rotationX);
xDiff*= .5;
yDiff*= .5;
mouseDownX=mouseX;
mouseDownY=mouseY;
scene.renderCamera( camera );
}
function mousePressed(event:Event):void {
mouseIsDown=true;
}
function mouseReleased(event:Event):void {
mouseIsDown=false;
}
function handleMainHover(e:InteractiveScene3DEvent):void {
trace(e.target.name);
}
function gotoLoc(e:Event):void {
trace(e.currentTarget.name);
}
function handleMainClick(e:InteractiveScene3DEvent):void {
trace(e.target.name);
}
}
}
[PVD] Render Sphere From Inside
How 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. Thus it should render the sphere from inside... apparently, this doesn't work... Any suggestions, examples - welcome.
360 Rotating Sphere(basketball)
Hi Im needing help to fix this code so that i can make
line 4 & 12 labeled "(meridians)"{which represent vertical & horizontial lines in the sphere} turn into black lines instead of the grey
color they are. Any help would be appreciated for I am new to actionscript.
these line are suppose to represent black lines in a rotating basketball.
c0._alpha=0;
c2_0._alpha=87;
step=11; // rotation speed
nrc=2 ; //(nr meridians)
var incl=20; // sphere inclination
var transp=25; // default back face visibility
cnt=0;
//meridians
for(i=0;i<nrc;i++){
duplicateMovieClip('c_0','c'+i,i);
pass=Math.round(Math.cos((i-nrc/2)*Math.PI/nrc)*1000)/1000;
rot3d=180*Math.atan(Math.sin(Math.PI*incl/180)*Math.sqrt(1-pass*pass)/pass)/Math.PI;
setProperty('c'+i,_xscale,100*Math.cos(Math.PI/nrc*i)*Math.cos(Math.PI*incl/180));
setProperty('c'+i,_alpha,90);
dir=getProperty('c'+i,_xscale);
if(dir<0){
rot3d=-rot3d;
}
if(pass<0){
rot3d=-180+rot3d;
}
setProperty('c'+i,_rotation,rot3d);
}
//parallels - expert edit
for(k=1;k<=3;k++){
duplicateMovieClip('c2_0','p'+k,k+20);
setProperty('p'+k,_alpha,70);
setProperty('p'+k,_yscale,100*Math.sin(Math.PI*inc l/180)*Math.sin(Math.acos((2-k)*80/100)) );
setProperty('p'+k,_y,-(2-k)*80*Math.cos(Math.PI*incl/180));
setProperty('p'+k,_xscale,100*Math.sin(Math.acos(( 2-k)*80/100)));
}
p2.mask._y=-110;
p1.zero._visible=false;
p2.zero._visible=false;
p3.zero._visible=false;0
Mapping Images On A Sphere
Hello.
I've been reading up on some 3d and pseudo 3d things on the site and can't find what i'm after. I'm looking for a method for mapping dynamic images across a rotateable 3d sphere in real time. Basically, imagine a globe or soccerball with images pasted on it at regular intervals. the sphere needs to be controllable to bring a new image into focus (i.e. up front/middle).
Any ideas would be greatly recieved, this one is a bit outside of my knowledge.
jJ
Balls Revolving Around Sphere
Hey,
I needed flash help and this is the first place that came to mind
I've searched the forums, the main page, Google, flashkit, etc and I couldn't find the answers I need, so:
What I'm looking for is a way of selecting items that are revolving around a sphere. I've seen sites before where you move the mouse to one side and the items start revolving in that direction -- that's sort of what I need.
Ideally, I need to be able to click on one of the balls and have it spin around to the center focus in the front of the sphere, but anything will do. I'm hoping to have the spheres spin around playfully a bit in an attract-mode type thing (like the PS2 startup screen almost -- http://i11.photobucket.com/albums/a1.../MACAD-01.jpg).
Thanks a lot to anyone who offers advice, in the meantime, I'll keep looking
Rolling Textured Sphere
Hi guys,
I'm trying to make a textured sphere that looks realistic when rolling (exactly like a pool ball); it can roll in any direction but not spin.
I can't figure out how to make the texture look right when it rolls. I've been experimenting with DisplacementMapFilter and although I can do cool effects I can't get close to what I want.
Should I even be using the DisplacementMapFilter for something like this ? I really need some guidance because I'm stuck.
Thanks.
Moveable Rotating Sphere
Hi all,
I want to make a user controllable rotating sphere. Exactly the same as the google earth initial view only I dont want to be able to zoom, just spin around using the mouse
I then want to map jigsaw shaped pieces over the sphere for users to click and take them to another page.
Any ideas or help is greatfully appreciated!!!
Sphere Plan Collision Detection
Hi all,
I am searching for a script to do frame independent collision detection of a sphere and a plan (in a pseudo 3D environment) ...
Anyone ?
Thanks for your help
Sibylhun
Plotting Curve Lines Over Sphere?
Any Geodata visualization experts out here? How do you accurately plot curved lines over a sphere?
I'm working on an open-source 3D Flash mapping application. You can see and download all the source code here (including the LAT/LONG KML XML data): http://code.google.com/p/meadanglobe
[see Line.as]
This is related to another post on latitude/longitude conversions here: http://www.actionscript.org/forums/s...957#post722957
The application will currently plot nodes over the surface of a 3D sphere (globe) by converting latitude and longitude to x, y, x cartesian coordinates. There is also a function that will plot lines between any of these nodes. However, the lines are linear (straight) and are therefore not represented accurately as if traversing over the curved surface of a globe. How to do this?
we are currently using this, which draws a straight line:
lineTo(endNode.x, endNode.y);
I imagine we will want to use something like bezier to get curved lines:
curveTo(anchor1, anchor2, endNode.x, endNode.y);
but how to calculate for the anchors?
This appears to be a complex one, but I sense achievable. Any help will be much appreciated.
Sphere Made Up Of 1000 Lines?
I'm currently working on a project for my Interaction Design class. I've decided to do the entire interaction design in flash but I'm really bad at actionscrip. What I want is a bunch of straight lines that are the same length to stem from a single point outwards. I want them to be equi-distant forming a sphere much like a dandylion.
Can anyone point me in the right direction?
Cheers,
Michael
Sphere Made Up Of 1000 Lines?
I'm currently working on a project for my Interaction Design class. I've decided to do the entire interaction design in flash but I'm really bad at actionscrip. What I want is a bunch of straight lines that are the same length to stem from a single point outwards. I want them to be equi-distant forming a sphere much like a dandylion.
Can anyone point me in the right direction?
Cheers,
Michael
Ball/sphere Menu Navigation?
Hi all,
Not really sure how to word this, but here goes....
I saw a copy of the latest Encyclopedia Britannica
recently and it's got this great hypertext navigation
system. At the center of it, is a ball...that ball is
the main topic you are searching on...and around it are
suggestions as to the next path you can take on your search.
These too are balls and when you click on one, it moves to the
center and a whole new breed of alternative balls pop up
around it....allowing you to just keep navigating through
loads of info.
Well, after that awful description, I'm trying to find any
Flash examples of a similar concept for menu navigation.
I'd like a ball "Menu", that when you click on or move your
mouse over it, is surrounded by a number of options....if you
click on one of these, they have sub-menus (or balls) that
appear around it.
Get what I mean? Anyone seen this in use anywhere? Can anyone
point me to a tutorial or source file of any sort?
Cheers,
Phil
Camera Moving Arounnd Sphere
Yes, what seems like a really basic papervision question, i'm almost ashamed. Almost.
We've all seen the execution about a mllion times, a sphere/globe that the user can spin around in all axis relative to mouse movements. Now, my maths isn't what it should be or used to be, so how can you do this by moving the (not Free) camera? I can move it around one axis, horizontal, pretty easily, but after that I run out of maths skills.
Code:
camera.x = Math.cos(angleX) * Globals.CAMERA_DISTANCE;
camera.z = Math.sin(angleX) * Globals.CAMERA_DISTANCE;
I just need it to do the same kind of thing but omni-directional. Thanks in advance!
New To Flash - Trying To Make Sphere With Satellites Project
I am new to Flash, although I have taken a class. I'm just having a difficult time learning this software. The project I am trying to do is make a sphere or a large circle on the page with satellites or moons going around the sphere in the middle. When you mouseover one of the satellites, the rotation should stop and clicking on that satellite should take you to a specific web page. Is that something that is possible with Flash? I am to the point where I know what the stage is, what objects are, the tools and some of the panels. The timeline and layers are difficult for me, especially keyframes, blank keyframes, tweening, and other commands. How much will I have to learn to make the above project work? Thank you for your help. I would really like to learn this program and be able to create some neat movies.
Help With Papervision Sphere And External SWF File Material
Hi all,
I have problemm, maybe someone knows solution.
I need to put external SWF file as a material on Sphere in Papervision.
I wrote those lines, but it's not working :
Code:
var loader:Loader = new Loader();
var req:URLRequest = new URLRequest("001.swf");
loader.load(req);
var movieClip:MovieClip = new MovieClip();
movieClip.addChild(loader);
var txt:TextField = new TextField();
txt.text = "asdasdasddfsdfkjha flkashgd fafsdfasdf";
movieClip.addChild(txt);
var movieMaterial:MovieMaterial = new MovieMaterial(movieClip);
movieMaterial.interactive = true;
movieMaterial.doubleSided = true;
movieMaterial.smooth = true;
// Create Sphere
sphere = new Sphere(movieMaterial,1000,40,40);
sphere.rotationY = sphere_start_rotation; // Set up sphere rotation point startup position;
scene.addChild(sphere);
renderer.renderScene(scene, camera, viewport);
But I can not see nothig, I think there is error or I'm doing something wrong.
Please Help me with it.
3D Spin
I have put my company logo to 3d spin and it's moveing to the right as it spins, only about 1/2 inch. Also I would like it to spin continuously.
Spin
Does anyone know why this script works when I test the movie through flash but doesn't work when I double click the swf file?
the code needs to be attatched to a movie clip to have a go!!
would really appreciate some help!
code:
------------------------------------------------------------------------
onClipEvent(load){
//maximum rotational speed
maxSpeed=10;
}
onClipEvent(enterFrame){
//mouse location along the x axis
xpos=_parent._xmouse;
//x position of this movie clip
center=_x;
//the difference between the mouse and this movie clip along the x axis
xdiff=(center-xpos)/200;
//percentage of maxSpeed
speed=maxSpeed*xdiff;
//update rotation property
_rotation+=speed;
}
Spin
Does anyone know of a tutorial or have a flash fla of a globe spinning?
Spin Up
I have a gear that is spinning for a preloader. I would like the gear to start slow and gain speed up to its max speed. I already have the setproperty working and the gear rotating. I just need the proper mathmatics to get it to speed up a visually appealing rate. Probably over the length of 4-5 seconds.
thnx
Spin.co.uk How'd They Do That?
Hello, new to AS.org. Great site.
I really like the menu system at spin.co.uk. Can anyone help me get started with trying to replicate this effect? I couldn't find anything in tutorials or forums. Do you think it could be done with a.s. and pull the copy from an actual file/directory structure?
Spin?
I need to get an object to spin. Not rotate CW or CCW. Any help would be appreciated.
3D Spin.
I'm looking for a flash or imageready tutorial to make an image spin or rotate 360°, please help
How Do They Pan And Spin Like This?
check this out . . .
http://www.headblade.com/default23.htm
i assume it's a series of frames with slightly different photos of the razor. when you play the movie it looks like it is spinning . . .
my question is, how do they get the movie clip it to play forward when you move the mouse in one direction, and backward in the other?
is it something like mouse over to the right and left (i'm bad with the direction code)??
any suggestions and help would be cool!
right now i have a version that will play the movie clip (it's a button w/ only a hotspot) on mouse over and it will stop when the mouse os off the hotspot, but i can't get it to work like the headblade example . . . because i don't know the right code to play forward and back etc on mouse moves . . .
thanks!
hondo311
Spin ?
Is there a way, that I can spin a mc at 90 degree ? Or do I have to make another mc ?
3D Spin.
I'm looking for a flash or imageready tutorial to make an image spin or rotate 360°, please help
How Do They Pan And Spin Like This?
check this out . . .
http://www.headblade.com/default23.htm
i assume it's a series of frames with slightly different photos of the razor. when you play the movie it looks like it is spinning . . .
my question is, how do they get the movie clip it to play forward when you move the mouse in one direction, and backward in the other?
is it something like mouse over to the right and left (i'm bad with the direction code)??
any suggestions and help would be cool!
right now i have a version that will play the movie clip (it's a button w/ only a hotspot) on mouse over and it will stop when the mouse os off the hotspot, but i can't get it to work like the headblade example . . . because i don't know the right code to play forward and back etc on mouse moves . . .
thanks!
hondo311
3d Letter Spin
I am trying to make a 3d letter (G) spin 360 degrees, and I can't figure out how to do this in flash. So, i created it in swift 3d and works perfectly, except it adds 500kb to the file size, way too much! Does anyone know any alternative methods that wouldn't take forever to do?
I appreciate all help, thanks
How To Spin A Cube?
Hello guys. I need help. I have created a simple cube. I want it to revolve and not rotate. I been trying to revolve it but it just can't. I know that this cube can revolved as I had seen something like this before. But I just don't know how to do it. Care to help me?
it's at http://www.geocities.com/mafitra1
filename-->cube.fla
I saved it as flash 5 format so even flash 5 user can see it. Help me. Thanks
You Spin Me Right Round...
Ok...guy-newb here and I got a kinda simple question.
Here is what I wanna do:
I am making an openning flash interface fer my new MUD and using illustrator I have made myself a rather nice compass for the front page. What I would like is for the had of the compass to follow the mouse cursor as it moves from one link to another...more or less I want it to point in the direction of the mouse, how would this be done? Any help would be supper awesome kewl!! Thanks! (I do have a basic understanding of flash...basic)
IM name: yakfun
Help How Do I Spin Text?
how do i make an object spin? for example text.
when i use the rotate tween, it rotates 360 degrees.
but what i want to do is to make a text as if its in 3D mode. like spin left to right.
help...
Spin Animation
Can anyone help me with the script to do the same that this page?
http://www.mystorix.com/html/storix/storix.htm
and go to the "view 360".
I am a new in this
thanks
Spin Cd Disc
Hi im trying to recreate a cd rom spining and slowing down.
Ie: the cd starts static spins then slows down to static will maybe use a blur effect of image to show the content spining.
Is there a way to ease in ease out the motion using actionscript im trying to use robert penner script but not sure how to use these.
Math.easeInOutCirc = function (t, b, c, d) {
t /= d/2;
if (t < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
t -= 2;
return c/2 * (Math.sqrt(1 - t*t) + 1) + b;
};
Can this be used on a circle to get it to spin as explained
cheers
3 D Spin Using Swish
I'm using swish and trying to get an object to spin horizontally on its axis in a smooth motion. Like looking at a globe and watching it spin. Any help ???
Thanks,
How Do I Spin My Object?
Hi
Imagine i have the simplest graphic in a movie clip, a circle with one line coming out of it.
At the moment i use tweening animation to make it spin, buts its a little hit and miss and what i do is create 4 seperate keyframes and on the last one send the playhead back to frame two (sorry - bad explanation but hopefully you get the jist)
Im sure this is the fools way of doing it and that theres some simple way to acheive it in AS.
If anyone can help me id be very grateful
Thanks
Cesca
Also - whats the best way to get text to curve. I have photoshop, flash, illustrator and imageready, but am not fluent really in any of them, not enough to know if theres some way to take a line of text and have it 'curve' 360 degrees and meet at each end, so its a rind of text ....and ideas?
VR Product Spin
Smashing Ideas did this cool VR Product Spin for a camera. Mouse driven 360 spin-- They also did it in Flash 3 for user specs. They mention doing it with actionscript and draggable clips in Flash 5 but I cant find any tutorials anywhere. Ive seen this all over the place on consumer sites but cant find any tutorials. Anyone know of any?
I Want The Fork To Spin
i have a problem, i made a fork that you can move (start drag, stop drag) but i want you to be able to turn it too.
like a button that says "turn" and if you click at it when you marked the fork it will turn... or maybe if you click with the mouse it will turn... can somebody help me?
i use flash mx...
hugs
How To Make It Spin?
Hello i'm new with flash and i have drawing that i would like to make it spin how can i explain this ok like a ufo i guess thats as clear as i can get anyone now how i can do this . i gues you have to use motion tweening in a movie but i would like to have more info on this thank you
Spin Effect
Could anyone tell me how to get this effect.
http://www.netprotocal.com/newhome.asp
Spin A Shape
Hi,
Does anyone know how to spin a shape round? For example, I have got a star and I want it to spin continuosly.
Thanks
|