School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,509 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,919 people online right now. Registration is fast and FREE... Join Now!




Where can i Add FSCOMMAND in code

 

Where can i Add FSCOMMAND in code

hafizfarooq

23 May, 2009 - 04:31 AM
Post #1

New D.I.C Head
*

Joined: 20 May, 2009
Posts: 5

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);


User is offlineProfile CardPM
+Quote Post


hafizfarooq

RE: Where Can I Add FSCOMMAND In Code

23 May, 2009 - 06:35 AM
Post #2

New D.I.C Head
*

Joined: 20 May, 2009
Posts: 5

Attached File  My_Menubar.zip ( 253.25k ) Number of downloads: 20
Please find the attached file.
User is offlineProfile CardPM
+Quote Post

hafizfarooq

RE: Where Can I Add FSCOMMAND In Code

23 May, 2009 - 07:57 PM
Post #3

New D.I.C Head
*

Joined: 20 May, 2009
Posts: 5

I GOT THE WAY TO INTERACT FLASH MENU WITH VB
Look at the code

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;
//REQUIRED CODE FOR INTERACT WITH VB
fscommand(item_obj.attributes.label, "");
//End
//trace("Item selected: "+item_obj.attributes.label);
};
my_menubar.addEventListener("change", menuListener);


This post has been edited by hafizfarooq: 23 May, 2009 - 08:01 PM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/8/09 05:11AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month