Question about buttons: Animation after "Rolloff"?


#3

Hmm, by labels do you mean the name that you gave the Symbol when you made it either a Button or MovieClip? See what I really don’t understand is the whole hierarchy of the animation… I wish Flash would have some sort of window that shows a tree of all the elements of the comp… :shrug:
I’ll try to have a look around some more regarding this, and anymore help is very appreciated, thanks!

Carl :beer:


#4

The film explorer is the thing you’re looking for. It is hidden in the same window like the Action Script stuff, just another tab of it. Labels… heck… I believe are created by giving sequences a name. I’m sorry, haven’t done that for at least over a year…


#5

Ah, yes, of course! The movie explorer. Had totally forgotten about it, I actually stubled across it yesterday briefly and just thought it was like the library, listing all the components and things like that. I had no idea it did so in a hierarchal manner. Thats great, thanks a lot!

Carl :beer:


#6

Hum… you know what?
It’s hard to explain something even though we’re using the same application - mine is in German, the menus hav different names, so the functions… :annoyed: There should be something like a sticky thread which visually explains the original English version with all its functions to get an idea of the original names.

Worst thing to me is After Effects. I have some troubles doing tutorials on that, because I installed the German version. Next time better in English… :hmm:


#7

this has to be quick because i’m almost out the door, i can give you a brief overview of the code but no actual code at the moment.

basically what you can do is create an animation that is say 15 frames long, where the “in” animated state of the button is from 1-7 and the “out” state is from 9-15, with frame 8 being your static in-between frame. check the current frame when the user rolls off, then subtract that from the total frames (or something to that effect).

for example, if you’re on frame 5 and roll out, totalFrames (15) - currentFrame (5) = 10 so the movie jumps to frame 10, which is the exact same image as frame 5 but its animating out instead of animating in. make sense? you’ll have to do some checking to figure out the syntax but it does work. hope that helps.

chris


#8

sorry off topic here, but fig were you the guy who used to roam the were-here.com boards ??? If so what happened to the site ???


#9

Sorry fig, I don’t mean to be rude or something like that, but I think your approach is a little bit less flexible and also more complicated. Labeling the frames which have to be played, would be way easier.
Anyway, Carl, I could send you the flash file I’ve done. It’s the menu of my company’s former web site and the buttons are in German, but I don’t think that this could distract you from the used technique… :slight_smile:


#10

Ok, you can either send it by email "carl@kaischaller.com" or send it to me through an IM at "dj_uvedoble@hotmail.com".
Thanks a lot!

Carl :beer:


#11

Okay! I sent it to your email address :beer:


#12

samartin, yup, that would be me, i was a mod at WH. to be honest i don’t know what happened, they’d been down for a bit and they were back up and then poof no more WH. sorry i can’t be more help.

tommi, no offense taken but i’m not quite follow why its complicated, its just a single mc and a line or two of code instead of having several layered things to mess with. can you elaborate? i’ll throw together an FLA and let you guys check it out to see what i mean.

chris


#13

and here’s that quick example if you want to download and check it out.

chris


#14

That sure looks interesting also. Thanks fig! I guess theres no difference between the two methods you and Tommi proposed as the results seem to be the same. I will however study them both carefully as I’m sure that I’ll find something useful or learn something form both cases :thumbsup:

Anyhoo, Fig, if you don’t mind I’d like to say what I think the actions are doing just so you can possibly correct me if I’m wrong about whats going on in the scene…
After creating the movieclip with all its stop frames and actions, etc… you tell it to play when mouse rolls over it, and it basically stops at the frame containing the stop action, which is where the animated OVER state finishes. Then, for RollOver action you’re telling the clip to coninue on playing the rest of the clip, although as theres a Stop(); action on the current frame, you tell it to play all frames except the one you’re on: this.gotoAndPlay(_totalframes-_currentframe);

Thats what I’ve understood anyway… Thanks for the help and I hope it hasn’t been too much trouble!

Carl :beer:


#15

Originally posted by fig
[B]samartin, yup, that would be me, i was a mod at WH. to be honest i don’t know what happened, they’d been down for a bit and they were back up and then poof no more WH. sorry i can’t be more help.

tommi, no offense taken but i’m not quite follow why its complicated, its just a single mc and a line or two of code instead of having several layered things to mess with. can you elaborate? i’ll throw together an FLA and let you guys check it out to see what i mean.

chris [/B]

:slight_smile: Well, that was the programmer in me who wants everything to be dynamic and changeable and stuff… As far as I understood you, you’re addressing the frames directly. So after changing the animation in length you also would have to change the frame references in the script. I hope I didn’t get that wrong… the only thing I’d make different is labeling the sequences I want to address…


#16

Well, I’d like to share with you all the result of what I’ve learned from thi thread :slight_smile: In the end, I used a mix of both Fig and Tommi’s code to make a new way of handling this situation.
The scene is 100k and its 4 buttons each representing the elements of HipHop culture, take a look here. Its for a website thats in the works right now

Again thanks to everyone for sharing their knowledge!

Carl :beer:

EDIT/PS: you might notice the 4th logo sends the white ring off frame, I’m gonna fix that, don’t worry :wink: Btw, I’m deciding on the button styles now, in the long run, they’ll all have the same text style.


#17

ah, gotcha tommi, and actually that’s not the case (i may have misstated what i meant). the actual code is something to the effect of (on the button/mc):

on(rollOver) {
	this.play();
}
on(rollOut, dragOut) {
	this.gotoAndPlay(_totalframes-_currentframe);
}

so it actually is totally portable, the only thing you’re required to do is keep a central frame around which your animation is mirrored (for animating the clip in and out at the same points). whatever the case, glad to help carl and glad you got it figured out :thumbsup:

chris


#18

Aaah I see… :smiley:


#19

To change topic now, does anyone here know the code to opening up Outlook from flash with the appropriate window displaying a certain email address? I know this possible as I’ve seen pages that use this function but what about the code?

Carl :beer:


#20

if you mean just popping a new e-mail window that’ll mail to a certain address try

on (release) {
    getURL("mailto:me@here.com");
    }

should work, tho outlook won’t pop a new window if you’re testing it in flash, you’ll need to test it in a browser window to see that.

chris


#21

Originally posted by fig
should work, tho outlook won’t pop a new window if you’re testing it in flash, you’ll need to test it in a browser window to see that.

Ah, ok, no problem then… see I always thought that these sort of things worked in flash tests too. Come to think of it, I haven’t tried this since I started testing HTML links from inside flash, my bad :hmm:
Thanks again!

Carl :beer:


#22

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.