HOME | DD

face-the-llama — Flash tut.: Snow globe effect

Published: 2006-03-02 04:43:10 +0000 UTC; Views: 10607; Favourites: 58; Downloads: 740
Redirect to original
Description Okay, this is a tutorial for the "Snow Globe Effect." Except I used flowers (how to get that flower is also included for incase you don't know)

you need to full view to see it, and at the beginning is an example of the snow globe effect.

Okie, now.. if you try this, and it works well for you... hehe, give me a score, one to five on how understandable it is, because I'm going to be teaching a little bit of beginner actionscript to a class that hasn't been introduced to it yet, so I need the feed back and it would be much appresheated.

THANKYOU!!!!


Edit:
this code goes on the flower:

onClipEvent (load) {

change = Math.random()*2+1;

scale = Math.random();

randomposneg = Math.random();

this._x = Math.random()*280;

this._y = Math.random()*280;

this._xscale = scale*200+15;

this._yscale = scale*200+15;

if (randomposneg<.5) {

posneg = -1;

} else {

posneg = 1;

}

}

onClipEvent (enterFrame) {

if (this._y>=450) {

change = Math.random()*2+1;

this._y = -60;

} else {

this._y = this._y+change*this._width*this._width/2500;

this._rotation = this._rotation+posneg*change;

}

}








This code goes on the action layer:


for (i=0;i<=15;i++) {

duplicateMovieClip(objectC_mc, "objectC"+i, 6*i+1);

duplicateMovieClip(objectD_mc, "objectD"+i, 6*i+3);

duplicateMovieClip(objectE_mc, "objectE"+i, 6*i+4);

duplicateMovieClip(objectF_mc, "objectF"+i, 6*i+5);

};






(if you want to add more, Copy one line of the code avove (one that starts with duplicatemovieclip) and change the letter after both "object" 's (both changes must have the same letter) and change the number at the end to a new number.

Bad Llama Productions 2006
Related content
Comments: 42

Ayco83 [2010-01-26 11:05:48 +0000 UTC]

Huhh.. It doesnt work for me theres no properity button anywhere.

👍: 0 ⏩: 0

Ayco83 [2010-01-22 03:47:26 +0000 UTC]

Ughh i'm so stuck on number 3. Is this for Adobe?

👍: 0 ⏩: 0

Morelwen [2008-01-29 10:08:51 +0000 UTC]

Finally got around to trying this out and the objects end up huge, some are the right size, but other are more than 8x the original size, any suggestion on how I might fix that?

👍: 0 ⏩: 1

face-the-llama In reply to Morelwen [2008-01-29 23:53:11 +0000 UTC]

mmm I think that would be a code issue. are they really cluttered? if not, just shrink the movie clip.

👍: 0 ⏩: 1

Morelwen In reply to face-the-llama [2008-01-30 01:09:31 +0000 UTC]

extremly cluttered, some are the right size, but many are huge, like boulders

👍: 0 ⏩: 1

Tsukassa05 In reply to Morelwen [2009-05-08 01:47:45 +0000 UTC]

Yeah, I've been having the same problem... Everything seems to be coded right, though. :/

👍: 0 ⏩: 1

Morelwen In reply to Tsukassa05 [2009-05-08 14:15:08 +0000 UTC]

I actually deleted all the code and entered it again and it fixed itself, are you trying to simulate snow? (because I actually know of some better code for that)

👍: 0 ⏩: 1

Tsukassa05 In reply to Morelwen [2009-06-05 06:09:47 +0000 UTC]

Oh. Yes actually. The project I'm working on is done with. (they liked the 'snow' anyhow) But I'd love to get that for future reference.

👍: 0 ⏩: 1

Morelwen In reply to Tsukassa05 [2009-06-05 10:22:16 +0000 UTC]

It's actionscript is broken down and easy to adjust and customize, great for a beginner (like me) to get a grasp of [link]

👍: 0 ⏩: 1

Tsukassa05 In reply to Morelwen [2009-06-11 03:21:22 +0000 UTC]

Sweet! Thanks a bunch! ^_^

👍: 0 ⏩: 1

Morelwen In reply to Tsukassa05 [2009-06-11 15:24:40 +0000 UTC]

I also got another interesting bit of code I found the other day that reminded me of the snow globe flowers: [link] the artist gave me the code in the comments.

👍: 0 ⏩: 1

Tsukassa05 In reply to Morelwen [2009-06-15 19:49:46 +0000 UTC]

Oh. Danke! You've been so terribly helpful. Thanks! ^_^

👍: 0 ⏩: 1

Morelwen In reply to Tsukassa05 [2009-06-15 20:49:52 +0000 UTC]

No problem, glad to share
Considering you helped me so much with this snowglobe

👍: 0 ⏩: 1

Tsukassa05 In reply to Morelwen [2009-06-16 06:27:26 +0000 UTC]

lol how did I help?

👍: 0 ⏩: 0

Morelwen [2008-01-17 21:43:01 +0000 UTC]

Looks very cool, I kinda wanna try it out I'll have to figure out actionscript for buttons first though :/

👍: 0 ⏩: 1

face-the-llama In reply to Morelwen [2008-01-23 17:19:27 +0000 UTC]

make it a button.. if you need, write the words "next" or "previous" of "back" etc. select all that you want to be the button and f8, select button. then click on the button to select it, and go to it's action script area.

I'm at school, so I can't test the code, but it's an easy search if you look up something like "Actionscript button next frame"

next:

on(release){
_root.gotoAndStop(_root._currentframe++)
}


And previous, I would assume is:


on(release){
_root.gotoAndStop(_root._currentframe--)
}

notice the -- vs the ++ that changes it. There are so many ways to do this one though.
make sure you put a stop(); on each frame you want to stop on, or else it will continue to play as normal.

see if those codes work, if not, just google it.

👍: 0 ⏩: 1

Morelwen In reply to face-the-llama [2008-01-23 21:45:04 +0000 UTC]

thanks!

👍: 0 ⏩: 0

fullnarusader [2007-12-24 16:40:18 +0000 UTC]

I know this isn't what the tutorial is on, but how do you do the NEXT and PREVIOUS buttons? D:

👍: 0 ⏩: 1

face-the-llama In reply to fullnarusader [2008-01-23 17:18:00 +0000 UTC]

oooo I"m at school right now. lemi think... you make the picture. make it a button.. if you need, write the words "next" or "previous" of "back" etc. select all that you want to be the button and f8, select button. then click on the button to select it, and go to it's action script area.

going to be something like.. onClick next frame... one sec. it's an easy google search if you look up, for example, "Actionscript button next frame"

next:

on(release){
_root.gotoAndStop(_root._currentframe++)
}


And previous, I would assume is:


on(release){
_root.gotoAndStop(_root._currentframe--)
}

notice the minus signs. There are so many ways to do this one though.
make sure you put a stop(); on each frame you want to stop on, or else it will continue to play as normal.

see if those codes work, if not, just google it.

👍: 0 ⏩: 1

fullnarusader In reply to face-the-llama [2008-01-23 23:23:32 +0000 UTC]

...............
I did that and google'd it, and they're correct. But I have a problem. I have the symbol selected, but whenever I go into Actionscript, it says 'current selection cannot have actions applied to it.' I don't know why it's not working.... Doesn't mention this problem on any of the sites I found.... I was wondering if you knew why it's saying that.

👍: 0 ⏩: 1

face-the-llama In reply to fullnarusader [2008-01-29 23:53:52 +0000 UTC]

are you sure its a movie clip? sounds like you're working on a graphic

👍: 0 ⏩: 0

x-missworld-x [2007-05-23 08:52:03 +0000 UTC]

thanks ^_^

👍: 0 ⏩: 1

face-the-llama In reply to x-missworld-x [2007-06-01 00:12:53 +0000 UTC]

no prob!

thank you too

👍: 0 ⏩: 0

felipe-olguera-jr [2006-11-14 05:19:51 +0000 UTC]

wow! love it!

👍: 0 ⏩: 1

face-the-llama In reply to felipe-olguera-jr [2006-12-10 08:32:25 +0000 UTC]

THANK YA!

👍: 0 ⏩: 0

magikwolf [2006-05-23 22:24:27 +0000 UTC]

I did he tutorial but it didn't totally work. It only worked for my last image(I did a drawing with paintbush) layer while nothing happened to the rest of the image layers. I double checked if I copied the codes correctly and I did use the edited codes. So, why did this happen...what should I do?

👍: 0 ⏩: 1

face-the-llama In reply to magikwolf [2006-05-23 23:57:36 +0000 UTC]

okie dokie, one sec...

Check these

1. all of the objects are seporate movie clips, inside the same movie clip? (does that confuse?)
2. The big code is the one used on the objects, and the little one is on the action layer
3. The instance names only have the object letter capitalized (sounds like the problem might be with the instance names)
4. The instance names are all spelt correctly


you can send your .fla file to me if you want, and I'll check it over

face.the.llama@gmail.com

👍: 0 ⏩: 0

caffeineoverdose [2006-04-06 06:54:46 +0000 UTC]

Really great tutorial. Thank you for sharing this nice bit with us.

One question. The random side to side swaying isn't working for me, and I don't see any code that looks like it would have anything to do with it. Did you include that swaying in the tutorial code, or is that a special way of setting the registration points?

👍: 0 ⏩: 1

face-the-llama In reply to caffeineoverdose [2006-04-07 18:00:16 +0000 UTC]

I wonder if you got the entire code.. .cause it doesn't fit all the way on the screen, you need to right click, select all and copy.. I'll put the codes in my discription for you.

There is nothing in the tutorial about the swaying, it's in the code. one sec and I'll put it in for you

👍: 0 ⏩: 1

caffeineoverdose In reply to face-the-llama [2006-04-07 20:48:52 +0000 UTC]

Sorry about that. I got it all the first time. It's just that by default the registration point of my movie clips is centered. If you offset it a little it gives the swaying effect.

Once again excellent tutorial. I had an idea while I was drilling this into my memory that you might like. I'm not a pro or anything, but what about using the Stage.width and Stage.height variables in some places so that it automatically works for all stage sizes? Like:

_x = Math.random()*Stage.width;
_y = Math.random()*Stage.height;
if (_y>Stage.height+60) {
_y=-60
} else {
_y+=change*_width*_width/2500;
_rotation+osneg*change;
}

Stuff like that *shrug*. Just an idea.

👍: 0 ⏩: 1

face-the-llama In reply to caffeineoverdose [2006-04-08 06:39:08 +0000 UTC]

there's a thought, I didn't know you could do that but, would that cause it so that the flowers don't go off screen? because the flowers (or snow) would look more as they should, if they sway on and off screen too

thank you, I've never heard of that before (I'm no pro either :-P )

👍: 0 ⏩: 1

caffeineoverdose In reply to face-the-llama [2006-04-10 00:47:56 +0000 UTC]

Well, they wouldn't go all the way off the screen, but that's why you could do Stage.width+100 and Stage.height+100 or whatever. The only problem I guess that could cause is that if you were you resize the stage when testing your movie, the new measurements instantly kick in, but I think that's it really.

👍: 0 ⏩: 1

face-the-llama In reply to caffeineoverdose [2006-04-13 00:51:42 +0000 UTC]

ahhh I see, thank you

👍: 0 ⏩: 0

K-ny [2006-03-04 13:23:26 +0000 UTC]

Very interesting tut ^^

👍: 0 ⏩: 1

face-the-llama In reply to K-ny [2006-03-04 22:25:00 +0000 UTC]

i hope interesting in a good way :-p thank you for the +fave!

👍: 0 ⏩: 1

K-ny In reply to face-the-llama [2006-03-05 11:10:53 +0000 UTC]

👍: 0 ⏩: 0

Daniel-Hunt [2006-03-04 00:34:43 +0000 UTC]

Wow, that's great. I've been trying to do that effect in one of my movies for a while now.

👍: 0 ⏩: 1

face-the-llama In reply to Daniel-Hunt [2006-03-04 00:52:04 +0000 UTC]

heheh

thank you! and for the fave


ohhh... for your tutorial.. you say to make the loading animation or sum such.. so I just made a random animation.. no specific lengh, it was 3 frames, and a smilie changing mouth positions.. and evedently, it didn't work hehe, so maybe clearify that for future readers of your preloader :-D

👍: 0 ⏩: 0

sepia-tenshi [2006-03-02 04:45:33 +0000 UTC]

im gonna need this later, I just got a flash 8 program and i have no clue how to use it

👍: 0 ⏩: 1

face-the-llama In reply to sepia-tenshi [2006-03-02 04:52:04 +0000 UTC]

Ahh, hehe thank you

I'm glad that you got flash, and flash 8 is much nicer then MX 2004

If you need help at all, I would be plenty glad to do so, but there are so many tutorials out there, that you probably wouldn't need me at all, hehe, but anyways, if you ever need.

👍: 0 ⏩: 1

sepia-tenshi In reply to face-the-llama [2006-03-02 05:59:46 +0000 UTC]

well I cant find any for flash 8, its totally differant than the older versions...so this will be hard to learn

👍: 0 ⏩: 1

face-the-llama In reply to sepia-tenshi [2006-03-02 06:50:51 +0000 UTC]

hmm really? older version tutorials should get you started, but there are Flash 8 Tutorials in Flashkit.com, you have to go to the navagator box thing, and click tutorials. It's a decent site, but do check the user ratings, some don't work, so they have a lower rating.

Are you new to flash, or just flash 8?
there isn't tooo much different between MX 2004 and 8, that I have noticed.. but yeah.. if you need help you can ask, and I'll try to make a tutorial for it

bye bye!

-Aber

👍: 0 ⏩: 0