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 8 of 8

Thread: BlackComboBox

  1. #1
    Administrator Living At The FlepStudio! Flep is on a distinguished road
    Join Date
    Jul 2007
    Posts
    5,460
    Rep Power
    8

    BlackComboBox

    amazing Flash templates

    FlepStudio has created a new free utility for Flash CS3/CS4 and Actionscript 3.0.


    This is a ComboBox style web 2.0.

    Graphically it is more beautiful of the ComboBox default Flash CS3 and CS4.

    To use it is very simple, just a few lines of code, keep the MovieClip mc_blackcombobox in the library and the class BlackComboBx.as in the same folder of FLA file.









    Included files



    • main.fla

    • BlackComboBox.as


    Actionscript variables



    • label: gets or sets the main label of the ComboBox

    • list: gets or sets the Array of the drop down list menu

    • rowCount: gets or sets the maximum number of rows that can appear in a drop-down list that does not have a scroll bar

    • color: gets or sets the highlighted colors of the ComboBox

    • text_color: gets or sets the text color of the ComboBox


    Events



    • OnSelection:String


    Using BlackComboBox


    Keep the MovieClip mc_blackcombobox in the library of FLA file.

    Keep the file BlackComboBox.as in the same directory of FLA file.

    Example of code:


    Code:
    var black_combo_box:BlackComboBox=new BlackComboBox();
    black_combo_box.label="my cars list";
    black_combo_box.list=["Ferrari","BMW","Audi","Mercedes","Maserati","Alfa Romeo","FIAT","Wolkswagen"];
    black_combo_box.rowCount=4;
    black_combo_box.color=0xBA0000;
    black_combo_box.text_color=0xFFFFFF;
    black_combo_box.x=stage.stageWidth/2-black_combo_box.width/2;
    black_combo_box.y=100;
    addChild(black_combo_box);
    
    black_combo_box.addEventListener("OnSelection",go);
    
    function go(evt:Event):void
    {
    	 trace("selected id= "+evt.target.id+"\n"+"selected label= "+evt.target.data);
    }

    Other customizations


    You can manage all the rest by working at MovieClip mc_blackcombobox in library.


    Source files:
    Attached Files

  2. #2
    Junior Member Settled In uacomp is on a distinguished road
    Join Date
    Nov 2007
    Posts
    15
    Rep Power
    0

    Re: BlackComboBox

    would be good to get rid of yellow rectangles (with "Tab" navigation)...

  3. #3
    Junior Member Settled In ZilverDragOn is on a distinguished road
    Join Date
    Feb 2009
    Posts
    5
    Rep Power
    0

    Smile Re: BlackComboBox

    Thanks. Very useful.

  4. #4
    Junior Member Settled In bonnafb is on a distinguished road
    Join Date
    Aug 2008
    Posts
    1
    Rep Power
    0

    Re: BlackComboBox

    Nice. Thank you.

  5. #5
    Junior Member Settled In DMarti is on a distinguished road
    Join Date
    May 2008
    Posts
    1
    Rep Power
    0

    Re: BlackComboBox

    Excellent look and feel. 10/10

  6. #6
    Junior Member Settled In vikingray is on a distinguished road
    Join Date
    Sep 2008
    Posts
    3
    Rep Power
    0

    Re: BlackComboBox

    How would I add some external links to the drop down list rather than just have a trace event?

  7. #7
    Junior Member Settled In uacomp is on a distinguished road
    Join Date
    Nov 2007
    Posts
    15
    Rep Power
    0

    Re: BlackComboBox

    change function go() in main.fla like this:
    Code:
    function go(evt:Event):void
    {
        //trace("selected id= "+evt.target.id+"\n"+"selected label= "+evt.target.data);
         switch(evt.target.data) {
            case "Ferrari": 
                navigateToURL(new URLRequest("http://Ferrari.com"), "_blank");
            break;
            case "BMW": 
                navigateToURL(new URLRequest("http://BMW.com"), "_blank");
            break;
            case "Audi": 
                navigateToURL(new URLRequest("http://Audi.com"), "_blank");
            break;
            case "Mercedes": 
                navigateToURL(new URLRequest("http://Mercedes.com"), "_blank");
            break;
           // all vendors
            case "Wolkswagen": 
                navigateToURL(new URLRequest("http://Wolkswagen.com"), "_blank");
            break;
         }
    }

  8. #8
    Junior Member Settled In vikingray is on a distinguished road
    Join Date
    Sep 2008
    Posts
    3
    Rep Power
    0

    Re: BlackComboBox

    Thank you uacomp, that looks good and I don't know why I didn't think of it before! Thanks again... Have a nice day.

+ Reply to Thread

Similar Threads

  1. BlackComboBox
    By Flep in forum Utilità di FlepStudio
    Replies: 6
    Last Post: 31-01-10, 18:44

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

Search Engine Optimization by vBSEO