Re: [Flashcoders] My first code.
On 16/12/2010 07:38, spyder spyders wrote: Thank You So Much! :DI have been researching for over a month!! I am guessing that the 'this' is pointing to the symbol or _mc I attach the class to? I ended up doing away with all of the this because I was receiving an error message saying gotoAndStop is not a function. Also I needed to declare the variable buttonState Using this shouldn't cause you a problem in a class definition. If you don't use it it generally means the same thing as this.! gotoAndStop is not a function. I would associate with a class that did not extend MovieClip. Spend some time on some OO tutorials to try and get the main concepts then you'll soon see how it all fits together. Here it is!!! My first Class! Excellent. Thank you! You're welcome. ### package { import flash.display.MovieClip; import flash.events.MouseEvent; public class ToggleButton extends MovieClip { //public var togglButton:MovieClip; public var buttonState = MovieClip; public function ToggleButton() { // constructor code //event listeners addEventListener(MouseEvent.MOUSE_OVER, rolloverToggle); addEventListener(MouseEvent.MOUSE_OUT, rolloutToggle); addEventListener(MouseEvent.CLICK, toggleClick); buttonState = off; // Respond to mouse events function rolloverToggle(event:MouseEvent) { gotoAndStop(buttonState+ over); } //rollover f(x) function rolloutToggle(event:MouseEvent) { gotoAndStop(buttonState); } //rollout f(x) function toggleClick(event:MouseEvent) { if (buttonState == on) { buttonState = off; } //if else { buttonState = on; } //else gotoAndStop(buttonState+ over); } //toggle click f(x) } //constructor f(x) } //class } //package # ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] My first code.
Spyder, you should order Colin Moock's book toute suite: http://www.amazon.com/exec/obidos/ASIN/0596526946/ref=nosim/moockorg It's essential reading for anyone interested in learning AS3. .m On Thu, Dec 16, 2010 at 2:38 AM, spyder spyders spyderspyd...@aol.com wrote: Thank You So Much! :D I have been researching for over a month!! I am guessing that the 'this' is pointing to the symbol or _mc I attach the class to? I ended up doing away with all of the this because I was receiving an error message saying gotoAndStop is not a function. Also I needed to declare the variable buttonState Here it is!!! My first Class! Thank you! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] My first code.
On 16/12/2010 14:54, Matt S. wrote: Spyder, you should order Colin Moock's book toute suite: http://www.amazon.com/exec/obidos/ASIN/0596526946/ref=nosim/moockorg It's essential reading for anyone interested in learning AS3. It is, but http://www.learningactionscript3.com/ is a much gentler ride to get started. Paul .m On Thu, Dec 16, 2010 at 2:38 AM, spyder spydersspyderspyd...@aol.com wrote: Thank You So Much! :DI have been researching for over a month!! I am guessing that the 'this' is pointing to the symbol or _mc I attach the class to? I ended up doing away with all of the this because I was receiving an error message saying gotoAndStop is not a function. Also I needed to declare the variable buttonState Here it is!!! My first Class! Thank you! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] My first code.
Thanks Paul and M. I have been reading sites on the internet. Here are a few. http://active.tutsplus.com/ http://www.kirupa.com/developer/flash/index.htm Plus there is youtube. http://www.freebookcentre.net/graphics-design-books/flash-ebooks-download.html http://www.gaiaflashframework.com/ I know binary systems hex logic gates arrays strings variables I have been reading about OOP and how it is structured like zoology or biology. Im good with electronics To be honest I am a music producer that is interested in video game sound design. I needed to make a webpage for myself and found out how Flash is in many ways like the music software I use. I love that I can learn coding. It is kind of a hobby. You guys are great! Very nice people, : ) Have a good day. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] My first code.
spyder spyders wrote: To be honest I am a music producer that is interested in video game sound design. I needed to make a webpage for myself and found out how Flash is in many ways like the music software I use. I love that I can learn coding. It is kind of a hobby. There are a fair number of musicians on the list--people like me who code by day and play in a band (or a symphony, in my case) by night. Welcome aboard. Cordially, Kerry Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] perspectiveProjection - remove or drag an mc on a transformed sprite
I'm using the perspectiveProjection transformation in CS5/AS3 for the first and I'm having a problem that I can't seem to figure out. On the sprite I've got a scroll bar for a text area - it's a custom one not a UIComponent. It's listening for the MOUSE_DOWN and MOUSE_UP events and simple it's a simple startDrag() to make it move. BUT it's not dragging. If i create it without the projection it works fine, so that's what causing it. Is there an issue with startDrag on a sprite when the parent is using a perspectivePosition? Or how can i remove the perspectiveProject from the sprite after the transition-in animation is completed (the only reason that I'm using it). I've tried setting it to undefined, but that doesn't work. Matt Perkins - http://www.nudoru.com http://udon.nudoru.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] error mesg
I have the following code below. When I compile the swf,I get the following error; Line 187 1136: Incorrect number of arguments. Expected 1. Have been playing with this all day, somewhat new to as3, and this has me stumped. Any help/insight would be greatly appreciated. stage.addEventListener(KeyboardEvent.KEY_DOWN, doSubmitViaEnter); function doSubmitViaEnter(e:KeyboardEvent):void { if (e.keyCode == 13) { doSubmit(); // this is line 187 } }; function doSubmit(e:MouseEvent):void { var clip:MovieClip = active_clip.mc_form; if (fname1field.text == || lname1field.text == || email1field.text == || clip.fnamefield.text == || clip.lnamefield.text == || clip.titlefield.text == || clip.emailfield.text == ) { status_txt.text = Please fill in all required fields.; } else { //All fields valid so send away! status_txt.text = Posting nomination...\nPlease wait...; doSend(); } } DON TALCOTT 316 Greenwood Avenue Decatur, Georgia 30030 404.538.1642 dtalc...@mindspring.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] error mesg
Take out the e:MouseEvent in your doSubmit function. On Dec 16, 2010 6:40 PM, DONALD TALCOTT dtalc...@mindspring.com wrote: I have the following code below. When I compile the swf,I get the following error; Line 187 1136: Incorrect number of arguments. Expected 1. Have been playing with this all day, somewhat new to as3, and this has me stumped. Any help/insight would be greatly appreciated. stage.addEventListener(KeyboardEvent.KEY_DOWN, doSubmitViaEnter); function doSubmitViaEnter(e:KeyboardEvent):void { if (e.keyCode == 13) { doSubmit(); // this is line 187 } }; function doSubmit(e:MouseEvent):void { var clip:MovieClip = active_clip.mc_form; if (fname1field.text == || lname1field.text == || email1field.text == || clip.fnamefield.text == || clip.lnamefield.text == || clip.titlefield.text == || clip.emailfield.text == ) { status_txt.text = Please fill in all required fields.; } else { //All fields valid so send away! status_txt.text = Posting nomination...\nPlease wait...; doSend(); } } DON TALCOTT 316 Greenwood Avenue Decatur, Georgia 30030 404.538.1642 dtalc...@mindspring.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] error mesg
I failed to mention, also have the following for a button; mc_aim_higher.mc_form.submitBtn.addEventListener(MouseEvent.CLICK, doSubmit); If I remove e.MouseEvent the button won't work. On Dec 16, 2010, at 7:05 PM, Nathan Mynarcik wrote: Take out the e:MouseEvent in your doSubmit function. On Dec 16, 2010 6:40 PM, DONALD TALCOTT dtalc...@mindspring.com wrote: I have the following code below. When I compile the swf,I get the following error; Line 187 1136: Incorrect number of arguments. Expected 1. Have been playing with this all day, somewhat new to as3, and this has me stumped. Any help/insight would be greatly appreciated. stage.addEventListener(KeyboardEvent.KEY_DOWN, doSubmitViaEnter); function doSubmitViaEnter(e:KeyboardEvent):void { if (e.keyCode == 13) { doSubmit(); // this is line 187 } }; function doSubmit(e:MouseEvent):void { var clip:MovieClip = active_clip.mc_form; if (fname1field.text == || lname1field.text == || email1field.text == || clip.fnamefield.text == || clip.lnamefield.text == || clip.titlefield.text == || clip.emailfield.text == ) { status_txt.text = Please fill in all required fields.; } else { //All fields valid so send away! status_txt.text = Posting nomination...\nPlease wait...; doSend(); } } DON TALCOTT 316 Greenwood Avenue Decatur, Georgia 30030 404.538.1642 dtalc...@mindspring.com DON TALCOTT 316 Greenwood Avenue Decatur, Georgia 30030 404.538.1642 dtalc...@mindspring.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] error mesg
Then have e:MouseEvent = null On Dec 16, 2010 7:23 PM, DONALD TALCOTT dtalc...@mindspring.com wrote: I failed to mention, also have the following for a button; mc_aim_higher.mc_form.submitBtn.addEventListener(MouseEvent.CLICK, doSubmit); If I remove e.MouseEvent the button won't work. On Dec 16, 2010, at 7:05 PM, Nathan Mynarcik wrote: Take out the e:MouseEvent in your doSubmit function. On Dec 16, 2010 6:40 PM, DONALD TALCOTT dtalc...@mindspring.com wrote: I have the following code below. When I compile the swf,I get the following error; Line 187 1136: Incorrect number of arguments. Expected 1. Have been playing with this all day, somewhat new to as3, and this has me stumped. Any help/insight would be greatly appreciated. stage.addEventListener(KeyboardEvent.KEY_DOWN, doSubmitViaEnter); function doSubmitViaEnter(e:KeyboardEvent):void { if (e.keyCode == 13) { doSubmit(); // this is line 187 } }; function doSubmit(e:MouseEvent):void { var clip:MovieClip = active_clip.mc_form; if (fname1field.text == || lname1field.text == || email1field.text == || clip.fnamefield.text == || clip.lnamefield.text == || clip.titlefield.text == || clip.emailfield.text == ) { status_txt.text = Please fill in all required fields.; } else { //All fields valid so send away! status_txt.text = Posting nomination...\nPlease wait...; doSend(); } } DON TALCOTT 316 Greenwood Avenue Decatur, Georgia 30030 404.538.1642 dtalc...@mindspring.com DON TALCOTT 316 Greenwood Avenue Decatur, Georgia 30030 404.538.1642 dtalc...@mindspring.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] error mesg
Then make the parameter optional: function doSubmit(e:MouseEvent=null):void OR in your function doSubmitViaEnter method call doSubmit(null) - Benny -Oorspronkelijk bericht- Van: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] Namens DONALD TALCOTT Verzonden: vrijdag 17 december 2010 1:24 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] error mesg I failed to mention, also have the following for a button; mc_aim_higher.mc_form.submitBtn.addEventListener(MouseEvent.CLICK, doSubmit); If I remove e.MouseEvent the button won't work. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] error mesg
You shouldn't be manually calling an event handler in your code. If you want multiple event handler functions to run the same set of code, then create a third function that they all call. function onSomething(event:Event):void { doIt(); } function onSomethingElse(event:Event) { doIt(); } function doIt():void { //doStuff. } Jason Merrill Instructional Technology Architect Bank of America Global Learning ___ -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of DONALD TALCOTT Sent: Thursday, December 16, 2010 7:24 PM To: Flash Coders List Subject: Re: [Flashcoders] error mesg I failed to mention, also have the following for a button; mc_aim_higher.mc_form.submitBtn.addEventListener(MouseEvent.CLICK, doSubmit); If I remove e.MouseEvent the button won't work. On Dec 16, 2010, at 7:05 PM, Nathan Mynarcik wrote: Take out the e:MouseEvent in your doSubmit function. On Dec 16, 2010 6:40 PM, DONALD TALCOTT dtalc...@mindspring.com wrote: I have the following code below. When I compile the swf,I get the following error; Line 187 1136: Incorrect number of arguments. Expected 1. Have been playing with this all day, somewhat new to as3, and this has me stumped. Any help/insight would be greatly appreciated. stage.addEventListener(KeyboardEvent.KEY_DOWN, doSubmitViaEnter); function doSubmitViaEnter(e:KeyboardEvent):void { if (e.keyCode == 13) { doSubmit(); // this is line 187 } }; function doSubmit(e:MouseEvent):void { var clip:MovieClip = active_clip.mc_form; if (fname1field.text == || lname1field.text == || email1field.text == || clip.fnamefield.text == || clip.lnamefield.text == || clip.titlefield.text == || clip.emailfield.text == ) { status_txt.text = Please fill in all required fields.; } else { //All fields valid so send away! status_txt.text = Posting nomination...\nPlease wait...; doSend(); } } DON TALCOTT 316 Greenwood Avenue Decatur, Georgia 30030 404.538.1642 dtalc...@mindspring.com DON TALCOTT 316 Greenwood Avenue Decatur, Georgia 30030 404.538.1642 dtalc...@mindspring.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- This message w/attachments (message) is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachments, and be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this message is prohibited. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Sender. Subject to applicable law, Sender may intercept, monitor, review and retain e-communications (EC) traveling through its networks/systems and may produce any such EC to regulators, law enforcement, in litigation and as required by law. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or free of errors or viruses. References to Sender are references to any subsidiary of Bank of America Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that are part of this EC may have additional important disclosures and disclaimers, which you should read. This message is subject to terms available at the following link: http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you consent to the foregoing. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] error mesg
Thanks to all, it is woking and posting all data. function doSubmitViaEnter(e:KeyboardEvent):void { if (e.keyCode == 13) { status_txt.text = Posting nomination...\nPlease wait...; doSubmit(); } } function doSubmit(e:MouseEvent=null):void { var clip:MovieClip = active_clip.mc_form; if (fname1field.text == || lname1field.text == || email1field.text == || clip.fnamefield.text == || clip.lnamefield.text == || clip.titlefield.text == || clip.emailfield.text == ) { status_txt.text = Please fill in all required fields.; } else { //All fields valid so send away! status_txt.text = Posting nomination...\nPlease wait...; doSend(); } } //Disable all the fields and buttons //prep all the variables that need to be sent to PHP //send them to register.php function doSend():void { for (var i:uint = 0; i fields.length; i++) { fields[i].enabled = false; } //enable preloader dots dots.visible = true; dots.play(); var variables:URLVariables = new URLVariables(); // variables follow . On Dec 16, 2010, at 7:48 PM, Merrill, Jason wrote: You shouldn't be manually calling an event handler in your code. If you want multiple event handler functions to run the same set of code, then create a third function that they all call. function onSomething(event:Event):void { doIt(); } function onSomethingElse(event:Event) { doIt(); } function doIt():void { //doStuff. } Jason Merrill Instructional Technology Architect Bank of America Global Learning ___ -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of DONALD TALCOTT Sent: Thursday, December 16, 2010 7:24 PM To: Flash Coders List Subject: Re: [Flashcoders] error mesg I failed to mention, also have the following for a button; mc_aim_higher.mc_form.submitBtn.addEventListener(MouseEvent.CLICK, doSubmit); If I remove e.MouseEvent the button won't work. On Dec 16, 2010, at 7:05 PM, Nathan Mynarcik wrote: Take out the e:MouseEvent in your doSubmit function. On Dec 16, 2010 6:40 PM, DONALD TALCOTT dtalc...@mindspring.com wrote: I have the following code below. When I compile the swf,I get the following error; Line 187 1136: Incorrect number of arguments. Expected 1. Have been playing with this all day, somewhat new to as3, and this has me stumped. Any help/insight would be greatly appreciated. stage.addEventListener(KeyboardEvent.KEY_DOWN, doSubmitViaEnter); function doSubmitViaEnter(e:KeyboardEvent):void { if (e.keyCode == 13) { doSubmit(); // this is line 187 } }; function doSubmit(e:MouseEvent):void { var clip:MovieClip = active_clip.mc_form; if (fname1field.text == || lname1field.text == || email1field.text == || clip.fnamefield.text == || clip.lnamefield.text == || clip.titlefield.text == || clip.emailfield.text == ) { status_txt.text = Please fill in all required fields.; } else { //All fields valid so send away! status_txt.text = Posting nomination...\nPlease wait...; doSend(); } } DON TALCOTT 316 Greenwood Avenue Decatur, Georgia 30030 404.538.1642 dtalc...@mindspring.com DON TALCOTT 316 Greenwood Avenue Decatur, Georgia 30030 404.538.1642 dtalc...@mindspring.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- This message w/attachments (message) is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachments, and be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this message is prohibited. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Sender. Subject to applicable law, Sender may intercept, monitor, review and retain e-communications (EC) traveling through its networks/systems and may produce any such EC to regulators, law enforcement, in litigation and as required by law. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are