Results 1 to 3 of 3

Thread: Where to add FSCOMMAND

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2004
    Location
    Quetta-Pakistan
    Posts
    852

    Where to add FSCOMMAND

    Dear all,

    I have created a Menu in Flash using MenuBar Component and actoin script. I want to interatc this menu with Visual Basic 6.0, but unable to do this as I am unable to adjust FSCOMMAN in code. Please help me.

    Code:
    var my_menubar:mx.controls.MenuBar;
    var myDP_xml:XML = new XML();
    myDP_xml.ignoreWhite = true;
    myDP_xml.onLoad = function(success:Boolean) {
    	if (success) {
    		my_menubar.dataProvider = myDP_xml.firstChild;
    	} else {
    		trace("Error Loading XML File");
    	}
    };
    myDP_xml.load("menubar.xml");
    
    import mx.styles.CSSStyleDeclaration;
    if (_global.styles.MenuBar == undefined) {
        _global.styles.MenuBar = new CSSStyleDeclaration();
    }
    _global.styles.MenuBar.setStyle("themeColor", "haloOrange");
    
    // Add a change-listener to Menu to detect which menu item is selected.
    var menuListener:Object = new Object();
    menuListener.change = function(evt_obj:Object) {
     var item_obj:Object = evt_obj.menuItem;
     trace("Item selected: "+item_obj.attributes.label);
    };
    my_menubar.addEventListener("change", menuListener);

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    May 2004
    Location
    Quetta-Pakistan
    Posts
    852

    Re: Where to add FSCOMMAND

    Please find the attached file.
    Attached Files Attached Files

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    May 2004
    Location
    Quetta-Pakistan
    Posts
    852

    Re: Where to add FSCOMMAND (I got it)

    I got it

    only 1 line of change..

    Code:
    var my_menubar:mx.controls.MenuBar;
    var myDP_xml:XML = new XML();
    myDP_xml.ignoreWhite = true;
    myDP_xml.onLoad = function(success:Boolean) {
    	if (success) {
    		my_menubar.dataProvider = myDP_xml.firstChild;
    	} else {
    		trace("Error Loading XML File");
    	}
    };
    myDP_xml.load("menubar.xml");
    
    
    
    import mx.styles.CSSStyleDeclaration;
    if (_global.styles.MenuBar == undefined) {
        _global.styles.MenuBar = new CSSStyleDeclaration();
    }
    _global.styles.MenuBar.setStyle("themeColor", "haloOrange");
    
    // Add a change-listener to Menu to detect which menu item is selected.
    var menuListener:Object = new Object();
    menuListener.change = function(evt_obj:Object) {
     var item_obj:Object = evt_obj.menuItem;
     fscommand(item_obj.attributes.label, "");
     //trace("Item selected: "+item_obj.attributes.label);
    };
    my_menubar.addEventListener("change", menuListener);

Posting Permissions

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



Click Here to Expand Forum to Full Width