|
-
banned by dp.
Easing problem!
Okay, I'm working on my portfolio. And I got this on the "profile" MC:code: onClipEvent (load) {
targetx = 143;
targety = 136;
speed = 8;
function pull(){
_x += (targetx-_x)/speed;
_y += (targety-_y)/speed;
}
function push(){
_x -= (88+_x)/speed;
_y -= (81+_y)/speed;
}
}
Now that all works.
I have the same code on "porfolio" MC. And taht all works.
On a button I have this code code: on (release) {
this.onEnterFrame = function(){
profile.pull();
}
}
and I have that on another button also.
Okay, now here is my problem: When one button is clicked and the Mc starts to move to targetx, if you click another button it stop on MC and moves the other. I think it might have to do with" this.onEnterFrame = function(){"
Make sense?
Thanks to whoever helps!
-
banned by dp.
-
No!
Do both buttons have the same code? they both do profile.pull()?
I'll just mention this yet again, I'm very proud of the code
http://www.flashkit.com/board/showth...hreadid=478030
scroll down and check out tween or multitween
can you post the fla?
-
banned by dp.
No, one button has profile.pull(); and the other has portfolio.pull();
I can't uplaod the fla. but I can give you a link: http://www.studentrock.com/users/Eva...igns/Index.htm
Sorry for the load time. Haven't had a chance to optimize or anything.
I'm really confused as to why its doing this.
Last edited by I_am_TheFlasher; 11-06-2003 at 10:45 PM.
-
banned by dp.
*bump*
man I'm anoying...
-
banned by dp.
Now are you guys really gonna make me post three times in a row?
...oh whoops, too late...
-
erm, i thought that make sense?
u r rewriting this.onEnterFrame function each time u click the button... so only either one of the pull() will be called?
maybe..., i'm a noob...
-
banned by dp.
Originally posted by isc00011
u r rewriting this.onEnterFrame function each time u click the button... so only either one of the pull() will be called?
Yeah, thats what's happening, but that's exactly not what I want to happen. I them both to come to there final targets at once, depending on when the buttons are clicked)
i know there must be a way around this.
Yasuno--Your script is just too long and complicated for my puny mind to comprehend.
-
correct me if i'm wrong,
u want both pull function to be called within the onEnterFrame function if both button if clicked?
-
banned by dp.
Originally posted by isc00011
correct me if i'm wrong,
u want both pull function to be called within the onEnterFrame function if both button if clicked?
If the "profile" button is clicked I want the "profile_mc" to pull();
If "portfolio" is clicked I want the "portfolio_mc" to pul();
but if the user hits one button then the next I still want them to do both.
Make sense?
-
banned by dp.
OH my gosh! I'm a moron. I don't know why I didn't see this.
I just had to put on onEnter frame function inside the other functions.
Works like a charm now, thanks anyways guys!
-
got it...
i'm sure there must be a better solution, i'm lazy to think, ha ha
but this is the first thing that came up in my mind.
use a variable as indicator, then u condition the button's on release function.
make sense? khekheke..., sorrie, lame solution from me...
-
banned by dp.
Originally posted by isc00011
got it...
i'm sure there must be a better solution, i'm lazy to think, ha ha
but this is the first thing that came up in my mind.
use a variable as indicator, then u condition the button's on release function.
make sense? khekheke..., sorrie, lame solution from me...
Thanks man, but I figrued it out. see^^
-
so how do u solve it? *juz wondering...
eh mind to see my other thread, i need a pointer or two there..
thanx man!
-
banned by dp.
Originally posted by isc00011
so how do u solve it? *juz wondering...
eh mind to see my other thread, i need a pointer or two there..
thanx man!
Instead of: code: onClipEvent (load) {
targetx = 143;
targety = 136;
speed = 8;
function pull(){
_x += (targetx-_x)/speed;
_y += (targety-_y)/speed;
}
function push(){
_x -= (88+_x)/speed;
_y -= (81+_y)/speed;
}
}
I used this:code:
onClipEvent (load) {
targetx = 137;
targety = 134;
speed = 8;
function pull(){
this.onEnterFrame = function(){
_x += (targetx-_x)/speed;
_y += (targety-_y)/speed;
}
}
function push(){
this.onEnterFrame = function(){
_x -= (95+_x)/speed;
_y -= (81+_y)/speed;
}
}
}
And...sure I'll take a look at your other thread, see if I could lend a hand.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|