FORUMS: list search recent posts

Coding a spinning wheel in Flash

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Michael P. Adamo
Coding a spinning wheel in Flash
on Mar 9, 2013 at 5:44:42 pm

I have a freelance project involving a game show with a wheel. I want to be able to make a clickable button that makes the wheel rotate clockwise one time and then stop. I was able to import the Illustrator file into the Flash stage in different layers, but I am not familiar with the coding in Flash.

Any advice will be very helpful!


Return to posts index

demetri tashie
Re: Coding a spinning wheel in Flash
on Mar 9, 2013 at 8:48:28 pm

there will be other ways, but you could do this by using the rotation property of movieclips, and setting a Timer

your images that you import need to be made into a movieclip symbol. make sure the registration point is in the center.

have your button click trigger the TimerEvent, which can start the rotation, by increasing the rotation by X amount every time the Timer fires. the function should also contain a conditional/logic statement ( i.e. and 'if/else' statment) that checks for the maximum roation that you want. when that condition is met, the Timer stops, and the EventListener is removed from the button

i hope that helps.

ps: this DOES require some coding, abeit some simple coding. since you are getting paid for this, you should familiarize yourself with at least the bit of coding knwoledge to cover the scenario i laid out.

it would be easy enough for me to give you the code to do this, but since you are getting paid for it, follow my reasoning, and try to come up with it yourself. i would be glad to then review it and/or make any corrections to it once an honest attempt is made.

if you have absolutely no coding/ as3 knowledge, the basic things to explore ( and this forum has PLENTY of information in its archives and tutorials) are:

- turning images into movieclip symbols.
- giving movieclips instance names
- creating buttons/using movieclips as buttons
- adding EventListener to a button
- writing a simple funtion
- creating a Timer
- rotation property of a movieclip symbol

that might seem like a lot, but a couple hours of work could get you up to speed. let us know how it is working out

Return to posts index

Michael P. Adamo
Re: Coding a spinning wheel in Flash
on Mar 12, 2013 at 3:35:08 pm


I was able to figure it out. I made a simple animation of the wheel spinning and then attached it to a button using a simple code.

Thank you for your help! I will definitely look around the forums for more information and tutorials.

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved