falling snow: pls help with actionscript

Hallo,

I made a flash animation with the snow that falls from the sky in Flash 8 (actionscript 2.0)

However, the snow, I did differs from the original.

The original is here:

http://www.Kirupa.com/developer/MX/snow.htm

I put mine here:

http://toetssite.webs.com/

You will notice that my only falling snow down: there is no randomness for the flakes to go left or right. There is no movement.

Where in the script below can I change this so that there is more movement for flakes? Thank you

I use the following script for the snow itself:

onClipEvent (load) {}


Specifies the size of the movie scene
movieWidth = 300;
movieHeight = 200;

variables that alter the snowfall
I have = 1 + Math.random () * 2;
k = - Math.PI + Math.random () * Math.PI;

What gives each snowflake unique features
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) {}
restore the
+= rad (k/180) * Math.PI;
this ._x-= Math.cos (rad);
This += i ._y;
If (this ._y > = movieHeight) {}
This ._y = - 5;
}
If ((cette._x > = movieWidth) |) (cette._x < = 0)) {
This ._x = - 10 + Math.random () * movieWidth;
This ._y = - 5;
}
}


and on the first frame of my movie, I put the following:

for (k = 0; k < 50; k ++) {}


duplicateMovieClip (this.snow, "snow" + k, k);


}

Thank you!

Just initialize the variable rad. I added following line to your code and it works fine.

rad = 0; a line that I inserted.

No other changes required. It is advisable to initialize all variables before using them.

in any case, below, that I provided all script for snow after change

onClipEvent (load) {}

Specifies the size of the movie scene

movieWidth = 300;

movieHeight = 200;

rad = 0; a line that I inserted.

variables that alter the snowfall

I have = 1 + Math.random () * 2;

k = - Math.PI + Math.random () * Math.PI;

What gives each snowflake unique features

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) {}

restore the

+= rad (k/180) * Math.PI;

this ._x-= Math.cos (rad);

This += i ._y;

If (this ._y > = movieHeight) {}

This ._y = - 5;

}

If ((cette._x > = movieWidth) |) (this ._x<=0))>

This ._x = - 10 + Math.random () * movieWidth;

This ._y = - 5;

}

}

Tags: Adobe Animate

Similar Questions

  • Pls see SWF and help with Actionscript

    I'm trying to get my nails of the thumb (which is the individual buttons) to display in the box to the right when you click on it, but I don't know the code to put on the buttons for that to happen. Can someone help me please.

    http://www.geocities.com/demetriusmcclain/

    Here are your files in this way, they should be programmed. There is a minor change in your file main eoa.fla (with the path to elephants.swf) and major changes to elephant.fla:

    www.geocities.com/kglad99/eoArts.zip

  • I need help with actionscript 3, sending information php to my email, Web site created in Flash pro cs5

    Hi, my name is David and I took a course to create my own website of Lynda.com by Paul Trani. After that, I created my first own webste. After that I finished it, everything worked well in flash and firefox. I have one problem or question about the power form back to send information of my website at my emailaddres. I created my website 'LisbonDreamWalking' in Flash pro CS5. I have a contact page, where people can send an e-mail for a walk in Lisbon, the date, the number of people etc. Now I want through my ISP / host funpic.org, as the entry info fields of text to be sent to my emailaddress [email protected]. My mail URL address iss: http://lisbondreamwalk.li.funpic.org This is a free webhost, so they do not work with forms as in the course, and I need some additional Info for php. Here is my HTML (Flash actionscript 3.0) to send, I don't have that red text to fill (php), I was told by the adobe course. I really hope that someone can help me? Thanks in advance!

    Instructions: 1. Add your custom code on a new line after the line that says "/ / Start your code custom" below. The code runs when the user clicks the symbol instance. * / send_btn.addEventListener (MouseEvent.CLICK, fl_MouseClickHandler_13);  function fl_MouseClickHandler_13(event:MouseEvent):void {if (thename.text == "": theemail.)} Text == ' | thetime. Text == ' | thepersons. Text == ' | TheMessage. Text == "") {thankyou.text = "Please fill out all fields';      } else {/ / create a container var allVars: URLVariables = new URLVariables();}           allVars.name = thename.text;           allVars.email = theemail.text;           allVars.time = thetime.text;           allVars.persons = thepersons.text;           allVars.message = themessage.text;           Send the info to a URL var mailAddress:URLRequest = new URLRequest ("http.www.namewebsite.com/gdform.php");           mailAddress.data = allVars;           mailAddress.method = URLRequestMethod.POST;           sendToURL (mailAddress);            Thankyou. Text = "Thank YOU!"           theName.Text = "";           Theemail. Text = "";           thetime. Text = "";           thepersons. Text = "";           TheMessage. Text = "";      } }

    H

    your code and my code are not the same.  Copy and paste the code that I have proposed.

  • fade out dynamic text only fading. Need help with actionscript

    Hi all

    I hope someone can help me. I have a dynamic text I want to fade and then fade out and then disappear in another bit of copy. My text fades but is not melted, paragraph disappears and then evokes the next paragraph suddenly. All the basic ideas on the code that I have attached here? Let me know if you need more.

    Thanks a lot for your help. I finally found it and done in a much simpler way with much less code. I used symbols that I mentioned in previous posts, following this same actionscript help basis but put my video clips on frame 1, used a stop action and ended up with PlayMC()

  • Pls help with Apple TV 3!

    Hello everyone!

    I have a big problem with my Apple TV 3 (model MD199LL/A). I need your help...

    I watched my Apple TV yesterday and it started to reboot. Light - thinking 3 min and restar...

    I connected Apple TV for iMac and did restore from iTunes.

    Now Apple TV works maybe 10 min and restart again.

    Can U help me with this...?

    Restore and try somewhere else as a guest house, if the problem persists the Apple TV ist kaputt.

  • pls help with the problem of player

    Hello

    I posted last week, I couldn't open pdf after update of the player.

    After having followed the advice that I received, I uninstalled and reinstalled, accepted the agreement of the user, searched and not found the eula file.  Finally I managed to open the pdf files, however drive either now hangs completely or the blue circle shows updated continuously propagated.

    It appears that there are major problems with the update or I'm doing something completely wrong.

    could someone please suggest a way to solve this problem or a way to get back to my previous version that worked?

    Thank you very much in advance for any help.

    Kind regards

    Andy

    Three things to try - which some have already been given to you in message your last week...

    1. Using Windows Explorer navigate to C:\Program Files (x 86) \Adobe\Reader 11.0\Reader, and then double-click Eula.exe and accept the license agreement
    2. You can open Adobe Reader by itself?  If so, try to disable the Protected Mode [Edit |] Preferences | (Improved) security].
    3. It might even be a malware problem; See http://helpx.adobe.com/acrobat/kb/reader-core-dll-error.html
  • Help with ActionScript

    I was recently done in ActionScript, and I'm over my head. I need help.

    I want to do is to have a series of images that scroll. However, I would also like to have back and arrows according to, so you can change the images manually.

    Here is where I am now:

    I have two movie clips - I want to switch between two images.
    I have two buttons next and back.

    I am able to make the arrows to work, if I go to a certain slice, but if I try to get to go to a specific movie clip name, I get an error.

    Here is the ActionScript code I currently have:

    function nextclip(event:MouseEvent):void
    {
    image1_mc. Play();
    }
    next_btn.addEventListener (MouseEvent.CLICK, nextclip);


    I guess I'm not sure I'll even on this the correct way. Is there a way to advance to the next image, without having to specify what is the name of the instance of the image?

    Please help me! I'm quite confused.

    You can keep the images on consecutive images (not the space 10 frames) and simply use nextFrame() and prevFrame() for arrows next and previous. Regarding the second loop 10, you can use a timer. (I'll do my best to explain)

    var: clock = new Timer (10000);
    Creates a new timer under the name of the clock object and sets it to check every 10 seconds (10 000 milliseconds, change at your convenience)

    clock.addEventListener (TimerEvent.TIMER, moveNext)
    Adds a listener to the clock. Ticks of the clock every time, the listener will start the function called moveNext

    Clock.Start ();
    Starts the clock (will be start ringing every milliseconds x (however you define it))

    function moveNext(event:TimerEvent) {}
    If (currentFrames == totalFrames) {}
    If it's the last image > Stop at frame 1
    gotoAndStop (1);
    } else {}
    If this is not the last picture > goto the next image
    nextFrame();
    }
    }

    Hope this helps ;-)

  • Pls help with system restore - there was trouble, uninstallation of big Mo Prog., to make room for SR....

    Finally, the C drive seems to have 55 MB of available space. However, the system restore does not appear to knit - restore points may not be created.

    Finally, the C drive seems to have 55 MB of available space. However, the system restore does not appear to knit - restore points may not be created.

    Hey old activist

    Read the information below about system restore

    http://Windows.Microsoft.com/en-us/Windows-Vista/system-restore-frequently-asked-questions

      How space hard disk System Restore require?

    To store restore points, you need at least 300 megabytes (MB) of free space on each hard disk with the system on Protection. System Restore can use up to 15 percent of the space on each disk. As the amount of space fills up with restore points, System Restore deletes older restore points to make room for the new.

    and if you still have problems uninstalling programs try program revouninstaller free from the link below

    Walter, the time zone traveller

  • Pls help with the audio driver

    Hi, I have a Fujitsu Siemens amilo pro v2065, when I installed win7 was not sound, I tried several drivers but failed. the sound chip is AD1986A on Intel 915 pm here's a link to the datasheet:
    I'd appreciate any help really
    Thank you

    http://social.answers.Microsoft.com/forums/en-us/GettingReadyforWindows7/threads

    Link above is "Preparing for Windows 7" Forum.

    http://social.technet.Microsoft.com/forums/en/category/w7itpro/

    Link above is Windows 7 Forums.

    Windows 7 questions/answers/suggestions should be directed there.

    You are in the Vista Forums.

    See you soon.

    Mick Murphy - Microsoft partner

  • How to perform this procedure. .pls help with example

    / * It displays a warning * /.
    -How to remove this warning


    CREATE PROCEDURE EMP_TITLE_GENERATOR (EMP_GENDER IN (1) TANK, EMP_TITLE OUT VARCHAR2)
    IS
    BEGIN
    EMP_TITLE: = Decode(EMP_GENDER,'M','Mr','F','Ms','INVALID');
    EXCEPTION
    WHILE OTHERS THEN
    DBMS_OUTPUT. PUT_LINE (SQLERRM);
    END;

    Published by: 923746 on April 18, 2012 19:58

    Published by: 923746 on April 18, 2012 19:59
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    
    SQL> CREATE PROCEDURE EMP_TITLE_GENERATOR (EMP_GENDER IN VARCHAR2,EMP_TITLE OUT VARCHAR2)
      2  IS
      3  begin
      4  select DECODE(EMP_GENDER,'M','Mr','F','Ms','INVALID') into emp_title from dual;
      5  EXCEPTION
      6  WHEN OTHERS THEN
      7  dbms_output.put_line(sqlerrm);
      8  END;
      9  /
    
    Procedure created.
    
    SQL> set serveroutput on
    SQL> DECLARE
      2    EMP_GENDER VARCHAR2(200);
      3    EMP_TITLE VARCHAR2(200);
      4  BEGIN
      5    EMP_GENDER := 'F';
      6
      7    EMP_TITLE_GENERATOR(
      8      EMP_GENDER => EMP_GENDER,
      9      EMP_TITLE => EMP_TITLE
     10    );
     11    DBMS_OUTPUT.PUT_LINE('EMP_TITLE = ' || EMP_GENDER);
     12    DBMS_OUTPUT.PUT_LINE('EMP_TITLE = ' || EMP_TITLE);
     13  END;
     14  /
    EMP_TITLE = F
    EMP_TITLE = Ms
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    
  • Quiz Flash need help with actionscript


    Hallo,

    I made a quiz in flash with four Pages:

    1. "welcome to quiz," etc. with a button to GO to THE QUIZ.
    2. the real test with two possible answers
    3. the correct answer
    4. wrong answer with link to start again.

    I've added the following script to jump between the pages:

    {We (Release)}
    gotoAndPlay (pagenumber)
    }

    It works perfectly. But...

    I would like to add several quiz that I figure out on my own, but I want to add a kind of counter, which, at the end of the quiz, will give a percentage or a count for example. 7/10 - 70% congratulations! or something like that.

    Anyone have an idea how I wanted to write this script?

    I am a total newbie Flash is told by the way!

    Thank you very much!

    Create an action layer that extends through all your pages and set an outcome variable...

    var score = 0;

    Maybe for each correct answer you increment the value 1...

    score += 1;

    When you arrive at the end or somewhere else, you have a textfield and you use the value of note in there somehow...

    tField.text = "you answered" + score + "out 10 correctly»;»"

  • Beginner, need help with ActionScript 3.0

    Hi all
    I am a newbie to flash and have little experience with OBJECT oriented programming (and therefore of action script), so I apologize in advance for my lack of knowledge. I think it is easy enough to fix, just don't know the syntax or if there is a better way to do it. Here's my problem:

    I created a flash file which has a card (like a layer of the base image) with 4 quadrants, I created separate layer (converted to a button) which corresponds to the limit of 1 of the 4 quadrants, and added a simple script, I copied and modified since a tutorial Adobe (see syntax). Instead of a new webpage to appear and the text output "I clicked" I want a new window appears with the plan of each quadrant (which is another image, jpg).

    I don't know what is the syntax to call this new image upward once your mouse over individual quadrant.

    Thank you

    Try this code. It should simplify what you want to do. Just replace the real names of new html documents that you want to open.

  • Help with Actionscript error

    What I try to achieve is to read from an XML file to be located in my assets folder in my project directory.

    So as I will try to use the concepts of E4X for XML data, I started writing my code but get an error message as follows: 1120: access of undefined property contactsXMLLoader

    Here is my initial code that gives the error on the last line:

    import flash.net.URLLoader;
    import flash.net.URLRequest;

    var contactsXMLLoader:URLLoader = new URLLoader();
    contactsXMLLoader.load (new URLRequest("assets/mydata.xml"));

    Not sure why this error occurs?
    Also is there a way of FlexBuilder 3.0 to view the actual code of the URLLoader and URLRequest classes? Where and what files is the content code in, if any?

    Thank you

    hkpadobe,
    recently, when I saw someone else after an error of this kind, the code they were studying with was not really in any, but simply written method directly in the block. Have you tried to put these lines in a method such as creationComplete() - eg


    import flash.net.URLLoader;
    import flash.net.URLRequest;

    public function setup_items (): void
    {
    var contactsXMLLoader:URLLoader = new URLLoader();
    contactsXMLLoader.load (new URLRequest("assets/mydata.xml"));
    }
    etc etc.
    Richard

  • Smartphones blackBerry pls help with OS 6 or more

    Am the bberry 8520 curve and need to rank up to my PHONE to 6.0.0 or older. How to improve my OS to 6.0.0

    agogoman wrote:

    Am the bberry 8520 curve and need to rank up to my PHONE to 6.0.0 or older. How to improve my OS to 6.0.0

    Sorry, but the Curve 8520 does not support OS 6. For 8520 OS 5 is there for and and work perfectly.

    Prince

    __________________________________________________________________________

    Click 'Like' If you want to thank someone.

    If problem resolves mark message (s) as a 'Solution', so that others can use.

  • Problem with my iPhone 6s, while charging or using internet, he rejects a higher amount of heat! Pls help me...

    PProblem with my iPhone 6s, while charging or using internet, it rejects higher amoun of heat! Pls help me...

    Certain amount of heat is normal using a particularly intense use as a streaming video

    Can I restart a Force

    Restart your iPhone, iPad or iPod touch - Apple Support

    If the problem persists

    An appointment of 'Genius' to an Apple Store, or select another authorized service provider.

Maybe you are looking for

  • apt - get

    Hello I need help with the command apt - get install. I know that I need tool command line that I had already installed, but how do I activate the apt - get on Mac - OSX?

  • error code 0 x 80248011

    The following error code solution has not worked for my current setup.  My machine was running slowly so I uninstalled IE8 and XP SP3, IE7.  I then ran a utility called FixCleaner cleaning.  Part of this utility downloads updates from Microsoft Updat

  • DV6 3219tx xp downgrade. No sound at all and can not install any MS - UAA at all. Help, please

    I need to downgrade to XP SP2 due to work. I work for a public service and I tried everything about compatibility. I can't afford the upgrade 7 Ultimate. I have XP Home and they install ok but I can not install the drivers for the sound. DECCOM opens

  • Get the 7425 ordinal not found in dynamic link library...

    After having downloaded the Samsung Kies program, I get the message in the title everytime I open the program. How can I get this 7425 ordinal & how is it important for the Kies program?

  • VPN site to site access via a VPN client

    Hi all From our headquarters, we use a vpn site-to-site to connect to another site and it works great. We have just configured the VPN client on our headquarters, remote VPN user can access the LAN in the seat. We need the remote user can also access