View Full Version : mx infinite menu
blah-de-blah
December 12th, 2002, 07:13 AM
ive made the inifnite menu, and i wanetd to change it a little...
i was wondering if you could make it continuosly move to the left even if your mouse wasn't on it, but it still having the change in direction once your mouse rolls over it...get it? anywayz thx for your help
Dravos
December 13th, 2002, 05:01 AM
have a direction string
ie direction=""
when mouseover left side set direction="left"
when mouseover right side set direction="right"
then do an
onClipEvent(enterFrame)
{
if(direction=="left")
{
object._x-=10;
}
else if(direction=="right")
{
object._x+=10;
}
}
blah-de-blah
December 13th, 2002, 09:02 AM
i'm not too sure how to do that :-\
direction = left, right
left = _xmouse<225
right = _xmouse>225
is it something like that? i'm not too great at this so if its wrong plz ignore it and tell me how it could be done...thx
pom
December 13th, 2002, 10:08 AM
I don't understand what you're trying to do :-\ Do you have an example?
blah-de-blah
December 13th, 2002, 07:43 PM
i have an fla attatched here i think if it works properly...and right now its just moving at a constant speed towards the right...
but i'm trying to make it move to the left when your mouse goes to the left....and to the right when your mouse goes to the right, just like on the infinite menu
it doesn't have to have a varied speed...just a constant speed is good...and i also want it to only move when your mouse goes on the scrollbar...i'm not sure if that would be hard...but i'm just trying to get the direction thing correct at the moment...so do you know how it would be done?
blah-de-blah
December 15th, 2002, 03:04 AM
i hope you guys understood it :-\ someone must know howta do this!!
lostinbeta
December 15th, 2002, 03:35 AM
Sorry, I don't know anything.
I have yet to even do the tutorial :-\
blah-de-blah
December 15th, 2002, 03:39 AM
darn! if you don't know...who will!
ah well hope someone drops by this post =)
pom
December 16th, 2002, 10:18 AM
I think that this does what you wanted. And there was a problem in the code, too.
pom :goatee:
blah-de-blah
December 17th, 2002, 03:09 AM
sweet! thx very much i was about to get pretty desperate heh...
thx again :)
blah-de-blah
December 18th, 2002, 03:43 AM
alrite i just found out another problem and i dont' know howta fix it!
since i got those two buttons where you rollover, it covers the pictures in the scrollbar below.
You can see them, but you can't click on 'em to link them to something else...
so i was wondering how this could be fixed...!? could you mask more than one thing..? or will that not work either?
i was thinking i would have to do this all in coding instead...would you happen to know how to do this...? how about if we created a box in AS and made it so when you rolled over that invisble box it would still move but wouldn't affect the things under...
get it..?! anywayz i'm not sure if that'll work thx for reading <:}
pom
December 18th, 2002, 08:18 AM
OK, here it is, scripted.
pom (-:
blah-de-blah
December 18th, 2002, 08:27 AM
yipeeee thx very much you saved me lotsa time and misery :) :rambo: :) :nerd: :asian: :bandit: <:}
blah-de-blah
December 20th, 2002, 06:26 AM
ok this is beginning to really annoy me cause after i figure out something another problem keeps comming!!
so the this is...i used your code and everything and changed it a bit to make it fit what i wanted...and then the problem is...that i can't click on the buttons to make em change scenes!!
i added a code to them to change to 'scene 2' for example and it doesn't work!!
whats wrong!!! :bad:
eyeinfinitude
December 20th, 2002, 06:37 AM
have the buttons target frame labels on the scene you want it to go to.
blah-de-blah
December 20th, 2002, 06:41 AM
well this is the code i got on each button right now...
on (release) {
gotoAndPlay("scene2", 1);
}
sorry i'm not too sure what you mean by target frame labels...or is the way i did alrite..? just to make sure, doesn't the '1' already target a frame?
eyeinfinitude
December 20th, 2002, 06:43 AM
On scene 2 give one of your frames a name like "blah" and on your button apply this action:
on (release) {
_root.gotoAndPlay("blah");
}
blah-de-blah
December 20th, 2002, 07:18 AM
are you sure taht is correct? it still doesn't seem to link...i dunno why!! heeelp me!
eyeinfinitude
December 20th, 2002, 07:22 AM
Did you give the frame a name in scene 2? Let me look at your fla so I can see what you did.
blah-de-blah
December 20th, 2002, 07:25 AM
good idea.....:)
blah-de-blah
December 23rd, 2002, 01:46 AM
someone must know..?! plz anyone..!? :nerd:
pom
December 23rd, 2002, 11:45 AM
The buttons are bamboozled by the code I gave you :beam:
When you do scroller.onRollOver, Flash won't take into consideration button handlers that are inside that button. So you need to change the code to
midScreen = Stage.width/2;
scroller.onEnterFrame=function(){
if (_xmouse>midScreen) {
this.speed = -5;
} else {
this.speed = +5;
}
this._x+=this.speed;
if (this._x>0) {
this._x = -300;
}
if (this._x<-300) {
this._x = 0;
}
};and remove the code from the scroller too.
pom :)
blah-de-blah
December 23rd, 2002, 10:09 PM
alrite i dont' think its that problem anymore because i just fixed it and the links aren't working :(
so this is the code i put on each button:
on (release) {
gotoAndPlay ("scene 2",1);
}
but its not worrrkiing!!!!! thats the code i usually use but i think its wrong i'm guessing...any ideas..?! thx for all this help btw <:}
lostinbeta
December 23rd, 2002, 11:13 PM
It works fine, you just aren't doing it right.
Give the frame in your Scene 2 a label. I will use "startScene2" (no quotes) as my label for frame 1 in Scene 2.
Ok, now on your button, the code will look like...
on (release) {
_root.gotoAndPlay("startScene2");
}
You can't change scenes from inside a movieclip using the gotoAndPlay("Scene", frame#) for some reason, but if you give the frame you want to go to a label, you can always use _root.gotoAndPlay(label). Which is what electrongeek said earlier.
blah-de-blah
December 24th, 2002, 05:27 AM
ah i got it thx A LOT!!!
and merry christmas <:}
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.