Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

action script for recognizing opened mc's 3

Status
Not open for further replies.

disfasia

Programmer
Apr 20, 2001
378
0
0
CA
I have composed a site with two mc's: one is the menue with buttons, the other are the indivual minipages that these buttons call up. they unscroll and rescroll the windows.

You can see this at
I have made invisible buttons which call the scrolling up for each button, but if you notice it makes the site a bit jumpy at times.

What I would like to do is dump the scroll up button and incorporate this in the button itself so that on rollout the scroll up mc keyframe will be called up, but I can only do this wil a variable or if statement in which each button, before scrolling out its page will first scroll up any other open button. How can I do this?

Thanks in advance.

Also, how do I give people stars here? I have no idea how this system works.... : ) Sorry...
 
I have a site with buttons that are animated...so when you pass over one the name comes and goes...the problem i am having is how to make this not turn off quickly should one pass over the buttons very quickly..

Thanks again in advance!

the site is at:
the .fla is at the
 
Got an idea for your second problem.... the first question I don't understand...


In a new movie clip, create the standard appearance of the button (draw a square, graphics, animation, whatever). DO NOT convert this to a button.


Assign a stop() action to frame 1. On the second frame of this MC create the appearance of the button on mouse over. Again, insert a stop() action on this frame.

Now add frames to the movie in the amount of time you want the mouseOver appearance to remain, (Eg: if you want a 1 second pause before it returns to normal, and your movie moves at 12fps, move over 11 frames and add a new keyframe). Assign a gotoAndStop(1) action to this keyframe.

Add a new layer above your graphic, and create an invisible button. Assign actions to this button like so:

on (rollOver) {
gotoAndStop(2);
}
on (rollOut) {
play();
}


If ya have problems... let me know and I'll build you a sample file...
The Jhereg
=~=~=~=~=~=~=~=~=~=~
I never lie.
I'm building a reputation for honesty so I can blow it when something big comes along... This ain't it.
 
The link to the .fla is a dead one!

Regards,
wink4.gif
ldnewbie
 
Sorry about that, idnewbie, I forgot to add the .fla part to it...it should work now...

regards.
 
To the Jerheg,

Thanks for your advice. It is very late here (italy), so I will work on this tomorrow. I was actually thinking that the solution might be to load the button on a separate level (but I don't know how to do that either)...

I will get back to you tomorrow if I get stuck...

Regars
 
I have put the site up (at the address above) but there is still a problem that is driving me a bit nuts: the music on the preload does not load with the preload! The .fla is at the above .fla address.

I would be grateful as to any leads on this! I have tried doing a prepreload but it makes the site cumbersome...is there a command that will start the music WITH the preload...

thanks again all!
 
I just noticed a second problem: when i pass over a button, the name shows...fine. But then i pass over it again (without passing over another one first) and it does not show. Why is this?

Thanks again all!
 
disfasia,

I'm not sure why the button's aren't behaving correctly for you. I've constructed a mockup of what I explained above if you'd like me to email you with it. Just drop me a line at willwork4java@aol.com... I'm stuck on AOL here, but will upload both the fla and SWF to you, if you would like.

I'll take a look at your FLA as well, see if I can see what's up.

The Jhereg
=~=~=~=~=~=~=~=~=~=~
I never lie.
I'm building a reputation for honesty so I can blow it when something big comes along... This ain't it.
 
The Jhereg,

I have written you twice to the email address above regarding this problem, but perhaps it is not the correct address?

I am still unable to resolve this button problem at
and the fla at:

I would greatly appreciate any assistance in this as I have no way of 'fixing' these buttons!

Regards,

disfasia
 
What about the different sound movies that load one on top of the other... A bit cacophonous at one point!

Regards,
wink4.gif
ldnewbie
 
well, i had to keep the levels separate on that because I have an action script for the various tracts:

on (press) {
_level#.gotoAndPlay(2);
}
 
So?
That doesn't mean that problem can't be worked out!

Regards,
wink4.gif
ldnewbie
 
I didn't notice until now but the end of my previous post was cut off.

I had gone on to ask what can be done, because I do not know how to load the sound if I load the sound on all the same level?

In short, I do not know how to fix this 'problem'...nor the one I mention above with the buttons that fail to work properly (though they are scripted perfectly?)...

Regards,
 
Okay, I'm coming late to this party so you might be past this point (it's hard to tell from the posts).

Here's a quick buttons/menu deal that (I think) does what you want with rollOver/rollOut etc. Rather than using the buttons to set actions going I'm just using them to set a variable to true or false which is then used elsewhere to start the menu items going.


Source is here...

 
Thats kool wangbar (and it uses the same loop thing we were using) Regards

Big Dave

davidbyng@hotmail.com


** If I am wrong I am sorry, but i'm only trying to help!! **

 
As I've said before, all your scripting is peculiar, not to say a bit messy.
For your titles not re-appearing on a second rollover for example, you shoud change the following:

In the ascolta mc:
First, since you don't have a stop action, you don't need to have a play action on the first frame. You can take that out.
Second, change the action on the last frame from stop();
to gotoAndStop(1); thus preparing the clip for it's next play on another rollover.
Third, set the instance name of your ascolta mc to ascolta, and change your script on the button that calls it to:
on (release) {
gotoAndStop (6);
}
on (rollOver) {
gotoAndStop (7);
ascolta.play();
}
on (release) {
_root.mc1.gotoAndStop(32);
}

You should do the same on all your title mcs and button scripts!

Now, it should work! But as I've also said previously, since your ascolta tween is pretty long, this won't work on a quick rolloff and another quick rollover. For it to work on quick moves like those, you would have to use a control mc, that would play the ascolta clip in reverse. That's another story!

As for your sound problem... I'm workin' on it!

Regards,
wink4.gif
ldnewbie
 
Thanks to wangbar and idnewbie....I will get to work on this and get back to you....

Regards,
 
Wang, don't think this would solve Dis' problem!
Have you had a look at his .fla?
As I've said already... peculiar scripting to say the least!

On top of which, your are in fact using eval!

Regards,
wink4.gif
ldnewbie
 
If you want to play a movie clip backwards :

faq250-1292 Regards

Big Dave

davidbyng@hotmail.com


** If I am wrong I am sorry, but i'm only trying to help!! **

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top