rotate in place smoothly
#1
Posted 19 April 2007 - 12:09 AM
I've been trying to use Flash's built in rotate tween to rotate a circle in place (spinning disc), but as it approaches 360 degrees there's a little skip - is there a way of getting it to rotate 100% smoothly?
Cheers!
Boog
#2
Posted 19 April 2007 - 01:17 AM
#3
Posted 19 April 2007 - 01:52 AM
#4
Posted 19 April 2007 - 03:30 AM
code:
onClipEvent(enterFrame){ this._rotation+=5; }
#5
Posted 19 April 2007 - 05:04 AM
I've got a different issue now...
If you would kindly look at the swf on the below link:
http://www.simonwats...au/sb/sbee.html
...you can see how the left edge of the album cover and the right edge of the record get cut off to the size of my swf - is there something I can do to make it not look so bad? I don't really want to resize my swf's width to 1300px or whatever it'd need.
Also, there's a little glitch on my machine when you press stop on the turntable - does that happen for anyone else?
Cheers, guys
#6
Posted 19 April 2007 - 08:27 AM
#7
Posted 19 April 2007 - 12:38 PM
#8
Posted 19 April 2007 - 08:39 PM
#9
Posted 19 April 2007 - 09:54 PM
I've actually refined it a little again, if you're interested - very happy now
#10
Posted 20 April 2007 - 01:23 AM
I've created a few extra pngs of the turntable arm, as if you rotate away from its original postition, it looks terrible. Anyway, I'd like to get some actionscript into the mp3 player, which does a tween between randomly chosen pics (arm1, arm2 etc), so that you get the effect of the arm moving to a different position when the next song plays (doesn't have to start at the edge and work through).
Any ideas? Sorry I ask so many questions - at least I'm adding to the general store of knowledge, I guess
It'd be a rotation tween, btw
#11
Posted 20 April 2007 - 07:53 AM
www.mosessupposes.com/fuse/
I think thats the url.
You'll just need to put your animations into a function and call that function on the start or finish of every song.
#12
Posted 20 April 2007 - 09:26 AM
Actually, I've been using Fuse, which is really cool! I didn't realise you could tween between two different pics using it, though - I'll check it out
#13
Posted 20 April 2007 - 10:04 AM
#14
Posted 20 April 2007 - 10:15 AM
#15
Posted 20 April 2007 - 12:00 PM
I've realised I've got some issues with this concept. I'm starting to think it's too hard, but I'll at least go through it to the best of my ability!
Firstly, the pngs of my turntable arm don't look good rotated at all, so generating a random destination for the tween won't work (unless I do pngs of every degree, which would be ridiculous). Therefore, I think the most logical way to do this would be to add a node to the player's XML, and every time a new song plays, rotating the current png to the new png's position. This all sounds very complicated!!! The other option would be to design the arm in Flash, so it looks fine rotated - obviously, it wouldn't look quite as cool!
I think, regardless of which I chose, I'd have to use the XML to control where the arm tweens to, only because you'd want it to go to a certain place every time you played a certain song. I'd imagine something like this:
* the XML would have a node added (ie position A, position B, etc) to each song
* there would be a different png for each position in the XML (if we used pngs)
* not sure how this would work, but when the player goes to the next song, somehow it would have to read where to tween the arm to. Can we use information from the XML? It'd be great if a variable could check the XML and then tween from the current postition to the destination position.
Anyway, if this isn't interesting enough for anyone to help me with (especially Pax, who's been way too nice to me), I won't worry - I think it'd be a very interesting exercise, though!
Sorry about the long post! It's 3am here (I'm watching the cricket and working), so I hope I've made sense!
#16
Posted 21 April 2007 - 05:05 PM
So my only issue is the rotation using XML, if anyone could be bothered
#17
Posted 22 April 2007 - 04:29 AM
http://www.simonwats...au/sb/sbee.html
#18
Posted 22 April 2007 - 09:00 AM
#19
Posted 22 April 2007 - 05:49 PM
Anyway, I'm rapt with the turntable - I think it's the best thing I've done to this point. The only thing which still bothers me is that volume issue, so if you find time to look at it, please do
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users