I need help BAD!!!

  • PetStarr
  • Born
  • Born
  • PetStarr
  • Posts: 2

Post 3+ Months Ago

Ok, I have a piece of script that a friend sent to me, and I am trying to adapt it with not too much luck. Below is the script.

When I click on the movieclip 'pushhome', movieclip 'home_mc' slides on screen. When I click on 'pushclients', 'home_mc' slides off screen. This works fine. But I am trying to add an extra function whereby clicking on 'pushclients' will not only slide 'home_mc' OFF, but will slide 'clients_mc' ON. As you can see I have added this to the script - but it wont work!! It seems to ignore clients_mc altogether. Anyone got any ideas why?? It should be noted I am NOT an actionscript afficionado...merely a beginner trying to learn on the fly. :)

Cheers.


Code: [ Select ]
Math.easeOutQuad = function(t, b, c, d) {
return -c*(t /= d)*(t-2)+b;
};
MovieClip.prototype.motion = function(clip, pos, speed) {
clip.t = 0;
clip.d = speed;
clip.b = clip._x;
clip.c = pos-clip._x;
clip.onEnterFrame = function() {
if (this.t<=this.d) {
this._x = Math.easeOutQuad(this.t, this.b, this.c, this.d);
this.t++;
} else {
delete this.onEnterFrame;
}
};
};
pushhome.onRelease = function() {
this.motion(home_mc, 700, 25);
};
pushclients.onRelease = function() {
this.motion(home_mc, -300, 25);
this.motion(clients_mc, 700, 25);
};
  1. Math.easeOutQuad = function(t, b, c, d) {
  2. return -c*(t /= d)*(t-2)+b;
  3. };
  4. MovieClip.prototype.motion = function(clip, pos, speed) {
  5. clip.t = 0;
  6. clip.d = speed;
  7. clip.b = clip._x;
  8. clip.c = pos-clip._x;
  9. clip.onEnterFrame = function() {
  10. if (this.t<=this.d) {
  11. this._x = Math.easeOutQuad(this.t, this.b, this.c, this.d);
  12. this.t++;
  13. } else {
  14. delete this.onEnterFrame;
  15. }
  16. };
  17. };
  18. pushhome.onRelease = function() {
  19. this.motion(home_mc, 700, 25);
  20. };
  21. pushclients.onRelease = function() {
  22. this.motion(home_mc, -300, 25);
  23. this.motion(clients_mc, 700, 25);
  24. };
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • IMMORTAL
  • Beginner
  • Beginner
  • User avatar
  • Posts: 45

Post 3+ Months Ago

Is clients_mc on the same timeline as home_mc?

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 61 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.