button and text input components

FLASH

    Next

  • 1. Errors with loading movies when uploaded to web
    Hello. I am having an error after the swf files have been uploaded to the server. Everything runs smoothly from the actual swf files locally. What is supposed to happen, is a load movie script. After the first one (a splash screen) is done playing, it is automatically supposed to load and play the next movie. An error occurs and it doesnt load the next movie- it just stops. Another example of this occuring is where it is supposed to load two different movies on two different levels. In this case, it only loads the base level. From this information, can anyone detect the problem? Thanks!
  • 2. Dynamic Text editing
    Why isn't kerning available with dynamic text? How do people normally resolve this problem? If I create dynamic information text boxes then how can I ensure that they will be properly formatted? I am having trouble with placing dynamic information into text boxes. The text is always uneven and sentences will be longer than others. Is there some code that I am missing? Can I place <BR> tags in a paragraph of dynamic text so that it will atleast be formatted somewhat? Thanks, Sam
  • 3. Links in Jpg's Gifs and png's
    I knoe when you go to publish settings you can choose either them or some other. The site I want to put it on doesn;t upload Flash, it only uploads jpg's and gif's. How do i get the hyperlink to work if i have it in those 2 file formatts?
  • 4. help with a navigation menu...
    Does anybody know of a tutorial or a help page that would show me how to create a navigation menu bar like the one here on the macromedia web site that fades in and out of more options when you rollover the different options on the bar and then highlights the new options for clicking? I am brand new to Flash but i am familiar with web terminology and i currently use photoshop and Dreamweaver primarily to create my web sites. I think creating a nav bar like macromedia's would work well with my site. Thanks.
  • 5. Cancel test movie
    I'm working on a movie with multiple scenes. Sometimes I hit Ctrl, enter (test movie) when I mean to hit Ctrl, alt, enter (test scene) then when I click cancel...it doesn't. At least not right away it takes forever, Why is that? Is there a work around? thanks, cj

button and text input components

Postby lexamus » Wed, 11 Jun 2008 06:47:45 GMT

i have a part of my website where i want there to be a sort of form, so i have 
used about 10 text input field components and placed a button component at the 
bottom...now using actionscript how do i get these 2 components to work 
together and how do i make sure that when someone clicks the button the 
information in the text input fields will be emailed to a specified email 
address?? help is sooo greatly appreciated!


Re: button and text input components

Postby jimbo123654 » Thu, 12 Jun 2008 21:46:02 GMT

hey,
 Well you need to give all your text fields an instance name so you can refer 
to them in AS then either you can select the button then press F9 and put the 
script on the button object or make a new layer at the top of your main time 
line and put the script there in the same frame as the button not the same 
layer though,
 The script would be something:
 button_name.onRelease = function(){
 first_var_name = frist_textfield_name.text;
 //repeat this for all your text fields they are now captured and stored in the 
variables
 }
 As for emailing this ifnormation you would need to create a couple of loadVars 
objects one to to send the info and one to recieve a reply and then send the 
info to a PHP page use the mail function of php to send info and send back a 
message that can then be output in a dynamic text field so that your user can 
knows that the info has been sent or not. It gets a bit in depth so look up 
LoadVars in the user manuals in flash and see if you can work it htrough from 
there or find some tutorials on using LoadVars.
 but pretty much if had something like:

 var send_lv:LoadVars = new LoadVars();
 var recieve_lv:LoadVars = new LoadVars();

 function SendData(){
     recieve_lv.onLoad = function(success:Boolean){
         if(success){
             theMsg_txt.text = recieve_lv.msg;
         }
         else{
             theMsg_txt.text = "Sorry! a problem occur info not sent";
         }
     }
 send_lv.sendAndLoad("mailme.php",recieve_lv,POST);
 }

 myButton.onrelease = function(){
 send_lv.firstName = firstName_txt.text;
 send_lv.lastName = lastName_txt.text;
 SendData();
 } 

 This would send the data to mailme.php if the swf and the php pages where at 
the same level in the same directory otherwise you would need to change that in 
the sendAndLoad function so thta the data was directed to the right directory 
to fiind the page on the server


 Hope this helps you out


Similar Threads:

1.receiving text from text input component

hey all, I am trying to get a variable from a text input component box that is 
located inside a movie clip object.  I am testing it by reading the output 
panel upon clicking a button set up in another movie clip instance.  Here is 
the code:

 this.inputScreen.startAreaMC.startButton.onPress = function(){
 	trace(videoID);
 	trace("Ok");
 }

 no matter what I type in the input component box, the output I always get is:
 undefined
 OK

 why do I keep getting undefined?

2.Remove input text on input text box select?

Right now I've got an input text box with an instance name of EMail and Var of 
EMail. Then in my AS I've got:

 var EMail:String = "Enter Your Email Address";

 which puts "Enter Your Email Address" in the text box when it displays. What 
I'd like to do is when a user clicks inside the box to enter their email 
address is for that string to disappear.

3.Animated Text Input Component

I am having a nightmare

 I have a text input component that animates on my screen, and no matter what i 
try cant get it to actually display any text.

 I have tried embedding the fonts.

 Below is my code

                        var _myVerdana:myVerdana = new myVerdana();
 						
 			//lets create a text format object for the input boxes
 			var format:TextFormat = new TextFormat();

                         nameTextInput.textField.defaultTextFormat = format;
 			nameTextInput.textField.embedFonts = true;
 			nameTextInput.textField.antiAliasType = AntiAliasType.ADVANCED;  
                         nameTextInput.textField.autoSize = 
TextFieldAutoSize.LEFT;  
 			nameTextInput.text = "test";
 			format.font = _myVerdana.fontName;  			
 			format.color = 0xFFCCCC;


 any help would be greatly appreicated

4.halo effect for text input component

how does macromedia achieve the halo effect on the text input "search" component seen at the top right of this page. i see that "radiobutton", "button" and some other components allow you to customize them with the following...

submit.setStyle("fontFamily", "verdana");
submit.setStyle("fontSize", "11");
submit.setStyle("fontWeight", "bold");
submit.setStyle("color", "0x5B5642");
submit.setStyle("themeColor", "haloOrange");

any help is much appreshiated (sp), thanks - Matthew





5.input text component error

I have created a series of forms for an ecommerce app. I have a movie clip 
called "billInfo" being placed dynamically- there is a combobox with a 
dataprovider for the states. It functions fine.

 when a person hit's a "next button" I store the collected info, remove the 
form and load the next screen.

 The second screen contains another combo box. This combo box won't display 
"selected" data. the dropdown list works and displays information and I can 
select items but the label displayed remains blank! I tried an experiment by 
placing a inputtext component on the same screen and this is also won't display 
anything. it won't even let me give it focus ( click inside it). If I remove 
the combo box from the first form, the second form combobox works fine. It's 
almost like I can't use two instances of that component without the second 
instance refusing to work.

 Is this a bug in the component?

 I'm running flash mx 2004 professional on a mac. Any help would be great I'm 
so close to completing this purely flash client ecommerce site but this is 
sticking me bad.

 Jared

6. naming var component input texts

7. Changing the value of a text input component

8. input text component



Return to FLASH

 

Who is online

Users browsing this forum: No registered users and 50 guest