Flip image

Flip image as automatic movieclip

Page 1 of 1

2 Replies - 11116 Views - Last Post: 12 March 2009 - 01:12 PM

#1 wiffie   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 12-March 09

Flip image

Post icon  Posted 12 March 2009 - 06:49 AM

The code below doesn't work to me because it is flipping the image all the time, and not on it's center (now it turns from right to left).
this._xscale *= -1;

I want to that the image flips automatically within every 2 seconds on its center. I would be happy if anyone could tell me where I can read about how to make a script that plays the movieclip.
Cardflip is a similar effect that descripes how I want to flip the image. The different is that the cardflip flips the image at onmouseclick, I don't want any on_mouse, but play();

Is This A Good Question/Topic? 0
  • +

Replies To: Flip image

#2 thehat   User is offline

  • awake ? web();
  • member icon

Reputation: 106
  • View blog
  • Posts: 951
  • Joined: 28-February 08

Re: Flip image

Posted 12 March 2009 - 10:48 AM

you can probably use the source from that cardflip thing, but where they use a mouse event to trigger the flip you should look at the setInterval() function which will let you call the flip function repeatedly with a specified delay.
Was This Post Helpful? 0
  • +
  • -

#3 theRemix   User is offline

  • D.I.C Regular

Reputation: 15
  • View blog
  • Posts: 440
  • Joined: 19-October 05

Re: Flip image

Posted 12 March 2009 - 01:12 PM

to change the sprite's registration point, do

this.x -= this.width/2;
this.y -= this.height/2;

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1