Setting up Contact forms on AS3, Flash CS5????

Does anyone have a clear answer for me please, I have been through Training with Trani on HD and also with the Lynda.com package, as I try to make the second contact form - the program tells me that there is a function repitition so what must I do cause I am making more than 1 contact form for my website?
Does someone have an easy solution for me to go through cause its been like a week and I am tired of this silly issue, my website is done and now waiting to publish yet this error is not helping at all. Thanks for all the help...

If you understand what I am saying I do not see the challenge of which you speak. You can rename functions to anything you like, just not the same name as another function.  The only thing I can imagine is that you do not understand that functions you see defined in code are named by whoever wrote the code.  So if you see a function like...
function someWords(){
   // code
that is a function that you can rename as you please...
function someOtherWords(){
   // other code
so long as you change whatever calls upon that function as well.
But if the code within the functions is not going to change, then you don't need to have two functions defined to do the same thing anyways... just share the same one for both forms

Similar Messages

  • I have been looking everywhere on how to code a contact form with as3

    I wouldn't think it is such an uncommon thing, but I have been unable to find tutorials past flash 5, or as2, on how to code contact forms.
    I have a simple movieclip symbol, with text fields, all with instance names, and need to find out how to pass the information from flash to a php
    script.  If anyone can help, or atleast point me towards a tutorial that uses something newer than flash 5 and newer than 2004, it would be awesome.

    Would any of these work?
    http://www.webdesignmo.com/blog/2008/08/14/flash-contact-form-in-actionscript-3/
    check this one first:
    http://www.kirupa.com/forum/showthread.php?t=272898
    http://www.edesignerz.net/flash/527--flash-cs3-as3-contact-form-with-php-parser-actionscri pt-3-video-tutorial
    Hope this helps!

  • MP3 Player in AS3 Flash CS5 with autoresume feature?

    I created a web site with an MP3 player on several of the pages. I created the player using AS3 in Flash CS5 Professional. It has a volume slider on it that I set the initial value to 2. It music that is loaded is identified in an XML file. If the user changes the volume, pauses or stops the music, I want to use autoresume (or something equivalent) to make sure the player continues in the same status across pages.The player is embeded on the pages using SWFObject.
    I have searched for several days on the web trying to find a solution and have not found one. I don't know if there is something I need to do in AS3, in Flash, on my pages or if it can be handled in PHP or XML. Does anyone know a good approach?

    Thank you for your help. I put the code in and it works except for one thing, the position of the slider does not change when I bring the player up the second time, it is always set to the default position. I do not know what value to store and reset for the slider position.
    I have three different books that I have searched and I have searched on the Internet but cannot find the answer. I have pasted the Action Script below. I hope you can help me. In the meantime, I will continue to look more myself. Thank you again.
    import flash.display.DisplayObject;
    import fl.events.SliderEvent;
    import flash.media.SoundTransform;
    import flash.net.SharedObject;
    // rewind and fast forward rate
    const SEARCH_RATE:int = 3000;
    // XML file that holds reference to the mp3 files and used to load the tracks
    const XML_FILE:String = "tracks.xml";
    const FORWARD:String = "forward";
    const BACKWARD:String = "backward";
    var playDirection:String;
    var index:Number = 0;
    var trackPos:Number = 0;
    var trackOn:Boolean = false;
    var trackXML:XML;
    var trackList:XMLList;
    var urlRequest:URLRequest;
    var urlLoader:URLLoader;
    var track:Sound = new Sound  ;
    var newTrack:Sound;
    var newUrlRequest:URLRequest;
    var chan:SoundChannel = new SoundChannel  ;
    var context:SoundLoaderContext = new SoundLoaderContext(7000,false);
    var trackTimer:Timer = new Timer(200);
    var trans:SoundTransform;
    var mySO:SharedObject = SharedObject.getLocal("MP3Vol");
    var currVol:Number = mySO.data.MP3CurrVol;
    if (!mySO.data.MP3CurrVol) {
        currVol = .2;
    // create a new URLRequest object and use to reference the XML file
    urlRequest = new URLRequest(XML_FILE);
    // create a new URLLoader object to load the XML file
    urlLoader = new URLLoader(urlRequest);
    urlLoader.addEventListener(Event.COMPLETE, onceLoaded);
    urlLoader.load(urlRequest);
    //listener for the volume slider;
    volSlide.addEventListener(SliderEvent.CHANGE, volumeChange);
    function onceLoaded(e:Event):void
        trackXML = new XML(e.target.data);
        trackList = trackXML.track;
        urlRequest = new URLRequest(trackList[index].path);
        trans = new SoundTransform(currVol);
        track.addEventListener(Event.COMPLETE, trackCompleteHandler);
        track.addEventListener(ProgressEvent.PROGRESS, trackProgressHandler);
        track.load(urlRequest, context);
        chan = track.play(trackPos);
        chan.soundTransform = trans;
        chan.addEventListener(Event.SOUND_COMPLETE, playNext);
    function trackCompleteHandler(e:Event):void
        trackOn = true;
        title_txt.text = trackList[index].title;
        performer_txt.text = trackList[index].performer;
        e.target.removeEventListener(Event.COMPLETE, trackCompleteHandler);
        e.target.removeEventListener(ProgressEvent.PROGRESS, trackProgressHandler);
    function trackProgressHandler(pe:ProgressEvent):void
        var percent:int = (pe.target.bytesLoaded / pe.target.bytesTotal) * 100;
        performer_txt.text = "Loading...";
        title_txt.text = percent + "%";
    play_mc.addEventListener(MouseEvent.CLICK, playTrack);
    stop_mc.addEventListener(MouseEvent.CLICK, stopTrack);
    next_mc.addEventListener(MouseEvent.CLICK, nextTrack);
    prev_mc.addEventListener(MouseEvent.CLICK, prevTrack);
    pause_mc.addEventListener(MouseEvent.CLICK, pauseTrack);
    ffwrd_mc.addEventListener(MouseEvent.CLICK, ffwrdTrack);
    rewind_mc.addEventListener(MouseEvent.CLICK, rwndTrack);
    function playTrack(e:MouseEvent):void
        trackTimer.stop();
        if (! trackOn)
            newUrlRequest = new URLRequest(trackXML.track[index].path);
            newTrack = new Sound  ;
            newTrack.addEventListener(Event.COMPLETE, trackCompleteHandler);
            newTrack.addEventListener(ProgressEvent.PROGRESS, trackProgressHandler);
            newTrack.load(newUrlRequest, context);
            chan = newTrack.play(trackPos);
            chan.soundTransform = trans;
            chan.addEventListener(Event.SOUND_COMPLETE, playNext);
            play_mc.removeEventListener(MouseEvent.CLICK, playTrack);
    function stopTrack(e:MouseEvent):void
        trackTimer.stop();
        if (trackOn)
            chan.stop();
            trackOn = false;
            play_mc.visible = true;
            play_mc.addEventListener(MouseEvent.CLICK, playTrack);
        trackPos = 0;
    function nextTrack(e:MouseEvent):void
        if (index < trackList.length() - 1)
            index++;
        else
            index = 0;
        trackPos = 0;
        chan.stop();
        newUrlRequest = new URLRequest(trackList[index].path);
        newTrack = new Sound  ;
        newTrack.addEventListener(Event.COMPLETE, trackCompleteHandler);
        newTrack.addEventListener(ProgressEvent.PROGRESS, trackProgressHandler);
        newTrack.load(newUrlRequest, context);
        chan = newTrack.play(trackPos);
        chan.soundTransform = trans;
        chan.addEventListener(Event.SOUND_COMPLETE, playNext);
        track = newTrack;
    function prevTrack(e:MouseEvent):void
        if (index > 0)
            index--;
        else
            index = trackList.length() - 1;
        trackPos = 0;
        chan.stop();
        newUrlRequest = new URLRequest(trackList[index].path);
        newTrack = new Sound  ;
        newTrack.addEventListener(Event.COMPLETE, trackCompleteHandler);
        newTrack.addEventListener(ProgressEvent.PROGRESS, trackProgressHandler);
        newTrack.load(newUrlRequest, context);
        chan = newTrack.play(trackPos);
        chan.soundTransform = trans;
        chan.addEventListener(Event.SOUND_COMPLETE, playNext);
        track = newTrack;
    function pauseTrack(e:MouseEvent):void
        if (trackOn)
            trackPos = chan.position;
            chan.stop();
            play_mc.visible = true;
            play_mc.addEventListener(MouseEvent.CLICK, playTrack);
            trackOn = false;
    function ffwrdTrack(e:MouseEvent):void
        if (trackOn)
            playDirection = FORWARD;
            trackTimer.addEventListener(TimerEvent.TIMER, trackSearch);
            trackTimer.start();
    function rwndTrack(e:MouseEvent):void
        if (trackOn)
            playDirection = BACKWARD;
            trackTimer.addEventListener(TimerEvent.TIMER, trackSearch);
            trackTimer.start();
    function trackSearch(te:TimerEvent):void
        trackPos = chan.position;
        chan.stop();
        chan.removeEventListener(Event.SOUND_COMPLETE, playNext);
        if (playDirection == FORWARD)
            if (trackPos + SEARCH_RATE < track.length)
                trackPos +=  SEARCH_RATE;
                chan = track.play(trackPos);
                chan.soundTransform = trans;
                chan.addEventListener(Event.SOUND_COMPLETE, playNext);
            else
                if (index < trackList.length() - 1)
                    index++;
                else
                    trackPos = 0;
                    chan.stop();
                    newUrlRequest = new URLRequest(trackList[index].path);
                    newTrack = new Sound  ;
                    newTrack.addEventListener(Event.COMPLETE, trackCompleteHandler);
                    newTrack.addEventListener(ProgressEvent.PROGRESS, trackProgressHandler);
                    newTrack.load(newUrlRequest, context);
                    chan = newTrack.play(trackPos);
                    chan.soundTransform = trans;
                    chan.addEventListener(Event.SOUND_COMPLETE, playNext);
                    track = newTrack;
                    te.target.stop();
                    te.target.removeEventListener(TimerEvent.TIMER, trackSearch);
        else if (playDirection == BACKWARD)
            if (trackPos - SEARCH_RATE > 0)
                trackPos -=  SEARCH_RATE;
                chan = track.play(trackPos);
                chan.soundTransform = trans;
                chan.addEventListener(Event.SOUND_COMPLETE, playNext);
            else
                if (index > 0)
                    index--;
                else
                    index = trackList.length() - 1;
                trackPos = 0;
                chan.stop();
                newUrlRequest = new URLRequest(trackList[index].path);
                newTrack = new Sound  ;
                newTrack.addEventListener(Event.COMPLETE, trackCompleteHandler);
                newTrack.addEventListener(ProgressEvent.PROGRESS, trackProgressHandler);
                newTrack.load(newUrlRequest, context);
                chan = newTrack.play(trackPos);
                chan.soundTransform = trans;
                chan.addEventListener(Event.SOUND_COMPLETE, playNext);
                track = newTrack;
                te.target.stop();
                te.target.removeEventListener(TimerEvent.TIMER, trackSearch);
    function playNext(e:Event):void
        if (index < trackList.length() - 1)
            index++;
        else
            index = 0;
        trackPos = 0;
        chan.stop();
        chan.removeEventListener(Event.SOUND_COMPLETE, playNext);
        newUrlRequest = new URLRequest(trackList[index].path);
        newTrack = new Sound  ;
        newTrack.addEventListener(Event.COMPLETE, trackCompleteHandler);
        newTrack.addEventListener(ProgressEvent.PROGRESS, trackProgressHandler);
        newTrack.load(newUrlRequest, context);
        chan = newTrack.play(trackPos);
        chan.soundTransform = trans;
        chan.addEventListener(Event.SOUND_COMPLETE, playNext);
        track = newTrack;
    // uses volume slider value to control volume
    function volumeChange(e:SliderEvent):void
        currVol = e.target.value;
        trans.volume = currVol;
        chan.soundTransform = trans;
        mySO.data.MP3CurrVol = currVol;
        mySO.flush();

  • Flash Contact form for beginner

    Hello,
    I have been searching online for a tutorial to create a contact form on my flash website. I am using Flash CS3 and ActionScript 3. I am not fluent in ActionScript. I was looking to copy and paste the code and change the information to my own. Any help would be really appreciated.

    You should be able to find a number of tutorials if you search Google using "AS3 contact form tutorial"
    https://www.google.com/search?q=AS3+contact+form+tutorial

  • Using PHP with Flash (contact form)

    I am trying to get a contact form on a flash site to work and
    for some reason the PHP isn't forwarding the message to my email.
    Below is the flash code I have used as well as the document I have
    saved as contact.php. Thank you so much for the help. This is the
    last thing I need to complete for the site and I just can't seem to
    get it right. Thanks.
    Flash Code For the Submit Button:
    onClipEvent (enterFrame) {
    if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
    if (this._currentframe<this._totalframes) {
    this.nextFrame();
    } else {
    if (this._currentframe>1) {
    this.prevFrame();
    on (release) {
    this._parent.getURL ("contact.php","_blank","GET");
    this._parent.name = "Your Name:";
    this._parent.email = "Your Email:";
    this._parent.phone = "Your Phone Number:";
    this._parent.text4 = "e-mail:";
    this._parent.message = "Your Message:";
    Here is what I have for Contact.php:
    <?php
    $your_name = $_GET['name'];
    $your_email = $_GET['email'];
    $your_phone = $_GET['phone'];
    $your_message = $_GET['message'];
    $recipient_email = "[email protected]";
    $subject = "from " . $your_email;
    $headers = "From: " . $your_name . "<" . $your_email .
    ">\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1';
    $content = "<html><head><title>Contact
    letter</title></head><body><br>";
    $content .= "Name: <b>" . $your_name .
    "</b><br>";
    $content .= "E-mail: <b>" . $your_email .
    "</b><br><hr><br>";
    $content .= "Phone: <b>" . $your_phone .
    "</b><br>";
    $content .= $your_message;
    $content .= "<br></body></html>";
    mail($recipient,$subject,$content,$headers);
    ?>
    <html>
    <body bgcolor="#282E2C">
    <div align="center"
    style="margin-top:60px;color:#FFFFFF;font-size:11px;font-family:Tahoma;font-weight:bold">
    Your message was sent. Thank you.
    </div>
    </body>
    </html>
    <script>resizeTo(300, 300)</script>

    well...that's true..I wanted "name" to be cleared when
    clicked...this version I found doesn't clear "name" when clicked,
    but it needs selected and erased manually...anyway..it's better
    then nothing...
    Reason I want this is because I'm using a design that is not
    giving me much space and I have to trick the low space with this
    option.
    If you want I can send you the fla to get a better
    picture...I believe you deserve it :)

  • Problem with contact form

    Hi-
    I found a contact form for my Flash website but it's not working properly. It uses ActionScript 3 and PHP, both of which I don't know much about. Because of this, I can't pinpoint the problem or how to fix it. Here's what's going on:
    1) Each field in the form only allows 3 characters and no special characters such as @ _ ! . , etc...
    2) When the user goes to the next field in the form, the previous field appears blank but the when clicking on that again, the original text appears.
    3) When submitting the form, it just keeps saying "in progress" and never shows the confirmation text nor does the email get sent. There is an HTML file included with this form but I am not sure if I need to put that in as I have embedded this form into an SWF file so I don't think I need that code but please let me know if I am wrong about this.
    I am posting both the AS code and PHP code below.. if someone can help me figure this out I would greatly appreciate it. I am not sure which file the problem is in. If someone here doesn't know PHP then at least see the AS code and let me know if the problem is in that or not. That way I can pinpoint which file the problem is coming from and then seek further help if needed. To see the form in action, go here: http://www.poojasdesigns.com/ and click on "Contact Me".. here are the codes:
    ActionScript 3.0
    //presistant reference to this movie's mail timeline:
    var mainTL:MovieClip = this;
    //start off with submit button dimmed
    submit_mc._alpha = 40;
    //create the LoadVars objects which will be used later
    //one to send the data...
    var dataSender:LoadVars = new LoadVars();
    //and one to recieve what comes back
    var dataReceiver:LoadVars = new LoadVars();
    create listener for Key Object
    this is just a U.I. thing - "wakes up" the submit button
    when all fields have at least some content
    var formCheck:Object = new Object();
    formCheck.onKeyUp = function() {
         if (name_txt.text != '' &&
                   email_txt.text != '' &&
                   subject_txt.text != '' &&
                   message_txt.text != '') {
              //clear any alert messages
              alert_txt.text = '';
              //enable the submit button
              submit_mc._alpha = 100;
         } else {
              //remain disabled until all fields have content
              submit_mc._alpha = 40;
    Key.addListener(formCheck);
    /*#######SET STYLES FOR TEXT FIELDS#######*/
    //define styles for both normal and focussed
    //set hex values here that work with your site's colors
    var normal_border:Number = 0x000000;
    var focus_border:Number = 0xFA8D00;
    var normal_background:Number = 0xFFFFFF;
    var focus_background:Number = 0xE9E3E3;
    var normal_color:Number = 0xFFFFFF;
    var focus_color:Number = 0x000000;
    //create an array containing the fields we wish to have styles applied to
    inputs=[name_txt,email_txt,subject_txt,message_txt];
    a "for in" loop now iterates through each element in the "inputs" array
    and applies our "normal" formatting to each input text field
    for( var elem in inputs) {
         inputs[elem].border = true;
         inputs[elem].borderColor = normal_border;
         inputs[elem].background = true;
         inputs[elem].backgroundColor = normal_background;
         inputs[elem].textColor = normal_color;
         /*this takes care of applying the "normal" style to each of the four input fields;
              the following TextField prototypes handle highlighting when an input field
              gains focus and resetting to normal when a field loses focus*/
         inputs[elem].onSetFocus = function() {
              this.borderColor = focus_border;
              this.backgroundColor = focus_background;
              this.textColor = focus_color;
         inputs[elem].onKillFocus = function() {
              this.borderColor = normal_border;
              this.backgroundColor = normal_background;
              this.textColor = normal_color;
    //finally: make the first field (name_txt) selected when the movie loads
    Selection.setFocus(name_txt);
    /*DEFINE SUBMIT BUTTON BEHAVIOR*/
    submit_mc.onRelease = function() {
         //final check to make sure fields are completed
         if (name_txt.text != '' &&
                   email_txt.text != '' &&
                   subject_txt.text != '' &&
                   message_txt.text != '') {
              alert_txt.text='';//clear any previous error messages or warnings
              //advance playhead to frame 2 - the "processing" message
              mainTL.play();
              //assign properties to LoadVars object created previously
              dataSender.name = name_txt.text;
              dataSender.email = email_txt.text;
              dataSender.subject = subject_txt.text;
              dataSender.message = message_txt.text;
              //callback function - how to handle what comes abck
              dataReceiver.onLoad = function() {
                   if (this.response == "invalid") {
                        mainTL.gotoAndStop(1);
                        alert_txt.text = "Please verify your email address - it appears to be incorrect."
                   } else if (this.response == "passed") {
                        mainTL.gotoAndStop(4);
              //now send data to script
              NOTE: the line below presumes the Flash swf file and php script are in the
              SAME DIRECTORY on your server. If this is not the case (if for example you
              wish to put the php script along with other similar items in a "scripts"
              directory) you MUST MODIFY THE PATH. Otherwise the Flash movie won't be
              able to locate the php script.
              dataSender.sendAndLoad("processEmail.php", dataReceiver, "POST");
         } else {
              //warning if they try to submit before completing
              alert_txt.text = "Please fill out all the fields before submitting the form.";
    PHP
    <?php
    //create short variable names
    $name=$_POST['name'];
    $email=$_POST['email'];
    $subject=$_POST['subject'];
    $message=$_POST['message'];
    $name=trim($name);
    $email=trim($email);
    $subject=StripSlashes($subject);
    $message=StripSlashes($message);
    /*my email address - dummy address inserted for privacy in this forum*/
    $toaddress='[email protected]';
    if (preg_match ("/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i", $email)) {
    mail($toaddress,$subject,$message,"From: $name <$email>\r\nReply-To: $email\r\nReturn-Path: $email\r\n");
    //clear the variables
    $name='';
    $email='';
    $subject='';
    $message='';
    echo "response=passed";
    else {
    echo "response=invalid";
    exit;
    ?>
    Please let me know how to proceed. Thanks so much!
    *Pooja*

    You say you don't know much about AS3, and that you have embedded this form into an swf.  In what manner did you embed it, and what version of AS does the swf use?  Have you tried using the form in the page that was provided as a standalone test to see if it works?

  • Passing a variable from Captivate 5 to Flash CS5/ActionScript 3

    I don't get it. Why is it so difficult to pass a variable from Captivate 5 to AS3/Flash CS5. I must be making it harder than it really is. I cannot figure it out.  Can anyone help?
    I have a variable (gpDone = 1) defined in Captivate 5 (it's a guided practice) on the last frame which will indicate that the learner has completed the guided practice file.
    Now I want to pass that variable back to Flash/AS3 so I can evaluate whether I should show the Continue button so they can continue. They have to complete the guided practice before they can continue. If it is equal to 1, the Continue button will display. If it is not equal to 1, the Continue button will not display, but a message will display telling them they have to complete the guided practice in order to continue in the course.
    Do I need to edit the Flash html? Or just put code in the Flash timeline or the associated AS file?
    Help would be greatly appreciated. Thanks in advance.
    CAH

    Having the same problem...getting variable values FROM captivate to my inserted .swf (not widgets).
    I can set the value from the .swf to the captivate using Object(parent.parent.parent.parent).captivateVariable but not the other way around.
    Very frustrating.
    I hope someone answers your query.

  • Is it possible to create a contact form via Flash cs5.5 and package out app for desktop?

    I need to create a desktop app for windows.  Im using Flash cs5.5 and I wanted to know of an easy to way to create a simple contact form that would work once installed on a desktop/
    Thanks guys for any input!

    If you want a contact form you can either use StageWebView or HTMLLoader to show an HTML page in your web server with a contact form.
    Or you can create the form with Flash textfields and then send the whole thing with a POST request to a PHP script in the server, for example.

  • Contact forms in Flash (AS3/PHP)

    Hello,
    I have created a form in flash (CS5) using AS3 and Php.
    The test run worked absolutely fine but now I have added the form to my (original) flash movie it has a number of errors come up...
    Thing is that I've just spent the last 2 hours trying to get this form to work and having no success what so ever.
    So does anyone know what the following complier errors mean and how I can solve this issue?
    Scene 1
    1152: A conflict exists with inherited definition flash.display:DisplayObject.name in namespace public.
    ComponentShim (Compiled Clip), Line 1
    5000: The class 'fl.controls.TextArea' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.
    ComponentShim (Compiled Clip), Line 1
    5000: The class 'fl.controls.TextInput' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.
    ComponentShim (Compiled Clip), Line 1
    5000: The class 'fl.controls.UIScrollBar' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.
    ComponentShim (Compiled Clip), Line 1
    5000: The class 'fl.controls.Button' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.
    Yes, I'm obviously a newbie and still getting to grips with flash so any help would be amazing!
    Thank you in advance,
    Jos

    add those components to the library of your main (ie, loading) fla.

  • AS3 Flash Form

    I am creating a comment form for my flash site in AS3. I found a tutorial on cookbooks.adobe.com on how to do so, however I had some output errors show up regarding things such as    valid.text    and    fromEmail.
    Here is a link to the forum, all of the code is located here.  I basically copy and pasted the whole thing, and have a separate php file set up in the same folder with the copy and pasted code from the forum in there as well.
    http://cookbooks.adobe.com/post_How_to_create_an_email_form_with_ActionScript_3-16598.html
    Any help would be great!
    Thanks!
    mariah d.

    If you commented out this line and the error went away:
    resetbtn.addEventListener(MouseEvent.CLICK, reset);
    that indicates the error is telling you that the resetbtn is out of scope -- meaning it does not exist by that name when that line of code executes.

  • Flash contact form key issue

    Hi my flash contact form will only accept certain keys, Like zxvywghjk.. and number keys will not type into it any ideas???
    motionstills.co.uk

    Forms in Flash use Input text objects. You have to embed the font or fonts that you want to use for those text objects. It sounds like either you embedded a font that doesn't contain a full set of glyphs or that a restricted set of glyphs was set in the Font Embed window.

  • Flash / PHP Contact Form

    Hello,
    I am setting up a flash site (well trying too)  and decided to get a Flash  template of Template Monster so I could work on it, I have the site up  and all but the contact form is not working properly. The problem is the Actionscript dosen't  seem to work with the contact.php file that came in the template pack and  when I contacted them it was of no help, I was just refered me to their help  pages which showed I just had to insert my email address after rec="??????" and it would work. The actionscript is;
    rec="[email protected]";
    serv="php";
    var fields_descriptions= Array ("",
    Array("t1", "your_name", "Your Name:"),
    Array("t2", "your_address", "Your Address:"),
    Array("t3", "phone", "Telephone:"),
    Array("t4", "message", "Message:"),
    Array("t5", "your_email", "E-mail:"),
    Array("t6", "field_3", "Address:"),
    Array("t7", "field_4", "fax:")
    function reset_txt(name,name2,value) {
    path=eval(_target);
    path[name2]=value;
    this[name].onSetFocus=function() {
    path=eval(_target);
    if(path[name2]==value) { path[name2]="";}
    this[name].onKillFocus=function() {
    path=eval(_target);
    if(path[name2]=="") { path[name2]=value;}
    for (i=1; i<=fields_descriptions.length; i++) {
    reset_txt("t"+i, fields_descriptions[i][1], fields_descriptions[i][2]);
    And the contact.php file has the following script;
    <?php
    $your_name = $_GET['your_name'];
    $your_address = $_GET['your_address'];
    $phone = $_GET['phone'];
    $your_email = $_GET['your_email'];
    $message = $_GET['message'];
    $headers .= 'Content-type: text/html; charset=iso-8859-1';
    $content = "<html><head><title>Contact letter</title></head><body><br>";
    $content .= "Company: <b>" . $your_company . "</b><br>";
    $content .= "Name: <b>" . $your_name . "</b><br>";
    $content .= "Phone: <b>" . $your_phone . "</b><br>";
    $content .= "E-mail: <b>" . $your_email . "</b><br><hr><br>";
    $content .= $your_message;
    $content .= "<br></body></html>";
    mail("[email protected]","New enquiry from website",$content,$headers);
    ?>
    <html>
    <body bgcolor="#282E2C">
    <div align="center" style="margin-top:80px;color:#FFFFFF;font-size:16px;font-family:Tahom a;font-weight:bold">
    Your message was sent to <br> East Coast Computer Services <br>We will be in contact with you soon. Thank you.
    </div>
    </body>
    </html>
    I do get email from the form in Outlook but the problem is it has no content just blank fields, see below:
    From: [email protected] [mailto:[email protected]]
    Sent: 24 March 2011 23:10
    To: [email protected]
    Subject: New enquiry from website
    Company:
    Name:
    Phone:
    E-mail:
    I  haven't got a breeze about Flash or PHP, I just know a small bit from  using Dreamweaver. Would you know what is preventing the form from  working, I know it something to do with Arrays but what do I change in the PHP file so I start to receive information in the contact form? Thank you in advance.
    Kevin

    kglad,
    The actionscript calls the PHP form but dosen't post any information, it loads in the browser and I get the email but nothing in it?
    I'm just looking for the correct Actionscript to paste into flash and hopefully get it working. Thanks for the help.

  • AS3/PHP Contact Form Problem

    I am working on a contact form in my .fla that utilizes php to send user info to my email address.  I believe I have all of the files in the correct directories, but it is still unsuccessful.  I am not getting any errors in the AS3.  Rather, I think the issue is related to the send_email.php file.  The swf is hosted at http://stephenpappasphoto.com/ and the page in question is under the "Contact" button.
    Here is the AS3:
    import flash.utils.Timer;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.MouseEvent;
    import flash.net.URLVariables;
    import flash.events.TimerEvent;
    f_Name.text = f_Date.text = f_Location.text = f_Email.text = f_Phone.text = f_Budget.text = message_status.text = "";
    submitBtn.addEventListener(MouseEvent.CLICK, submit);
    resetBtn.addEventListener(MouseEvent.CLICK, reset);
    var timer:Timer;
    var var_load:URLLoader=new URLLoader;
    var URL_request:URLRequest=new URLRequest("send_email.php");
    URL_request.method=URLRequestMethod.POST;
    function submit(e:MouseEvent):void
        if( f_Name.text == "" || f_Date.text == "" || f_Location.text == "" || f_Email.text== "" || f_Phone.text == "" || f_Budget.text == "" )
            message_status.text = "Please fill up all test fields.";
        else if( !validate_email(f_Email.text) )
            message_status.text = "Please enter a valid email address.";
        else
            message_status.text = "Sending..."    ;
            var email_data:String = "name=" + f_Name.text 
                                + "&email=" + f_Email.text
                                + "&message=" + f_Phone.text
                                + "&message=" + f_Location.text
                                + "&message=" + f_Date.text
                                + "&message=" + f_Budget.text;
            var URL_vars:URLVariables = new URLVariables(email_data);
            URL_vars.dataFormat = URLLoaderDataFormat.TEXT;
            URL_request.data = URL_vars;
            var_load.load( URL_request );
            var_load.addEventListener(Event.COMPLETE, receive_response );
    function reset(e:MouseEvent):void
        f_Name.text = f_Date.text = f_Location.text = f_Email.text = f_Phone.text = f_Budget.text = message_status.text = "";
    function validate_email(s:String):Boolean
        var p:RegExp = /(\w|[_.\-])+@((\w|-)+\.)+\w{2,4}+/;
        var r:Object = p.exec(s);
        if( r == null )
            return false;
        return true;
    function receive_response(e:Event):void
        var loader:URLLoader = URLLoader(e.target);
        var email_status = new URLVariables(loader.data).success;
        if( email_status == "yes" )
            message_status.text= "Thank you for your contact information.  I will get back to you shortly.";
            timer = new Timer(500);
            timer.addEventListener(TimerEvent.TIMER, on_timer);
            timer.start();
        else
            message_status.text = "Your message cannot be sent.  Please email your information to [email protected]. ";
    function on_timer(te:TimerEvent):void
        if( timer.currentCount >= 10)
            f_Name.text = f_Date.text = f_Location.text = f_Email.text = f_Phone.text = f_Budget.text = message_status.text = "";
            timer.removeEventListener(TimerEvent.TIMER, on_timer);
    Here is the send_email.php:
    <?php
    $f_Name = $_POST['name'];
    $f_Date = $_POST['date'];
    $f_Location = $_POST['location'];
    $f_Email = $_POST['email'];
    $f_Phone = $_POST['phone'];
    $f_Budget = $_POST['budget'];
    if( $f_Name == true )
        $sender = $f_Email;
        $receiver = "[email protected]";
        $client_ip = $_SERVER['REMOTE_ADDR'];
        $email_body = "Name: $f_Name \nEmail: $f_Email \n\nSubject: New Client-$f_Name \n\nDate: $f_Date \n\n$f_Location \n\n   Phone: $f_Phone \n\n    Budget: $f_Budget\n\n    IP: $client_ip \n\n";       
        $extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion();
        if( mail( $receiver, "New Client - $f_Name", $email_body, $extra ) )
            echo "success=yes";
        else
            echo "success=no";
    ?>
    Thank you in advance for any advice.

    Try this:
    For the actionscript side, my changes are in italics:
    import flash.utils.Timer;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.MouseEvent;
    import flash.net.URLVariables;
    import flash.events.TimerEvent;
    f_Name.text = f_Date.text = f_Location.text = f_Email.text = f_Phone.text = f_Budget.text = message_status.text = "";
    submitBtn.addEventListener(MouseEvent.CLICK, submit);
    resetBtn.addEventListener(MouseEvent.CLICK, reset);
    var timer:Timer;
    var var_load:URLLoader=new URLLoader;
    var URL_request:URLRequest=new URLRequest("send_email.php");
    URL_request.method=URLRequestMethod.POST;
    URL_request.data = formVariables;
    var_load.addEventListener(Event.COMPLETE, receive_response ); 
    function submit(e:MouseEvent):void
        if( f_Name.text == "" || f_Date.text == "" || f_Location.text == "" || f_Email.text== "" || f_Phone.text == "" || f_Budget.text == "" )
            message_status.text = "Please fill up all test fields.";
        else if( !validate_email(f_Email.text) )
            message_status.text = "Please enter a valid email address.";
        else
            message_status.text = "Sending..."    ;
            formVariables.name = f_Name.text;
            formVariables.email = f_Email.text;
            formVariables.phone = f_Phone.text;
            formVariables.location = f_Location.text;
            formVariables.date = f_Date.text;
            formVariables.budget = f_Budget.text;
            formVariables.subject = "Mail from form...";
            formVariables.recipient = "[email protected]";
            varLoad.load(formVariables);
    function reset(e:MouseEvent):void
        f_Name.text = f_Date.text = f_Location.text = f_Email.text = f_Phone.text = f_Budget.text = message_status.text = "";
    function validate_email(s:String):Boolean
        var p:RegExp = /(\w|[_.\-])+@((\w|-)+\.)+\w{2,4}+/;
        var r:Object = p.exec(s);
        if( r == null )
            return false;
        return true;
    function receive_response(e:Event):void
        var loader:URLLoader = URLLoader(e.target);
        var email_status = new URLVariables(loader.data).success;
        if( email_status == "yes" )
            message_status.text= "Thank you for your contact information.  I will get back to you shortly.";
            timer = new Timer(500);
            timer.addEventListener(TimerEvent.TIMER, on_timer);
            timer.start();
        else
            message_status.text = "Your message cannot be sent.  Please email your information to [email protected]. ";
    function on_timer(te:TimerEvent):void
        if( timer.currentCount >= 10)
            f_Name.text = f_Date.text = f_Location.text = f_Email.text = f_Phone.text = f_Budget.text = message_status.text = "";
            timer.removeEventListener(TimerEvent.TIMER, on_timer);
    The php file that you have should work with this actionscript. The variables that you define in the AS, "name", "email", etc, must match the variables that are used in the php. Try it. It may need some additional tweeks.

  • PHP files and Flash contact form

    Hello,
    I am creating a website in flash CS4 and I made a contact form and when I test the site out, I can type and click the submit button, so everything is fine there but it doesn't go to anything. Now I know I need a code to tell the contact form where to go, but I can't find one that works, or I may be doing something wrong.  I also have been reading about PHP but I am not sure what that is. I found a site that said to put this code in the actions panel.
    on(release){
        getURL("http://www.mail.menaceaudio.com", "", "POST");
    The www.mail.menaceaudio.com is the site for the companies email.
    So when I test it out this error comes up:
    1087: Syntax error: extra characters found after end of program.

    The code you show is AS2, not AS3. Try searching for 'as3 form php' and you should find plenty of info.
    PHP is a server-side scripting language. You put PHP files on your server and can then call them from Flash...

  • DW CS5, Sending contact form results to email with page redirection using php script

    I am currently building a site from scratch with Dreamweaver, with the intent of replacing my current website layout that was designed using Intuit's website builder. My dreamweaver site is not online, but i have setup a local test server on my computer, using XAMPP, and i have an apache server with a MySQL database and a mercury mailserver running. I mention that in case it makes a difference in your answers. If necessary, I can include those settings, but that may be asking too much.
    I have an html contact form for users to schedule service appointments. I need the resulting actioned php file to do the following after submit is clicked: verify certain fields have been entered; prevent spammers or verify human visitors; send the form results to a (hidden from public view of any kind) email address; redirect user to a confirmation page, or an error page.
    I found the following code but being less than a newbie im not sure what needs to be changed, or if its even the right script i should be using:
    5 <?php
    6 $email = $_POST['email'];
    7 $mailto = '[email protected]';
    8 $mailsubj = 'You Have a Service Request';
    9 $url = '/MyLandingPage.html';
    10 $req = '0';
    11 $mailbody = "Results from form:\r\n";
    12 $space = ' ';
    13 $line = '
    14 ';
    15 foreach ($_POST as $key => $value)
    16 {
    17 if ($req == '1')
    18 {
    19 if ($value == '')
    20 {echo "$key is empty";die;}
    21 }
    22 $j = strlen($key);
    23 if ($j >= 20)
    24 {echo "Name of form element $key cannot be longer than 20 characters";die;}
    25 $j = 20 - $j;
    26 for ($i = 1; $i <= $j; $i++)
    27 {$space .= ' ';}
    28 $value = str_replace('\r\n', "$line", $value);
    29 $conc = "{$key}:$space{$value}$line";
    30 $text .= $conc;
    31 $space = ' ';
    32 }
    33 mail($emailadd, $subject, $text, 'From: '.$emailadd.'');
    34 echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
    35 ?>
    Can anyone please illuminate me on what I need?
    Thank You in advance

    Take a read here, this might enlighten you a little.
    http://www.paulgdesigns.com/learncontactform.php
    You are doing this with your local testing server, is it set up to email?
    Gary

Maybe you are looking for

  • How to display forum content in another web page

    Hi, Anybody has idea if the forum provides some API/ snippets which can be used to show the contents from forum (latest threads, announcements, polls) in a simple HTML page The fields required from API to be displayed are: Subject of the thread Some

  • How do I structure Information in three Levels in MDM 7.1?

    Hi, I am creating a Service Catalogue for a customer. They require three levels in the catalogue: "Packed Services" that are built up by several "Services", that can have several "Supporting Services". I am thinking  of using two main tables, and tup

  • Can I download music from other computers?

    Can I download iTune music to other computers. Especially, other computers at Internet Cafes or random spots that have internet connections. If I can, then how?

  • Where are my pictures in icloud

    I had to get a new iphone.  All backed up to Icloud...it's been 12 hours and only some of my pictures and videos have downloaded...i went on icloud and don't see my pictures at all.  what's happening?

  • Communication between separate ADF Web Applications

    Using 11.1.1.5 of JDeveloper I have two Fusion Web Applications that each have a single "view" task flow. Those task flows will be dropped into regions within a WebCenter Portal application so they behave like portlets. I'd like to have a value from