Jump to content

MaizeNBlueJ

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

MaizeNBlueJ's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Alright guys, I'm trying to apply a very basic Photo Album Slideshow to a web site. I used Adobe's default template, which works flawlessly, until you try and set the Autostart variable to true. At that point, it balks at you, and the controls don't work. Here is the error message: TypeError: Error #1009: Cannot access a property or method of a null object reference. at Burger_fla::MainTimeline/fl_startSlideShow()[burger_fla.MainTimeline::frame1:47] at Burger_fla::MainTimeline/frame1()[burger_fla.MainTimeline::frame1:70] Line 47 contains this code: slideshowTimer.start(); Line 70 contains this code: fl_startSlideShow(); Here's the entire code contents: // USER CONFIG SETTINGS ===== var autoStart:Boolean = true; //true, false var secondsDelay:Number = 30; // 1-60 // END USER CONFIG SETTINGS // EVENTS ===== playPauseToggle_mc.addEventListener(MouseEvent.CLICK, fl_togglePlayPause); function fl_togglePlayPause(evt:MouseEvent):void { if(playPauseToggle_mc.currentLabel == "play") { fl_startSlideShow(); playPauseToggle_mc.gotoAndStop("pause"); } else if(playPauseToggle_mc.currentLabel == "pause") { fl_pauseSlideShow(); playPauseToggle_mc.gotoAndStop("play"); } } next_btn.addEventListener(MouseEvent.CLICK, fl_nextButtonClick); prev_btn.addEventListener(MouseEvent.CLICK, fl_prevButtonClick); function fl_nextButtonClick(evt:MouseEvent):void { fl_nextSlide(); } function fl_prevButtonClick(evt:MouseEvent):void { fl_prevSlide(); } var currentImageID:Number; var slideshowTimer:Timer; var appInit:Boolean; function fl_slideShowNext(evt:TimerEvent):void { fl_nextSlide(); } // END EVENTS // FUNCTIONS AND LOGIC ===== function fl_pauseSlideShow():void { slideshowTimer.stop(); } function fl_startSlideShow():void { slideshowTimer.start(); } function fl_nextSlide():void { currentImageID++; if(currentImageID >= totalFrames) { currentImageID = 0; } gotoAndStop(currentImageID+1); } function fl_prevSlide():void { currentImageID--; if(currentImageID < 0) { currentImageID = totalFrames+1; } gotoAndStop(currentImageID-1); } if(autoStart == true) { fl_startSlideShow(); playPauseToggle_mc.gotoAndStop("pause"); } else { gotoAndStop(1); } function initApp(){ currentImageID = 0; slideshowTimer = new Timer((secondsDelay*1000), 0); slideshowTimer.addEventListener(TimerEvent.TIMER, fl_slideShowNext); } if(appInit != true){ initApp(); appInit = true; } // END FUNCTIONS AND LOGIC I'm a flash nebie, so please be gentle. Thanks for any help you can provide!
  2. teynon, Thanks for all your help. I just wanted to let you know that the form is now working as it should. I really appreciate you taking the time to help me out! Josh
  3. Nevermind. I'm losing my marbles, I set up WAMP on my extra PC last night to use as a testing server, and was on the wrong page when I tried to submit the form. I just did another test, so we'll see how it goes, but the problem mentioned in the previous post is not there after all. I apologize for the confusion.
  4. I just sent another test, and I'm waiting for the email to come in, but noticed that with that change, it printed them on my submission page (where it's supposed to tell you whether it failed or not. Any idea why that is? Thanks man. I really appreciate your help.
  5. 1) I read somewhere that it might be easier for a bot to see if they looked for the "hidden" terminology in the page. I don't know if they've done that yet or not, but it seemed like a good idea. 2) I appreciate your reply. I modified your code and just sent a couple of test emails, including one testing the spam filter. I'll let you know what I find out with it, but I'm guessing it's going to work. I think my main problem was that I didn't realize that it would send as soon as I put the command for mail in. I thought of it as defining a variable. Now that I know that, what you said makes a lot of sense. Since I'm going to (hopefully) be doing a lot more of this kind of thing, I'm going to study up and compare your script to mine to see why yours is right. Thanks again for your help! Edit: Update - It looks like that just about has it. The only issue I see is the fact that instead of listing all the boxes checked, it's only showing the last one checked. For instance, I checked "Participate in Phone Banks" & "Help at Campaign Headquarters" and only the campaign headquarters one shows up.
  6. Alright guys. Let me preface this by saying I'm not a programmer. That'll be obvious once you see the code. Anyway, I'm creating a form mailer for a web site that I'm creating for a local mayoral candidate. I'm moving right along with it, and have it functioning for the most part, but I have a few minor things that I haven't been able to get to work properly. I also want to say that I have been googling and researching most of the day today, so I have put in quite a bit of effort to try and figure this out on my own. With that said, here are the issues I'm having: 1) I have a input box that's hidden via CSS that needs to be blank in order to send the form, otherwise it should quit. The problem is, it's still delivering the message, in spit of the fact that it meets the first condition. Please note that I've got the CSS code commented out at the moment so I can test the input. 2) I'm having trouble getting data from a checkbox array to show up in my test email messages. Here's the HTML Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>****</title> <link href="style.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function validateForm() { var x=document.forms["contact"]["fname"].value var y=document.forms["contact"]["lname"].value var z=document.forms["contact"]["email"].value if (x==null || x=="") { alert("Please enter your first name."); return false; } if (y==null || y=="") { alert("Please enter your last name."); return false; } if (z==null || z=="") { alert("Please enter your email address."); return false; } } </script> <script type="text/javascript"> function toggle_checkboxes() { var rb=document.forms["contact"]["VolRadio"]; var cb=document.forms["contact"]["voljobs"]; if (rb[0].checked) { cb[0].disabled = ""; cb[1].disabled = ""; cb[2].disabled = ""; cb[3].disabled = ""; cb[4].disabled = ""; } else { cb[0].disabled = "disabled"; cb[1].disabled = "disabled"; cb[2].disabled = "disabled"; cb[3].disabled = "disabled"; cb[4].disabled = "disabled"; } } </script> </head> <body> <div class="container"> <div class="header"><img src="../images/header.jpg" alt="***" width="960" height="125" id="Insert_logo" style="background: #FF0; display:block;" /> <!-- end .header --></div> <div class="menu"> <ul class="nav"> <li> <div align="center"><a href="index.html"> <h4>Home</h4> </a></div> </li> <li> <div align="center"><a href="personal.html"> <h4>Personal</h4> </a></div> </li> <li> <div align="center"><a href="whereistand.html"> <h4>Where I Stand</h4> </a></div> </li> <li> <div align="center"><a href="press.html"> <h4>Press Releases</h4> </a></div> </li> <li> <div align="center"><a href="getinvolved.html"> <h4>Get Involved</h4> </a></div> </li> <li class="first"> <div align="center"><a href="#"> <h4>Contact</h4> </a></div> </li> <li> <div align="center"><a href="links.html"> <h4>Links</h4> </a></div> </li> </ul></div> <div class="sidebar1" align="center"> <script src="http://widgets.twimg.com/j/2/widget.js"></script> <script> new TWTR.Widget({ version: 2, type: 'profile', rpp: 10, interval: 6000, width: 240, height: 500, theme: { shell: { background: '#333333', color: '#ffff00' }, tweets: { background: '#cccccc', color: '#000000', links: '#ffff00' } }, features: { scrollbar: true, loop: false, live: false, hashtags: true, timestamp: true, avatars: false, behavior: 'all' } }).render().setUser('BurgerforJasper').start(); </script> <!-- end .sidebar1 --> <br><a href="http://www.facebook.com/pages/***" target="_blank"><img src="../images/facebook.png"/></img></a> <a href="http://twitter.com/#!/***" target="_blank"><img src="../images/twitter-white.png"></img></a></div> <div class="content"> <img src="../images/***.png" width="178" class="fltlft" /> <h3 align="right">Contact</h3> <p align="right">Please fill out the form below to contact me.</p> <form id="contact" name="contact" action="jbformmail.php" onsubmit="return validateForm();" method="post"> <table width="500px" id="tablefloat"> <tr> <td align="left"><label for="fname">First Name *</label></td> <td><input name="fname" type="text" class="textboxsize" /></td> </tr> <tr> <td align="left"><label for="lname">Last Name *</label></td> <td><input name="lname" type="text" class="textboxsize"/></td> </tr> <tr> <td align="left"><label for="address">Addresss</label></td> <td><input name="address" type="text" value="" class="textboxsize" /></td> </tr> <tr> <td align="left"><label for="phone">Phone Number</label></td> <td><input name="phone" type="text" class="textboxsize" /></td> </tr> <tr> <td align="left"><label for="email">Email Address *</label></td> <td><input name="email" type="email" class="textboxsize" /></td> </tr> <tr><td></td> <td align="right"><label>Are you willing to volunteer your time to the campaign?</label> <br /> <label> <input type="radio" name="volradio" value="Yes" id="VolunteerYesNo_0" onclick="toggle_checkboxes()" checked="checked"/> Yes</label> <label> <input type="radio" name="volradio" value="No" id="VolunteerYesNo_1" onclick="toggle_checkboxes()" /> No</label><br /><br /></td> </tr> <tr> <td></td> <td align="right">If Yes, what are you willing to do? (Check all that apply.)</td> </tr> <tr> <td></td> <td width="292" align="right"><label>Walk In Parades</label> <input type="checkbox" name="voljobs[]" value="Walk In Strassenfest Parade" id="voljobs_0" /></td> </tr> <tr> <td></td> <td align="right"><label>Participate in Phone Banks</label> <input type="checkbox" name="voljobs[]" value="Participate in Phone Banks" id="voljobs_1" /></td> </tr> <tr> <td></td> <td align="right"><label>Help at Campaign Headquarters</label> <input type="checkbox" name="voljobs[]" value="Help at Campaign Headquarters" id="voljobs_2" /></td> </tr> <tr> <td></td> <td align="right"><label>Walk Door to Door</label> <input type="checkbox" name="voljobs[]" value="Walk Door to Door" id="voljobs_3" /></td> </tr> <tr> <td></td> <td align="right"><label>Work On Election Day</label> <input type="checkbox" name="voljobs[]" value="Work on Election Day" id="voljobs_4" /><br /><br /></td> </tr> <tr> <td align="left" valign="top"><label for="comments">Comments</label></td> <td><textarea name="comments" rows="20" cols="20" class="textboxsize" ></textarea></td></tr> <tr> <td></td> <td align="right"><input type="submit" value="Submit" /> <input type="reset" /></td> </tr></table> <input class="special" name="url" type="text" /> </form> <h4>***</h4><p>***</p> <!-- end .content --></div> <div class="footer"> <p>This .footer contains the declaration position:relative; to give Internet Explorer 6 hasLayout for the .footer and cause it to clear correctly. If you're not required to support IE6, you may remove it.</p> <!-- end .footer --></div> <!-- end .container --></div> </body> </html> And here's the PHP script: <?php $to = "my@email.com"; $email = $_POST['email'] ; $fname = $_POST['fname'] ; $lname = $_POST['lname'] ; $address = $_POST['address'] ; $phone = $_POST['phone'] ; $volradio = $_POST['volradio'] ; $voljobs = $_POST['voljobs'] ; $url = $_POST['url'] ; $comments = $_POST['comments'] ; $subject = "Web Submission from: $fname $lname"; $headers = "From: noreply@***.com"; $body = "Name: $fname $lname \n\n Email: $email \n\n Address: $address \n\n Phone: $phone \n\n Volunteer: $volradio \n\n Jobs: $vj \n\n Comments: $comments"; $send = mail($to, $subject, $body, $headers); foreach($voljobs as $vj) if($url !== "") { echo "Sorry, could not complete your request."; exit(); } else { $send; echo "Submission successful. <a href=***/>Click here</a> to return to the web site."; } ?> Like I said, I'm a PHP newbie, and I've gotten a decent amount done, but I'm having trouble finishing it off. Any help you can provide is appreciated. Thanks guys!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.