Flash Gallery | Flash Templates | Flash Menu | Flash Design | Flash Audio & Video

flash page flip

Actionscript 3.0 video tutorials

+ Reply to Thread
Results 1 to 2 of 2

Thread: Combo Box transferring variables to submit button help

  1. #1
    Junior Member Settled In spencersmb is on a distinguished road
    Join Date
    Oct 2008
    Posts
    1
    Rep Power
    0

    Combo Box transferring variables to submit button help

    flash templates
    Hello,

    I am currently trying to solve a problem of having a combo box with 3-4 links however instead of using the combo box to go to the url I would like to use the submit button to exectute the get url. So if the combo box has 3 links the submit button takes you to the link depending on which one is selected in the combo box.

    Right now I only have the combo box set up using AS2. I wouldnt mind learning this in AS3 if someone knows how :)

    my_cb.addItem({data:1, label:"First Item"});
    my_cb.addItem({data:2, label:"Second Item"});
    my_cb.addItem({data:3, label:"Third Item"});
    my_cb.addItem({data:4, label:"Fourth Item"});

    // Tell the combo change method to fire when the change event is
    // fired by the combo box
    my_cb.addEventListener ("change", onComboChange);
    // Method called by the change event listener
    function onComboChange (event:Object):Void
    {
    // Get the label and the data properties from the event object passed in
    // to this method by the change event
    var label:String = event.target.selectedItem.label;
    var data:String = event.target.selectedItem.data;
    // Trace the value to check it out
    trace ("label : " + label);
    trace ("data : " + data);
    // Go to that url that is on the data property
    getURL (data, "_self");
    }

    all this is placed on a single frame containing the combo box - I just cant figure out how to send the information from the combo box to the submit button. I am new to flash to please be specific in any help.

    Thank you in advance!

    -spencer

  2. #2
    CSS.FlepStudio.org Moving My Stuff To The FlepStudio Onsitus is on a distinguished road Onsitus's Avatar
    Join Date
    Jul 2007
    Posts
    1,405
    Rep Power
    5

    Re: Combo Box transferring variables to submit button help

    Ciao,

    try with getURL (event.target.value , "_self");
    and the data containing the url.

+ Reply to Thread

Similar Threads

  1. Combo Menu Header
    By Flep in forum Utilità di FlepStudio
    Replies: 68
    Last Post: 29-10-09, 12:40
  2. next button-prev button+transizioni+tante altre cose
    By filippot in forum Actionscript 3.0 base
    Replies: 3
    Last Post: 19-06-09, 16:56
  3. Help with Combo box
    By oliveros_daryl in forum Flash English
    Replies: 4
    Last Post: 23-08-08, 19:56
  4. Using a submit button to trace radio buttons
    By spfricke in forum Flash Italiano
    Replies: 0
    Last Post: 11-08-08, 00:55
  5. Trying to bring a .png to the stage through xml and a combo box
    By Zane5100 in forum PHP | mySQL | Flash CS3
    Replies: 1
    Last Post: 20-05-08, 18:16

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts