Fruitbeard: he never has mentioned anything about a pause/unpause button, and anyway there is no pause button on the tape player, he wanted rewind/fastforward buttons, thing that i'm not too advanced with, so, as you are so wishful in helping him, here is your chance ^_^ i did a lot already. I will post the fixed .fla so both can proceed with the rewind/fastforward thing.
One last thing, i did make the reel rotations stop, maybe you are watching an old .swf in my site, you need to clear the cache. The reel are stopped when the movie starts, then when you hit on of the right tape buttons, the reels begin to rotate. Then when you hit stop, the reels stop. For the reels playing if there is not a tape inside, i made it like that because I knew that when you press the play button on a tape player, the reels begin to rotate even if no tape inside. I just tried it with my cassette/tape FM radio, I removed the tape, pressed play and it was rotating and working with no tape inside.
And you used a lot of functions only for a simple thing like a rotation. I already have the main function " songSelected(); " that contains the function " rotateReels();" there is no need to use a 3rd function "playreel();"
songSelected(); is the function that the "playbutton" and the "tape buttons" will call to do this things: 1-go to the frame 2 of the playbutton movieclip, where it is DOWN/PRESSED. 2- turn the playbutton pressed =true; 3- play a click sound when the playbutton is pressed 4- rotate the reels
And the songSelected(); function calls the rotateReels(); function that contains the actually rotating script
Actionscript Code:
reel._rotation +=8; reel2._rotation+=8;
And when you hit the stop button it deletes the onEnterFrame function of the rotateReels(); function , stoping the rotation of the reels.
That meets the requirements. What you did, fruitbeard, is like this:
This function, will call this other function, that will call this another function, that will rotate the reels. 3 steps, for something that can be done in 2. Hehe.
It is like comparing a movieclip with itself? I have seen a lof of times that when you use the equal sign is for comparing to different objects:
Actionscript Code:
reel._rotation = xmouse +8
Scot: We are few steps closer to achieve your ambicious project hehe. I have had fun with it. I fixed the button boundaries/hit state, the buttons are not overlapping each other anymore. you can click anywhere on the buttons now. For the eject button, yeah, we can make it empty the tape's tray and stay like when the movie starts.
Fruitbeard, the ball is in you yard! Good luck with the rewind/fastfordward buttons. If need my help, I will be arround.
That thing looks amazing ^ I hope thats not the correct resolution though because can't read anything, Also when you hold down the button it plays the click/unclick sound even if you didnt unclick it :P but im just looking at the minor details :P what is that thing for and cool songs.
Basses, i have nothing to do with the images hehe. I'm only helping our friend scot with the actionscript. Yes, there is a lot to fix on the buttons, align them etc. I'm working right now on the Eject button script. That image, lols.PNG, what's the bug? Thanks for coming by ^_^
Updates
1-The rewind, fastforward and record buttons have not been programmed yet.
2- Scot wanted the songs to be started automatically after pressing the song/tapes buttons on the right. I thought about 'selecting' the song first, then hitting the PLAY button to start the song, so it isn't a bug actually, he want it that way.
3- I added a sound like a "motor" when there is not a tape inserted, and you hit the play button, the reels start to rotate and the sound of the reels/motor...it is perfect to me, and that is how most tape/cassette players and karaokee's work.
For some reason this thing amazes me alot, do you care if I made my own version and show it here later :P this things so simple yet awesome got atleast 10 ideas.
Yes bosses. It is supposed to work that way. Have you ever used a tape player? I have one in my house, and i connected it to see how it works, and yes, even if no tape is inserted, and you press the play button, the middles (like you called it) the reels, begin to rotate and a motor like sound is heard.
That thing looks amazing ^ I hope thats not the correct resolution though because can't read anything, Also when you hold down the button it plays the click/unclick sound even if you didnt unclick it :P but im just looking at the minor details :P what is that thing for and cool songs.
It's an mp3 player for a musician client I'm working with to showcase some of his songs.
Yes, the buttons need to be lined up a little better, but that's not a big deal. The scripting is the hard part.
Last edited by ScotinOttawa; 07-18-2012 at 08:12 PM.
Angel, how close are we to RW and FF? There is a tutorial for this:
Maybe try this action script:
this.onEnterFrame = function () {
//Reverse
if (REV==1 && myMusicPosition>0) {
_root.myMusic.stop("myMusic01");
myMusicPosition=myMusicPosition-.5;
//The .5 is the decremented amount.
_root.myMusic.start(myMusicPosition,0);
}
revButton.onPress = function () {
REV=1;
myMusicPosition=_root.myMusic.position/1000;
//
}
revButton.onRelease = function () {
REV=0
}
//Fast Forward
if (FF==1 && myMusic.position < myMusic.duration) {
_root.myMusic.stop("myMusic01");
myMusicPosition=myMusicPosition+.5;
//The .5 is the incremented amount.
_root.myMusic.start(myMusicPosition,0);
}
FFButton.onPress = function () {
FF=1;
myMusicPosition=_root.myMusic.position/1000;
}
FFButton.onRelease = function () {
FF=0
}
That case is not mine lol. I did a lot already. Talk with fruitbeard, he's very interested in this project. If tomorrow he doesn't respond , then tell me and i'll work on it.
I was really hoping to have this ready to go by end of day. If it's just a matter of the fast forward and rewind buttons, maybe you can post the .fla and I can take a crack at it? The buttons need to be lined up anyway, so that would be something I can do in the meantime.