Random Bird Movement
Does anybody have any random code I can slap on a movieclip that will look like a bird (seagulls) moving in the distant? I tried tweening it it but it just looks too repititive and boring.
I'll have at least 5 birds that I want to animate, I figure it will be easier if I just do it with code.
Your help will be greatly appreciated.
FlashKit > Flash Help > Flash General Help
Posted on: 07-09-2005, 06:00 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Random Rotation To Equal Random Movement Direstion?
k i finally got it so that my things randomly move around the screen and have walls etc etc.. anyways now i wanna know how to make it so that my randomly moving ship will rotate to face there direction if you want i can post the code i am using for random movement and thanks in advance
Random Movement, Random Opacity?
I want to create a mc, where a box(50x200) should duplicate itself, and change width randomly. But width should stay in ranges between 50 - 250 px. The boxes should move from left to right, right to left randomly. Also they should have random opacity and random colors(different variations of blue,and red). When the boxes overlap=the opacity should change accordingly, also color changes as they mix. Is creating something like this, or similiar possible?
If so does anybody have examples.
Thnx
Random Movement AND Random Speed
So I got this from the tut on this site and it's works great.
I can't figure out though how to make the speed random as well as the movent.
I want all my little clips to move at random speeds in adition to direction.
Any clues?
Thanks!
---------------------------------------
function getdistance(x, y, x1, y1) {
var run, rise;
run = x1-x;
rise = y1-y;
return (_root.hyp(run, rise));
}
function hyp(a, b) {
return (Math.sqrt(a*a+b*b));
}
MovieClip.prototype.reset = function() {
//specify the width and height of the movie
width = 600;
height = 400;
//-------------------
var dist, norm;
this.x = this._x;
this.y = this._y;
this.speed = Math.random()*4+5;
this.targx = Math.random()*width;
this.targy = Math.random()*height;
dist = _root.getdistance(this.x, this.y, this.targx, this.targy);
norm = this.speed/dist;
this.diffx = (this.targx-this.x)*norm;
this.diffy = (this.targy-this.y)*norm;
};
MovieClip.prototype.move = function() {
if (_root.getdistance(this.x, this.y, this.targx, this.targy)>this.speed) {
this.x += this.diffx;
this.y += this.diffy;
} else {
this.x = this.targx;
this.y = this.targy;
if (!this.t) {
this.t = getTimer();
}
if (getTimer()-this.t>1000) {
this.reset();
this.t = 0;
}
}
this._x = this.x;
this._y = this.y;
};
--------------------------------
onClipEvent(enterFrame){
move();
}
[F8]random Scaling, But With Random Movement?
i am a bit lost. i make a prototype function that randomly scales a box when i click on the stage. i got the scaling right, but why does it move around when it scales?
here is the swf: scaleEase
here is the code:
ActionScript Code:
MovieClip.prototype.scaleEaseTo = function(ease){ onMouseDown = function () { newWidth = 1 + Math.random() * 250; newHeight = 1 + Math.random() * 250; }; this._xscale += (newWidth - this._xscale) / ease; this._yscale += (newHeight - this._yscale) / ease;};dot.onEnterFrame = function(){ scaleEaseTo(5);};
thanks in advance.
Random Movement AND Random Speed
So I got this from the tut on this site and it's works great.
I can't figure out though how to make the speed random as well as the movent.
I want all my little clips to move at random speeds in adition to direction.
Any clues?
Thanks!
---------------------------------------
function getdistance(x, y, x1, y1) {
var run, rise;
run = x1-x;
rise = y1-y;
return (_root.hyp(run, rise));
}
function hyp(a, b) {
return (Math.sqrt(a*a+b*b));
}
MovieClip.prototype.reset = function() {
//specify the width and height of the movie
width = 600;
height = 400;
//-------------------
var dist, norm;
this.x = this._x;
this.y = this._y;
this.speed = Math.random()*4+5;
this.targx = Math.random()*width;
this.targy = Math.random()*height;
dist = _root.getdistance(this.x, this.y, this.targx, this.targy);
norm = this.speed/dist;
this.diffx = (this.targx-this.x)*norm;
this.diffy = (this.targy-this.y)*norm;
};
MovieClip.prototype.move = function() {
if (_root.getdistance(this.x, this.y, this.targx, this.targy)>this.speed) {
this.x += this.diffx;
this.y += this.diffy;
} else {
this.x = this.targx;
this.y = this.targy;
if (!this.t) {
this.t = getTimer();
}
if (getTimer()-this.t>1000) {
this.reset();
this.t = 0;
}
}
this._x = this.x;
this._y = this.y;
};
--------------------------------
onClipEvent(enterFrame){
move();
}
A Bird
What i need to do is make a small bird fly across (from left to right) the header graphic of my page. Im pretty new to flash, but i do know how to make it JUST move from one side to another. I want to be able to make the wings move up and down as though its flying while actually moving.
If someone could help me out, ill be on aim @ yo MrStiffy.
How To Design Bird
hey can any body help me how to design a bird and then animate it if any tutorial is there i would be highlt obliged
regards
Hussain
Flying Bird
I am new to Flash. I just upgraded to CS3 and am trying to create an employee website with a flash file. I created my design in Photoshop and am using Fireworks to create my slices and Dreamweaver to finish it off. I am not sure if I need to do my slices first in Fireworks and then import that into Flash to create my animation. anyone know?
also, for my flash file, I have a scene with a tree, buildings, grass and clouds. I wanted to add a bird flying, some moving clouds and a light flashing on and off. The problem I am having is with the bird flying. I found animated gifs on the internet and tried to use those with a motion guide but the animated gif won't work. I tried doing my own animation with a bird with it's wings up and then down. It is very choppy and I know I didn't do it the right way. I used all kinds of keyframes and motion tweened between each one and then added motion guide. Can anyone help me out? I just want a small black bird flying across my scene and I want to do it the easiest way as possible. Any advice will be greatly appreciated. Thanks.
Flying Bird
I make a bird that wave it wings
I make it fly with random motion
but how do I make it point it's nose in the right direction?
tricky huh!!
Exploding Bird
Hello! I have an animation of a bird flying that starts when the "our work" button on our site is rolled over. I would like to make this bird explode somehow, where ever he is atthetime, when the button is released....then, the "our work" section would load. Any ideas?
Flying Bird
I make a bird that wave it wings
I make it fly with random motion
but how do I make it point it's nose in the right direction?
tricky huh!!
Bird Flock
I once saw an animated bird flock, it was a gif or a swf.
You know where can i find one that is animated to use in a flash animation?
Creating An Animated Bird
I am trying to incorporate a "near realistic" animated bird into my website, but I don't know how to go about it. I want the bird perching, and later flying away just as birds do. I was hoping may be someone can point me in the right direction. Anyone seen something like this done before? thanks
[F8] Flying Bird Animation
Im trying to make a bird fly and move around the screen at the same time but im not sure how to do it. I already made the layers of the bird flying and i can set it up so the frames change and its wings flap ... but how do i loop the flying and make the birds move around? Thanks!!
Flying Bird In Flash
I am new to Flash. I just upgraded to CS3 and am trying to create an employee website with a flash file. I created my design in Photoshop and am using Fireworks to create my slices and Dreamweaver to finish it off. I am not sure if I need to do my slices first in Fireworks and then import that into Flash to create my animation. anyone know?
also, for my flash file, I have a scene with a tree, buildings, grass and clouds. I wanted to add a bird flying, some moving clouds and a light flashing on and off. The problem I am having is with the bird flying. I found animated gifs on the internet and tried to use those with a motion guide but the animated gif won't work. I tried doing my own animation with a bird with it's wings up and then down. It is very choppy and I know I didn't do it the right way. I used all kinds of keyframes and motion tweened between each one and then added motion guide. Can anyone help me out? I just want a small black bird flying across my scene and I want to do it the easiest way as possible. Any advice will be greatly appreciated. Thanks.
Flying Bird For Flash
Hi guys
I need to make an animated vector flying bird. Not a bird drawing but a bird shape only. First i tought that making some modifications to he vector and then doing a shape tween would be enough but i havent been provided by a good shape....
I got Poser 6 but even i have basic knowledge about 3D programs like Lightwave i'm stuck with it. I was told you can animate animals with it but i haven't been able to change the character.
Can anyone point me to a basic tutorial for Poser 6, a model ti import into Poser or maybe any other idea on how to make a simple flying bird.
Random Movement
Can anybody help please?
I want a movie clip to move randomly after a certain length of time, then keep looping over the same amount of time and changing the movie clips position randomly. Is there a script which will wait before executing an action, then keep looping that action until anougher condition tells it to do something else?
I tried
if (Number(getTimer()>=500){
---then do a random move function
{
The problem with this is it doesn't keep executing the script until I tell it to stop.
Thanx in advance
Nick
Random Movement
quite a simple one i'm sure.....
I have a series of objects and i want them to randomly move up and down the stage, no interaction necessary, i just don't want to have to tween 10 or so objects.
Is this possible, and is it also possible to replicate the effect of 'easing in and out'
thanks in advance....
Random Movement
i have 10 vertical bars that i want to randomly move across the screen left to right. i dont know how to accomplish this and am hoping that someone would be kind enough to expalain it to me. thank you.
josh
i_am_brucelee@hotmail.com
Random Movement For Mc
Hi everybody,
I am trying to get a movieClip to randomly move around within
a confined area of my stage. When I try to do this it moves very
irraticly and doesnt stay within any boundries.
this is what I tried:
onClipEvent(enterFrame){
this._x=Math.random()*50;
this._y=Math.random()*50;
}
I want a nice fluid motion that will stay in some defined boundries.
Thanks for the Help
Random Movement
u wud think that this wud be simple ah. simple to do, and even simpler to find. nope ..
does anyone know how i may create randomlly moving elements. ie, i want thesse incy wincy things to float around the stage. no collision detect, no nuffin'
i have looked all over this site .. i have found a couple of movie examples, but one is button triggered, and the other is waaaaaaaaaaaaay to complicated.
help Much appreciated.
thx
b
Random Movement
hej venner
could anybody helpme with a script that makes an object (button) move in an nice smooth random path (infinitly , and in an area slightly exceeding the visible)?
i would be most appreaciative@
thank you in advance
[Edited by sjovefro on 06-04-2002 at 12:23 PM]
Random Movement
I'm making a menu and when I go over the buttons I want them to shake. So i guess this would mean some random movment of some kind. Now I'm not very good at A.S., could someone code this up for me. I need the instance to shake, so in other words move from frame to frame move from one location to an other very quickly in a small amount of space.
Thank You,
Sebastien Couture
Random Movement Of MC
Please can anyone please suggest me how can i have a random movement of an movieclip using actionscript.
Arup
Random Movement
is there code that i can use to make a graphic move randomally within a rectangle on screen?
Random Movement
hey all
having some trouble with a game im making. i need an MC to reappear at a random location inside a box. im using this code
setProperty (_root.object, _y, _root.object._y=random(100-350)
setProperty (_root.object, _x, _root.object._x=random(300-250)
im only a beginner and im probably doin somthing stupid here so it would be much appreciated if someone could point me in the right direction??
cheers
Random Movement AS?
Hey,
Does anyone have any code,tips or tutorials involving random movement of an object? I don't mean random x or y values, but fluid movement. A good example would be like a fish moving around - that sort of thing...
Random Movement
Hi There,
I am using the below code to ease a movie clip to a random target, which it does, but I want it to then ease to another random target, once it reaches the target before, so in effect, it is constantly moving to random targets. Any ideas????
On frame 1:
_y=100;
targety=n;
n=random(100-600);
speed=32;
On Frame 2:
distancey=targety-_y;
amount=distancey/speed;
_y+=amount;
On Frame 3;
gotoAndPlay(2);
Thanks in advance!!!
Barry
Random Movement
Im making a game and I needs o have butterflys moving in a random way, I would be very happy for any help. I want then to curve instead of just a sharp corner.
Thanx in advance,
Random Movement
I am making a flash movie for a screen saver I have a Movieclip I want to move all around the stage on a Random basis. How would I code or script the (motion)Movieclip to move around randomly?
If you know some code or a tutorial I would appreciate the help.
Thanks.
Random Movement?
Hey everybody.
Just wondering:
How to make an as moving a MC randomly around a swf.
Example:
An ant moving around the page randomly..
Thank you for your time
Need Random Movement
anybody know of a good tute for making an object move randomly about the stage area.
Random Movement
I'm sure I’ve seen something like this before an image to move up, down, left, right and diagonally randomly using AS.
I plan to have a box let's say size 100x100 and within that box will be an image about 200x200 in size, so all you can see of the image is 100x100 (sort of masking), then the image to move randomly in all directions and if possible with random speed.
Please can someone point me in the right direction.
Many thanks
Michael
Random Movement
Hi,
I looked at some flash-sites and one site draw my attention.
I'm talking about www.derbauer.de.
In there you see a very nice flash-site.
But what I'm interested in is the background.
You see screens opening and closing, stuff appearing and so on....
At first it doesn't look so hard but the thing is, it looks like is doing that randomly.
And that the part i don't get, how does he do that?
Does anyone here know how to do something like that?
Because I don't and I would really like to know.
So would anyone be so nice and tell me or give me an example of how it is done?
Thx
Random Movement
hi everyone,
i need some action script to work with random movement. basically i need fish to swim randomly over the movie but also if they change direction the instance movies needs to be flipped.
Could anyone help me with this problem
thanks.
Random Movement
Im creating a game in which i need to make a load of objects randomly move. Does anyone know how i can do this? I also need them not to disappear off screen. If anyone could help i'd be very greatful.
Thanks
Random Movement
I would like to create some random movement for a mc i made. my stage size is 790 x 600 but the area i want the movie clip to move is is only 720 x 268. www.izzos.com/beta is where the site is and you will see the roll your own text at the top. I only want it to move within that green background area. I have used some scripts before but all of them make my text scroll around the entire stage area. Any help is appreciated, thanks.
Random Movement
Is it possible to have random movement for a movieclip within a restricted area?
If so , anyone have a clue on how to do it?
Random Movement
I'm making a game in an overhead type of view and want to know how to make a movieclip Randomly move around the map and face the direction that it is moving. I have the movie clip moving but it doesn't face the direction that it faces. Which looks really bad.
Random Movement Etc.
Hi,
I'm trying to make these fireflies: http://listic.dk/324fireflies.swf
I have loaded the thing into a flash decompiler, but I must be doing something wrong, because it doesn't work, my .fla can be found here: http://listic.dk/fireflies.fla
I would very much appreciate if one of you experts maybe could take a look at the scripting and see where I'm doing it wrong :-)
All the best
Andrew
Random Movement...
Im trying to get a movieclip to be placed on the stage (from a button press) and move randomly in one direction at one speed.
Eventually ill write the code for it to stop when it hits the edge but im just looking for the random directional movement right now...
any help would be greatly appreciated
Random Movement
you can i make a few movie clips move in a randomly around the stage?
Random Movement
Does anybody have any random code I can slap on a movieclip that will look like a bird (seagull) moving in the distance? I tried tweening it it but it just looks too repititive and boring.
Please!!!
Random Movement
Hey guys,
i'm slowly but surely piecing parts of my game together, but I was wondering if you could help...
I want a target to move around the window at random, bouncing off of the walls and then continuing on. Is this possible to do, and secondly is it easy to do, coz I have no flash skill whatsoever and this has to be completed in the next few hours.
I have the target already made into a movie clip within Flash, I just need help with the actions that have to be attatched.
any help that you can provide is greatly appreciated. Thanks.
Random Movement
Hey guys,
i'm slowly but surely piecing parts of my game together, but I was wondering if you could help...
I want a target to move around the window at random, bouncing off of the walls and then continuing on. Is this possible to do, and secondly is it easy to do, coz I have no flash skill whatsoever and this has to be completed in the next few hours.
I have the target already made into a movie clip within Flash, I just need help with the actions that have to be attatched.
any help that you can provide is greatly appreciated. Thanks.
Random Movement
Hey guys,
i'm slowly but surely piecing parts of my game together, but I was wondering if you could help...
I want a target to move around the window at random, bouncing off of the walls and then continuing on. Is this possible to do, and secondly is it easy to do, coz I have no flash skill whatsoever and this has to be completed in the next few hours.
I have the target already made into a movie clip within Flash, I just need help with the actions that have to be attatched.
any help that you can provide is greatly appreciated. Thanks.
[CS3] Random Movement
Hi everyone
i have a 779 x115 movie with text in the middle. I have a few squares which randomly move around the movie using this actionscript
onClipEvent (enterFrame) {
_x = random(779);
_y = random(115);
_alpha = random(100);
}
if i want the squares to just randomly move around the area where the text is how do i tell it to do that? corodinates are top left: 263, 65 bottom right: 515,74 probably very easy to do but im not very good at script yet.
thanks very much for your help
AS3 Random Movement
Hi there,
I'm looking to do something like this: http://www.samburdge.co.uk/developme...2#comment-8835 in AS3 and wondered if anyone could help. I'm new to Flash in general and can't seem to figure it out. Basically I want a number of move clips on the stage (preferably moving in some way) and when the mouse hits off them, they scatter/move out of its way.
Any help would be greatly appreciated.
Daria
Random Movement
im looking for a peice of code that allows a movie clip to move randomly whilst avoiding the mouse, theres no end of tutorials for mouse avoid and random movement but given that to combine the two im having to hack together code with out knowing how it realy works i end up with a mess that dosnt do anything! so any one know of an inclusive tutorial or a peice of code that is idiot proof??
John
|