×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    44

    Talking Component not tracing

    Hi,
    I have just shifted from Flash web development to Flash lite and now i am developing an application for N 97 mini and all similar screens. I recently browsed for an component with the url
    http://wiki.forum.nokia.com/index.ph...for_Flash_Lite I have installed the component and its working fine even on the device i mean the menu is sliding down like an accordian. But when i add the addEventListener code given in the page its not tracing the message in the flash output box. Could you please help me with this... Do i need to import an external AS file please help since all the other components works fine in the app. except this...

    FYR

    i have named the component listMenu

    //************************* Initialization ********************


    fscommand2("DisableKeypadCompatibilityMode");
    fscommand2("FullScreen", true);
    fscommand2("SetQuality", "high");
    Stage.scaleMode = "noScale";
    Stage.align = "TL";
    _focusrect = false;


    //************************* Actual Code********************

    //Params: (Label, Data)
    listMenu.addRootItem("Item 1", 1);
    listMenu.addRootItem("Item 2", "second");
    listMenu.addRootItem("Item 3", 3);
    listMenu.addRootItem("Item 4", {i:4});
    listMenu.addRootItem("Item 5", [5]);
    listMenu.addRootItem("Item 6", "Third");
    listMenu.addRootItem("Item 7", "Fourth");
    listMenu.addRootItem("Item 8", "Fivth");
    listMenu.addRootItem("Item 9", "Sixth");
    listMenu.addRootItem("Item 10", "Seventh");

    //Params: (Parent Index, Label, Data)
    listMenu.addChildItemAt(0, "SubItem 1.1", 1.1);
    listMenu.addChildItemAt(0, "SubItem 1.2", 1.2);
    listMenu.addChildItemAt(0, "SubItem 1.3", 1.3);
    listMenu.addChildItemAt(2, "SubItem 3.1", 3.1);
    listMenu.addChildItemAt(2, "SubItem 3.2", 3.2);
    listMenu.addChildItemAt(4, "SubItem 5.1", 5.1);


    var myChangeEvent:String = listMenu.onChangeEvent();
    listMenu.addEventListener(myEvent, myListener);
    function myListener(eventObject:Object):Void {
    if (eventObject.type == myChangeEvent) {
    trace("Item: "+eventObject.item);
    trace("Label: "+eventObject.label);
    trace("Data: "+eventObject.data);
    }
    }

  2. #2
    Registered User
    Join Date
    Apr 2010
    Posts
    44

    Re: Component not tracing

    Hi,
    I was able to solve this issue.

    Just in case if any one faces the same problem......

    var onChangeEvent:String = menuComponent.onChangeEvent();
    menuComponent.addEventListener(onChangeEvent, myListener);

    function myListener(eventObject:Object):Void{
    trace("event "+eventObject.type);
    trace(" item: "+eventObject.item);
    trace(" label: "+eventObject.label);
    trace(" data: "+eventObject.data);
    }

    menuComponent.addRootItem("Item 1", 1);
    menuComponent.addRootItem("Item 2", 2);
    menuComponent.addRootItem("Item 3", 3);
    menuComponent.addRootItem("Item 4", 4);
    menuComponent.addRootItem("Item 1", 1);
    menuComponent.addRootItem("Item 2", 2);
    menuComponent.addRootItem("Item 3", 3);
    menuComponent.addRootItem("Item 4", 4);

    menuComponent.addChildItemAt(0, "Sub Item 1", 1);
    menuComponent.addChildItemAt(0, "Sub Item 1", 2);
    menuComponent.addChildItemAt(0, "Sub Item 1", 1);
    menuComponent.addChildItemAt(2, "Sub Item 1", 2);
    menuComponent.addChildItemAt(2, "Sub Item 1", 3);
    menuComponent.addChildItemAt(3, "Sub Item 1", 3);

Similar Threads

  1. Focus between button and list component
    By stingmartin in forum [Archived] Flash Lite on Nokia Devices
    Replies: 2
    Last Post: 2010-03-29, 14:37
  2. KineticScroll Component help
    By djvpuls in forum [Archived] Flash Lite on Nokia Devices
    Replies: 0
    Last Post: 2009-12-18, 15:39
  3. [moved] [OT] Visual C# (.Net) Component of Nokia
    By camilord in forum PC Suite API and PC Connectivity SDK
    Replies: 4
    Last Post: 2009-09-08, 07:56
  4. How to set focus on a component in a flow?
    By profwiggy in forum Widsets Development
    Replies: 2
    Last Post: 2008-08-21, 13:49
  5. Register component
    By gotka in forum PC Suite API and PC Connectivity SDK
    Replies: 0
    Last Post: 2004-06-14, 18:31

Posting Permissions

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