# Flipping an Image...HELP!

**URL:** <https://forum.kirupa.com/t/flipping-an-image-help/22634>\
**Category:** flash\
**Created:** [June 6, 2003, 1:29pm UTC](https://forum.kirupa.com/t/flipping-an-image-help/22634 "2003-06-06T13:29:10Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 16, 2003, 6:48pm UTC](https://forum.kirupa.com/t/flipping-an-image-help/22634/21 "2003-06-16T18:48:26Z")

</div>

I’m watchin your moves with interest, Sentry  
(as quoting and echoing you over & over again would only take unnecessary space)…

thanks for your patience, guys :hangover:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 16, 2003, 6:50pm UTC](https://forum.kirupa.com/t/flipping-an-image-help/22634/22 "2003-06-16T18:50:00Z")

</div>

well yes…And if you wanna loop it over and over again you just have to make the same frame to be exactly like the last one and don’t use stop(); just let it loop:)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 16, 2003, 6:54pm UTC](https://forum.kirupa.com/t/flipping-an-image-help/22634/23 "2003-06-16T18:54:17Z")

</div>

hmmm… the reason it looks like it’s going back and forth is because it switches direction so abruptly. hmm… how to overcome this?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 16, 2003, 7:01pm UTC](https://forum.kirupa.com/t/flipping-an-image-help/22634/24 "2003-06-16T19:01:12Z")

</div>

ok, i got it…  
[AS]spd = 0.05;  
logo.onEnterFrame = function() {  
scale+=spd;  
newYscale = Math.sin(scale)\*100;  
this.\_yscale = newYscale;  
};[/AS]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 16, 2003, 7:03pm UTC](https://forum.kirupa.com/t/flipping-an-image-help/22634/25 "2003-06-16T19:03:15Z")

</div>

wow nicely done dude

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 16, 2003, 7:09pm UTC](https://forum.kirupa.com/t/flipping-an-image-help/22634/26 "2003-06-16T19:09:47Z")

</div>

thnx oddin…

now i turned them into prototypes for easy reuse…

[AS]MovieClip.prototype.verticleRotate = function(spd) {  
this.onEnterFrame = function() {  
this.scale += spd;  
this.newYscale = Math.sin(this.scale)\*100;  
this.\_yscale = this.newYscale;  
};  
};  
MovieClip.prototype.horizontalRotate = function(spd) {  
this.onEnterFrame = function() {  
this.scale += spd;  
this.newXscale = Math.sin(this.scale)\*100;  
this.\_xscale = this.newXscale;  
};  
};  
logo.verticleRotate(0.07);  
logo2.horizontalRotate(0.1);[/AS]

_so bored_

check out the fla…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 16, 2003, 7:09pm UTC](https://forum.kirupa.com/t/flipping-an-image-help/22634/27 "2003-06-16T19:09:58Z")

</div>

so…

replace existing code with that?

:sure:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 16, 2003, 7:14pm UTC](https://forum.kirupa.com/t/flipping-an-image-help/22634/28 "2003-06-16T19:14:22Z")

</div>

well, first chose whether you want it to rotate horizontally of vertically. then copy and paste the prototype of your choice(erase previous code), and then call the prototype to your movie clip  
eg:  
[AS]MovieClip.prototype.verticleRotate = function(spd) {  
this.onEnterFrame = function() {  
this.scale += spd;  
this.newYscale = Math.sin(this.scale)\*100;  
this.\_yscale = this.newYscale;  
};  
};

myMC.verticalRotate(0.07)//the number in the brackets controls the rotate speed[/AS]

good luck 🙂

[Previous page](https://forum.kirupa.com/t/flipping-an-image-help/22634.md?page=1)
