Stop The Snow
Hello.. I have followed directions on how to make snow fall.
http://www.kirupa.com/developer/mx/snow.htm
I used the oval tool to make a round snow drop. Converted it into a movie and named it "winter". In the movie clip instance the name is "snow". I right ckicked the snow drop and clicked Actions. Entered this: -------------------------------------------------------------------- onClipEvent (load) { //specifies the size of the movie stage movieWidth = 300; movieHeight = 200;
//variables that will modify the falling snow i = 1+Math.random()*2; k = -Math.PI+Math.random()*Math.PI;
//giving each snowflake unique characteristics this._xscale = this._yscale=50+Math.random()*100; this._alpha = 75+Math.random()*100; this._x = -10+Math.random()*movieWidth; this._y = -10+Math.random()*movieHeight; } onClipEvent (enterFrame) { //putting it all together rad += (k/180)*Math.PI; this._x -= Math.cos(rad); this._y += i; if (this._y>=movieHeight) { this._y = -5; } if ((this._x>=movieWidth) || (this._x<=0)) { this._x = -10+Math.random()*movieWidth; this._y = -5; } } ---------------------------------------------------------------------------
ON THE 11th LEVEL OF FRAME 1, I ENTERED THIS A/S:
for (k=0; k<50; k++) { duplicateMovieClip(this.snow, "snow"+k, k); } ---------------------------------------------------------------------- It's works fine! But.... I only want it to snow for 75 of the 400 frames I have.
I tried using the removeMovieClip ("winter"); on level 11 frame 75 but it doesn't work. What am I doing wrong?
KirupaForum > Flash > Flash 8 (and earlier) > Flash 5
Posted on: 12-19-2003, 04:14 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Stop The Snow?
Hi, I had download a snow fla from this site. And i put at my moive. But when i want the snow to stop somewhere of the frame. ITs still keep going falling snow. Anyone know how to fix this problem?
The code as below
//
// Snowfall algorithm by Grant Skinner. Check out http://gskinner.com/ for updates, more source code and other good stuff.
// To use:
// copy this code into the timeline you wish to display snowflakes in.
// copy the "snowflake" movieclip from this movie's library into your movie's library.
// set the variables below.
//
// Edit these values:
maxSnowFlakes = 60;
snowFallWidth = 780;
snowFallHeight = 400;
windStrength = 50;
// 0-100
snowRate = 10;
// 1-50 (smaller number is more flakes per second)
// don't touch anything below this line:
function startSnowFall() {
// set up the interval:
snowIntervalID = setInterval(this, "doSnowfall", 50);
// initialize values:
snowFlakeCount = windSpeed=windSpeedTarget=windAcc=nextWindChange=0 ;
}
function doSnowfall() {
// wind calculations
nextWindChange--;
if (nextWindChange<=0) {
// change wind speed target
nextWindChange = random(200)+50;
windSpeedTarget = Math.round(random(windStrength)-windStrength/2)/5;
}
windAcc += (windSpeedTarget-windSpeed)/60;
windAcc *= 0.8;
windSpeed += windAcc;
if (snowFlakeCount<maxSnowFlakes && random(snowRate) == 0) {
// add a snowflake:
snowFlakeCount++;
this.attachMovie("snowflake", "s"+snowFlakeCount, snowFlakeCount);
}
}
function endSnowFall() {
for (var i = 1; i<snowFlakeCount; i++) {
this["s"+i].removeMovieClip();
}
clearInterval(snowIntervalID);
}
// END snowflake algorithm
stopSnowFall();
Snow, That Won't Stop
Alright, so here is my code, to make it snow (drop is the linkage used by the movieclip)
var swidth = 550;
var sheight = 400;
_root.createEmptyMovieClip("DropClip", 15999);
for(var i=0; i<200; i++)
{
createdrop(random(sheight));
}
var storm = setInterval(createdrop, 1);
function createdrop(y)
{
var clip = "drop" + Math.random();
_root.DropClip.attachMovie("Drop", clip, random(15999));
_root.DropClip[clip]._x = random(900);
if(y != null)
{
_root.DropClip[clip]._y = y;
}
_root.DropClip[clip]._alpha = random(100);
_root.DropClip[clip].speed = random(2)+1;
_root.DropClip[clip].onEnterFrame = fall;
}
function fall()
{
if(this._y < sheight && this._x > 0)
{
this._y += 1 + this.speed;
this._x -= 2 + random(1);
}
else
{
delete this.onEnterFrame;
this.removeMovieClip();
}
}
it works great for making it snow, and everythign is fine, however, when you click the button to start the game (by the way this is for a game, and this snow is on the main title and is to add effect to the game. we want it to snow in the title then when you start the game, stop snowing and start the intro movie, and then begin the game.) it keeps snowing. we want it to stop snowing so we can do our movie. is there a line of code we can use that will stop all previous AS? please help, and thanks
~kingfoot
p.s. attached is the file itself, for flash mx 2004. however, i have flash 8 so if there are commands in flash 8 and not in 2004, than im fine.
Can't Stop My Snow.
Hi I'm new here, so forgive me any newbie transgressions.
I'm using code from a tutorial to produce a snow effect. Now I want the snow effect to stop when my movie reaches a certain frame. How do I stop it?
Here's the code...
init = function () {
width = 300;
// pixels
height = 200;
// pixels
max_snowsize = 10;
// pixels
snowflakes = 50;
// quantity
for (i=0; i<snowflakes; i++) {
t = attachMovie("snow", "snow"+i, i);
t._alpha = 20+Math.random()*60;
t._x = -(width/2)+Math.random()*(1.5*width);
t._y = -(height/2)+Math.random()*(1.5*height);
t._xscale = t._yscale=50+Math.random()*(max_snowsize*10);
t.k = 1+Math.random()*2;
t.wind = -1.5+Math.random()*(1.4*3);
t.onEnterFrame = mover;
}
};
mover = function() {
this._y += this.k;
this._x += this.wind;
if (this._y>height+10) {
this._y = -20;
}
if (this._x>width+20) {
this._x = -(width/2)+Math.random()*(1.5*width);
this._y = -20;
} else if (this._x<-20) {
this._x = -(width/2)+Math.random()*(1.5*width);
this._y = -20;
}
}
init();
Stop Snow
Hello,
please help! How can I stop the snow animation - movie clip on a certain frame or better how can I make it dissappear form a certain frame forward? Is there any possibility to make it fade out with alpha or by some other trick? Thanks for the help!
Stop The Snow
I used the tuttorial on maing snow in a project. It works great on the scene that the animation is on. My problem is the snow doesn't stop when the movie moves on to the next scene. Any ideas how I can get the snow to play for just that one scene and then stop when it moves on to the next scene.
I Can't Stop The Snow
Hello everyone..first time poster here Awesome site with amazing tutorials!
I used this snow tutorial (http://www.kirupa.com/developer/flash8/snow.htm) in my Flash project and it looks great. The only problem is I can't get it to stop playing. I've tried stop actions and removing movie clip actions but no luck. I'm not that advanced in ActionScript so it's no surprise that I'm having problems.
Basically, I want the snow to stop after certain buttons are clicked. How can I go about doing this?
Thanks,
- marcel
Stop The Snow
Hello, this is my first posting. I am somewhat new to flash and have a opening page with the snow effect working fine. What I want to do is when a user clicks on a button to transfer him/her to another page(frame) in the site the snow should stop. Any suggestions? Thanks ahead. I am using the snow 3.0 tut from this site.
Stop The Snow
Hello..
I have followed directions on how to make snow fall.
http://www.kirupa.com/developer/mx/snow.htm
I used the oval tool to make a round snow drop. Converted it into a movie and named it "winter". In the movie clip instance the name is "snow".
I right ckicked the snow drop and clicked Actions. Entered this:
--------------------------------------------------------------------
onClipEvent (load) {
//specifies the size of the movie stage
movieWidth = 300;
movieHeight = 200;
//variables that will modify the falling snow
i = 1+Math.random()*2;
k = -Math.PI+Math.random()*Math.PI;
//giving each snowflake unique characteristics
this._xscale = this._yscale=50+Math.random()*100;
this._alpha = 75+Math.random()*100;
this._x = -10+Math.random()*movieWidth;
this._y = -10+Math.random()*movieHeight;
}
onClipEvent (enterFrame) {
//putting it all together
rad += (k/180)*Math.PI;
this._x -= Math.cos(rad);
this._y += i;
if (this._y>=movieHeight) {
this._y = -5;
}
if ((this._x>=movieWidth) || (this._x<=0)) {
this._x = -10+Math.random()*movieWidth;
this._y = -5;
}
}
---------------------------------------------------------------------------
ON THE 11th LEVEL OF FRAME 1, I ENTERED THIS A/S:
for (k=0; k<50; k++) {
duplicateMovieClip(this.snow, "snow"+k, k);
}
----------------------------------------------------------------------
It's works fine! But....
I only want it to snow for 75 of the 400 frames I have.
I tried using the removeMovieClip ("winter"); on level 11 frame 75
but it doesn't work.
What am I doing wrong?
Stop Snow
Hello,
please help! How can I stop the snow animation - movie clip on a certain frame or better how can I make it dissappear form a certain frame forward? Is there any possibility to make it fade out with alpha or by some other trick? Thanks for the help!
The Snow Won't Stop AHHH
Ok, I have this page I'm working on where there are numerous backrounds. You click the next button to change them. Anyway, on one of the backrounds is a winter theme, and I used the Falling Snow tutorial to make snow fall on that set of frames, but when you choose any other backround after that, the snow follows. I wan't the snow to only fall on the winter backround.
Stop The Falling Snow?
I found the on this site tutorial on how to make falling snow in flash, which is excellent by the way, but now I have a question about it. HOW DO I STOP IT???
I have followed every step like it says, but when I continue into the next frame, the snow just keeps falling, even if I change scene. I have tried with several codes, "removeMovieClip("Snow")", "snow.stop();" "_root.snow.unloadMovie();", but nothing works!
Can someone please help me??
How To Stop Falling Snow
Does anyone know how to stop a running function? I was using the below the scripts to create snow scene, it works but i dun now how to stop it.
init = function () {
width = 630;
// pixels
height = 391;
// pixels
max_snowsize = 10;
// pixels
snowflakes = 50;
// quantity
for (i=0; i<snowflakes; i++) {
t = attachMovie("snow", "snow"+i, i);
t._alpha = 20+Math.random()*60;
t._x = -(width/2)+Math.random()*(1.5*width);
t._y = -(height/2)+Math.random()*(1.5*height);
t._xscale = t._yscale=50+Math.random()*(max_snowsize*10);
t.k = 1+Math.random()*2;
t.wind = -1.5+Math.random()*(1.4*3);
t.onEnterFrame = mover;
}
};
mover = function() {
this._y += this.k;
this._x += this.wind;
if (this._y>height+10) {
this._y = -20;
}
if (this._x>width+20) {
this._x = -(width/2)+Math.random()*(1.5*width);
this._y = -20;
} else if (this._x<-20) {
this._x = -(width/2)+Math.random()*(1.5*width);
this._y = -20;
}
}
init ();
The Snow Won't Stop AHHH
Ok, I have this page I'm working on where there are numerous backrounds. You click the next button to change them. Anyway, on one of the backrounds is a winter theme, and I used the Falling Snow tutorial to make snow fall on that set of frames, but when you choose any other backround after that, the snow follows. I wan't the snow to only fall on the winter backround.
Stop The Falling Snow?
I found the on this site tutorial on how to make falling snow in flash, which is excellent by the way, but now I have a question about it. HOW DO I STOP IT???
I have followed every step like it says, but when I continue into the next frame, the snow just keeps falling, even if I change scene. I have tried with several codes, "removeMovieClip("Snow")", "snow.stop();" "_root.snow.unloadMovie();", but nothing works!
Can someone please help me??
How To Stop The SNOW From Falling? (w/ Button)
Hi
I love the falling snow and imported it in a flashscene as part of my happy newyear message.
I made it in a new layer and because I only want it to start snowing at a certain framenumber. I just made the instance of the movieclip (snow) at that framenumber. So far so good.
Now I want it to stop snowing after you release a button (the one that also restarts the rest of the scene).
I can't manage to find the correct code for it (tried: this.snow.stop, removemovie, unload). I don't know a lot about actionscripts so I probably make a stupid mistake.
Who can help me stop the snow from falling?
Stop Kirupa's Falling Snow
Hi all!
I am trying to find a way to stop the snow from Kirupa's "Create Falling Snow" tutorial. When I change scenes in Flash I need the snow to have stopped. This is his tutorial that I used: http://www.kirupa.com/developer/mx/snow.htm
Here is the action I am working with:
onClipEvent (unload) {
//specifies the size of the movie stage
movieWidth = 800;
movieHeight = 516;
//variables that will modify the falling snow
i = 1+Math.random()*2;
k = -Math.PI+Math.random()*Math.PI;
//giving each snowflake unique characteristics
this._xscale = this._yscale=50+Math.random()*100;
this._alpha = 75+Math.random()*100;
this._x = -10+Math.random()*movieWidth;
this._y = -10+Math.random()*movieHeight;
}
onClipEvent (enterFrame) {
//putting it all together
rad += (k/180)*Math.PI;
this._x -= Math.cos(rad);
this._y += i;
if (this._y>=movieHeight) {
this._y = -5;
}
if ((this._x>=movieWidth) || (this._x<=0)) {
this._x = -10+Math.random()*movieWidth;
this._y = -5;
}
}
Thanks for any help with this!!!
RandyK
Stop Kirupa's Falling Snow
Hi all!
I am trying to find a way to stop the snow from Kirupa's "Create Falling Snow" tutorial. When I change scenes in Flash, I need the snow to have stopped. This is his tutorial that I used: http://www.kirupa.com/developer/mx/snow.htm
Here is the script I am working with:
onClipEvent (unload) {
//specifies the size of the movie stage
movieWidth = 800;
movieHeight = 516;
//variables that will modify the falling snow
i = 1+Math.random()*2;
k = -Math.PI+Math.random()*Math.PI;
//giving each snowflake unique characteristics
this._xscale = this._yscale=50+Math.random()*100;
this._alpha = 75+Math.random()*100;
this._x = -10+Math.random()*movieWidth;
this._y = -10+Math.random()*movieHeight;
}
onClipEvent (enterFrame) {
//putting it all together
rad += (k/180)*Math.PI;
this._x -= Math.cos(rad);
this._y += i;
if (this._y>=movieHeight) {
this._y = -5;
}
if ((this._x>=movieWidth) || (this._x<=0)) {
this._x = -10+Math.random()*movieWidth;
this._y = -5;
}
}
Thanks for any help with this!!!
RandyK
I Would Like To Know How To Stop A Loop Of Falling Snow When You Enter The Page...
Hi Im on a deadline and Im making a page where the would like a intro now when its winter with snow falling so Ive used this site script to make the snow fall..
http://www.sitepoint.com/article/script-falling-snow-effect
now my problem is when you continue in to the site the snow wont stop falling please help me and fast or Im kinda screwed..
Snow Effect Without The Mouse Effects Required [asdvanced Snow From Free Source]
Hi all.
Managed to find this really cool snow effect but trying to remove the mouse interaction, but in doing so the snow seems to stop or fade after five or ten seconds due to removing the mouse elements, however if they are in place without any hit with the mouse the snow still continues to fall regardless so in effect I need the snow to keep running without any effect from the mouse, here is the actionscript as below. Any help would be great.
cheers
ActionScript Code:
//var total = 0;//function setQuality(thisSpeed) { if (thisSpeed == 1) { total = 100; } else if (thisSpeed == 2) { total = 300; } else { total = 400; }}setQuality(_global.speed);/////////////////////////////////////function createParticles() { for (var i = 0; i<total; i++) { this.ele.attachMovie("bit", "bit"+i, i++); var clip = this.ele["bit"+i]; clip.force = 0; clip.mn = 1+Math.random()*1.5; clip.x = Math.random()*2-0.75; clip.y = Math.random()*2; clip._x = (Math.random()*this.frame_mc._width)+left; clip._y = Math.random()*200-220; clip._xscale = 70+Math.random()*290; clip._yscale = 70+Math.random()*290; clip.ct = Math.floor(Math.random()*60); clip.c = 0; clip.onEnterFrame = function() { this.c++; if (this._x<_x/*mouse*/) { this.x -= this.force; } else { this.x += this.force; } if (this.force>0) { this.c = 0; this.force *= 0.6; if (this.force<0.05) { this.force = 0; } } if (this.c>this.ct) { this.x = Math.random()*5-1.5; this.c = 0; this.ct = Math.floor(Math.random()*60); } this._y += (this.y+this.mn)-(this.force*9); this._x += this.x; if (this._x<left-5) { this.x = Math.random()*5-1.5; this.force = 0; this._x = right+2; } if (this._x>right+5) { this.x = Math.random()*5-1.5; this.force = 0; this._x = left-2; } if (this._y>_y/*mouse*/-25 && this._y<_y/*mouse*/+25 && this._x>_x/*mouse*/-35 && this._x<_x/*mouse*/+35) { this.force += Math.random()*5; } else if (this._y>=bottom+5) { this.force = 0; this.x = Math.random()*5-1.5; } }; }}///*function clearAll() { for (var i = 1; i<=total; i++) { removeMovieClip(this.ele["bit"+i]); }}*///createParticles();//stop();
Falling Snow - Showing/Hiding The Snow
Hey everyone,
A question someone asked me earlier was how to make the snow disappear or reappear at a certain point. For example, you may want the snow to fall in Frames 1-30, but beyond that, you would not want any snow to fall. The code I had provided in v2.0 of the tutorial did not address that, so until I write a modified tutorial, I have provided the FLAs (for MX) that help you to control when you want or don't want the snow to fall
I have provided two variations of the Falling Snow file. One method stops or starts the falling snow by having you press a button (the white/pink circle on the bottom left of the animation). The second method displays the falling snow for about 30 frames, and then it stops displaying the falling snow.
The primary thing you will need to consider in this new version of the falling snow is your placement of:
ActionScript Code:
_root.run = 1 // displays snow
- and -
ActionScript Code:
_root.run = 0 // hides snow
Also, I made some minor modifications to the actual Falling Snow code found on the snow movie clip, and that can be found here:
ActionScript Code:
onClipEvent (load) {//variableswidth = 300;height = 200;//random x,y, and alpha this._xscale = this._yscale=50+Math.random()*100;this._alpha = 20+Math.random()*50;//random x and y for flakesthis._x = -width+Math.random()*(3*width);this._y = -10+Math.random()*height;//speed and trigonometric valuei = 1+Math.random()*2;k = -Math.PI+Math.random()*Math.PI;rad = 0;this._visible = false;}onClipEvent (enterFrame) {//////////////////////////////////////if (_root.run == 1) {//////////////////////////////////////this._visible = true;// horizontal movementrad += (k/180)*Math.PI;xmovement = _root._xmouse;this._x -= Math.cos(rad)+(xmovement-(width/2))/50;// vertical movementthis._y += i;// remove clips when they misbehave (overstep boundaries)if (this._x>(width+50)) {this._x = -45;this._y = Math.random()*height*2;}if (this._x<-50) {this._x = width+45;this._y = Math.random()*height*2;}if (this._y>=height) {this._y = -50;this._x = -width+Math.random()*(3*width);}//////////////////////////////////////} else {this._visible = false;}//////////////////////////////////////}
The source files should contain everything I have explained here.
Cheers!
Kirupa
Snow Behind MC (using Snow 3.0)- Depth Issues
Hey folks! I am hoping someone can help me out with this one. Thanks to Sammo I was able to put an end to my snowfall headache using snow 3.0 http://www.kirupa.com/developer/flash8/snow.htm -- But now another problem has risen.
I need it to "snow" behind a movieclip and I can seem to figure out the right way of doing this . Anyone? Not sure if this involves using movieclip.getNextHighestDepth(); for the object? Just one of my unsuccessful attempts.
Help.....
Snow, Blummin Snow
Hey Guys,
What a nightmare! I love the Snow tutorial our god of Flash, Kirupa, did but I can't seem to take the code etc and bung it into something I'm working on.
It's bloody strange, everything is exactly the same. The names, the vars, the timelines, the sizes, the Flash version, even the bloody colours, but it still just grinds my system to a hault and prompts me to stop the script. This all happens when I export/preview obviously.
Anyway, it's here www.tigeralex.co.uk/MYTEST_SOL.fla
Would love some help?
A dearly grateful, Alex.
Snow Glorious Snow
Hello all,
Hate to cross post this, but I'm not getting any takers over in the Flash 8 forum.
I am using the snow method wonderfully created here on Kirupa and have a quick question.
Currently, the movie just starts with a screen full of snow. I'd like to get it to start off screen and fall in. Basically setting an initial state for the ._y of 0. I also can't seem to get a delay working for the function. Ideas?
Thanks!
ActionScript Code:
var movieWidth = 470;var movieHeight = 230;createEmptyMovieClip("snowholder",this.getNextHighestDepth());function makesnow() { for (var i = 0; i<500; i++) { var clip = snowholder.attachMovie("snow", "s"+i, i); clip.i = 1+Math.random()*2; clip.k = -Math.PI+Math.random()*Math.PI; clip._xscale = clip._yscale=20+Math.random()*100; clip._alpha = 75+Math.random()*100; clip._x = -10+Math.random()*movieWidth; clip._y = -10+Math.random()*movieHeight; clip.finished = false clip.onEnterFrame = move; }}function move() { this.rad += (this.k/180)*Math.PI; this._x -= Math.cos(this.rad); this._y += this.i; if (this._y>=movieHeight) { if(!this.finished){ this._y = -5; }else{ this.removeMovieClip() } } if ((this._x>=movieWidth) || (this._x<=0)) { this._x = -10+Math.random()*movieWidth; this._y = -5; }}function removesnow() { for (var obj in snowholder) { if (typeof snowholder[obj] == "movieclip") { snowholder[obj].finished = true } }}makesnow();setInterval(removesnow,5000);
Snow 3.0 Help - End Snow Function
Hey !!
Im using the Snow 3.0 effect but i need a bit of AS that will end the snow effect once the playhead has left the frame
or a bit of AS that will end the function once a button is clicked or something like that
cos the snow still falls after i leave the frame !!
Stop Actionscript Function At A Specific Frame (stop Looping)
I want to stop an effect at a specific frame but I dunno how.
Do I have to put something in the code?
I'm confused.
Or just tell me how to stop it from looping.
Edit:
Is it possible to attach this to a movie clip? Then i can stop it or use onEnterFrame and then escape();
I actually have no idea what I am talking about. /Edit
Here is one of the code I borrowed:
MovieClip.prototype.placeInSpace = function(id) {
var ratio = this.focaldistance / Math.sqrt(this[id].z * this[id].z);
this[id]._x = this[id].x * ratio;
this[id]._y = this[id].y * ratio;
this[id]._xscale = this[id]._yscale = 1000 / this[id].z;
}
MovieClip.prototype.randomPlace = function(id) {
var radius = this.rmin + (this.rmax - this.rmin) * Math.random();
var polar = 2 * Math.PI * Math.random();
this[id].x = radius * Math.cos(polar);
this[id].y = radius * Math.sin(polar);
this[id].z = this.zmin + (this.zmax - this.zmin) * Math.random();
}
Here's the other code cause I can use two in my movie:
function mover() {
// Move the particle over time
this._y += this.speed;
this._yscale += 10;
this.speed++;
if (this._y>500) {
this._y = 0;
this.speed = Math.random()*10;
this._yscale = 100;
}
}
function starField(x, y, n) {
// Generate a starfield of specified dimensions with n stars
for (var i = 0; i<n; i++) {
var star = this.createEmptyMovieClip("star"+i, i);
var dot = star.createEmptyMovieClip("dot", 0);
star._rotation = Math.random()*360;
star._x = x;
star._y = y;
dot.lineStyle(0, 0xFFFFFF, 100);
dot.moveTo(0, 10);
dot.lineTo(0, 15);
dot.onEnterFrame = mover;
dot.speed = Math.random()*10;
}
}
starField(275, 200, 100);
[F8] Movie Plays > Stop > Reverse > Stop > Play
I am fairly new to involved action scripting. I have successfully scoured flashkit threads for years to get my answers but this one has been driving me crazy for the past couple days. I have tried numerous solutions but none of them do exactly what I am trying to do.
I am creating an online portfolio that I want to control with two buttons that will play forward on release and stop at every piece unless the user is pressing and holding down - I also would like the scrolling animation to play in reverse on press and stop at every piece unless press and hold which happens to be skateboards in this section. I am posting the .fla for this section. This is what I have been able to accomplish so far. I moved everything into the main timeline from a movie clip because I could not get that to work at all. Should I move it back to movie clip? I also want it to stop at the first board.
here is the code I was able to peice together that just plays continously without stops.
Empty movie clip on second frame.
PHP Code:
onClipEvent (enterFrame)
{
if (_root.goBack)
{
_root.prevFrame();
}
else
{
_root.nextFrame();
}
_root.frameNo = "Frame : " + _root._currentFrame;
}
Forward button.
PHP Code:
on (press)
{
_root.goBack = false;
}
Reverse Button.
PHP Code:
on (press)
{
_root.goBack = true;
}
I have only done basic stops; goToAndPLay, getURL and such I am a little out of my league here but I started the ball rolling and would like to make this work as I intended. Any help making this do anything close to what I am describing would be much appreciated
How To Make The Wings Of A Fly Stop When The Flash Movie Stop?
Hello,
I made a simple "Fly Flying" flash animation. The wings of the fly are moving up and down while the fly is flying from one location to the other. My problem is:
The wings of the fly are still moving up and down when the fly is landed on the ground. I tried to add a stop(); action script at the last frame. However the wings are still moving even the movie is stopped.
How can I make the wings stop moving when the flash movie is stop? Please download and take a look at my flash file (fly_flying.fla):
http://space.uwants.com/batch.download.php?aid=313219
Thanks and best regards
Alex
Snow On Tv
Hello all,
Everybody has seen it on tv. The channels where there is nothing but snow. I would like to do the same in Flash but I have no idea how I would do this. Could somebody give me some help.
Thanks
Snow In MX?
Hi all!
Is it possible to have falling snow that settles and builds up in certain areas on the stage?
Thanks in advance
Andy
Snow
I am making a Christmas card with flash mx and I am using actionscript to make it snow. Could somebody check my code and tell me what is wrong with the part I mared red.
// general
Blow = function () { if (!(random(75))) {windTarget = (random(21)-10)/3;}wind += (windTarget-wind)/20;};
// snowfall
MovieClip.prototype.addFlake = function() {
this.attachMovie("snow", "s"+++this.depth, this.depth);
var me = this.flakes[this.flakes.length]=this["s"+this.depth];
me.x = random(500)-100;
me._xscale = me._yscale=random(75)+26;
me.scale = me._xscale/100;
};
MovieClip.prototype.killFlake = function(i) {
this.flakes[i].removeMovieClip();
this.flakes.splice(i, 1);
};
MovieClip.prototype.LandFlake = function(i) {
var clip = _root.landscape.snow;
clip.attachMovie("snow", "s"+++this.depth, this.depth);
var me = clip["s"+clip.depth];
me._x = this.flakes[i]._x;
me._y = this.flakes[i]._y;
me._xscale = me._yscale=this.flakes[i]._xscale;
this.killFlake(i);
};
// flakes
MovieClip.prototype.fall = function() {
this._x = Math.cos(this.t += .1)*10+(this.x += _root.wind*this.scale);
this._y += 3*this.scale;
};
MovieClip.prototype.isInBounds = function() {
return (this._x>-100 && this._x<400 && this._y<300);
};
MovieClip.prototype.isTouchingLand = function() {
return _root.landscape.hitTest(this._x, this._y, true);
};
Thanks
Snow Tv
hi i saw somewhere on this site a tv with snow on it does any1 has a link to that b/c i can't ifn it anymore ore got something thats simulair
Snow
Do anyone know how to make the snow. (many white object fall down endlessly)
I have thought of a method by inserting layer and creating motion guide.
But it is complicate and cant make it endlessly.
Can someone know how to make it by actionscript or have any ideas of making snow?
Thanks
Snow
Hey, before i start visit this site: www.synphia.com It isnt any spyware,xxx or such site, its a finnish company that make homepages. I now assume that u have visited the site and hopefully can tell me how i make those snowflakes but the "site itself, and text" still being visible. Now i'm not really a newbie but in this case i dont see it going since the flash movie wants it own space, am i right ?
Snow
I'm using a snow scene in one of my xmas cards (see code below). I'm not an expert at action script, so can anyone give me the code to stop it snowing without coming out of the scene?
thanks.
Mike
(i = 0;
while (Number(i)<>250) {
duplicateMovieClip("/snow", "snow" add i, i);
i = Number(i)+1;
}.
Help With Snow Tut. AS
Could someone PLEASE help me script the snow to my dimensions:
Stage 600 wide x 400 High
I only want the snow in an area 432 Wide x 296 High at the X=80 y=52 position
I've tried scripting it and totally messed it up...again & again & again. I'll never learn this stuff :<(
Here's the original script:
onClipEvent (load) {
onClipEvent (load) {
//specifies the size of the movie stage
movieWidth = 300;
movieHeight = 200;
//variables that will modify the falling snow
i = 1+Math.random()*2;
k = -Math.PI+Math.random()*Math.PI;
//giving each snowflake unique characteristics
this._xscale = this._yscale=50+Math.random()*100;
this._alpha = 75+Math.random()*100;
this._x = -10+Math.random()*movieWidth;
this._y = -10+Math.random()*movieHeight;
}
onClipEvent (enterFrame) {
//putting it all together
rad += (k/180)*Math.PI;
this._x -= Math.cos(rad);
this._y += i;
if (this._y>=movieHeight) {
this._y = -5;
}
if ((this._x>=movieWidth) || (this._x<=0)) {
this._x = -10+Math.random()*movieWidth;
this._y = -5;
}
}
Snow
I read the falling snow tutorial in the Flash MX section and I made it but it keeps repeating through the whole movie. How do I get it to stop at a certain point? Thanks.
Snow 2.0?
How can i make something like that with FLash 5, i tryed to follow the steps, when i had to copy the second set of the action script code, i kept telling me it has errors....how do i go about it.. or is it not possible to create such an effect with flash 5?>
-AlBERT
Tv Snow
lo,
does anyone know a good way of making tv snow, you know, the moving black and white dots.
dunno whether it's possible with moving pictures or with actionscript... hmm
thanks.
Snow V.2.0
I follow the tutorial to the letter, but when it comes to publish it, I keep getting a message says that a script is causing it to slow down and eventually time out. The only way around it is to abort the scripts, and if I do that, there's no snow Help?
SNOW V 2.0 HELP ME
ok somebody please help me! i have been trying to do the SNOW.v2.0 tutorial
and i keep getting errors when im done the project, and also my little snow movie clip just sits on the top left corner of my screen.
but yeah i keep getting this error message from flash in waht looks like a text document saying my errors , sometimes 2 soemtimes 4 so yeah can anyone try it and tell me if its the tutorial or is it that im jsut doing wrong.
in anycase i get errors and my little snow wont move at all
what am i doing wroooong?
http://www.kirupa.com/developer/mx2004/snow.htm
Snow
hello,
im trying out the snow effect
http://www.kirupa.com/developer/mx2004/snow.htm
but its not working =(
im keep getting this error :
A script in this movie is causing flash player to run slowly. if it continuesto run you computer may become unresponsice. do you want to abort the script?
thanx bdq
Help With Snow 2.0
I saw the Snow 2.0 tutorial here:
http://www.kirupa.com/developer/mx2004/snow.htm
I wanted to do it, so I followed the instructions, but when I finished, a box came up that said,
Quote:
A script in this movie is causing Flash Player to become unresponsive. Do you want to abort the script?
I know it's not my version of flash because I downloaded the Flash MX file and that worked fine. Can someone help?
I'm using Flash MX Pro 2004.
Snow
Hey guys
I just took this tutorial:
http://www.kirupa.com/developer/mx/snow.htm
Now ive got a problem...
The snow carries over to all the scenes in my movie. I think it has something to do with the duplicate movie action. Ive tried but gone no where.
TIA
-T
Let It Snow
Hello I was reading a tutorial on Falling Snow. I am having difficulties making a movie for a presentation. I want the Falling Snow effect in the background and want to have logos appearing and disappearing. Moreover I need to Export it to .avi and then convert it to .mpeg. The converting part I understand but when I export using the Export feature in Flash it has a single screen and nothing happens. If you have any clue as to what I am talking about please post and tell me how to get the snow to fall in the background. Thanks.
Snow 3.0
Hello there, my name is Atha, and i have a question to make, which i am sure many can answer, except me
I've visited this tutorial
http://www.kirupa.com/developer/flash8/snow.htm
tryed it and it works fine! What i really need to do is, try to move the flakes from bottom to top instead of top to bottom. My problem is that i do not know how to edit the code, and i would like to learn how.
The closest i got so far is by changing the += of this code to -=
this._y += this.k; this._x += this.wind;
the flakes spawn , but they dont respawn when they go out of the screen .
I am sure there is a solution, which i don't have. Please spare some of your time to help me out~!
Thanks in advance!
Snow To Fog...
I'm hoping someone has a suggestion to this issue.
I created a snow animation basically the same way that was in a tutorial on here.
Here is the code i'm using:
init = function () {
width = 900;
// pixels
height = 300;
// pixels
max_snowsize = 10;
// pixels
snowflakes = 50;
// quantity
for (i=0; i<snowflakes; i++) {
t = attachMovie("snow", "snow"+i, i);
t._alpha = 20+Math.random()*60;
t._x = -(width/2)+Math.random()*(1.5*width);
t._y = -(height/2)+Math.random()*(1.5*height);
t._xscale = t._yscale=50+Math.random()*(max_snowsize*10);
t.k = 1+Math.random()*2;
t.wind = -1.5+Math.random()*(1.4*3);
t.onEnterFrame = mover;
}
};
mover = function() {
function fadeOut() {
this._alpha = 0;
}
this._x += this.k;
this._y += this.wind;
if (this._y>height+10) {
this._x = -20;
}
if (this._x>width+20) {
this._y = -(width/2)+Math.random()*(1.5*width);
this._x = -20;
} else if (this._x<-20) {
this._x = -(width/2)+Math.random()*(1.5*width);
this._y = -20;
}
}
init();
I took the idea to make a fog effect instead. Switched the x and y values so the fog would roll in from left to right. that works fine. The problem is that the fog just ends abruptly and comes in all the same.
Is there a time based way, or something to go along with the snow tutorial that will cause the object to fade in and fade out...not just dissapear. I think i'm looking for an actionscript solution. I know how to do it it using alpha and tweens or transitions but that would involve guessing on when the snow will stop falling. Any help would be great.
thanks,
chris
Help With Snow Tut. AS
Could someone PLEASE help me script the snow to my dimensions:
Stage 600 wide x 400 High
I only want the snow in an area 432 Wide x 296 High at the X=80 y=52 position
I've tried scripting it and totally messed it up...again & again & again. I'll never learn this stuff :<(
Here's the original script:
onClipEvent (load) {
onClipEvent (load) {
//specifies the size of the movie stage
movieWidth = 300;
movieHeight = 200;
//variables that will modify the falling snow
i = 1+Math.random()*2;
k = -Math.PI+Math.random()*Math.PI;
//giving each snowflake unique characteristics
this._xscale = this._yscale=50+Math.random()*100;
this._alpha = 75+Math.random()*100;
this._x = -10+Math.random()*movieWidth;
this._y = -10+Math.random()*movieHeight;
}
onClipEvent (enterFrame) {
//putting it all together
rad += (k/180)*Math.PI;
this._x -= Math.cos(rad);
this._y += i;
if (this._y>=movieHeight) {
this._y = -5;
}
if ((this._x>=movieWidth) || (this._x<=0)) {
this._x = -10+Math.random()*movieWidth;
this._y = -5;
}
}
|