Nice video other than when I went to test movie in cs5 it threw a number of compiler errors. Two were Error 1120:Access of undefined property _root and _newPoint. Also undefined method of stopAllSounds. Shouldn't this be SoundMixer.stopAll(); Do you have code that will run in cs5?
To those who are wondering why the volume doesn't go all the way down. for me, it seems like I have to place the reference point literally on the left side of the canvas in order to work correctly. A way of solving this so that I can place the volume controls anywhere on the screen, I put it in a symbol, made sure my instance paths are changed for it, and placed the main symbol reference point on the far left end of the canvas. then i positioned the volume controls within that symbol.
I still can't get my slider centered on the groove. I've tried the instructed method, many times and I still can't align it properly. It's dead center on the stage, but still veers right, when playing back. Even when I've tried off-setting it to the left on the stage, it still takes that far right position upon clicking, in the preview. Any solutions?
I don't know why, my slider doesn't stay attached to the bar, I can move it all around screen, and it doesn't seem to chage de volume value, Im trying to use this on a flash project I already had, can some one help? I actually did it on a blank project and it worked, but if I paste it to the orher project it all goes wrong. Hope someone can help, Thanks!
Thank you so much! you're a life saver! but what if i want the sound to start automatically ? and on a bit louder volume ? how am i going to do that ? please please please help me. I would really appreciate it. Thank you. :)
Thank you - this is exactly what I've been looking for.
I'm a beginner coding Flash, but I have to say, I 'd much rather learn from you - someone who has discovered something important to share and NOT FROM MachineMalfunction who seems to have no social skills. MachineMalfunction - your comment is an embarrassment to humankind.
I'm trying to make a flash page with multiple sound files all with their own volume sliders. So far, I have copied and pasted the buttons, slider and groove, then renamed the instances of each symbol.
It all works well with the exception of volume control. Play and Stop works on each of my sound files independently, but the volume for everything is controlled only by the first slider.
This is the code I assume I need to individualize. newPoint = new Object(this); newPoint.x = this._x; newPoint.y = this._y; _root.groove_2.globalToLocal(newPoint); _root.mySong.setVolume(-1 * newPoint.x);
hey dude, I've got a question. Whenever I hear volume I need to raise until maximum the sound. Is there any option to download more sound so I can hear it louder?
This doesn't work in conjunction with your actionscript 2.0 preloader... to do with the fact that its loading the sound file before it starts the preloader. I have the preloader on frame one and this project on frame 2, with a stop(); on frame 2 actionscript too. (I replaced the sound file with some pictures just to test, and the preloader functions perfectly. Just doesn work with the sound file in the library)
is there another way to bring in the sound file so that the loader works? thanks!!
ok i have all the code right but it wont stop dragging and yes i have combined it all in a movie clip and given proper instance names but it still dosnt work.
if you make all that inside a movieclip instead of right into scene, it doesn't work... how could i change the code: slider_1.onMouseMove = function() { newPoint = new Object(); newPoint.x = this._x newPoint.y = this._y _root.reproductor.groove_1.globalToLocal(newPoint); _root.reproductor.mySong.setVolume(-1*newPoint.x); } ????? So i think that the problem is there...
If your video is only 19 Seconds long then go to a couple of videos in the desc and then come back to this one and it should be 19minutes again.. worked for me :)
Also great tutorial :) Thank you, i will copy the AS so i can re use it some other time :D
if ur using cs4, when you link the sound you have to right click it in the library, slect properties, and in the bottom right hand corner of the properties window click on "ADVANCED" and the Linkage panel will pop up below.
PLEASE DONT READ THIS. YOU WILL GET KISSED ON THE NEAREST POSSIBLE FRIDAY BY THE LOVE OF YOUR LIFE. TOMORROW WILL BE THE BEST DAY OF YOUR LIFE. HOWEVER IF YOU DONT POST THIS COMMENT TO AT LEAST 3 VIDEOS YOU WILL DIE WITHIN 2 DAYS. NOW UV STARTED READIN DIS DUNT STOP THIS IS SO SCARY.Ã�Â&mac r;ÃÂ�»& Atilde;Â�¿ SEND THIS OVER TO 5 VIDEOS IN 143 MINUTES WHEN UR DONE PRESS F6 AND UR CRUSHES NAME WILL APPEAR ON THE SCREEN
i seriously dont get these things...? it says dont read this and then it says tommorow will be the best day of your life -.- seriously makes no sense :/
Actionscript sucks ass. I really like Flash, aside from having to use actionscript. I used to work with Authorware, and the code was so much more intuitive and efficient. Actionscript is ridiculously counter-intuitive and inefficient. WTF?
I'm trying to create a lip synced flash with one song, but it's really irritating because I can only hear the sound if I start from to very beginning of the flash. I want to be able to hear it if I press play on the frame I'm working on...
can this be made with the music start playing by itself right after it loads instead of pressing the play button .. everything else works fine for me...
thnx for the tutorial.. it seems quite easy thow i've been having probs with this peace of code for a few days... i just love youtube! anything can be found here :p if i have questions i hope you dont mind answering...
i've 2 little problems, hope some of you guys can help me:
1.: how can i attach the sound without export it into the first frame in the linkage window? because the preloader gets loaded after the sound if i do - so it loads about a minute before the preloader is showed.
2.: somehow the newPoint part wont work - could somebody post the code please?
before i say this, tutvid you're sick, i learned a lot of what i know from flash by you, it really got me interested in flash, thanks for all these tutorials..
also..
slider_1.onReleaseOutside=function(){
this.stopDrag();
}
that should do it, i do that with my movie clip buttons now to do the same as the onRollOut does so the user can't make all the buttons stay on rollOver states by dragging outside of it, thats just my personal preference though..
Thanks, almost all the code worked perfectly for me. I have one question/issue tho. If I take my mouse off the slider whilst I have hold of it (either by sliding it too far left or right or by moving mouse up or down the screen) the mouse does not release the slider when you let go, my pointer must be over the slider to let go of it. Any ideas?
No because I have the same problem I have the stopDrag code but if ou move the mouse offscreen or move it fa above or below he volume bar even when I let go of the mouse the slider still follows it.
Dude, use onReleaseOutside as well as onRelease. Create an onReleaseOutside functions and put all the same code as the onRelease function in it.
Might I say that this video (from a flash actionscripter's point of view) is extremely uninformative and he fails to explain everything properly. He doesn't even touch on what globalToLocal is.
He clearly put an effort in, which is good, but he should spend more time learning before he teaches, and more time explaining why things work how they do.
Great vid, and the codes works perfectly. However, when I tried using two buttons from the Library for start and stop (and I had to creat a mocie clip layer to put them in because I hid one when you clicked the other and vice versa) I can no longer get the slider to control the sound. The button loads the sound from the movie clip layer and the slider layer no longer controls it.
Everything works fine by itself, but they do not work together. Any ideas?
You can see how I used the slider on my website (check my profile). I made the slider verticle instead of horizontal and I started the music to play on load rather than have to press the play button first.
I wanted a single button that changed back and forth between the play state and the stop state which is what I had before I put in the slider vol control but the movie clip would not work with the slider. I don't know why. Check it out on my homepage from my profile. I had 2 use 2 buttons.
This is a magnificent idea for flash/as ignorants such as myself!
I did everything down to the T on this video. Read all the comments in search of an error I cant fix. Video works great ALONE, BUT...I have imported it as a movie (loadMovie) from another SWF file and the sound wont play, buttons don't work and the slider handle goes ANYWHERE you want to take it to. hehehe
Any suggestions or ideas? I have looked EVERYWHERE and cant find anything. Thank you for your time!
copy and paste that code in your AS window, rename the sound with the one you choose so delete where i wrote ¨thenameofyourfile" and write yours, then it should work.
This is a magnificent idea for flash/as ignorants such as myself!
I did everything down to the T on this video. Read all the comments in search of an error I cant fix. Video works great ALONE, BUT...I have imported it as a movie (loadMovie) from another SWF file and the sound wont play, buttons don't work and the slider handle goes ANYWHERE you want to take it to. hehehe
Any suggestions or ideas? I have looked EVERYWHERE and cant find anything. Thank you for your time!
Thank you so much for your flash tutorial videos! I have been looking all over the net for some decent vids and all of them are non-video (text) or poorly commented vids and I cannot follow them, Thanks again TutVid!
If its FALSE then you just pause the video, if its TRUE then you play the video when its paused. If you leave it without a TRUE or FALSE, then you will get a toggle button.
I found this extremely useful, but there are a few flaws in your code. Ie. you should include the stopAllSounds(); function before starting the music in the play button. That way you won't get overlap in the sounds.
As well, I don't know if Flash Pro 8 has this, but x is registered on a document-size scale. Meaning, x is the initial start point for the slider. The width is property of the size of the slider. X is not the property of the size. My slider is at a position of -320, so the product of the setVolume() function becomes 320. Yikes. Really loud. It then decreases in volume as one slides it. Kinda opposite of what I want, but that's alright, I'll figure it out.
erm, I apologize, the "x" co-ordinate property is determined by relation of the object to the center of the screen. I've noticed this when dealing with it... trying to get it to work properly...
replace the -69 with the sum of your track bar's x co-ordinate plus (+) the width. Since my x co-ordinate was -320, and width was 251, the result was -69. Viola, it stops it from moving and sticking to the cursor.
I feel that he is not going too fast, just perfect. You can always use the pause button on YouTube, if it was too fast... I wouldn't like to sit here and listen to him for 40 minutes, if it can be done in 20 minutes. Thanks tutvid... great video!
I know you are doing this for free, which is sweet, but if you ever want to make money, which I would pay for, you seriously need to go 50% slower and say EVERY damn thing you click and type.
Great voice, but you go WAY too fast, and assume people know what you are doing. If you want to make tutorals, you have to assume someone knows NOTHING and go STEP by STEP, S-L-O-W-L-Y.
how do you refrain it from moving up and down
Liberaisnumber1 5 days ago
Nice video other than when I went to test movie in cs5 it threw a number of compiler errors. Two were Error 1120:Access of undefined property _root and _newPoint. Also undefined method of stopAllSounds. Shouldn't this be SoundMixer.stopAll(); Do you have code that will run in cs5?
iScaper1 1 month ago
thank you very much xD
NK691128210 2 months ago
thanks man! It really work, u saving my ass with my teacher of multimeadia :)
aspirin777 2 months ago
Good Sound slider, I love this tutorial.
joeygart 4 months ago
To those who are wondering why the volume doesn't go all the way down. for me, it seems like I have to place the reference point literally on the left side of the canvas in order to work correctly. A way of solving this so that I can place the volume controls anywhere on the screen, I put it in a symbol, made sure my instance paths are changed for it, and placed the main symbol reference point on the far left end of the canvas. then i positioned the volume controls within that symbol.
vrshowdown 4 months ago
Comment removed
vrshowdown 4 months ago
this is not working for me :/
slider_1.onRelease = function(){
this.stopDrag();
}
help?
braykbeat 7 months ago
@braykbeat
you have slider_1.onRelease = function(){
this.stopDrag();
}
it must be
slider_1.onRelease = function();
{
this.stopDrag();
}
boerhaha 5 months ago
Comment removed
ivanhoeescobar3004 5 months ago
@braykbeat
Try this:
slider_1.onReleaseOutside = function(){ this.stopDrag();
}
Let me know if that works.
ivanhoeescobar3004 5 months ago
Has anyone got their sound to go soft and loud on this?
blairbooth 11 months ago
@blairbooth
Yeah i just tried this tutorial and it never got completely silent, It either got rather soft or loud. just as you said,..
Did you ever figure out what was the problem?
IDPProductionI 9 months ago
I figured it out. When I made my groove vertical, I assigned my registration incorrectly. I should have chosen bottom-center.
ruinsatiable2 11 months ago
I still can't get my slider centered on the groove. I've tried the instructed method, many times and I still can't align it properly. It's dead center on the stage, but still veers right, when playing back. Even when I've tried off-setting it to the left on the stage, it still takes that far right position upon clicking, in the preview. Any solutions?
ruinsatiable2 11 months ago
I don't know why, my slider doesn't stay attached to the bar, I can move it all around screen, and it doesn't seem to chage de volume value, Im trying to use this on a flash project I already had, can some one help? I actually did it on a blank project and it worked, but if I paste it to the orher project it all goes wrong. Hope someone can help, Thanks!
hustage 1 year ago
Thank you so much! you're a life saver! but what if i want the sound to start automatically ? and on a bit louder volume ? how am i going to do that ? please please please help me. I would really appreciate it. Thank you. :)
janizcullen 1 year ago
geat...
Tutmastersphotoshop 1 year ago
Can you make this slider vertical and create a search slider for the audio?
Morcains 1 year ago
Does anyone know how to add the ability to scrub the playhead to jump anywhere you want during audio play?
monk333 1 year ago
1. does this work with a whole animation with different sounds and music
2. can you paste the script in the description
JamDCrazy 1 year ago
Thank you - this is exactly what I've been looking for.
I'm a beginner coding Flash, but I have to say, I 'd much rather learn from you - someone who has discovered something important to share and NOT FROM MachineMalfunction who seems to have no social skills. MachineMalfunction - your comment is an embarrassment to humankind.
angstrommcduff74 1 year ago
A RECAP from all these great comments:
- This appears to only work in ActionScript 2.0. (You can change your ActionScript settings in the upper left corner of the Actions window)
- The added code after mySong.start(o,1);.... _root.mySong.setVolume(50);
...seemed to help.
- Adding the word "this" in newPoint = new Object(this);
...worked for me.
I changed the code //mySong.start(o,50);// to //mySong.start(o,1);// to only play one cycle instead of 50 loops.
angstrommcduff74 1 year ago
I'm trying to make a flash page with multiple sound files all with their own volume sliders. So far, I have copied and pasted the buttons, slider and groove, then renamed the instances of each symbol.
(i.e. groove_1, groove_2, groove_3, slider_1, slider_2, etc...)
It all works well with the exception of volume control. Play and Stop works on each of my sound files independently, but the volume for everything is controlled only by the first slider.
Any thoughts?
angstrommcduff74 1 year ago
slider_1_smlapplause.onMouseMove = function()
{
This is the code I assume I need to individualize. newPoint = new Object(this); newPoint.x = this._x; newPoint.y = this._y; _root.groove_2.globalToLocal(newPoint); _root.mySong.setVolume(-1 * newPoint.x);
angstrommcduff74 1 year ago
hey dude, I've got a question. Whenever I hear volume I need to raise until maximum the sound. Is there any option to download more sound so I can hear it louder?
JonasR001 1 year ago
i needed only to know how to bind the drag to a specific area but this tutorial was so intresting i watched it all! xD
thank you!
ultimateshadowyt 1 year ago
_root.mySong.setVolume(-1*newPoint.x);
why thats doesn't work? how to make it work, please...?! Something wrong???
rathcpranxz 1 year ago
this doesnt work on adobe flash cs4!!!!
it marks a lot of errors on the programing
2nekos 1 year ago
how can i do so the music starts automaticly?please someone pm me
arhaisme 1 year ago
_root.groove._y + 0 Will fix that it goes down
dakon11 1 year ago
This doesn't work in conjunction with your actionscript 2.0 preloader... to do with the fact that its loading the sound file before it starts the preloader. I have the preloader on frame one and this project on frame 2, with a stop(); on frame 2 actionscript too. (I replaced the sound file with some pictures just to test, and the preloader functions perfectly. Just doesn work with the sound file in the library)
is there another way to bring in the sound file so that the loader works? thanks!!
philjo1005 1 year ago
Comment removed
dylanisley1212 1 year ago
Comment removed
dylanisley1212 1 year ago
This has been flagged as spam show
ok i have all the code right but it wont stop dragging and yes i have combined it all in a movie clip and given proper instance names
onClipEvent(enterFrame)
{
_root.mslider.slider.onPress = function(){
_root.mslider.slider.startDrag(true, _root.mslider.bar._x, _root.mslider.bar._y, _root.mslider.bar._x + 200, _root.mslider.bar._y);
}
_root.mslider.slider.onRelease = function() {
_root.mslider.slider.stopDrag;
}
dylanisley1212 1 year ago
This has been flagged as spam show
ok i have all the code right but it wont stop dragging and yes i have combined it all in a movie clip and given proper instance names
onClipEvent(enterFrame)
{
_root.mslider.slider.onPress = function(){
_root.mslider.slider.startDrag(true, _root.mslider.bar._x, _root.mslider.bar._y, _root.mslider.bar._x + 200, _root.mslider.bar._y);
}
_root.mslider.slider.onRelease = function() {
_root.mslider.slider.stopDrag;
}
dylanisley1212 1 year ago
This has been flagged as spam show
ok i have all the code right but it wont stop dragging and yes i have combined it all in a movie clip and given proper instance names but it still dosnt work.
onClipEvent(enterFrame)
{
_root.mslider.slider.onPress = function(){
_root.mslider.slider.startDrag(true, _root.mslider.bar._x, _root.mslider.bar._y, _root.mslider.bar._x + 200, _root.mslider.bar._y);
}
_root.mslider.slider.onRelease = function() {
_root.mslider.slider.stopDrag;
}
dylanisley1212 1 year ago
hi can somebody help me? i am using flash CS4 and I can't see the linkage if I right click on the sound. Thanks a lot
FanaticCassiopeia 1 year ago
@FanaticCassiopeia once you have opened the properties window for the file, click the advanced button to show linkage options. hope this helped!
philjo1005 1 year ago
Thanks you !
German727 1 year ago
This comment has received too many negative votes show
This is boring and your voice is iritating
DurbanAccomodation 1 year ago
That's just it, it's a variable name. You can name that whatever you want as long as its consistent with every place the guy put mySong
papayoshi16 2 years ago
@disturbanite80 Good point.
FlashFireEX 2 years ago
santiagodecadi 2 years ago
i didn't forget to introduce the name of the instance of "reproductor" movieclip after "_root." and play and stop button works...
however, slider of volume doesn't it. I guess that is for the last fragment of code...
santiagodecadi 2 years ago
If your video is only 19 Seconds long then go to a couple of videos in the desc and then come back to this one and it should be 19minutes again.. worked for me :)
Also great tutorial :) Thank you, i will copy the AS so i can re use it some other time :D
TheRuneOblivion 2 years ago
thanks!!! :D :D :D
abcdefpaul 2 years ago 2
Good Job. Its AS2 guys, so select the proper settings in your IDE.
Whether it works for u or not it's irrelevant as this guy put some time into teaching something cool.
What I'd like better explained though is the globalToLocal and that (-1*newPoint.x). Will a simple var x:Number = w/e; approach work here?
Anyway, a good amount of not just basics are taught here for FREE so tutvid deserves at least the community's appreciation.
Thx tutvid, gj.
acpet83 2 years ago
WTF !?!?! CUTS OF AT 0:19 !!!!
khortonworld 2 years ago
This has been flagged as spam show
right turn off hq/hd
Iglitchlife 2 years ago
if ur using cs4, when you link the sound you have to right click it in the library, slect properties, and in the bottom right hand corner of the properties window click on "ADVANCED" and the Linkage panel will pop up below.
FibreFilms 2 years ago
yea i have cs4, and the script didnt work and i assume thats why, so if you get on your youtube account and read this please help a fellow nerd out.
camdaddy09 2 years ago
I just got a glitch when I'm double click the slider and then I cant go back.
Apapilootoe 2 years ago
Where can i download that files?^^
iMoviesTV 2 years ago
Could I know what the use of snapping??
from philippines
sunleoest 2 years ago
2:47 XD
sunleoest 2 years ago
This is good. I'm trying to use AS3.0 as much as possible, so I'd probably create the eventListeners in lieu of onRelease for the functions.
wrdeboise 2 years ago
Thanks tons.
Questions.
I want my video (separate from audio) AND my audio to play at start of the Flash. How do I get the audio to start and still control it?
Thanks in advance. ;)
SEspider 2 years ago
"and what key did you use for times on the set volume part ?"
yo me estoy preguntando lo mismo! que símbolo usas cuando haces el "setVolume"?? Después del -1 y antes de newPoint_x
Por favor contestame que me vuelvo loco!!
cuchu192 2 years ago
and what key did you use for times on the set volume part
diademmaster45 2 years ago
the asterix key *
FibreFilms 2 years ago
um is it posible to maek 4 songs playing at once
diademmaster45 2 years ago
don't make yourself too hard.
FlashEpics 2 years ago
This has been flagged as spam show
PLEASE DONT READ THIS. YOU WILL GET KISSED ON THE NEAREST POSSIBLE FRIDAY BY THE LOVE OF YOUR LIFE. TOMORROW WILL BE THE BEST DAY OF YOUR LIFE. HOWEVER IF YOU DONT POST THIS COMMENT TO AT LEAST 3 VIDEOS YOU WILL DIE WITHIN 2 DAYS. NOW UV STARTED READIN DIS DUNT STOP THIS IS SO SCARY.Ã�Â&mac r;ÃÂ�»& Atilde;Â�¿ SEND THIS OVER TO 5 VIDEOS IN 143 MINUTES WHEN UR DONE PRESS F6 AND UR CRUSHES NAME WILL APPEAR ON THE SCREEN
toronator27 2 years ago
This has been flagged as spam show
i seriously dont get these things...? it says dont read this and then it says tommorow will be the best day of your life -.- seriously makes no sense :/
JackSpud999 2 years ago
Thank you!!
sendono 2 years ago
How You'r vid is 19 mintues?!
gai1700 2 years ago
he is a partner, enables longer vids
he has videos a lot longer
ALOT LONGER :)
3hraad 2 years ago
So How Can I Get Longer Videos Too>?
gai1700 2 years ago
make really good videos that alot of people watch and youtube will make you a partner
thithimimi 2 years ago
Actionscript sucks ass. I really like Flash, aside from having to use actionscript. I used to work with Authorware, and the code was so much more intuitive and efficient. Actionscript is ridiculously counter-intuitive and inefficient. WTF?
duncanjwebster 2 years ago
HEY there. how on earth did ya get macromedia flash? it wun let me download it =(
daguyhuluvsvids 3 years ago
it's out of date you can't get it anymore you must get cs3 or cs4.
thithimimi 2 years ago
why is this video 19 seconds long? (YES IT SAYS 19 SECONDS)
HaLO3gamer91 3 years ago
because you are idiot ...
when video starts you can see : "youtube shortened clip ! check description for detals" ...
in description you can read : "FULL VIDEO: /adress/ " ...
gelvispro 3 years ago
it says 19 minutes to me O_o
LickandNuke 3 years ago
hahahahha"beacuse you are idiot" ;DD
rexxar666666 2 years ago 2
I'm trying to create a lip synced flash with one song, but it's really irritating because I can only hear the sound if I start from to very beginning of the flash. I want to be able to hear it if I press play on the frame I'm working on...
LORDBIGDOGGIE 3 years ago
wa ko ksabut lagi...mao ray ato:-??
sweetzarah 3 years ago
2 questions: 1 - how can u add a video 19 minutes? 2 - how do i increase a sound volume without that bar
SAINTsoldi 3 years ago
can this be made with the music start playing by itself right after it loads instead of pressing the play button .. everything else works fine for me...
rotteneggy 3 years ago
hm.....near the beginning I made the slider slide. However it could also move along the Y axis as well, and wasn't following the slider bar. help? :S
arronhunt 3 years ago
thank you very much,
ilkut 3 years ago
4:27
ZiWrath 3 years ago
5:00
ZiWrath 3 years ago
slider_1.onMouseMove = function () {
newPoint = new Object ();
newPoint.x = this._x
newPoint.y = this._y
_root.groove_1.globalToLocal(newPoint);
_root.mySong.setVolume(-1*newPoint.x);
}
lol! Ops, I named my song cloud14, but just set the name of whatever you named your song.
AstroFalcon 3 years ago
This has been flagged as spam show
slider_1.onPress = function (){
this.startDrag(true, _root.groove_1._x, _root.groove_1._y, _root.groove_1._x + 520, _root.groove_1._y);
}
slider_1.onRelease = function (){
this.stopDrag ();
}
play_btn.onRelease = function() { mySong = new Sound (); mySong.attachSound("cloud14"); mySong.start (0, 50);
}
stop_btn.onRelease = function () { stopAllSounds();
}
AstroFalcon 3 years ago
thnx for the tutorial.. it seems quite easy thow i've been having probs with this peace of code for a few days... i just love youtube! anything can be found here :p if i have questions i hope you dont mind answering...
prelar 3 years ago
Oops this is the second part of the script.
}
stop_btn.onPress = function () { stopAllSounds ();
}
slider_1.onMouseMove = function (){ newPoint = new Object ();
newPoint.x = this._x
newPoint.y = this._y
_root.groove_1.globalToLocal(newPoint);
_root.mySong.setVolume(-1"newPoint.x);
}
mrwong23 3 years ago
Hi everybody,
this is a nice little AS, but it doesn't work on my computer?! >:(
I only got the error message **Error** Scene=Scene 1, layer=as, frame=1:Line 21: ')' or ',' expected }
Total ActionScript Errors: 2 Reported Errors: 2
??
What can be that problem?
Thx, from germany
mrwong23 3 years ago
slider_1.onPress = function (){
this.startDrag(true, _root.groove_1._x, _root.groove_1._y, _root.groove_1._x + 560, _root.groove_1._y);
}
slider_1.onRelease = function (){
this.stopDrag ();
}
play_btn.onRelease = function (){
mySong = new Sound ();
mySong.attachSound("bouncesong");
mySong.start (0, 50);
mrwong23 3 years ago
Thanks this helped this helped! 5 stars. Stop by my page.
TowerSL 3 years ago
Thank you very much man. +5 *****
mafurion1 3 years ago
2:15
mafurion1 3 years ago
Hallo, any one know or maybe can help, why I can't inport mp3 to flsh pro 8. Tkns
wintakengen 3 years ago
stream the .mp3 using
var soundToLoad:Sound = new Sound();
{ soundToLoad.loadSound("rgirl.mp3", true);
}
soundToLoad.onLoad = function () { this.start(0, 1);
}
djfunkshowkid 3 years ago
where would u insert this code:
var soundToLoad:Sound = new Sound();
{ soundToLoad.loadSound("rgirl.m p3", true);
}
soundToLoad.onLoad = function () { this.start(0, 1);
}
boiGeniusbeats 3 years ago
in da actions panel dumbass
MasterChiefgame3 3 years ago
hmmm i need your help in something similar get back to me plz
thithimimi 3 years ago
Hello, just a quick question.
My slider graphic will not stop at hte width I have set it at, which is 138.0. It instead ends at the boarder of my test window, which is
150. Any ideas?
Thanks.
Breakdowncon 3 years ago
can any one tell me how to do this on ActionScript 3.0
i have the scroller moving
but it will only move for a split second and stop
message me the code plz
killuacaper 3 years ago
I'm in the same seat as you and I'm goin crazy. I cannot get this to work in as3. I can holy hope its not a PEBKAC.
YouMockMe 3 years ago
Very well done!!! Thanks!! If it doesn't work, check your spelling, your instance names, your coding for mistypes..... This will work!
jparker3119 3 years ago
thanks i sed this for hwlp with school flash project.. we had to show our teacher what we could do in flash
animation7king 3 years ago
I mean this is good, but you have to improve your teaching skills a bit.
okreset 3 years ago
omg you saved my life xD
thx
SinOfBlooD1 3 years ago
dude it's na nice tutorial but the code doesn'y work for me.. i'm using flash cs3..
I always got this error 1120: Access of undefined property _root.
hope u can help me
Dhamphy 3 years ago 6
make sure ur using action script 2.0
animation7king 3 years ago
i used CS3 it worked...
animation7king 3 years ago
@Dhamphy r u using ac3.0?
mionicle 1 year ago
@Dhamphy it should be 2.0
mionicle 1 year ago
@Dhamphy You are using AS 3.0
To get no error, use as2.0
badmonkeyballplayer 1 year ago
Thank you very Much
NoYoN9s 3 years ago
can u attach the source file in the info area where we can download it,please? thanks
shannon5118 3 years ago 2
you're the man....great tutorials
BarefootRadio 3 years ago
Useless! Spent Last 2 Hours Of My Life And It Didnt Even Work!
kule06 3 years ago
The script for making the slider move won't work for me
Radmanlive 3 years ago
for autoplay add this in the actionscript ... no curly brackets ...
var mySong:Sound = new Sound();
mySong.attachSound("instanceName");
mySong.start(0,100);
valentionella 3 years ago
where do I insert this code?
surfertide 3 years ago
the sound somehow changes (tones down) when I mouse over the file, not when I leave it alone, but there is no mouse over function in the script ???
valentionella 3 years ago
what code would i use so that the sound automatically starts playing?
prophetizm7 3 years ago
Hi guys! I need your help, when I check this one, the button play doesn´t do anything... somebody can explain it to me?
In fact I had check few times the code, at its ok... but the music don´t start... plz! I really need youre help... Tnx!!!
TZD333 3 years ago
i've 2 little problems, hope some of you guys can help me:
1.: how can i attach the sound without export it into the first frame in the linkage window? because the preloader gets loaded after the sound if i do - so it loads about a minute before the preloader is showed.
2.: somehow the newPoint part wont work - could somebody post the code please?
iswhiti 3 years ago
before i say this, tutvid you're sick, i learned a lot of what i know from flash by you, it really got me interested in flash, thanks for all these tutorials..
also..
slider_1.onReleaseOutside=function(){
this.stopDrag();
}
that should do it, i do that with my movie clip buttons now to do the same as the onRollOut does so the user can't make all the buttons stay on rollOver states by dragging outside of it, thats just my personal preference though..
sPa12kViDz 3 years ago
Great tutorial. Easy to follow thanks to pause button ;). Just one problem:
as I press Play button music start, but as soon as I move the mouse the music stop, and won't start again in any way. Any idea?
ivozolla 3 years ago
Thanks, almost all the code worked perfectly for me. I have one question/issue tho. If I take my mouse off the slider whilst I have hold of it (either by sliding it too far left or right or by moving mouse up or down the screen) the mouse does not release the slider when you let go, my pointer must be over the slider to let go of it. Any ideas?
chriscook1981 3 years ago
You forgot to add
slider_1.onRelease = function(){ this.stopDrag();
}
NicholasSta 3 years ago
No because I have the same problem I have the stopDrag code but if ou move the mouse offscreen or move it fa above or below he volume bar even when I let go of the mouse the slider still follows it.
xxNIGGORILLAxx 3 years ago
i also have the same problem as xxxxNIGGORILLAxx . The code for
//slider_1.onRelease = function(){
this.stopDrag()// is there but when i let go of the mouse the slider still follows it.
any ideas guy?
buzzpeppermint 3 years ago
If you change the onPress and onRelease codes to onRollOver and onRollOut it solves this problem.
xxNIGGORILLAxx 3 years ago
Dude, use onReleaseOutside as well as onRelease. Create an onReleaseOutside functions and put all the same code as the onRelease function in it.
Might I say that this video (from a flash actionscripter's point of view) is extremely uninformative and he fails to explain everything properly. He doesn't even touch on what globalToLocal is.
He clearly put an effort in, which is good, but he should spend more time learning before he teaches, and more time explaining why things work how they do.
MachineMalfunction 3 years ago
how im gonna put this on site
samhauns420 3 years ago
Thanks!
Hazzard0 3 years ago
Great vid, and the codes works perfectly. However, when I tried using two buttons from the Library for start and stop (and I had to creat a mocie clip layer to put them in because I hid one when you clicked the other and vice versa) I can no longer get the slider to control the sound. The button loads the sound from the movie clip layer and the slider layer no longer controls it.
Everything works fine by itself, but they do not work together. Any ideas?
Any easy solutions.
zymurg2007 3 years ago
You can see how I used the slider on my website (check my profile). I made the slider verticle instead of horizontal and I started the music to play on load rather than have to press the play button first.
I wanted a single button that changed back and forth between the play state and the stop state which is what I had before I put in the slider vol control but the movie clip would not work with the slider. I don't know why. Check it out on my homepage from my profile. I had 2 use 2 buttons.
zymurg2007 3 years ago
how did you get the music to play on load rather than have to press the play button first?
thanks!
Azoth33 3 years ago
Great Tutorial!!!
UFOENGINE 3 years ago
errrr
if you press the play button more then once, it plays multiple copies of the same song.
To fix this problem, all you need to do is hide the play button after you press it, and show the stop button. Then vice-versa. Nice tutorial.
DragoonKain19 4 years ago
You can also just add a stopAllSounds(); to the play_btn function.
play_btn.onRelease = function(){ stopAllSounds(); mysong = new Sound(); etc...etc...etc...
}
Have fun!
tutvid 3 years ago
hey man, thanx for this, it saved my butt xD
robcarass 4 years ago
This is a magnificent idea for flash/as ignorants such as myself!
I did everything down to the T on this video. Read all the comments in search of an error I cant fix. Video works great ALONE, BUT...I have imported it as a movie (loadMovie) from another SWF file and the sound wont play, buttons don't work and the slider handle goes ANYWHERE you want to take it to. hehehe
Any suggestions or ideas? I have looked EVERYWHERE and cant find anything. Thank you for your time!
dlindo55 4 years ago
i did this tut and it works, you did something wrong, check the code again
loombaron 4 years ago
slider_1.onPress = function(){ this.startDrag(true, _root.groove_1._x, _root.groove_1._y, _root.groove_1._x * 520, _root.groove_1._y);
}
slider_1.onRelease = function(){ this.stopDrag();
}
play_btn.onRelease = function(){ mysong = new Sound(); mysong.attachSound("thenameofyourfile"); mysong.start(0, 30);
}
stop_btn.onRelease = function(){ stopAllSounds();
}
loombaron 4 years ago
slider_1.onMouseMove = function(){ newPoint = new Object(); newPoint.x = this._x newPoint.y = this._y _root.groove_1.globalToLocal(newPoint); _root.mysong.setVolume(-1*newPoint.x)
}
loombaron 4 years ago
copy and paste that code in your AS window, rename the sound with the one you choose so delete where i wrote ¨thenameofyourfile" and write yours, then it should work.
loombaron 4 years ago
This is a magnificent idea for flash/as ignorants such as myself!
I did everything down to the T on this video. Read all the comments in search of an error I cant fix. Video works great ALONE, BUT...I have imported it as a movie (loadMovie) from another SWF file and the sound wont play, buttons don't work and the slider handle goes ANYWHERE you want to take it to. hehehe
Any suggestions or ideas? I have looked EVERYWHERE and cant find anything. Thank you for your time!
dlindo55 4 years ago
tutorials like this are what youtube was designed for. thanks!
Monkeystick 4 years ago
So helpfull!! Thank you so much!! ^_^
HorrorAddict23 4 years ago
Oh nevermind, I already got it. You were able to explain it clearly. Thanks for sharing this video. =]
denise33345 4 years ago
Can you also put how to make the pause button? Where am I going to put the music?
denise33345 4 years ago
How did you place the music??
denise33345 4 years ago
hey i cant import any music? can u please tell me y?
rastamon77 4 years ago
or is it because im using Actionscript 3.0?
cobinfire 4 years ago
Thank you so much for your flash tutorial videos! I have been looking all over the net for some decent vids and all of them are non-video (text) or poorly commented vids and I cannot follow them, Thanks again TutVid!
elliotnkesy 4 years ago
what if I want the stop button to pause the sound, instead of stopping it.
Thanks
jerrime1213 4 years ago
Simple! I will explain with code
var sound:Sound = new Sound();
sound.pause();
In pause you can pass in either TRUE or FALSE
If its FALSE then you just pause the video, if its TRUE then you play the video when its paused. If you leave it without a TRUE or FALSE, then you will get a toggle button.
warlord90210 4 years ago
I found this extremely useful, but there are a few flaws in your code. Ie. you should include the stopAllSounds(); function before starting the music in the play button. That way you won't get overlap in the sounds.
[...]
AndrewG4d 4 years ago
As well, I don't know if Flash Pro 8 has this, but x is registered on a document-size scale. Meaning, x is the initial start point for the slider. The width is property of the size of the slider. X is not the property of the size. My slider is at a position of -320, so the product of the setVolume() function becomes 320. Yikes. Really loud. It then decreases in volume as one slides it. Kinda opposite of what I want, but that's alright, I'll figure it out.
AndrewG4d 4 years ago
erm, I apologize, the "x" co-ordinate property is determined by relation of the object to the center of the screen. I've noticed this when dealing with it... trying to get it to work properly...
AndrewG4d 4 years ago
now, there is an issue with the snapping of the volume bar to the mouse, after being released on the slider. I have solved this.
include this condition in the vol_slide.onMouseMove function before everything else:
[code]
if (_xmouse > -69) { vol_slide.stopDrag(true); // don't apply the volume idea, and don't track the cursor } else {
// volume code as described
[/code]
AndrewG4d 4 years ago
replace the -69 with the sum of your track bar's x co-ordinate plus (+) the width. Since my x co-ordinate was -320, and width was 251, the result was -69. Viola, it stops it from moving and sticking to the cursor.
AndrewG4d 4 years ago
How can I make a fwd or rew button work for this player??
noukyrast 4 years ago
I feel that he is not going too fast, just perfect. You can always use the pause button on YouTube, if it was too fast... I wouldn't like to sit here and listen to him for 40 minutes, if it can be done in 20 minutes. Thanks tutvid... great video!
emirpasic 4 years ago 3
I know you are doing this for free, which is sweet, but if you ever want to make money, which I would pay for, you seriously need to go 50% slower and say EVERY damn thing you click and type.
MovieNutGal 4 years ago
don't be mean
chordchart 4 years ago
Great voice, but you go WAY too fast, and assume people know what you are doing. If you want to make tutorals, you have to assume someone knows NOTHING and go STEP by STEP, S-L-O-W-L-Y.
MovieNutGal 4 years ago
Ok, I am going nutso. I JUST got Flash 8 pro like you are using in the video here.
First off when I make the initial bar it is blue and a SOLID color. NOT grey and gradiated like yours.
Second, you say grab the fill transform tool. Are you maiking up your OWN names for tools?
It is called the GRADIENT transform tool.
Anyway I click on it and it DOES NOT do whatever you chose to move the bar around.
What the heck is going on?
MovieNutGal 4 years ago
I have Flash MX and am trying to keep up with you, lol. WHy when I make the initial slider bar it does not open colored in like yours does?
MovieNutGal 4 years ago
Very nice of you to do this, but you go WAY TOO FAST. You need to go ALOT slower.
MovieNutGal 4 years ago
once again i aced this in the first try =) .. u rule man.
one thing and i hate to bother you but. how can i make the slider move as the song plays along?
MrFunk1503 4 years ago
Hey thanks for this! Really helpful with my assignment!
circuscat200 4 years ago