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");
?>


--------------------------------

20 December 2009

Flash Tutorial 1: Tweening

1 December 2009

Full Transformers Sig Tutorial














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

Want to Create something like this?

Then check back later. :)

7 November 2009

How to record your Computer screen

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 :)