Variables for closing animation help

Hey.

Firstly i have designed a panel in my website , where behind the panel is a external movie, now every time a button is selected i would like the panel to have a closing animation then load the external movie relating to the button selected and then have the open animition which i know how to do (by just placing the animation after the preloader on the external ).

What i dnt know is how to make the closing animation work, I have been told that the best way to do this is Variables. I know some actionscripting but havent really touched variables other than some scrolling text.

Would anyone do me a big favour and show me how to use variables in this way, it would be much appreciated, thanx

you have a panel, and when you press a button, the content of the panel changes and you want a closing animation following the transition of the contents, right?

My advice is to place this closing animation on every content movie that could be loaded, or, you can do like that:

1 - create this closing animation in a separated movie, with a stop action on the first frame;

3 - load it on you main movie on a high level (let´s say level10.), this way the panel´s contents must be loaded on a lower level (let´s say level9);

3 - on every button you place this action on the on (press) handler:

_level10.play();

[SIZE=1]Ps: see attached file.[/SIZE]

[SIZE=1]Ps2: If you really want to do this with variables I help you, but is more complicated.[/SIZE]

Hope it helps.:slight_smile:

=)

Hey thanx dude for your idea, but ive already tried that, the bad thing about that is that when i have a external closing animation and i call it when i press a button, the closing animation will never open, so i press the button , and the button tells to load the closing animation external and load profile.swf (a section of my site). so it closes and underneath the other external has loaded but you cant c it due to the closing animation is on a higher level and its closed, so yes please tell me how to do it with variables because i think thats the only way for this particular animation.

…so if could post your .FLAs here it would be easier for me to understand the situation, and help you better.

=)

Hey this is a mock up of what i have, it not the actual file, but the idea is there, the main.swf is the ‘main one’ so when u open that you will c that there is 3 buttons , each openin a external movie, with a opening animation, what i would like is that when u click on the buttons to have it so that if it is open, the panel closes and loads the selected external movie, hope you understand.

Let me see this…

=)

Execute the main.swf, click on the first button then click on the second.

Is that it?

=)

thanx for the try, but its kinda what i want , well the closing animation is right relating to this animation, but i rather it closing, preload then opening, they both happen 2 quick and almost at the same time, like i said this is a majorly simplified version of my site, i dnt really want to give out my site fla’s , i hope you understand that.

I just want to learn how to use variables in this way, it dosent really matter for what animation it is for right now, i really just want to learn the method in creating a closing and opening animation using variables for use with external movies.

if you could help me with that it will be great.

thanx again

**i dnt really want to give out my site fla’s **

Sure I understand, not agree but understand.:slight_smile:

if you could help me with that it will be great.

Sure I will!

=)

Read the codes man. try to understand them, if you can´t I help you out. It´s important that you LEARN, this variables thang is so helpfull and usefull…

Any doubts, I´m her for ya.

=)

Is that it? The problem was solved?

=)

yeah thanx, thats what i was after, A little different than what i ve seen before,

ive been going through

’ {F5} a true challenge : who can help me to get this script working?’ thread by “ericinho” in Flash actionscripting

and he has some fla’s based on the same topic but he had layed them out differently, have a look there , iam curious if you can help him out on his code, cause no one is helping him out.

he used target for his externals, and sets up a variable field in the main movie and then has two layers contents and cover, where the cover has the closing and opening animation, and the code to bring in the external movie, and then the external movies have code calling for the preloader which also is in the _root.cover
and its based like that, seeing that one and the one you gave me gives me a better understanding of the topic, so its all good for me, try and help him out.

one question though, you have a section 0, why is this empty and just has the if statement code while the other sections (eg 1, 2) have the animation and code, is there for a reason?

About the “true challenge…” topic: The way that ericinho had layed out his project has so many tecnical errors (for example, the close/open animation on cover layer wll stay bellow any movie loaded, cause the main movie stays on level0.) that to make this possible is to change almost everything. The idea is good but the execution has to be re-planned. when I got some time I´ll try to help him out, cause this is going to take a while.

About this topic: the section0 is there to make the first load of the other movies.
Did you read all the codes in all the files? Did you get it? That´s whatis important.

=)

lol

oh yes please, do help me :slight_smile:

I´ll meet you guys there ok?

=)

posted in the ‘true challenge’ thread to you Guig0 :slight_smile: