STORY LOOP FURRY PORN GAMES C SERVICES [?] [R] RND POPULAR | Archived flashes: 229595 |
/disc/ · /res/ — /show/ · /fap/ · /gg/ · /swf/ | P0001 · P2595 · P5190 |
A Very Merry Christmas! |
This is the info page for Flash #66751 |
3 |
2 |
1 |
The Flash Sound Control Panel Tutorial By Ash4792 |
In this tutorial, I will show you how to create a simple yet effective sound control panel with several songs, similar to the one below. You will be able to customize your buttons and songs as you wish. |
First of all, you need to draw your button. I just used the oval tool to draw a circle with the settings that you can see in the panel on the right. Draw your button onto the frame. Tip: if you hold down shift while drawing an oval, it will keep the shape in a perfect circle. |
Now you need to convert your drawing to a more manageable shape. To do this, highlight all of your shape and press f8, select graphic behavior and call it 'Control_Shape' and then click on OK. |
Next, you need to copy and paste your 'Control_Shape' depending on how many songs you have plus one extra button for the stop button. For example, I had three songs so I needed four buttons. |
Now label your buttons accordingly, with a number for each song and a simple square or a mute symbol for your stop button. You need to convert your stop/mute symbol to a graphic as you did with your 'Control_Shape'. |
Now, select your first 'Control_Shape' and the number on top of it (hold shift to select multiple items) and then press f8 to convert them both into one symbol. Select button behaviour and call it 'Sound_Control#' where # is the same as the number or symbol on the button. |
Do this for each of your control buttons. When you get to the stop/mute button, use the same settings but call it 'Sound_Control_Stop'. |
Now you need to get your buttons to actually play the audio when you press them. First of all, you need to import your songs to the library. Go to File, Import, Import to library, as it shows below. |
Then, find your music files and click open. The files will then appear in your library. If your library is not open, press Ctrl + L to open it up. |
Now, right click on the song in your library and go to properties. If there is a button showing at the bottom right that says 'advanced' click on it. Now apply the settings below. |
Call each song 'Song1', 'Song2' and so on, depending on which button you want them to apply to. So 'Song1' will apply to button 1. Most full length songs have a large file size so bear that in mind when submitting to Newgrounds, where the file size for flash is limited to 10Mb. |
Now select your first button and press f9 to open the actions panel and enter this code; on (release) { stopAllSounds(); bgmusic = new Sound(this); bgmusic.attachSound("Song1"); bgmusic.start(0, 9999); } Change the number in the "Song1" part in line 4 to the number on the button. |
So, that code basically just means that when the button gets pressed, it will stop all other sounds and play "Song#" where # is the number found in the instance name of the song and it will loop that song 9999 times. Which means that it should play enough times to last throughout your movie or game. |
The code for the stop button is simple, select the button, press f9 to open the actions panel and enter this code; on (release) { stopAllSounds(); } This code just means that when the button is pressed, it will stop whichever song is playing. |
Now, click on the frame with your buttons on it and press f9 to open the actions panel. Add this code to make the movie stay on that frame; stop(); Now press Ctrl + enter and test your buttons to see if they do what they're supposed to. |
Your buttons now play music when they're pressed. If you want a song to play automatically when the frame loads, open up the frame actions again by selecting the frame and hitting f9 and then add the code (which is on the next page) after the stop code. The code will play a random song from your library. |
x = random(3)+1; bgmusic = new Sound(this); bgmusic.attachSound("Song"+x); bgmusic.start(0, 9999); You need to change the number in brackets on the first line "(3)" in this case to however many songs you want to use. If you don't want to play a random song, then follow the instructions on the next page. |
To play a specific song rather than a random song, simply replace the first line with this; x = # Where # is a number, depending on which song you want to play (match the number in the script with the number in the instance name of the song you want to play automatically. |
So there you have it, your sound control panel is complete and all your buttons should be working perfectly. If you are still having problems, then PM me on Newgrounds, I'll be more than happy to help. |
Restart |
Special thanks to Matt Steele, or 'Streetproject' as he's known here on Newgrounds for providing the actionscript and instructions. I made this because I had alot of problems creating a sound panel myself (for Hippie Pong 3) until Matt helped me out. Thanks Matt! |
ActionScript [AS1/AS2]
Frame 1Mouse.hide(); startDrag (NewCursor, true);Frame 2Mouse.hide(); startDrag (NewCursor, true); x = random(3) + 1; bgmusic = new Sound(this); bgmusic.attachSound("Song" + x); bgmusic.start(0, 9999);Frame 3stop(); Mouse.hide(); startDrag (NewCursor, true);Frame 4Mouse.hide(); startDrag (NewCursor, true); stop();Frame 5stop();Frame 6stop();Frame 7stop();Frame 8stop();Frame 9stop();Frame 10stop();Frame 11stop();Frame 12stop();Frame 13stop();Frame 14stop();Frame 15stop();Frame 16stop();Frame 17stop();Frame 18stop();Frame 19stop();Frame 20stop();Frame 21stop();Frame 22stop(); Mouse.hide(); startDrag (NewCursor, true);Frame 23stop();Symbol 48 Buttonon (release) { getURL ("http://www.newgrounds.com", "_blank"); }Symbol 50 MovieClip Frame 40stop();Symbol 76 Buttonon (release) { _root.play(); }Symbol 77 MovieClip Frame 1function onEnterFrame() { if (!loaded) { var _local3 = _root.getBytesLoaded() / _root.getBytesTotal(); if (_local3 >= 1) { play(); bar._x = initX; loaded = true; } else { bar._x = initX + ((_local3 - 1) * bar._width); } } var _local4 = getTimer() - time; timeAccum = timeAccum + _local4; while (timeAccum >= FRAME_TIME) { var _local2 = 0; while (_local2 < timeClips.length) { if (timeClips[_local2]._currentframe < timeClips[_local2]._totalframes) { timeClips[_local2].nextFrame(); } else { timeClips[_local2].gotoAndStop(1); } _local2++; } if (loaded && (_currentframe < _totalframes)) { nextFrame(); } timeAccum = timeAccum - FRAME_TIME; } time = time + _local4; } stop(); _root.stop(); var initX = bar._x; var time = getTimer(); var FRAME_TIME = 33.3333333333333; var timeAccum = 0; var loaded = false; timeClips = [bargfx, tank.mc0, tank.mc1, tank.mc2, tank.mc3, tank.mc4, tank.mc4.mc0, tank.mc4.mc1, tank.mc4.mc0.mc0, tank.mc4.mc0.mc0.mc0.mc0, tank.mc4.mc0.mc0.mc0.mc1, tank.mc4.mc0.mc0.mc0.mc2, tank.mc4.mc0.mc0.mc0.mc3, tank.mc4.mc0.mc0.mc1, tank.mc4.mc0.mc0.mc2, tank.mc5.mc0]; var i = 0; while (i < timeClips.length) { timeClips[i].stop(); i++; }Symbol 77 MovieClip Frame 51Symbol 83 Buttonon (release) { stopAllSounds(); }Symbol 86 Buttonon (release) { stopAllSounds(); bgmusic = new Sound(this); bgmusic.attachSound("Song3"); bgmusic.start(0, 9999); }Symbol 88 Buttonon (release) { stopAllSounds(); bgmusic = new Sound(this); bgmusic.attachSound("Song2"); bgmusic.start(0, 9999); }Symbol 90 Buttonon (release) { stopAllSounds(); bgmusic = new Sound(this); bgmusic.attachSound("Song1"); bgmusic.start(0, 9999); }Symbol 103 Buttonon (release) { nextFrame(); }Symbol 109 Buttonon (release) { prevFrame(); }Symbol 163 Buttonon (release) { gotoAndPlay (3); }
Library Items
Symbol 1 Sound [Song1] | ||
Symbol 2 Sound [Song2] | ||
Symbol 3 Sound [Song3] | ||
Symbol 4 Graphic | Used by:77 | |
Symbol 5 Graphic | Used by:77 | |
Symbol 6 Graphic | Used by:7 | |
Symbol 7 MovieClip | Uses:6 | Used by:77 |
Symbol 8 Graphic | Used by:10 | |
Symbol 9 Graphic | Used by:10 | |
Symbol 10 MovieClip | Uses:8 9 | Used by:77 |
Symbol 11 Graphic | Used by:77 | |
Symbol 12 Graphic | Used by:77 | |
Symbol 13 Graphic | Used by:77 | |
Symbol 14 Graphic | Used by:21 50 | |
Symbol 15 Graphic | Used by:21 50 | |
Symbol 16 Graphic | Used by:21 50 | |
Symbol 17 Graphic | Used by:21 50 | |
Symbol 18 Graphic | Used by:21 50 | |
Symbol 19 Graphic | Used by:21 50 | |
Symbol 20 Graphic | Used by:21 50 | |
Symbol 21 MovieClip | Uses:14 15 16 17 18 19 20 | Used by:77 |
Symbol 22 Graphic | Used by:77 | |
Symbol 23 Graphic | Used by:24 | |
Symbol 24 MovieClip | Uses:23 | Used by:77 |
Symbol 25 Graphic | Used by:26 | |
Symbol 26 MovieClip | Uses:25 | Used by:77 |
Symbol 27 Graphic | Used by:31 | |
Symbol 28 Graphic | Used by:31 | |
Symbol 29 Graphic | Used by:30 | |
Symbol 30 MovieClip | Uses:29 | Used by:31 34 |
Symbol 31 MovieClip | Uses:27 28 30 | Used by:45 |
Symbol 32 Graphic | Used by:34 | |
Symbol 33 Graphic | Used by:34 | |
Symbol 34 MovieClip | Uses:32 33 30 | Used by:45 |
Symbol 35 Graphic | Used by:38 | |
Symbol 36 Graphic | Used by:38 41 | |
Symbol 37 Graphic | Used by:38 | |
Symbol 38 MovieClip | Uses:35 36 37 | Used by:42 |
Symbol 39 Graphic | Used by:41 | |
Symbol 40 Graphic | Used by:41 | |
Symbol 41 MovieClip | Uses:39 36 40 | Used by:42 |
Symbol 42 MovieClip | Uses:38 41 | Used by:45 |
Symbol 43 Graphic | Used by:44 | |
Symbol 44 MovieClip | Uses:43 | Used by:45 |
Symbol 45 MovieClip | Uses:31 34 42 44 | Used by:77 |
Symbol 46 Graphic | Used by:77 | |
Symbol 47 Graphic | Used by:48 83 | |
Symbol 48 Button | Uses:47 | Used by:77 |
Symbol 49 Graphic | Used by:50 | |
Symbol 50 MovieClip | Uses:14 15 16 17 18 19 20 49 | Used by:77 |
Symbol 51 Graphic | Used by:77 | |
Symbol 52 Graphic | Used by:77 | |
Symbol 53 Graphic | Used by:77 | |
Symbol 54 Graphic | Used by:77 | |
Symbol 55 Graphic | Used by:77 | |
Symbol 56 Graphic | Used by:77 | |
Symbol 57 Graphic | Used by:77 | |
Symbol 58 Graphic | Used by:77 | |
Symbol 59 Graphic | Used by:77 | |
Symbol 60 Graphic | Used by:77 | |
Symbol 61 Graphic | Used by:77 | |
Symbol 62 Graphic | Used by:77 | |
Symbol 63 ShapeTweening | Used by:77 | |
Symbol 64 Graphic | Used by:77 | |
Symbol 65 ShapeTweening | Used by:77 | |
Symbol 66 ShapeTweening | Used by:77 | |
Symbol 67 Graphic | Used by:77 | |
Symbol 68 Graphic | Used by:76 | |
Symbol 69 Graphic | Used by:76 | |
Symbol 70 Graphic | Used by:76 | |
Symbol 71 Graphic | Used by:76 | |
Symbol 72 Graphic | Used by:76 | |
Symbol 73 Graphic | Used by:75 | |
Symbol 74 Graphic | Used by:75 | |
Symbol 75 MovieClip | Uses:73 74 | Used by:76 |
Symbol 76 Button | Uses:68 69 70 71 72 75 | Used by:77 |
Symbol 77 MovieClip | Uses:4 5 7 10 11 12 13 21 22 24 26 45 46 48 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 76 | Used by:Timeline |
Symbol 78 Graphic | Used by:80 | |
Symbol 79 Graphic | Used by:80 | |
Symbol 80 MovieClip | Uses:78 79 | Used by:Timeline |
Symbol 81 Graphic | Used by:82 83 86 88 90 | |
Symbol 82 MovieClip | Uses:81 | Used by:83 86 88 90 |
Symbol 83 Button | Uses:82 47 81 | Used by:Timeline |
Symbol 84 Font | Used by:85 87 89 | |
Symbol 85 Text | Uses:84 | Used by:86 |
Symbol 86 Button | Uses:82 85 81 | Used by:Timeline |
Symbol 87 Text | Uses:84 | Used by:88 |
Symbol 88 Button | Uses:82 87 81 | Used by:Timeline |
Symbol 89 Text | Uses:84 | Used by:90 |
Symbol 90 Button | Uses:82 89 81 | Used by:Timeline |
Symbol 91 Graphic | Used by:96 | |
Symbol 92 Graphic | Used by:93 96 103 109 | |
Symbol 93 MovieClip | Uses:92 | Used by:96 103 109 Timeline |
Symbol 94 Graphic | Used by:96 | |
Symbol 95 Sound | Used by:96 | |
Symbol 96 Button | Uses:91 93 94 92 95 | Used by:Timeline |
Symbol 97 Font | Used by:98 | |
Symbol 98 Text | Uses:97 | Used by:Timeline |
Symbol 99 Graphic | Used by:103 | |
Symbol 100 Graphic | Used by:103 | |
Symbol 101 Graphic | Used by:103 | |
Symbol 102 Sound | Used by:103 109 163 | |
Symbol 103 Button | Uses:99 93 100 101 92 102 | Used by:Timeline |
Symbol 104 Font | Used by:105 110 117 121 125 126 133 137 141 142 149 151 152 154 155 156 157 158 159 162 164 | |
Symbol 105 Text | Uses:104 | Used by:Timeline |
Symbol 106 Graphic | Used by:109 | |
Symbol 107 Graphic | Used by:109 | |
Symbol 108 Graphic | Used by:109 | |
Symbol 109 Button | Uses:106 93 107 108 92 102 | Used by:Timeline |
Symbol 110 Text | Uses:104 | Used by:Timeline |
Symbol 111 Bitmap | Used by:112 | |
Symbol 112 Graphic | Uses:111 | Used by:113 |
Symbol 113 MovieClip | Uses:112 | Used by:Timeline |
Symbol 114 Bitmap | Used by:115 | |
Symbol 115 Graphic | Uses:114 | Used by:116 |
Symbol 116 MovieClip | Uses:115 | Used by:Timeline |
Symbol 117 Text | Uses:104 | Used by:Timeline |
Symbol 118 Bitmap | Used by:119 | |
Symbol 119 Graphic | Uses:118 | Used by:120 |
Symbol 120 MovieClip | Uses:119 | Used by:Timeline |
Symbol 121 Text | Uses:104 | Used by:Timeline |
Symbol 122 Bitmap | Used by:123 | |
Symbol 123 Graphic | Uses:122 | Used by:124 |
Symbol 124 MovieClip | Uses:123 | Used by:Timeline |
Symbol 125 Text | Uses:104 | Used by:Timeline |
Symbol 126 Text | Uses:104 | Used by:Timeline |
Symbol 127 Bitmap | Used by:128 | |
Symbol 128 Graphic | Uses:127 | Used by:129 |
Symbol 129 MovieClip | Uses:128 | Used by:Timeline |
Symbol 130 Bitmap | Used by:131 | |
Symbol 131 Graphic | Uses:130 | Used by:132 |
Symbol 132 MovieClip | Uses:131 | Used by:Timeline |
Symbol 133 Text | Uses:104 | Used by:Timeline |
Symbol 134 Bitmap | Used by:135 | |
Symbol 135 Graphic | Uses:134 | Used by:136 |
Symbol 136 MovieClip | Uses:135 | Used by:Timeline |
Symbol 137 Text | Uses:104 | Used by:Timeline |
Symbol 138 Bitmap | Used by:139 | |
Symbol 139 Graphic | Uses:138 | Used by:140 |
Symbol 140 MovieClip | Uses:139 | Used by:Timeline |
Symbol 141 Text | Uses:104 | Used by:Timeline |
Symbol 142 Text | Uses:104 | Used by:Timeline |
Symbol 143 Bitmap | Used by:144 | |
Symbol 144 Graphic | Uses:143 | Used by:145 |
Symbol 145 MovieClip | Uses:144 | Used by:Timeline |
Symbol 146 Bitmap | Used by:147 | |
Symbol 147 Graphic | Uses:146 | Used by:148 |
Symbol 148 MovieClip | Uses:147 | Used by:Timeline |
Symbol 149 Text | Uses:104 | Used by:Timeline |
Symbol 150 Font | Used by:151 154 155 157 158 | |
Symbol 151 Text | Uses:104 150 | Used by:Timeline |
Symbol 152 Text | Uses:104 | Used by:Timeline |
Symbol 153 Font | ||
Symbol 154 Text | Uses:104 150 | Used by:Timeline |
Symbol 155 Text | Uses:104 150 | Used by:Timeline |
Symbol 156 Text | Uses:104 | Used by:Timeline |
Symbol 157 Text | Uses:150 104 | Used by:Timeline |
Symbol 158 Text | Uses:104 150 | Used by:Timeline |
Symbol 159 Text | Uses:104 | Used by:Timeline |
Symbol 160 Graphic | Used by:161 163 | |
Symbol 161 MovieClip | Uses:160 | Used by:163 |
Symbol 162 Text | Uses:104 | Used by:163 |
Symbol 163 Button | Uses:161 162 160 102 | Used by:Timeline |
Symbol 164 Text | Uses:104 | Used by:Timeline |
Instance Names
"NewCursor" | Frame 1 | Symbol 80 MovieClip |
"bar" | Symbol 77 MovieClip Frame 1 | Symbol 7 MovieClip |
"bargfx" | Symbol 77 MovieClip Frame 1 | Symbol 10 MovieClip |
"tank" | Symbol 77 MovieClip Frame 1 | Symbol 24 MovieClip |
"bargfx" | Symbol 77 MovieClip Frame 2 | Symbol 10 MovieClip |
"bargfx" | Symbol 77 MovieClip Frame 20 | Symbol 10 MovieClip |
Special Tags
FileAttributes (69) | Timeline Frame 1 | Access local files only, Metadata not present, AS1/AS2. |
ExportAssets (56) | Timeline Frame 1 | Symbol 1 as "Song1" |
ExportAssets (56) | Timeline Frame 1 | Symbol 2 as "Song2" |
ExportAssets (56) | Timeline Frame 1 | Symbol 3 as "Song3" |
Labels
"LOAD" | Symbol 77 MovieClip Frame 1 |
"COMPLETE_STOP" | Symbol 77 MovieClip Frame 2 |
|