Can A Button Control A Combobox And Vice Versa?
When I click a button, I want it to display the corresponding label in the ComboBox. If so, how???
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 07-25-2008, 09:29 AM
View Complete Forum Thread with Replies
Sponsored Links:
LocalToGlobal And Vice Versa
Hi - this looks easy but is more complex than it seems.
When I mouse over a clip which is embedded two levels down
(_root -- loaded swf -- clip with mouseover), I want capture the x y position of the clip relative to the _root and then a function which places a label on the _root next to the clip but off set by -30 on the _x.
At the moment I am capturing the the X Y of the mouse and using that as a point, but obviously it looks a little messy because it depends on where the mouse hits the clip - yMouse could be 100, or 105 or 110, so each time the label is attached at slightly different Y positions. Currently I am doing XPosition = _parent._parent._xMouse and the same for Y.
Any ideaS?
thanks
frank
View Replies !
View Related
GlobalToLocal And Vice Versa
I am haveing a hellofa time trying to understand the globalToLocal and localToGlobal thing. I have read countless threads and nothing about it is clicking. I just know that once I get it I will be able to complete my project. I have some code and this is just a quick movie that I put together so I can isolate just the globalToLocal thing in action. My finished files have tweening and easing in it but that just complacates things for me visually. But this code is structured like my final file.
I have a mc "MC_B" with artwork inside a holder mc "MC_A. the holder mc is dragable by way of the second MC_B. so this main clip moves around and drops were ever you want. A button when pressed needs to send MC_B to about a 100 pixels from the Stage.width (the browser window). The code posted here is what I can't get to work. when you press the button MC_B goes flying off the screen. Ultimately I will have a button that will bring MC_B back to the x0 y0 of MC_A. If I could get some help and advice I would really appreciate it. And please don't direct me to a link on globalToLocal. I have been reading them for about 4 days. And a comment about how I get this working with the tween function would be helpful.
Code:
Stage.align = "TL";
// *** Stop the stage from scaling with the browser window.
Stage.scaleMode = "noScale";
stop ();
var myPoint:Object = {x:0, y:0};
//MC_A._x = 100; // _x for movieclip x position
//MC_A._y = 100; // _y for movieclip y position
MC_A.globalToLocal(myPoint);
trace ("x: " + myPoint.x); // output: -100
trace ("y: " + myPoint.y); // output: -100
MC_B.globalToLocal(myPoint);
trace ("B" +"x:" + myPoint.x);
trace ("y:" + myPoint.y);
////////Drag and drop function
this.MC_A.MC_B.onPress = function() {
this._parent.startDrag();
MC_A.globalToLocal(myPoint);
trace ("A" +"x: " + myPoint.x); // output: -100
trace ("A" +"y: " + myPoint.y); // output: -100
MC_B.globalToLocal(myPoint);
trace ("B" +"x:" + myPoint.x);
trace ("B" +"y:" + myPoint.y);
this.onRelease = function() {
this._parent.stopDrag();
};
}
/////////
this.toStageWidth.onPress = function() {
MC_A.globalToLocal(myPoint);
MC_A._x = Stage.width - 100;
trace (Stage.width)
trace ("A" +"x: " + myPoint.x);
trace ("A" +"y: " + myPoint.y);
trace ("B" +"x:" + myPoint.x);
trace ("B" +"y:" + myPoint.y);
}
View Replies !
View Related
Sound...going To The Next Loop And Vice Versa
check out www.seasonsrecordings.com
...
i have two mp3 loops converted to swfs and would like to be able to go back in forth between the two using a next and a back button such as the ones on the site...also, what code would i put in the stop and play buttons?
any help would be much appreciated..
peace
View Replies !
View Related
Why Use Symbols Over Swfs, Or Vice Versa?
across several flas, i have about a dozen movie clips that will be used in one product. the easiest route seems to be to use external swfs and loadMovie functions with a few instances of some see-through buttons - is there a reason not to do this? will the file size or runtime performance suffer? the libraries share virtually no symbols, so that part's not a concern.
pros? cons? doen't matter?
tyia.
View Replies !
View Related
[F8] Buttons Over Movies And Vice-versa
I have a floating block that follows my mouse curor around the screen, which is a movie clip, but I want to put a button that links to another scene and the movieclip block stops following my mouse. Even if the movieclip and buttons are in different layers.
How do you get around this simple idea?
View Replies !
View Related
Communicate Flash With C++ & Vice-versa
Hello all,
I am developing an app for MAC OS X using C++ Flash as UI. what I exactly need is the communication between Flash & C++. how can I accomplish it?(using ExternalInterface or any other way is there... like shared object or XMLsockets?) I want to transfer data(string format) vice versa in flash & C++, I know Its possible to communicate between two swfs using LocalConnection API, but I got stuck in how to communicate between C++ and flash.
any tutorial/code snippet is greatly appreciated.
Thanks in advance.
please help!
View Replies !
View Related
HTML Embedded Within Flash Or Vice Versa
I was wondering how I would go about this. To incorporate a small HTML page within a flash movie. basically I want the HTML page to be surrounded by the flash content. Or, is it an HTML page that incorporates flash. How would I do start this? I know this is possible I was just wondering how I could do it? Below is an example of what i mean. the text content in the middle is all HTML.
http://www.2advanced.com/realtybid/flash_index.htm
Thanks
View Replies !
View Related
Passing Variables From Flash To PHP And Vice Versa...
Here is what I need:
A button in Flash that when pressed will make a variable called "command" in a php file change value. (ie command=1).
I need to make another separate Flash file that will check to see the value of that variable.
I need help writing the actionscript for the button, the PHP file, and the file that looks for the new variable.
Can anyone help me or point me to a beginner's tutorial?
View Replies !
View Related
Html Form Embed Into Flash Or Vice Versa
Hey all you gurus,
Is it possible to emebed an html form onto a flash html page
Here is the flash page:
http://www34.brinkster.com/ugamis/order_test.html
with that space on the flash page i want to show an html form
Here is the html form:
http://www34.brinkster.com/ugamis/form.html
I am resorting to this because I could not get a form to work in flash. If you feel up to it email me or notify you want to take a crack at it and I will post a link on the list serve.
View Replies !
View Related
Embedding HTML Into Flash Documents (and Not The Vice-versa)
does ANYBODY know how to view html in a flash document. i have a script written that writes news to an html file. but now i'm making a flash version of my site, and want the same news posted in flash. i know you can use the "Field1.html=true;" and everything, but there's too much incompatability between my html and flash. (eg, i use "&" in the links, <font> tags cause problems, etc)
i attached .SWF document, so take a look at it please! (couldn't post .fla .... the file size was too big)
View Replies !
View Related
Whats The Best Method For Navigating Html From Flash & Vice Versa?
hey all
ok, so basically i need to find out the best Method for navigating html from flash & vice versa.
HERES MY CURRENT STRATEGY...
flash;
the flash banner will be just the one swf, it will navigate through the html content with the getURL function
html
each html page has the flash swf embedded using swfobject, a unique 'loadstate' variable will be passed from the html to flash,
eg. for the homepage it'll be;
HTML Code:
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("/swfs/header.swf", "sotester", "924", "350", "8", "#69be28");
so.addVariable("loadstate", "home");
so.write("flashcontent");
// ]]>
</script>
flash;
flash will receive this loadstate variable, then using switch/case it will gotoAndStop on the appropriate frame.
e.g
ActionScript Code:
// check variable passed from html, then play approiate frame switch (loadstate) {case "Home" : castMC.gotoAndPlay(1); break;case "Renewal" : castMC.gotoAndPlay(2); break;case "Growth" : castMC.gotoAndPlay(3); break;case "Harvest" : castMC.gotoAndPlay(4); break;case "Use" : castMC.gotoAndPlay(5); break;}
is there a better way of achieving the same result using swfobject to pass the variables to the .swf?
many thanks
Cam
View Replies !
View Related
Listbox Switcher: Move Items From Listbox1 To Listbox2 & Vice Versa
I have two listbox components side by side. "listbox1_mc" contains a list of users. "listbox2_mc" is empty.
I would like to create the code to allow the user to select one or many users from listbox1_mc and drag and drop them into listbox2_mc and vice versa (ie, once a user has been dropped into listbox2_mc, they can be removed and dropped back into listbox1_mc.
I will also have arrows ( < > ) between the listboxes to allow the user to manually move selected users between the two boxes if they don't use drag and drop (same end, different means).
View Replies !
View Related
Button Makes Another Disappear, But Not Vica Versa.
///
/ Solved, I was using a graphic from another library which had
had it's it own personal agenda.......a button attached to it with it's own actionscript, back to square one then.
/
///
Probably one of those basic concepts that I miss sometimes, but this one has been bugging me for almost an hour now.
I want to make a checkbox, I have made two buttons, a tick and a cross.
They sit on the same place on the stage, here is the script.
On the first frame....
_root.tick._visible=false;
_root.tick.enabled=false;
On the cross button....
on(release){
_root.tick._visible=true;
_root.cross._visible=false;
_root.tick.enabled=true;
_root.cross.enabled=false;
}
On the tick button....
on(release){
_root.tick._visible=false;
_root.cross._visible=true;
_root.tick.enabled=false;
_root.cross.enabled=true;
}
What happens when I test the movie is that the cross button appears, after click the tick button appears, clicking on the tick button makes everything disappear.
View Replies !
View Related
Combobox Control Load Graph
hello....
I have problem about combobox.
I have one combobox and in labels is "Underdamped,Overdamped,Undamped,Crittally damped"
if then select sameone in combobox .It plot graph line and then I select new other in combox it dont work. I must close its and open it again.
I want it work continous.I select someone in combobox it plot graph one line and I select new other in combobox it done work and line of any graph dont lose.
can sameone help me?
Thanks you.
then select sameone in combobox . in example I select "Critally damped"
I select new other in combox it dont work.I must close its and open it again
this code
Quote:
this.createEmptyMovieClip("graph_mc",this.getNextH ighestDepth());
this.createEmptyMovieClip("graph1_mc",this.getNext HighestDepth());
this.createEmptyMovieClip("graph2_mc",this.getNext HighestDepth());
this.createEmptyMovieClip("graph3_mc",this.getNext HighestDepth());
LO = new Object();
LO.change = function(EO)
{
c1Value= c1.getSelectedItem().label;
checkValue();
};
graph_mc.moveTo(100,300);
graph1_mc.moveTo(100,300);
graph2_mc.moveTo(100,300);
graph3_mc.moveTo(100,300);
graph_mc.lineStyle(2,0xFF0000);
graph1_mc.lineStyle(2,0xFFFF00);
graph2_mc.lineStyle(2,0xFFCCFF);
graph3_mc.lineStyle(2,0x9900FF);
var t:Number = 0;
var i:Number =-98;
this.onEnterFrame=function()
{
if(i<148&&c1Value=="Critically damped")
{
Go=(3*Math.exp(-3*t)+Math.exp(-3*t))/5;
graph_mc.lineTo(201+i,140-260*Go/150*i);
t+=1/12;
i=i+3;
}
if(i<139&&c1Value=="Undamped")
{
G1=(1+Math.sin(3*t-19.4));
graph1_mc.lineTo(209+i,300-80*G1);
t+=1/20;
i=i+3;
}
if(i<148&&c1Value=="Underdamped")
{
Go=1.5*(1.06*Math.exp(-t)*Math.cos(Math.sqrt(8)*t-19.47));
graph2_mc.lineTo(198+i,140-190*Go/150*i);
t+=1/7;
i=i+3;
}
if(i<148&&c1Value=="Overdamped")
{
Go=(0.171*Math.exp(-7.854*t)+1.171*Math.exp(-1.146*t))/1.8;
graph3_mc.lineTo(202.5+i,140-260*Go/150*i);
t+=1/12;
i=i+3;
}
}
_root.c1.addEventListener("change", LO);
View Replies !
View Related
How Do I Control Variables From ComboBox Values In Flash MX?
I've created a ComboBox using Flash MX's new ComboBox component...I have 3 values:
Jaguar
Porshe
Lamborgini
When the user clicks on say, Porshe, I have a movie clip with 3 labeled sectioned each containing text and an image of each of the cars. There is an instance of this movie clip on my root stage along with the ComboBox. The mc instance name is "cars." When the user clicks on the "Porshe" value in the ComboBox, how and where do I insert code so that an action is triggered that will make the instance of "cars" gotoAndStop at the frames labeled "Porshe" in the cars_mc?
View Replies !
View Related
Sound Control With Pause Button As Well As Timeline Control
Hi there
I have a flash page, with a ambient track playing. I added a pause and play button. So you press the button then it stops, then you press it again then it plays...
So now i want to make it so that if you go to the 'WORK' page on the site, wich is on its own frame, and wich has different buttons linking to it, then i want the sound to switch off when i am on the work page as well.
So if the background ambient music plays, and you go to work then the sound switches off. Untill you switch it back on again
How is the best way for me to do that?
View Replies !
View Related
How Do You Convert Text From Upper Case To Lower And Visa Versa?
hello people,
1) is it possible to convert from upper to lower case in flash 4 or not? if so how?
2) i have a text field where a person inputs their first name, which i want to use later on in the movie. if they enter 'JOHN' of 'john' i want to be able to display 'John' later on, with first letter capitalized and all the rest lower case.
how is this done?
thanks ahead of time!
-tm
View Replies !
View Related
Combobox Changes Button?
hi, I would like to start by thanking everyone for their help in the past. I find this forum to be very usefull.
im new to actionscripting and am having trouble with the following:
I have a combobox with three labels. I also have a button which is linked to an external site.
As a user selects one label i would like for the getUrl value for the button to be changed. Is this possible? How would i accomplish this ?
Thanks in advance for your help in this matter
View Replies !
View Related
Combobox Updated By A Button
I am using a navigational structure that has a combox that allows you to select a topic from the list and jump to that topic. That part works like a charm. The thing I am struggling with is that I also want to have a previous and next button as part of that navigation. I can't figure out how to have the previous and next button make the combobox show the appropriate label.
If I am on topic 2 and I click next I need the comboxbox to now show Topic 3. Any ideas...I'm stumped!!!
View Replies !
View Related
Custom Combobox Button?
Hi all,
I've managed to get a combobox to look how I would like it to, but how do I target the combobox dropdown button with as? Here's what I have so far:
code:
productStyle_cb.setStyle("borderStyle", "solid");
productStyle_cb.setStyle("borderColor", "0x003366");
productStyle_cb.setStyle("color", "0x336699");
productStyle_cb.setStyle("fontFamily", "Verdana");
productStyle_cb.setStyle("fontSize", 10);
productStyle_cb.setStyle("fontWeight", "bold");
productStyle_cb.dropdown.setStyle("borderStyle", "solid");
productStyle_cb.dropdown.setStyle("borderColor","0 x003366");
productStyle_cb.dropdown.setStyle("fontFamily", "Verdana");
productStyle_cb.dropdown.setStyle("fontSize", 10);
productStyle_cb.dropdown.setStyle("selectionColor" , "0xFFFFFF");
productStyle_cb.dropdown.setStyle("rollOverColor", "0xB9E1FF");
productStyle_cb.dropdown.setStyle("textSelectedCol or", "0x336699");
productStyle_cb.dropdown.setStyle("textRollOverCol or", "0x336699");
Secondly, any suggestions on how I can set these up as a global style? I've tried _global.style... but not all the properties are applied.
Thanks.
View Replies !
View Related
Button And Combobox Communicate?
I want to I am building a stadium seating application. A person can choose a seat on a layout of the stadium and it loads a pic of the spot where they are seated or they can use a drop down menu (ComboBox). How do I synch up the button and combobox?
View Replies !
View Related
Rollover/off Anim Control Button, Problem Adding Button Functionality
Hi, I'm really new to flash, so forgive me for sounding like an simpleton.
I'm trying to create a button that when you roll over, it grows in size and some text animates onto it. When you roll off, the anim is supposed to reverse and go back to the rest state. I've managed to get the animation to work okay, so it grows and shrinks accordinly. My problem now is, I want to make this into a functional button, ie to add a mailto: link, or a link to another frame.
Whats the best way to achieve this? I've tried to convert to a button and have the anim in all button states, but this didn't work. And a get an error when trying to add the mailto action script to the button, saying 'on release' should only be used on instanced buttons. I tried making an invisible button behind the animated on, but I loose the animation playback when rolling over the invisible button. It seems I can't do both for some reason.
I'm using this script on the first frame to control the playback of the movie. And stop on the last frame.
stop();
this.onRollOver = function() {
rewind = false;
this.play();
};
this.onRollOut = function() {
rewind = true;
};
this.onEnterFrame = function() {
if (rewind == true) {
prevFrame();
}
};
Any help would be appreciated, I've tried so many times with different approaches to no avail.
View Replies !
View Related
Combobox Component And Submit Button
I made a small form where i used a combo box component and when a selection is made and submitted, below the form, text appears depending on the selection. here is my code, i dont know why formdata.choice is undefined when the user clicks submit.
frame action:
formData = new LoadVars();
formData.choice = "";
action attached to submit button:
onClipEvent (mouseDown) {
formData.choice = choice_dropdown.getValue();
trace(formData.choice);
if (formData.choice == "Andrew Gibson") {
recalledData.text = "Andrew's Data";
}
}
any thoughts on what i did wrong? if there is a way to have the text appear when the user selects the choice and lets go rather than using the submit button i would like that much better! let me know if anyone has any ideas? thanks!
View Replies !
View Related
Help Please, Combobox / Radio Button Question.
Ok, I have a question that is probably simple if you understand actionscript, but I don't.
A while back I wanted to make a Flash E-mail form; I got advise off this board on how to do that and it works great. Now I want to make it so that the form will have a choice of 2 possible emails to send to. I can't seem to figure out how to get it to do this. I don't want the email's to be visible to the casual user. (I know if someone really wanted to they could dissect my swf and find them emails, but this is just to prevent casual mail harvesting.)
This is what i'm doing:
A combo box with 2 choices (the names of two people) it's instance name is "ToEmail". (it could be radio buttons if that would work also)
this is the actionscript i'm using (there is another actionscript for the release of ptressing the "Send button" which does a GetURL to the form, moves the movie to the next frame, and gets the results in a lower frame of the HTML document):
function onChange(component)
{if (component.toemail=="John Doe") {
email = "john@doe.com";
} else if (component.toemail=="Jane Doe") {
email = "jane@doe.com";
} }
// this worked before with just: recipient = "john@doe.com";
recipient = (email);
redirect = "http://www.mysite.com/email-sent.html";
subject = "Message from mysite website form";
stop();
---------
(I am using a html frames method for this so that the flash movie moves on to the next frame saying it is sent, but the actual "real" send notice appears in a lower frame set which is normally so small as to be hidden from view),
It does not give me any errors for checking my actionscript, but when I try to send this, the bottom HTML frame always says something to the effect of "recepient not specified", and so it is not working.
Basically, I need the recepient to be able to be one value, or another, as chosen in a radio button, or a combo box. Sorry for this lengthy description, hope someone can help me here.
View Replies !
View Related
How To Hide A ComboBox's Button With Script?
Hello!
I think there should be an easy way to hide the button of a combobox component after it is disabled, so there no need for that.
In the Help, they write about references to the list and the textfield subcomponent, but i didn't find a reference to the button.
Thanks in advance!
View Replies !
View Related
Changing Combobox SelectedVal W/ Button
How do I change the selected value in a comboBox via an outside button? I have 3 combo boxes and want to reset them back to default value w/ an external "reset" button.
I guess it would
Code:
myComboBox1.selectedIndex = 0;
myComboBox1.invalidate();
But couldn't get any tries to work.
View Replies !
View Related
Combobox And Button Symbol Interaction
I thought it would be easier for folks if they didn't have to create this from scratch:
Here is the Sample SWF
and the Source FLA
- - - - - - - - - - - - - - -
Greetings --
I traced back a bug that I was having to its most basic level and was surprised that it happens with only a ComboBox component and a button symbol... I traced it back so far that it got rid of all of my ActionScript and was left with only these two interface elements:
Set-up: Create a new Flash document, ActionScript 2 / Flash 8. Drag in a combobox component and add a label. Create a new button symbol and define up, over, down and hit states and drag this in as well...
When you try test this movie, you get strange behavior... Give the button a few clicks to see that it is working properly. Then, click on the combobox to open it and then go back to the button. The button will work the first time tried, but will not work properly with subsequent attempts. It seems that the states of the button are getting confused after the combobox is used? (help!?)
Could there be a work-around to this? Thank you in advance for you assistance with this issue...!
Edited: 06/24/2008 at 11:47:02 AM by FishFlash
View Replies !
View Related
Adding A Listener To A Button That Is Tied To A Combobox - Mx Pro 04
Hi all -
I just managed to get a combobox to work in pro04; dynamically created, populated from an xml stream and uses a listener to see which item in the combo has been selected and uses that as a url to load a web page. Easier raising the Titanic.
Anyhow. My designer doesn't want the user to be sent off as soon as they make a combobox choice as, and I see his POV, a selection could have been made in error. Therefore I've made a button that I now want to be the listener. If such a thing is possible.
ie make a combo selection, then click on button and button runs code that finds out selection and uses that for url.
This code
Code:
listenerLanguagesObject = {};
listenerLanguagesObject.change = function(evt) {
trace("item selected"+goto_Combo.getSelectedItem().label);
getURL("http://"+goto_Combo.getSelectedItem().data, "_blank");
};
language_Select.addEventListener("change", listenerLanguagesObject);
Works fine in the main timeline keyframe in which the combobox is created. I then tried, just for fun, to put it in a on(release) on the button with fingers crossed, but to no avail; flash throws up no errors but when clicked, nothing happens; obviously no connection between the two objects exists.
Any ideas anyone?
cheers
frank
View Replies !
View Related
Custom Combobox (border + Arrow Button)
Hello everyone,
I'm having trouble fully customizing a comboBox. With HaloTheme, I skinned every element I wanted and/or used the CSSStyleDeclaration. The problem is I can't pin point the actual way to change the down arrow's background color which remains bright green. I went to the document's library and changed the arrow assets (Themes/MMDefault/ComboBox Assets/States...) but I think there's a line of code that keeps it green when I press it down. The up state is ok, it's the down state that's annoying.
I've spent many hours searching forums and tutorials, got answers to most of my questions except these ones.
My question is : how do I access this bright green when I click the down arrow button ?
I have the same problem with the border color. How do I access the white border color ? Here's an image of the actual combobox :
Many thanks in advance, guys.
Joshley
View Replies !
View Related
Combobox Must Navigate When Selected W/o Pressing Push Button
Hi,
I need to convert list-menu or the dropdown list form component of html into flash where browsers don't need to press the button and they will be directed to another page.We use this as our navigation.
However,Flash MX has new features on this UI components,and i use the combo box for
my dropdown list.
My problem on this combo box is that after surfer select from the combo box list,it does not automatically directed into another frame/page and they still need to
press the push button to go another frame/page.
I need to automatically navigate(goto Frame no.) when the user selects from combo box
without pressing push button.
Can you guys help and advice me on this since im a newbie on actionscript.
And please help me more on Change Handler of combo box.
Thanks in advance.
Waxx
View Replies !
View Related
Combobox Must Navigate When Selected W/o Pressing Push Button
Hi,
I need to convert list-menu or the dropdown list form component of html into flash where browsers don't need to press the button and they will be directed to another page.We use this as our navigation.
However,Flash MX has new features on this UI components,and i use the combo box for
my dropdown list.
My problem on this combo box is that after surfer select from the combo box list,it does not automatically directed into another frame/page and they still need to
press the push button to go another frame/page.
I need to automatically navigate(goto Frame no.) when the user selects from combo box
without pressing push button.
Can you guys help and advice me on this since im a newbie on actionscript.
And please help me more on Change Handler of combo box.
Thanks in advance.
Waxx
View Replies !
View Related
Paypal Add To Cart Button & Combobox Variable Question
HI,
I am using Flash MX 2004 on the mac platform.
A while backcI found the following code that enabled me to set up paypal donatoins from my flash site. It was after searching through a huge amount of complicated code and help forum ideas that I eventually found what turned out to be incredibly simple (in my opinion). I have a button on the stage called button1 , and I place the following code in the first frame of my main timeline.
stop();
function makeDonation1() {
var lv : LoadVars = new LoadVars();
lv.cmd = "_xclick";
lv.business = "me@mydomain.com";
lv.item_name = "monkey";
lv.item_number = "monkey01";
lv.no_note = 1;
lv.currency_code = "USD";
lv.tax = 0;
lv.lc = "US";
lv.send("https://www.paypal.com/cgi-bin/webscr", "POST");
}
Button1.addEventListener("click", makeDonation1);
I'm definitely not a coder and understand actionscript only just enough to get through each project - no matter how much I try at this point however, most knowledge slips through the seive in my brain by the time it comes to use that knowledge again - grrrr.
What I am trying to do is two things.
1. Convert the above code to an add to cart button. (I know that the donation code above might have to change to different variables for an add-to-cart button, but I'm not sure what they are or which ar erequired by paypal at the very least.)
2. have the item name, item reference & price be determined by the value of a combobox selection. (download link to my fla below to understand better).
I have never used comboxes before, and my first challenge is figuring out how to make a combobox user selection change the value of a variable (or three variables in this instance - item name /item ref/item cost). How do I do this???? surely there is not much other use for a combobox than to change the values of variables but I can't find any simple info on this online! Is the 'data' where i put the variable value??? how do i refer to this elsewhere?? woudl it be:
myvariable1 = combobox1.data
(Total guess - no idea if that's even valid code or if the data is where I would get the value from)
I will try to figure this out by myself, but if anyone can help me out I'd be really grateful,
Thanks in advance
Cheska
PS) here is a link to download my zipped FLA ( I haven't added any code yet for the three variables relating to the combobox choices - because I don't know how !) http://www.lucid-life.com/paypaltest.fla.zip
View Replies !
View Related
[F8] Update Combobox Selected Item On A Button Click
I am working on a pagination module.
In the top of the page there is a list of items where I have to show only ten items and if there are more than ten items then a combo box will display 1 of 2, 1 of 3 etc., depending upon the number of items in the list. I have done it using XML and arrays and it is working fine.
But there is also a next and previous button which is also working but now what I want is suppose if we are in # 2 of 3 page and click on the previous button then the selected item of combo box should also change from 2 of 3 to 1 of 3.
Please let me know how should I do this.
Please let me know if I could not express myself clearly.
View Replies !
View Related
Attention Adobe: Button Functionality Affected By ComboBox
Normal buttons (my own or from the included Library) misbehave when a standard flash comboBox component and associated Event Listener for detecting selections in the comboBox is added. The buttons work, but once you've used the comboBox either selecting or just expanding its options flash doesn't register any mouse click within the same pixel space for any buttons for the duration of your flash movie, if I move my mouse a pixel off the last button's click location it then works - what up with that????
Yeah normally people would click for example a 'Next' button to go to the next page and do stuff then navigate back to the next button and it would work, but if someone say uses a comboBox for navigation then clicks 'Next' and then another 'Next' button to skip through a sites content you'd expect the button to work regardless of if the mouse cursor has moved from its last known location or not.
This is a BUG - Adobe please fix!
View Replies !
View Related
Simple Button.onRelease Style Question With ComboBox.change
Hello, i'm working on a flash movie where i want all code to be on the one frame rather than scattered round placed on all different objects. This is just so it's easy to edit and monitor.
I understand the difference between having a button named btnMyButton and writing say
on(press)
{
trace("this actionscript is on the button itself");
}
and having the code on the root timeline like btnMyButton.onRelease = function()
{
trace("this code is on the actual main timeline");
}
What i want to do is do the same thing but with the comboBox component on it's "change" event. (The user makes a different selection in the comboBox and the code then executes).
the comboBox has an instance name myComboBox.
why is it that i can put on the actual comboBox object the actionscript:
on(change)
{
trace("You changed the combo box item");
}
yet when i put on the main timeline
actionscript:
myComboBox.change = function()
{
trace("You changed the combo box item");
}
it doesn't have the same effect and no trace text is shown.
I've verified the naming is correct in my coding being as i refer to "myComboBox" to set it's themeStyles on the main timeline in exactly the same way and the theme colours get set correctly.
Thanks In Advance,
Bryce.
View Replies !
View Related
Capturing Label Selected In ComboBox In A VAR, And POSTing It With A Send Button
I've looked through the help many times and searched for various tutorials all over the net. Support docs I found have led to writing the following code (code was attached to comboBox instance) which was not working. The send button is not sending the label that I am trying to capture in the VAR "subject"
on (change) {
function(){
subject = contactReason.getSelectedItem().label;
}
}
I've been trying to look it up for a week and have had some headway - I didn't know how to use components at all before this. I'd asked for help or a specific tutorial but haven't found anything that will work the way I need it to.
I tried changing my code to the following (code is attached to comboBox instance) after someone suggested something different - but it didn't work with my send button either.
on (change) {
var subject:String = contactReason.selectedLabel;
}
contactReason is the name of my comboBox instance...
my send button POSTs to a CGI page that sends the info to an e-mail - using the VARs as subject etc (there are input boxes in form as well as the combobox) with the following code (code is attached to send button)...
on (release) {
loadMovieNum("formdone.swf", 2);
recipient = "sean@pxlforge.com";
loadVariablesNum("/cgi-bin/cgiemail/contact/contact.cgi", 0, "POST");
}
the input boxes still work fine and pass the other VARs, but I get no subject (I do if I use an input box - but not with comboBox)
View Replies !
View Related
A Button In A Button Control _root?
Hey Everybody,
I've got a small problem that I'm hoping someone can help me with. I've got a movie with two menus in it. Each menu is a button by behavior. But of course, there are buttons inside these symbols. These buttons are supposed to move the movie along to different frames to navigate to different content. Unfortunately, GotoandStop (or Play) refuse to get the job done unless the button that I'm clicking is actually in the root of the movie. (AKA, not in the menu symbol. I even tried GotoandPlay("Home",2) where Home is the scene but clicking on the button does nothing! The action script does work fine, however, if I put the button in the Home scene and thereby take it out of the menu symbol. Is there some kind of hierachy logic issue here? How do I get past it? Can I get past it. If you'd like to see the file itself, it is currently online at Http://www.geocities.com/chintue/Derelicious.html
Thanks everybody!
Chintue
View Replies !
View Related
Flash Button To Control Another Button
Ok I have 2 buttons lets call them button 1 and 2
button 1 is the Code help I need.
Button 2 just sends too a webpage
How do I tell Button one to press button 2 ?
So i press button 1 and it tells button 2 to press. Any and all help would be Most helpful And thank you in advance.
ps I need to keep the 2 Buttons. And I need it in the
on (release) {
}
format . ;D
View Replies !
View Related
Button Control
Hi,
I know you can control multiple levels in a movie with one button, ie..........
on (release) {
_level3.goToAndStop(2);
}
on (release) {
_level4.goToAndStop(4);
}
Can you control a variable in the same manner?
ie.....
on (press) {
_root.Scroll = false;
}
on (press) {
_root.Scroll = true;
}
Is this not possible?
Thx
~GD~
View Replies !
View Related
MC In MC Control With Button
OK, I am being lazy since it is the end of the day and I am not going to search the forum...
I have a movie clip "ValTrailMov" inside of which I have a button that controls the advancement of the movie clip "ValTrailMov." I also want it to control an additional movie clip inside "ValTrailMov" called "Pri1."
What I would like to have happen is when you roll over "Button1" you activate movie clip "Pri1" then when you click on "Button1" you advance the movie clip "ValTrailMov." I already have the code set for advancing the "ValTrailMov" movie clip, all I need help with is the rollover part.
Thanks!
View Replies !
View Related
Control Button In MC
I have a button inside an MC, and the MC is on my main movie, Scene 1. I want the button to take you to Scene 2, frame 1, when clicked. This is the code I used, but didn't work.
Quote:
on (release) {
_root.gotoAndStop("Scene 2", 1);
}
Anyone know why this doesn't work?
View Replies !
View Related
|