do you mean:
[AS]
onClipEvent(enterFrame) {
gotoAndPlay(20);
}
[/AS]
?
Yoi misunderstood, I was probably too vagueâŚ
I have a MC, now, I want it to trigger my visibleTrue function (that makes my butons visible) on the frame 20
-> MC plays -> hits frame 30 -> calls visibleTrue()
I believe this should clarify things, thx for the reply anyway
Hopefully I understood you better this time. Perhaps it could be something like this:
[AS]
onClipEvent(enterFrame) {
if (this._currentframe == 20) {
visibleTrue();
delete.this.onEnterFrame;
}
}
[/AS]
Code not tested, and beware, Iâm not an expert
oh nmâŚwhat sintax said.
if (this._currentframe == 20) { is right, but delete.this.onEnterFrame; wont work for onClipEvent(enterFrame) events (onEnterFrame and onClipEvent(enterFrame) are two completely different processes).
It probably wont do any harm to leave an onClipEvent(enterFrame) running so long as it only has that simple if statement in it for frame 20. Otherwise use the onEnterFrame option
clipName.onEnterFrame = function() {
if (this._currentframe == 20) {
visibleTrue();
delete.this.onEnterFrame;
}
}
Of course the best solution would be just to put a call in frame 20 of the clip if possible
Good you mention it Didnât knew that But now I doâŚ
That was my first try, but it didnât workâŚ
will try this
thanks people
khmmmâŚ
where exactly do I put this piece of code.
BTW -> error -> one â.â too much (dunno why), donât really understand why you delete whatever you are deleting?
You can just use this code:
[AS]onClipEvent(enterFrame) {
if (this._currentframe == 20) {
visibleTrue();
}
}
[/AS]
Put it on the movieClip you want to control with itâŚ
oh yeah, the delete should have a space after it, not a . - typo
delete this.onEnterFrame;
Nope, just wonât doâŚ
I donât know why, Iâve put several frames, just wont call it, the function works when i call it from any button or from the main timeline directlyâŚ
Iâve jut tried putting a marker so it only runs once and the trace comes out clean just after the function call, but it doesnt go into the function (I have a trace there too)âŚ
It just wonât CALL IT! The call executes but it seems to do nothing. Iâve double checked the names, donât know what else there isâŚ
[AS]
onClipEvent(enterFrame) {
if (this._currentframe == 20) {
_root.visibleTrue();
}
}
[/AS]
Perhaps if you use my code, add the â_rootâ element?
Senoculars code should work perfectly i guessâŚ
[AS]
clipName.onEnterFrame = function() {
if (this._currentframe == 20) {
visibleTrue();
delete this.onEnterFrame;
}
}
[/AS]
Ok that solve d the getting into the function (I thought functions could be called from whereverâŚ) -> thanks
BUT it doesnât solve the problem, it gets into the function but does not execute it, let me show you some codeâŚ
[AS]
//first frame
//this is just so the call of the fuction doesnât repeat
_root.globalMarker = 1;
//UNvisible
function visibleFalse() {
logo_mc._visible = logo._visible = false;
stat_mc._visible = stat._visible = false;
vector_mc._visible = vector._visible = false;
flash_mc._visible = flash._visible = false;
play_mc._visible = play1._visible = false;
pack_mc._visible = pack._visible = false;
interface_mc._visible = interface1._visible = false;
graphic_mc._visible = graphic._visible = false;
web_mc._visible = web._visible = false;
other_mc._visible = other._visible = false;
}
//making it unvisible at start
visibleFalse();
//visible
function visibleTrue() {
logo_mc._visible = logo._visible = true;
stat_mc._visible = stat._visible = true;
vector_mc._visible = vector._visible = true;
flash_mc._visible = flash._visible = true;
play_mc._visible = play1._visible = true;
pack_mc._visible = pack._visible = true;
interface_mc._visible = interface1._visible = true;
graphic_mc._visible = graphic._visible = true;
web_mc._visible = web._visible = true;
other_mc._visible = other._visible = true;
trace(âidâ);
}
[/AS]
and on the clip
[AS]
onClipEvent(enterFrame) {
if (this._currentframe == 20) {
if(_root.globalMarker == 1){
_root.visibleTrue();
_root.globalMarker = 0;
}
}
}
[/AS]
PS: I SUCK
Shouldnât this be
[AS]
if(_root.globalMarker == 1) {
[/AS]
Or is this glM another variable?
Yes sorry, it isnât in the code Iâve renamed all the glM to globalMarker so you would understand easier, sorry about that -> its not an error, Iâll edit it so it doesnât cause any more confusion
Whatâs with that âlogo_mc._visible = logo._visible = true;â, the instance names âlogo_mcâ and âlogoâ?
Maybe youâll need to change it to:
[AS]
logo_mc._visible = true;
[/AS]
I just donât get the point :h:
Ok I see Iâm confusing everyone (because of the lack of knowlegle probably)âŚ
could you look up the FLA, Iâve simplified it, removed everything but the problem itself -> thanks
cheers
Iâve taken a look at your fla, but I still canât quite figure out what the purpose is. Can you briefly explain (again?) whatâs not working, and what should be changed so it worksâŚ
First of all thanks for helping me out! I know Iâm a pain in the ***
Here goes:
-Iâve created some obviously too complex navigation for my site
-I have a button for the portfolio which has two types of animation (2 seperate masked MCs) one is for rollOver & rollOut and the other is for press
-the one for press is what bugs me, it âdrops downâ from the button (this is the second masked MC)
-apart from this I have buttons positioned where the MC scrolls down which are not visible (_visible = false)
->I want to enable those buttons when my animation completes, when that âdrop-downâ (masked MC)
competes (on frame 20), I want to call a function that enables those buttonsâŚ
Does this clarify? If you donât understand something please say (my english isnât that good, that is probably the biggest problem)
cheers
Dude, this is hard
I want to enable those buttons when my animation completes, when that âdrop-downâ (masked MC) competes (on frame 20), I want to call a function that enables those buttonsâŚ
So, can you name me the instance name of the movieClip where you want the function to enable those buttons on frame 20. Is it the âF_underâ instance?
Itâs quite difficult to figure out your code, but Iâm gonna try and help you here, so bare with me