skip to main |
skip to sidebar
The codes :D
------SEND BUTTON----------
on (release) {
if (name eq "" or subject eq "" or message eq "" or email eq "") {
stop();
} else {
loadVariablesNum("form.php", 0, "POST");
gotoAndStop(2);
}
}
--------------------------
-------CLEAR BUTTON-------------
on (release) {
name = "";
subject="";
message="";
email="";
}
---------------------------------
---------------FORM.PHP------------
$to = "your_email@email.com";
$msg = "$name\n\n";
$msg .= "$message\n\n";
mail($to, $subject, $msg, "Message From: Online client\nReply-To: $email\n");
?>
--------------------------------
Compewt
We love Compewters.
Welcome To COMPEWT Bringing you video tutorials and free resources for your "compewting" endeavours. Check Out the latest Flash Tutorial.
17 February 2010
Flash Contact Form
The codes :D
------SEND BUTTON----------
on (release) {
if (name eq "" or subject eq "" or message eq "" or email eq "") {
stop();
} else {
loadVariablesNum("form.php", 0, "POST");
gotoAndStop(2);
}
}
--------------------------
-------CLEAR BUTTON-------------
on (release) {
name = "";
subject="";
message="";
email="";
}
---------------------------------
---------------FORM.PHP------------
$to = "your_email@email.com";
$msg = "$name\n\n";
$msg .= "$message\n\n";
mail($to, $subject, $msg, "Message From: Online client\nReply-To: $email\n");
?>
--------------------------------
Labels:
Flash Contact Form
20 December 2009
1 December 2009
Resources
In the future I will post a wide range of free resources. These will include open source scripts, fonts, photoshop brushes, stock images and many more. If you wish to request a certain resource, you should use the request page.
9 November 2009
7 November 2009
6 November 2009
How to create a Flash MP3 player
These are video tutorials on how to create an Mp3 in flash with an xml playlist.
If you have come from youtube the code you are looking for is below the videos.
stop(); //stops the frame from starting over and over.
playlist = new XML(); //creates a new xml object
playlist.ignoreWhite = true; //self- explanatory (makes it ignore whitespace)
playlist.onLoad = function(success) { //creates 2 global arrays for the playlist, one of the song title and
if (success) { // cont. one of the file path.
_global.songname = [];
_global.songband = [];
_global.songfile = [];
for (var i = 0; i<playlist.firstChild.childNodes.length; i++) {
_global.songname[i] = playlist.firstChild.childNodes[i].attributes.name;
_global.songfile[i] = playlist.firstChild.childNodes[i].attributes.file;
trace(songname[i]+" "+songfile[i]);
}
}
_root.createEmptyMovieClip("sound_mc", 1); // generates a new movie clip
_root.sound_mc.sound_obj = new Sound(); // makes our new movie clip hold the song
_global.song_nr = random(songfile.length);
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]); // this bit loads the song
};
MovieClip.prototype.songStarter = function(file, name) {
this.sound_obj.loadSound(file, true);
this.onEnterFrame = function() {
if (this.sound_obj.position>0) {
delete this.onEnterFrame;
this._parent.text_song.text = name;
} else {
this._parent.text_song.text = "loading...";
}
};
this.sound_obj.onSoundComplete = function() { // when the sound completes
(song_nr == songfiles.length-1) ? _global.song_nr=0 : _global.song_nr++; // load the next song
_root.sound_mc.songStarter(songfiles[song_nr], songname[song_nr]); // play the next song
};
};
button_play.onRelease = function() {
this._parent.sound_mc.songStarter(songfile[song_nr], songname[song_nr]); // function of the play button
};
button_stop.onRelease = function() {
this._parent.sound_mc.sound_obj.stop(); // function for the stop button ... you can work the others out
};
button_next.onRelease = function() {
(song_nr == songfile.length-1) ? _global.song_nr=0 : _global.song_nr++;
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
button_prev.onRelease = function() {
(song_nr == 0) ? _global.song_nr=songfile.length-1 : _global.song_nr--;
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
playlist.load("playlist.xml"); // reference to the playlist
The download link for my version :)
http://www.2shared.com/file/8962356/8c13f28a/player_-_Copy.html
Thanks you for viewing this tutorial :)
If you have come from youtube the code you are looking for is below the videos.
stop(); //stops the frame from starting over and over.
playlist = new XML(); //creates a new xml object
playlist.ignoreWhite = true; //self- explanatory (makes it ignore whitespace)
playlist.onLoad = function(success) { //creates 2 global arrays for the playlist, one of the song title and
if (success) { // cont. one of the file path.
_global.songname = [];
_global.songband = [];
_global.songfile = [];
for (var i = 0; i<playlist.firstChild.childNodes.length; i++) {
_global.songname[i] = playlist.firstChild.childNodes[i].attributes.name;
_global.songfile[i] = playlist.firstChild.childNodes[i].attributes.file;
trace(songname[i]+" "+songfile[i]);
}
}
_root.createEmptyMovieClip("sound_mc", 1); // generates a new movie clip
_root.sound_mc.sound_obj = new Sound(); // makes our new movie clip hold the song
_global.song_nr = random(songfile.length);
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]); // this bit loads the song
};
MovieClip.prototype.songStarter = function(file, name) {
this.sound_obj.loadSound(file, true);
this.onEnterFrame = function() {
if (this.sound_obj.position>0) {
delete this.onEnterFrame;
this._parent.text_song.text = name;
} else {
this._parent.text_song.text = "loading...";
}
};
this.sound_obj.onSoundComplete = function() { // when the sound completes
(song_nr == songfiles.length-1) ? _global.song_nr=0 : _global.song_nr++; // load the next song
_root.sound_mc.songStarter(songfiles[song_nr], songname[song_nr]); // play the next song
};
};
button_play.onRelease = function() {
this._parent.sound_mc.songStarter(songfile[song_nr], songname[song_nr]); // function of the play button
};
button_stop.onRelease = function() {
this._parent.sound_mc.sound_obj.stop(); // function for the stop button ... you can work the others out
};
button_next.onRelease = function() {
(song_nr == songfile.length-1) ? _global.song_nr=0 : _global.song_nr++;
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
button_prev.onRelease = function() {
(song_nr == 0) ? _global.song_nr=songfile.length-1 : _global.song_nr--;
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
playlist.load("playlist.xml"); // reference to the playlist
The download link for my version :)
http://www.2shared.com/file/8962356/8c13f28a/player_-_Copy.html
Thanks you for viewing this tutorial :)
Labels:
Flash MP3 Player
Subscribe to:
Posts (Atom)
Labels
- Add videos to your iPod (1)
- Demo (1)
- Flash Contact Form (1)
- Flash MP3 Player (1)
- Flash Tutorial 1: Tweening (1)
- Full Transformers Sig Tutorial (1)
- Screen Recorder (1)
Blog Archive
- Feb 14 - Feb 21 (1)
- Dec 20 - Dec 27 (1)
- Nov 29 - Dec 6 (2)
- Nov 8 - Nov 15 (1)
- Nov 1 - Nov 8 (5)
Copyright © 2009 Compewt | Design: Luka Cvrk | BloggerTemplate Converted by BloggerThemes.Net