Scripting Rotation ?
I want to create an animation of a casinochip that is thrown on a table. I can script the _x and _y motion, but I also want it to rotate randomly between 0 and 720° (and ease out in the end). How do I make this rotating animation ?
any tip will do
thanks stanley
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 04-09-2003, 07:51 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Could Someone Help Me With 3d Rotation Scripting?
Hi there, first time posting here...
I've been learning to use Flash MX for a couple of months and know that I now the basics I'd like to move into actionscript.
This might be a little advanced for me yet, but here it goes: could someone give me some advice on how to script a 360º view of a movie clip? Check the link below and the 360º view of the camera...
http://www.olympusamerica.com/cpg_se...ct=91 1&fl=14
Scripting Rotation
Hi there! Please forgive me if I sound a bit like a newb, I'm still learning. I'm basically trying to create a combination lock that rotates around trying to find the shortest rotational route to the combinations <b>as</b> they're being punched in. I'm trying to setup the circular object to rotate between from -360 degrees to 360 degrees in order to find the shortest path possible between the numbers been punched in. However I'm trying to setup the circular symbol to be able to stop at certain degrees which has a numeral representation on the dial. I've included the file so you can see what I mean.
Scripting Rotation
Hi there! Please forgive me if I sound a bit like a newb, I'm still learning. I'm basically trying to create a combination lock that rotates around trying to find the shortest rotational route to the combinations as they're being punched in. I'm trying to setup the circular object to rotate between from -360 degrees to 360 degrees in order to find the shortest path possible between the numbers been punched in. However I'm trying to setup the circular symbol to be able to stop at certain degrees which has a numeral representation on the dial. I've included the file so you can see what I mean.
I'm really hoping someone can help me with this. I've been driving myself nuts with this. Any help would be greatly appreciated!
Thanks!
Scripting Rotation
Hi Everyone,
Is there anyone that knows how to script rotation; i want a picture to rotate and look at the cursor whereever it is over the movie, without actually moving its x & y co-ords.
Any help?
Thanks in advance,
dfx
http://www.darkfx.com
Rotation Through Action Scripting
anybody know how i can make thisss without using motion tweening?? so that it makes the same rotation trough use of action scripting...
i hope some one can help me out with this
thanx in advance,
paradix
Scripting An Object's Complete 3d Rotation Around Point... Gurus?
I've been burning midnight oil for maybe three days now and im really no closer to cracking this thing. Everyone knows how to orbit an object around a point on a 2d path, right? (example at ftp://project732.ath.cx/orbit.html), using some triginometry (sin, cos) and a fake z coordinate that produces scale... Anyway, I want to create something that will allow the user to rotate the orbiting object to any point on the sphere defined by the radii in the given equation(ie, x=Math.cos(angle*Math.PI/180)*radius; //where radius defines the sphere's size). I've tried so many different ways and I've come to the conclusion that I may have to wait to actually take trig (im a sohpomore now... so lets see, thats a few years away), or teach myself (ack! without you guys? no way) the math i need to do it. Right now, im convinced I have to do something (mathamatically) that I haven't run into before and all my shinanigans in the meantime are a waste, until I run into the correct equation. What I'm looking for from you guys is a nudge in the right direction. In other words, HOW?? All I need to go on is a concept, I *think* I can figure the code out on my own, and id like to try anyway once I have an idea in my head of how to go about it. This is kind of a biggie (for me) so thanks a bunch to any out there that even try to tackle it. As always, suggestions/comments/opinions are welcome. Happy Flashing
Question About Scripting 3D In Flash... "Rotation Around A Common Center"
Hello everyone,
I was wondering if anyone had any experience with the, "Rotation Around A Common Center" Tutorial Posted at the following link; http://www.kirupa.com/developer/acti...ion_center.htm
I was wondering if there was a way to load different movieClips at Different Points in the rotation, instead of having the same movieClip for all; and if so how?
Below is the AS.
Thanks in advance.
Designwell_06
Rotation Script - Smooth Rotation
I have created a speedometer and on clicking a speed, I can get the needle to rotate around to the speed clicked, using _rotation.
However, the movement is very 'jumpy' and I would like to make it smoother, or better still accelerate/decelerate.
I have tried the following
Quote:
on (release) {
rotation_speed = 0.1;
if (speedo._rotation > -40)
{
do {
rotation_speed = rotation_speed * 1.1;
speedo._rotation = speedo._rotation - rotation_speed;
} while (speedo._rotation > -40);
}
else {
do {
rotation_speed = rotation_speed * 1.1;
speedo._rotation = speedo._rotation + rotation_speed;
} while (speedo._rotation < -40);
}
}
I want to get the needle round to -40, so whilst it is greater rotate is backwards, otherwise rotate forwards, starting with a small rotation and increasing (accelerate).
I found that this was still jumpy. Trying a negative causes Flash warning about script running for too long.
Rotating forwards (else) also overshoots the end position of -40
Any ideas on how to get the needle moving smoothly and finishing on the correct spot??
Flash 5 Scripting Vs MX Scripting
ok, I have this script on a movieclip called g_loader:
onClipEvent(load) {
loadMovie("contact.swf",this);
}
onClipEvent(data) {
trace(this.getBytesTotal())
}
this is how it would be written in flash 5, and it worked fine.
I tried to write the same thing using MX syntax:
g_loader.onLoad = function() {
loadMovie("contact.swf",g_loader);
}
g_loader.onData = function() {
trace(g_loader.getBytesTotal())
}
And it WILL NOT WORK!! Am I going insane? Why won't this work!!!????
Rotation At A Given Rotation Point In AS
Hey ya'll.
I was wondering on exactly how would you make an MC rotate with a given rotation center, using AS, obviously. I'd like to know the math behind it, please.
Using _rotation would make it rotate around the mc's center... i'd like to make it rotate around another center, one defined...
URL Scripting.
I've have a site made partly in flash.
And I have some buttons which are linked to other web pages.
My question is. Do i really need to specify the entire URL..the actual URL or can i just use it juts like that with the '/' or ''
all the pages are in e same folder including that of the page wit the flash component.
eg..the page name is ; Intro.htm
and therefore at the URL of go to ..do i have to type out the entire URL for eg. http://www.dunearnguides.scriptmania.com/Intro.htm
??
Thanks in advance..Cos i'm rather blurr on this..
Cgi Scripting
How do I create scripts needed for submitting forms in Flash 5? Is there any toturials?
Scripting V2
Hey,
I have a input text box and a submit button. How do i make ti so that the number in the text box goes to that frame number when the button hit submit button is clicked?
L8
Scripting Help
I'm working on a digital cv that has a pixelized version
of my face on it. As you roll over a series of button's the
relevant section of the face stretches out and will ultimately reveal a part of my cv.
The problem i'm having seem's to be with the way i've ordered or positioned the script. The script works if you roll over the buttons seperatly, but if you roll over all the buttons at once you don't get the desired effect of growing and shrinking. The script seem's to get confused or conflict with itself.
If anyone has a minute to help and look at my fla I could e-mail it to you and would be very grateful as it's almost there and is doing my head in.
Thank you
luke.parish
Scripting Can't Get It?
Hi everyone,
I'm having trouble getting an certain effect to work. I want to have something similar to the old 2advanced site what I'm trying to achieve is when a button is clicked I want a external swf to load in to main movie clip but while its loading I want these two doors to come in over whats loading behind the doors and stay there until the external movie is done loading. When the movie is loaded I want the doors to then open again! This is my code on the button.
on (release) {
_root.introclip.shutter.gotoAndPlay("open");
loadMovie ("members.swf", "membersload");
_root.introclip.membersload._x = -325;
_root.introclip.membersload._y = -179;
_root.introclip.membersload._yscale = 86;
loaded = _root.introclip.membersload.getBytesLoaded();
total = _root.introclip.membersload.getBytesTotal();
if (loaded == total) {
_root.introclip.shutter.gotoAndPlay("closed");
} else if (loaded < total) {
_root.introclip.shutter.gotoAndStop("closed");
}
}
if anyone could help it would be great!
Thanks
Kyle
SCRIPTING HELP
Can anyone please advise where I might be able to learn basics regarding Actionscript - preferably with a tutor based in London, UK. I have tried self taught tutorials but I need to fully understand the basics of variables, arrays etc. Without this knowledge it is very difficult to begin to understand the capabilites of Flash and it also takes me forever when scanning back and forth through the pages of books. I would prefer to pay someone to help me understand basic programming functions. Thanks in advance for any advice.
Scripting?
In flash 5 how exactly do you get to add your own scripting w/o using the actions Flash gives to you? If any1 understands what I am talking about, please help me....lol
Scripting M O V E M E N T ---->
Hello there.
I need to create a dragable "movie-clip" which
will detect it's position (_x + _y) on the stage.
and
will move (animation move) to new _x and _y positions
on the stage
I tried this code but it didn't work:
onClipEvent (mouseDown) {
startDrag("_root.mymovie");
}
onClipEvent (mouseUp) {
stopDrag();
}
onClipEvent (load) {
xpos = "_root.mymovie_x";
ypos = "_root.mymovie._y";
if (xpos>236 & ypos<154) {
xpos++ & ypos++;
}
}
Scripting
What is the name/format of the scripting that you write in flash mx? is it c++, or a special flash script, or something else?
AIM Scripting
I am batting my head against the wall because I have created AOL icons for buttons and am trying to get them to auto prompt the AIM to pop up which they do just fine. The problem is that blank windows pop up. Is there anway to get rid of them.
This is what I am doing
on (release) {
getURL("aim:goim?screenname=&message=Hi!");
Help With Scripting
on (press) {
for (i=4; i>-1; i--) {
for (var name in _leveli.mc) {
_leveli.mc.stop();
_leveli.mc[name].stop();
_leveli.stop();
}
}
}
Hi guys,
What I'd like to do is autodecrement a number and put it into a variable so I don't need to specify the amount of levels I have. But I can't seem to get the variable (i) working in the script above. What this basically does is pauses any movie clips that are playing in particular levels but I would like to set the _level so that it is automatically updated rather than type each individual level number and repeat the script.
Thanks again
Scripting Help?
Hello Board_
I am loading an SWF into another using the following action script :
________________________________
on (release) {
loadMovieNum("Tree.swf", 200);
}
________________________________
I guess that to most, I'm being rather redundant in saying that this script loads "Tree.swf" to level 200 of my main movie.
The SWF loads in the Upper Left corner of my main movie.
How can I make it load to a position 150 pixels down from there?
I am not planning on changing the X-axis coordinates.
Any help would be great.
Best Regards,
KQ
Scripting Help
how can i call a SWF into a MC?
i've got a movie clip on the stage with a button in it.
on release of that button i need to have a swf play inside that movie clip.
i know how to call the swf to my main movie but not to this movie clip.
thanks.
Please Need Scripting Help NOW
(flash 5)i am using the following script for a preloader in the first of a two scene movie...when it finishes and loads the second scene , it jumps over about a quarter of the second scene and proceeds to loop 30 some odd frames...it seems to get stuck..can you figure out if there is something wrong with the script or what?..how can i fix it/figure it out?..i got a deadline, any ideas appreciated...thanks....
loadedbytes=getBytesLoaded();
totalbytes=getBytesTotal();
loadedkbytes=Math.ceil (loadedbytes/1000);
totalkbytes=Math.ceil(totalbytes/1000);
if (loadedbytes == totalbytes) {
nextScene ();
}
frame = int(loadedbytes/(totalbytes/100));
tellTarget (_root.loader) {
gotoAndStop (_root.frame);
}
Scripting Help.
Hey everyone,
I'm only 17 but I'm determined to be a top webdesigner. I'm not sure if I'll be able to afford university so I want to start learning now. I need some help and guidance with scripting, cgi, perl, even java. I'm good with graphics etc already, and I can make a site, but scripting gets me.
Please post any good links to beginners guides to scripting of any relevant kind. Also, if you're willing to talk me through things you can add me to your Yahoo! and my ID is annunaki_of_nibiru Please help my dream come true.
Best regards,
KD.
PHP Scripting
Hey - I finally have Flash MX! Yay! lol
My question is in regards to retreiving data from a php script. I am using YaPP (Yet another PHP Portal), and it comes with a forum, on it I am able to see who's currently logged in. I'm wanting to implement this script on my flash movie, but I've no clue where to start. Any help on how to do this would greatly be appreciated. TIA
Help Me With This Scripting
what is wrong with this script
if (success) {
i=1
while (i <= 9){
user[i] = this.user+(i);
password[i] = this.password+(i);
i = i + 1
}
}
Scripting Help
Hi im trying to make a clock that displays the date and time and i can get the time down, but i cant get it to display the date and im wondering if i coded something wrong, heres the code:
d=new Date()
day=d.getDate()
if(day>10){
day= "0" +day
}
mon=d.getMonth()
if(mon>10){
mon= "0" +mon
yer=d.getYear()
timed=+mon +"/" +day +"/" +yer
My hopes what to make it look like this:
mm/dd/yyyy
Any help is greatly appreciated
Scripting Help
Is anybody out there can help me to figure out the script below? the script below is to control a car by the arrow keys, but this script only works when I put the car movie clip and the boundary movie clip on the main stage which is the _root.
What I want is to put the boundary movie clip on the main stage (_root.boundary) and the car movie clip put inside another movie clip called land (_root.land.car), but once i put the car and the boudary in a different place, the car will not stop when it hits the boundary.
i will really appreciate it if someone can help me on this.
-------------------------------------------------------------------
// this script is to attach to the car movie clip.
onClipEvent (enterFrame) {
// make the car go forward
if (Key.isDown(Key.UP)) {
speed += 1;
}
// make the car go backwards
if (Key.isDown(Key.DOWN)) {
speed -= 1;
}
// tells the car to slow down after the speed of 20
if (Math.abs(speed)>20) {
speed *= .7;
}
// you can change the rotation of the car to your desire
if (Key.isDown(Key.LEFT)) {
_rotation -= 15;
}
if (Key.isDown(Key.RIGHT)) {
_rotation += 15;
}
// here is where the hittest is for the boundary
speed *= .98;
x = Math.sin(_rotation*(Math.PI/180))*speed;
y = Math.cos(_rotation*(Math.PI/180))*speed*-1;
if (!_root.boundary.hitTest(_x+x,_y+y, true)) {
_x += x;
_y += y;
} else {
speed *= -.6;
}
}
Scripting With ASP?
Is it possible to update image and text content within a Flash site with ASP?
If it is what would be the best course of action to take?
Scripting Help....
k guys heres my problem, i have a bunch of buttons on a scene and what i want to happen is that only after u click every single button will the scene jump to the next scene... wat code would be required??
Scripting Help
I nned some help with a script that zooms out and zooms in. I have the zooming part working good but I can't get it to zoom out from center. I know very vague, so i attached a file for a better explanation. By looking at the flash file the problem sould be very obvious.
Thanks for the help
JLD
Scripting Help
Hey all,
I am not very familiar with actionscripting. I am learning thanks to all of you in this forum. I have used in my movie the "loadmovie action" and everything works fine. Now the problem I have is that I have pictures that I want to click on (like a button) and have each picture become larger and center in the same movie. I have done some reading with the available tutorials that I can find and it is apparent (i hope I am right) that i need to introduce some variables. I dont know how to assign or even begin to start with variables. Any help you could provide would be greatly appreciated.
BTW I am using FLASH 5....
Thanks
CHANDLER26....
Scripting
Scripting
Greetings all. I'm a new Flasher and I'm going crazy. Ok, maybe i'm already crazy from trying to make something work that doesn't. Here goes. I downloaded a file from Flashkit and don't know what I'm suppose to do with it to make it work. (DUH) It's action scripting but I don't know where to input the script in order to make it work. Am I suppose to put this in something like Frontpage or HTML or should I be putting it straight into Flash. I have the MX version. Am I way off beat or what. Many thanks for any feedback.
Here's the script.
2 parts to this script
<script language="JavaScript">
<!--
//you can assign the initial color of the background here
r=255;
g=255;
b=255;
flag=0;
t=new Array;
o=new Array;
d=new Array;
function hex(a,c)
{
t[a]=Math.floor(c/16)
o[a]=c%16
switch (t[a])
{
case 10:
t[a]='A';
break;
case 11:
t[a]='B';
break;
case 12:
t[a]='C';
break;
case 13:
t[a]='D';
break;
case 14:
t[a]='E';
break;
case 15:
t[a]='F';
break;
default:
break;
}
switch (o[a])
{
case 10:
o[a]='A';
break;
case 11:
o[a]='B';
break;
case 12:
o[a]='C';
break;
case 13:
o[a]='D';
break;
case 14:
o[a]='E';
break;
case 15:
o[a]='F';
break;
default:
break;
}
}
function ran(a,c)
{
if ((Math.random()>2/3||c==0)&&c<255)
{
c++
d[a]=2;
}
else
{
if ((Math.random()<=1/2||c==255)&&c>0)
{
c--
d[a]=1;
}
else d[a]=0;
}
return c
}
function do_it(a,c)
{
if ((d[a]==2&&c<255)||c==0)
{
c++
d[a]=2
}
else
if ((d[a]==1&&c>0)||c==255)
{
c--;
d[a]=1;
}
if (a==3)
{
if (d[1]==0&&d[2]==0&&d[3]==0)
flag=1
}
return c
}
function bgtrans()
{
if (flag==0)
{
r=ran(1, r);
g=ran(2, g);
b=ran(3, b);
hex(1,r)
hex(2,g)
hex(3,b)
document.bgColor="#"+t[1]+o[1]+t[2]+o[2]+t[3]+o[3]
flag=50
}
else
{
r=do_it(1, r)
g=do_it(2,g)
b=do_it(3,b)
hex(1,r)
hex(2,g)
hex(3,b)
document.bgColor="#"+t[1]+o[1]+t[2]+o[2]+t[3]+o[3]
flag--
}
if (document.all)
setTimeout('bgtrans()',50)
}
//-->
</script>
==================================================
====
part 2
==================================================
====
<!-- --><body onload="bgtrans()"><!-- -->
Scripting?
I was wondering if there was any way to find who the person is logged in as, using either java or a/s? any help?
thanks
Php Scripting
Hello,
i have no idea how to start going about making this.
what i have is a form and you type in a name for example and then it gets saved to a file on the internet. i have already made this work with sharedobject, and i have a server to host the script - how do i make the scripts.
Help With Mx Scripting
OK, heres my mx scenario.
4 buttons on an oval motion path.
They need to rotate counterclockwise
on rollover (except if rollover is on whichever one is front and center.)
Whichever button is rolled over should be the one to stop front and center and could then be chosen to open a corresponding mc.
I can do this with a lot of keyframing and stop actions in the timeline, but i would like a more efficient scripting approach.
Please Help!!I posted this in the action script forum and no one has replied.!! Thanks!
heres a pic if it helps!
Scripting
I use Swish.. knock off of flash. But i was wondering how I could open up a sized window with it using actions and maybe java or html. If anyone knows the java for a link to open a sized window that should be all i need. I just don't know it. www.siwebdesigns.com/FB My bands website.. we are going to impliment a scrolling text box for the news. We were ganna have the news do like the fear-store does but when i put the ffects in to transform it moves from where the last effect was.. which makes everything go wacko. If that makes sense...
Ryan
Scripting Help
Okay, I've just downloaded this chat thing in the "Movies" section at http://www.flashkit.com/movies/Appli...7898/index.php. I was wounder can any help me script it. It's in PHP so I don't know anything about it. If you can, please reply it here, or Email me at hongnanthinguyen@yahoo.com.
Thank you so much!
P.S. Please explain it in a way that I can understand. I such a newbie to PHP.
.fla Scripting HELP
I'm a little new to Flash, and i have NO idea on how to put these on you Site (HTML code). I tried the one for Shockwave Flash, but it didn't work. The file extension is .fla
Can somone help me?
Please Help With Scripting
Hi, I have created my swf movie, but do not know how to embed it in my site to make it show. I have a test page set up at http://www.candlesofeden.com/index1.html Could someone please let me know what I'm doing wrong? Thanks.
Help With Scripting.
Hello, i was wondering if someone could help me with something.
I've been making this site, http://halogic-design.tragicntrue.net/halogic.html
i've been wodering if there is a way to put http://livejournal.com/~halozero in the main box when the "journal" link is clicked from the main menu.
thanks.
-ray.
Scripting
I have my movie stopping at frame 245 and a nav bar rolls down. OnMouseRelease i want it to finish the scene... play frames 246 to 270 and then load another scene.
Any hints on how i do this?
Thanks
Scripting
hi i have a problem, i have a couple of swf files and on the main one there a button that i want went click it will load a swf file but then unlaod the main page so there no conflict does anyone know how to do that????? thank you
How Do You Use The Scripting?
i dont know what it is... is it like java? or something like it? is it used for interacting?
<a href="http://www.llamalords.sictaar.com">llamalords.sictaar.com </a>
Help With Scripting In MX
I am trying to make a game and have the _x and _y from one MC become detected when they equal some _x and _y value of another MC. I don tknow how to do this with MX...the flash tutorials dont seem to help at all. I dont understand if I am suppose to getProperty or setProperty -- also i dont understand the parameters of these two commands. Is there another flash tutorial site that might help?
New To Scripting
Here's the deal I'm new to scripting and i need help with loading jpg in to flash.
I have multiple buttons and i want them to load a jpg to a certain place on the screen. I also need to be able to resize the pictures to fit the desired area and the pictures need to do a quick 3-5 frame fade in..
all these images are external, inside an images folder. i would also like to know how to make a quick preloader to load before each image if needed.
i tried a few things but nothing seemed to work so if anyone could help me out i would really appriciate that ..thank you
Need Scripting Help
does anyone know a code that will make it so wherever you click on the screen, a MC will appear where you clicked
Scripting
is ther sumwer i can learn sum basic scripts?...a link 2 a site would be very helpfull...thanks...
|