| Welcome to Brackenwood. We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| Math.(random) | |
|---|---|
| Tweet Topic Started: Apr 15 2005, 02:55 AM (203 Views) | |
| Ratio | Apr 15 2005, 02:55 AM Post #1 |
|
Brackenwood Heavyweight
|
lake okay, i got the rain droplets here in a movie clip, and basically i was wandering wether math random could help me make the droplets apper at random points ant random times in the lake. could someone tell me the full code to do this? |
![]() |
|
| Vector | Apr 15 2005, 09:29 AM Post #2 |
|
Resident Actionscript Guru ♂
![]()
|
Yeah man Firstly you need to give it a linkage name, so open up your assets library (F11). Then in that there should be your movieclip, right-click on it and go down to linkage, then tick the top box and give it a name "mcSplash". Then, hit ok. Then click on frame 1, and press the F9 key. this will bring up the actionscript window. type the following:
Then go back to your library and double-click on the splash movieclip (so you should be in the frame view for the splash now). go to the last frame of the splash, select the last frame and press F9. in the a.s. window type this.removeMovieClip(); This will remove the splash from the stage after it's finished "splashing". That should just about do the trick. it will add 1 splash every frame, which you can randomize by putting this just under _root.onEnterFrame = function() {:
and put another } just below the last one already there. Wanna know how I know this so well? I actually wrote my own rain engine a while back.... I'll upload it to photobucket in a sec. <edit> here it is My Rain EngineCheers, Vec |
![]() |
|
| mystical-mongoose | Apr 15 2005, 10:35 AM Post #3 |
![]()
Eggy Toast
|
Action Script really helps a lot more then I thought!! To bad it wont work if you put your animations on DVD...I mean a good animater who is great at Action Script could make an awesome animation. Maybe Macromedia should design a DVD and telivision safe version of Action Script, or try at least. |
![]() |
|
| Mr. Jiggmin | Apr 15 2005, 11:16 AM Post #4 |
|
made of tulips
|
That’s cool Vec! How did you get that impact detection going? Seems like a hit test every frame for all of those water drops would make things start lagging. I dunno about that green water though.
:lol: I'm just guessing, but I'd say that you could probably export to .exe to get actionscript to work on a dvd. Or maybe with some know how you could get the dvd to run a normal old swf? |
![]() |
|
| RJ213 | Apr 15 2005, 12:47 PM Post #5 |
|
Brackenwood Member
|
Not bad the rain drops was kind of good.. but can you tell me how I could put some of my animation on... It would really help alot.... |
![]() |
|
| RJ213 | Apr 15 2005, 12:53 PM Post #6 |
|
Brackenwood Member
|
And also I was wondering if someone could tell me how do I convert me flash animation into GIF format..... |
![]() |
|
| Bussman | Apr 15 2005, 01:31 PM Post #7 |
|
FLASH GENIUS (I wish...)
|
why would u wanna do that? |
![]() |
|
| RJ213 | Apr 15 2005, 01:54 PM Post #8 |
|
Brackenwood Member
|
So i could put on of my shorter animation as my avatar... |
![]() |
|
| Vector | Apr 15 2005, 02:22 PM Post #9 |
|
Resident Actionscript Guru ♂
![]()
|
you can use swf's as your signature, as long as they are 550x150 or less in size, and are below... 10k i think... All you do is type
Where 550 is the width, 150 is the height, and www.place.com/file.swf is the location of your file, which you can host at -www.freewebs.com, -www.imageshack.us, or -www.photobucket.com I have an interactive signature.. see You can click + drag the floating balls too
:lol: <edit> *slaps self in the face* You meant your avatar picture on the left, didn't you.... ![]() Well, you go file >> export >> export Movie (or control-alt-shift-S). Then in the drop-box you select "GIF Sequence (*.gif)"... and follow the prompts
|
![]() |
|
| Ratio | Apr 15 2005, 08:53 PM Post #10 |
|
Brackenwood Heavyweight
|
**Error** Scene=Scene 1, layer=Layer 5, frame=1:Line 1: Statement must appear within on/onClipEvent handler x = 0; **Error** Scene=Scene 1, layer=Layer 5, frame=1:Line 3: Statement must appear within on/onClipEvent handler _root.onEnterFrame = function() { Total ActionScript Errors: 2 Reported Errors: 2 what did i do wrong? |
![]() |
|
| Vector | Apr 15 2005, 09:06 PM Post #11 |
|
Resident Actionscript Guru ♂
![]()
|
You put it on a movieclip. What you have to do is put the code on a frame, that is, select the frame that you're on in the timeline (up the top), THEN press F9. when you paste the code in, a little "a" should appear in that frame in the timeline.
eg: ![]() (thankyou www.macromedia.com )The third layer down, "actions", on the first frame, there is the little "a". You need to click on the frame 1 box and open up the actionscript window and paste it in there.
|
![]() |
|
| Ratio | Apr 15 2005, 09:25 PM Post #12 |
|
Brackenwood Heavyweight
|
im sorry, its still not working, no error report, its just not working. the moive is playing as if there's no action script at all, just one splash, in the middle constantly looping. |
![]() |
|
| Vector | Apr 15 2005, 10:12 PM Post #13 |
|
Resident Actionscript Guru ♂
![]()
|
That's my bad... I tested it and found the prob. Where it says _root.attachMovieClip, it should actually be _root.attachMovie Sorry about that. |
![]() |
|
| Ratio | Apr 16 2005, 12:06 AM Post #14 |
|
Brackenwood Heavyweight
|
im sorry vector, its still not working here's the fla if you want to look at it |
![]() |
|
| Vector | Apr 16 2005, 12:29 AM Post #15 |
|
Resident Actionscript Guru ♂
![]()
|
Here it is, the main problem was in the right-click >> linkage, you actually typed "mcSplash" with the talking marks
sorry, I should've explained it better real copy attached.
|
![]() |
|
| Ratio | Apr 16 2005, 12:45 AM Post #16 |
|
Brackenwood Heavyweight
|
SCORE! thank you very much! |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Actionscript · Next Topic » |










12:31 AM Jul 12