MX Button Component > 2004 Button Component
HELP!
okay, I'm moving from MX to MX2004 and I'm having trouble with MX2004 button component. I'm used to the change click handler function and I know for MX2004, I need to use a listener but I can't get my code to work. Whats wrong?
ActionScript Code:
onSubmitListener = new Object();onSubmitListener.click = function();{ //Create a new LoadVars instance for the form data formData = new LoadVars(); //Initialize formData variables formData.txtZip = ""; formData.cboDist = ""; formData.dealer = "stores"; //Gather the order information into a LoadVars Instance formData.txtZip = escape(txtZip.text); formData.cboDist = cboDist.getValue(); formData.dealer = "stores"; //Create another LoadVars instance to receive the server's reply replyData = new LoadVars(); //Initialize reply variable replyData.reply_txtZip = ""; replyData.reply_cboDist = ""; replyData.reply_dealer = "stores"; //Specify a function to call when this new instance receives the reply replyData.onLoad = handleReply; //Submit the data formData.sendAndLoad("http://www.blahblah.com", replyData, "POST"); //Telling the user what is happening scroller.text = "Please wait while your information is being processed. . .";}onSubmit.addEventListener("click", onSubmitListener);}function handleReply(success) { if (success) { trace("done loading"); scroller.html = true; scroller.htmlText = replyData.textfield; } else { scroller.text = "There was a problem submitting your information. The server my be down or not responding."; }}
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 07-23-2004, 06:32 PM
View Complete Forum Thread with Replies
Sponsored Links:
MX Button Component > 2004 Button Component
HELP!
okay, I'm moving from MX to MX2004 and I'm having trouble with MX2004 button component. I'm used to the change click handler function and I know for MX2004, I need to use a listener but I can't get my code to work. Whats wrong?
ActionScript Code:
onSubmitListener = new Object();onSubmitListener.click = function();{ //Create a new LoadVars instance for the form data formData = new LoadVars(); //Initialize formData variables formData.txtZip = ""; formData.cboDist = ""; formData.dealer = "stores"; //Gather the order information into a LoadVars Instance formData.txtZip = escape(txtZip.text); formData.cboDist = cboDist.getValue(); formData.dealer = "stores"; //Create another LoadVars instance to receive the server's reply replyData = new LoadVars(); //Initialize reply variable replyData.reply_txtZip = ""; replyData.reply_cboDist = ""; replyData.reply_dealer = "stores"; //Specify a function to call when this new instance receives the reply replyData.onLoad = handleReply; //Submit the data formData.sendAndLoad("http://www.blahblah.com", replyData, "POST"); //Telling the user what is happening scroller.text = "Please wait while your information is being processed. . .";}onSubmit.addEventListener("click", onSubmitListener);}function handleReply(success) { if (success) { trace("done loading"); scroller.html = true; scroller.htmlText = replyData.textfield; } else { scroller.text = "There was a problem submitting your information. The server my be down or not responding."; }}
View Replies !
View Related
Push Button Component In Flash MX 2004 PRO
Hi All
I have a tutorial that requires I use the pushbutton component in the components panel. But I'm running Flash MX 2004 and there is no PushButton component, only a Button component.
Also it wants me to put in something in the Click Handler field but the Button component doen's have a Click Handler fielf?
Can someone please help me.
I'm trying to build a form and I can't get it to work with out getting this "Pushbutton"
many thanks
Cara
View Replies !
View Related
Speed Of My Button Component Versus Adobe Component
I've been happily creating my button component and things have been going well until I got to the point of creating the mouse down state.
I've modeled the structure of my components very similar to the Adobe supplied components, but I notice my component is not as attentive to mouse events as the Adobe components. I can click my mouse over one of my buttons fast enough that the button doesn't register the click.
But no matter how fast I click the Adobe button, it always registers the clip.
Is the speed difference the fact that my button doesn't use the Component shim? I plan to either use a shim or convert the component itself into a compiled clip, but for development purposes, I thought it best to reference the UIcomponent source.
I would appreciate your thoughts,
Thanks, Jennifer
View Replies !
View Related
Component Themes - Changing Button Component
I am creating a custom theme, or skin, for my components and I have figured out how to edit most pieces but the most used is the most elusive.
Does anyone know how to edit the look of the button when creating a new theme?
I am finding that you have to edit the ClassObject but Macromedia's help is very confusing, they talk aobut creating a button dynamically then about the ClassObject but don't put all the directions in one place.
Maybe someone knows a good tutorial
Thanks
View Replies !
View Related
Switching Out A Component Button With A Custom-made Button
Hey there,
I had a programmer work up some code that would allow me to use different usernames and passwords to enter a site. This was done with .as and xml. It works beautifully. The .as is a separate file that I also upload with the swf.
The problem I'm having is that the programmer used a component button and I need to use one that I made (one that matches the rest of the site). I created a button and switched the component button out with this newly made button. But now it refuses to work! I've tried naming it exactly the same in the instance box and even in the properties box but it just will not work.
What could I be doing wrong?
View Replies !
View Related
Difference Between Button Component And Creating A New Button Type
I'm using this sample code to send/receive data when a button is clicked. It works with a Button Component but not with a button I create. Any ideas while?
Code:
var submitListener:Object = new Object();
submitListener.click = function(evt:Object) {
var result_lv:LoadVars = new LoadVars();
result_lv.onLoad = function(success:Boolean) {
if (success) {
trace("content = "+result_lv.content);
} else {
trace("Error connecting to server.");
}
};
var send_lv:LoadVars = new LoadVars();
send_lv.file = "bios.html";
send_lv.sendAndLoad("http://[url]/press/content/talk_w_flash.php", result_lv, "POST");
};
mc_menu.submit_button.addEventListener("click", submitListener);
Thanks,
Pete
View Replies !
View Related
Switching Out A Component Button With A Custom-made Button
Hey there,
I had a programmer work up some code that would allow me to use different usernames and passwords to enter a site. This was done with .as and xml. It works beautifully. The .as is a separate file that I also upload with the swf.
The problem I'm having is that the programmer used a component button and I need to use one that I made (one that matches the rest of the site). I created a button and switched the component button out with this newly made button. But now it refuses to work! I've tried naming it exactly the same in the instance box and even in the properties box but it just will not work.
What could I be doing wrong?
View Replies !
View Related
Switching Out A Component Button With A Custom-made Button
Hey there,
I had a programmer work up some code that would allow me to use different usernames and passwords to enter a site. This was done with .as and xml. It works beautifully. The .as is a separate file that I also upload with the swf.
The problem I'm having is that the programmer used a component button and I need to use one that I made (one that matches the rest of the site). I created a button and switched the component button out with this newly made button. But now it refuses to work! I've tried naming it exactly the same in the instance box and even in the properties box but it just will not work.
What could I be doing wrong?
View Replies !
View Related
Component Button
Is there a way to make a button out of a line of text within an instance of a flash component List Box?
Trying to use the List Box as a scrolling menu.
Any help is much appreciated.
Best Regards,
KQ
View Replies !
View Related
Button Component Does Not Appear
I have this project which is a photo gallery, and picks up images from an XML file. I just discovered the joy of flash components (flash MX 2004) and wanted to insert them (by dragging from components onto the stage) into this photo gallery. however, the swf output gives me an empty button with no label! And it is just a rectangle (without the pretty edges and rollover effects).
Is it because my project uses XML and so components do not work with it? Any suggestions how I can solve this?
View Replies !
View Related
Button Component
Hi, I have made a button component that has no navigation built inside it. Instead I have used the:
StartButton.onRelease = function (){
nextFrame();
}
But when i apply this code to the button, the button no longer has any over or down states.
Basically as teh user roll sover it, it looses its rollover functions.
Has anybode experienced anythiif so any idea how to overcome this.
cheers
lee
View Replies !
View Related
Button Component
This is must be simple, but I’m using ‘Button component’ first time.
I have 2 text input (a & b) boxes & one dynamic text field (c). For simple calculation I’m using this script in button
on(press)
{c=a*1*b*1
}
If I use ‘Button component’ how to implement this script…
View Replies !
View Related
Button Component
Ok, im being a n00b here, I dont yet fully understand Action Scripting, or Advanced Flash (Using MX 2004).
I've been doing load of tutorials and so on, I could get them to work, yet I was still left without fully understanding the creation of Button Components, all I want to do is create button icons, small little 21px X 21px icons, but can't find a way to do properly, and have it as a fully functional button component.
Can someone please help. Please.
View Replies !
View Related
UI Component Button
Hi,
How can i load an external swf file using UI component button?
must i create a empty movieclip ?
i hv try the the following but it cant work.
on(click){
Var mc:MovieClipLoader = new MovieClipLoader ();
mc.loadClip("my_mc.swf","container");
}
pls advise thanks.
rgds,
View Replies !
View Related
[F8] Button Component Help
I'm having difficulties getting my buttons (Button component) to work the way i want. Here is what i have to make it more easy to explain: http://www.snap2guide.nl/tmp/buttons/
What i want is when i click a button it needs to get disabled (ie. b1.enabled=false). Now when i click another button this one should get disabled and the other(s) should be enabled again. And so on.. for all possible combinations. So there can only be 1 disabled button at a time.
In fact, it sounds a bit like radio buttons. But i realy prefer to use the Button component
Can anyone help me out please?
Thanks in advance.
View Replies !
View Related
Button Component
hi every body,
i m on a project that allows user to select a button instance from a list (list of pictures or buttons) and once the user selects it, i am supposed to build a user interface with the button they selected. i have already written my code using the default button component. now the problem is to skin these button with different up and down states and place them in a single movieclip. i tried it but always ended up with a dialog box that asks to replace the library button or reset all the buttons to default setting. i know its possible with AS but i want to try keepin all my button designs in library and simply calling the desired button when the user selects it. also all my buttons should be a component type so that whatever i have coded for default button can be used with my new buttons.
any idea how to achieve that. please help........soon.
thanks in advance
View Replies !
View Related
Ui-component Button
hello everybody,
i have a question concerning the skin
of an ui-component button.
i hardly try to chage side colour or skin
but i have no idea how? the tutorial about
components helped, but didnt work for this
button. please give me a hint.
tahnk you very much...
View Replies !
View Related
Button Component?
Apparently when you give the button component a rollOver function it eliminates the it's own rollOver state... it's as if your rollOver function now overwrite the buttons... REALLY stupid... is there a work around?
View Replies !
View Related
Please Help. Button Component
can anyone please help help out with this button component. i followed a step-by-step guide on adobe website and created my own button component. everything is great until i tried putting a on (release) command to it.
the rollover animation doesn't work when i put in the on(release) command. the link attached to on(release) getURL works fine but not the rollover animation on the button. take that away and the rollover animation works.
please can somebody help. i've attached the .fla file.
thanks
View Replies !
View Related
Ui-component Button
hello everybody,
i have a question concerning the skin
of an ui-component button.
i hardly try to chage side colour or skin
but i have no idea how? the tutorial about
components helped, but didnt work for this
button. please give me a hint.
tahnk you very much...
View Replies !
View Related
Button Component
and you thought that you saw the most basic question in here...
How do I use the button component to respond when I push the enter button? In other words, I have a text input and I want it to submit when the user presses enter. I can do it with a normal button, but that's no fun...
thank you in advance,
Me
View Replies !
View Related
Using A Component Push Button
I have a form in flash and I need to make a submit button.
The form is all 'input text' boxes that will tie to a table in a mySQL database. Usuing PHP how do I tie the flash with the PHP to make the form work.
Help Please.
View Replies !
View Related
Radio Button Component
i have a couple of radio buttons in a scene
when i select radio button a, i want to move the playhead to frame "a"; when i select radio button b i want to move the playhead to frame "b";
radio buttons:
changehandler: radioButtSelected
on frame 1 i have the following code:
function radioButtSelected(obj) {
if(obj.getSelectedItem().label=="a"){
gotoAndStop("a");
}
if(obj.getSelectedItem().label=="b"){
gotoAndStop("b");
}
}
i used the above code succcessfully with a dropdown menu, and i was hoping it'd work with the radio buttons. i've tried using data instead of label but i'm getting nowhere.
any help is very welcome
cheers
View Replies !
View Related
Radio Button Component
Maybe I'm just being stubborn and I don't want to look for the answer anymore, but I can't seem to figure out how to change the font color of the radio button labels... I tried changing it in the symbol library, the FLabel component, but it doesn't seem to be working...
Dave
View Replies !
View Related
Component Button Help Needed
Hey everyone,
I was just wondering how to use component buttons in Flash MX. I've read the help and everything and I know you have to use the setClickHandler method to make the button work.
But where do I put the code? Do I assign the action to the button itself or do I put it in the frame of my movie. I'm confused as to where to put the script. Nothing seems to work when I run it.
Here's what I have in the Actions layer of my main movie:
Code:
button1.setClickHandler("onClick",button1);
This is what I have in the Actions layer of my button:
Code:
this.onClick = function(component) {
proClip.gotoAndPlay(2);
}
Am I doing this right cause my button isn't triggering the movie clip to play?
View Replies !
View Related
Component Button Script
Hey everyone,
I was just wondering how to use component buttons in Flash MX. I've read the help and everything and I know you have to use the setClickHandler method to make the button work.
But where do I put the code? Do I assign the action to the button itself or do I put it in the frame of my movie. I'm confused as to where to put the script. Nothing seems to work when I run it.
Here's what I have in the Actions layer of my main movie:
Code:
button1.setClickHandler("onClick",button1);
This is what I have in the Actions layer of my button:
Code:
this.onClick = function(component) {
proClip.gotoAndPlay(2);
}
Am I doing this right cause my button isn't triggering the movie clip to play?
Thanks!
View Replies !
View Related
Mx2004 'Button' Component Help
Hi,
I need help with the 'Button' component. How do I programmatically add this component? I tried the following code (see below) but it broke (overRode I guess) the 'on(click)' method/event to where my 'new' buttons no longer 'hiLite' when you press them.
I know that if you drag an instance of a 'Button' component to the stage, you have to add behaviors to it; for example to cause the button to take you to a web link, you add the 'go to web link' behavior. All that does is add an 'on(click) event to the 'Button' instance.
First, I added a 'Button'component to the main time line and hid it.
Then I used this code to make the 'new' buttons:
Code:
var tmpMC={};
var btnArray=[
["button 1", "link 1"],
["button 2", "link 2"],
["button 3", "link 3"]
];
for(var ndx=0; ndx<btnArray.length; ++ndx){
tmpMC=attachMovie("Button", "mcBtn"+ndx, ndx);
tmpMC.label=btnArray[ndx][0]; // button text
tmpMC.linkAddress=btnArray[ndx][1]; // link address
tmpMC.onPress=handleOnPress;
}
function handleOnPress(){
trace(this+", "+this.linkAddress);
}
Is there a better way to do this?
How do I add my own 'on(click)' event to the buttons?
Thanks!
View Replies !
View Related
Button Component Problem
Hello,
I have been trying to learn how to use components in Flash MX 2004 and so far have not succedded in doing much at all. I started about a week ago trying to figure out how to use the "Button" component - and I haven't moved on at all.
I have looked at what little tutorials that are available on the web and I am still totally lost. These tutorials tell me to change the "Label" and then to set the "Click Handler" so I can control the button in ActionScript. Well that is all fine and dandy, except that when I drag a button component on to the stage area, there is no "Click Handler" anywhere to be seen in the "Properties Panel". There is:
icon
label
labelPlacement
selected
toggle
but no "Click Handler" anywhere!?!. I have clicked just about every possible thing I could find to bring up the "Click Handler" but I cannot find it. Now I realise that I am a complete moron and probably the only person in the world who cannot do this simple task but can someone please tell me how I find the "Click Handler" before I go totally insane.
Thankyou and regards,
Vaughan - celtic@allstate,net.au
View Replies !
View Related
Skinning A Button Component
Okay I have been trying to skin the button component, but it appears that since MM uses the drawing features of flash to draw a button component that it is impossible to get rid of the default background.
Code:
// I am dynamically adding a button and setting it's skin movies like this
var NextButton = new Object();
NextButton.falseUpIcon = "MyUpIcon";
NextButton.falseDownIcon = "MyDownIcon";
NextButton.trueUpIcon = "MyUpIcon";
createClassObject(mx.controls.Button, "MyButton", 0, NextButton);
MyButton._x = 200;
MyButton._y = 200;
MyButton.trackAsMenu = true;
MyButton.onPress = function()
{
trace("hello");
}
Still though the button draws it's default border. Can anyone tell me of a better way to accomplish this with the component button?
View Replies !
View Related
Problem With Component Button
Hi,
Im making a presentation that has a main menu where i can go to the other scenes of it. I used the button that is located at the common libraries menu, on the carpet Component Buttons (Pill Button). I used it because it versatile to customize and i can put many of it in one scane from one object in the library, and treat them as independenet objects.
but the problem is that, when i link one button to one scene i does nothing. I used this code in the actions panel of the button (the button is treated like movie clip...i dont understand why):
on (release) {
gotoAndPlay("scene2",1);
}
But when i look the swf file it does not work, i cant go to the other scene. Does it need anything else to work?, i couldn´t test it in the program directly, because it is not a button, so what can do???
Thx
View Replies !
View Related
Push Button Component ?
how do I get it to do anytihng, I'm baffled by it
It hoguht the point of them was to make it easier to make a button, well its not!
so I've got a button called 'Next' and I want to to go to the next frame. anyone help?
View Replies !
View Related
Button Component Problem
Hi,
I've built an Flash search application, which queries an XML file. The problem I'm having is that although the UI button component works fine if clicked, I want to be able to activate the button when the user hits 'Enter'. I have no idea why I can't get this to work...
Any suggestions, please?!
Also, does anyone know how to remove the "," from the middle of multiple search results, i.e. the results are currently returned as follows:
Visa Debit
A debit card scheme enabling cardholders to make payments to participating merchants in the scheme (typically at retailers and POS terminals).
,Visa
An international card scheme.
,Through-the-Wall ATM
An ATM located at a bank or building society accessible from outside the premises.
I want to get rid of the commas that appear before any titles listed after the first result...
Thanks!
View Replies !
View Related
Radio Button Component
Hi,
I have a problem with flash mx ui components.
Basically I have a screen with 15 items.
Each item has a radio button with the text 'buy item'.
The items are from a hi lo guess game. At the end of the game the user gets presented with a screen showing all 15 items in the game.
But only the items that have been correctly guessed will have a radio button that works.
The user can select up to 12 items (radio buttons). This is where the problems begin.
Each item will have a special code attached, so after the user has selected 1 - 12 items and presses a buy items button, the user goes to an order form on a website and the order form will be populated with the codes from the selected items.
I have never used ui components before and can't seem to find any tutorials.
Any help / tips would be great.
TIA
Lel
View Replies !
View Related
Radio Button Component
Hi,
I made a Radio button choice, with yes or no, as labels and datas.
If you press yes and then click on next, you should go to one screen. If you press no, you should get a text message saying "sorry".
Here's the code I put on the button :
code:
on (release) {
if (!surname.length) {
message_txt.text = "Please enter your first name";
} else if (!name.length) {
message_txt.text = "Please enter your last name";
} else if (radioGroup.selectedData = "No"){
message_txt.text = "Sorry";
} else{
gotoAndPlay(2);
}
Both times, I get a sorry message, whether I click yes or no.. Where's the error?
Thanks,
Manojo
View Replies !
View Related
Radio Button Component
Does anyone know how to change the font and font size for the radio button component. I would like to embed a pixel font, but whatever I tried (from my books) doesn't seem to work.
thanks guys (and girls)
z
View Replies !
View Related
Creating A Button Component
(Original post)
Ok, im being a n00b here, I dont yet fully understand Action Scripting, or Advanced Flash (Using MX 2004).
I've been doing load of tutorials and so on, I could get them to work, yet I was still left without fully understanding the creation of Button Components, all I want to do is create button icons, small little 21px X 21px icons, but can't find a way to do properly, and have it as a fully functional button component.
Can someone please help. Please.
View Replies !
View Related
Problem W/ The Button Component
i've never played w/ the components that macromedia/adobe gives you till today for this application i am creating.
the thing is, if i have actionscript for a particular instance of the button (in my case, a button to print out the written document), it opens up the print dialog to print but doesn't print anything at all.
when i do the same with my own button that i made, it prints clearly. this is the code i used:
BUTTON COMPONENT
Quote:
on (click) {
var my_pj = new PrintJob();
var myResult = my_pj.start();
if(myResult){
myResult = my_pj.addPage ("printPG", 1);
my_pj.send();
}
delete my_pj;
}
my Button
Quote:
on (release) {
var my_pj = new PrintJob();
var myResult = my_pj.start();
if(myResult){
myResult = my_pj.addPage ("printPG", 1);
my_pj.send();
}
delete my_pj;
}
[
as you can see, all i changed was "on(click)" to "on(release)". how can this be fixed?
the reason i'm asking is because i need to do to other button instances to format my text which isn't working either.
thanx in advance guys!
View Replies !
View Related
Button On FLVPlayback Component
I have 2 versions of a set of FLV movies -- one designed for visitors with broadband and one designed for visitors with dial-up. I want to offer visitors a choice of which version of the movie to view by putting a radio button group or dropdown menu on the FLVPlayback control. (See, e.g., the NYT homepage control.) How do I customize the control for this behavior?
Thanks.
View Replies !
View Related
Button System Component
Hello everyone,
First let me thank anyone that answers in advance.
Ok here is where I need help. I am building a button system, play button, stop, rewind, etc...
Now I want to convert the buttons into a component. I can convert one into a component and even create the MXP file but how do I make a component that will install all the buttons once you run the MXP installation?
In other words when you install the button system I want it to show up in your component library with all the buttons installed. The same way as when you click on the FLV playback custom UI and see all the buttons available.
Thank you for your help.
J
View Replies !
View Related
|