Saturday, March 10, 2012

[Code] Pop up Script in Monte

Based on Events and Event Handler
function Popup()
{
    newPopObj = new Object();
    newPopObj.onEvent = function ()
    {
        phone.mmi.Host.dispatchEvent(new phone.mmi.events.HostEvent(phone.mmi.Host.__get__ON_WIDGET_EMSG_DELIVERED(), ""));
        //make ur mc visible
    };
    _root.ExtendedEvents.onWidgetEmsgDelivered.addListener(newPopObj);
    _root.ExtendedEvents = ExtendedEvents;
    newPopObj2 = new Object();
    newPopObj2.onEvent = function (_arg1)
    {
        phone.mmi.Host.dispatchEvent(new phone.mmi.events.HostEvent(phone.mmi.Host.__get__ON_WIDGET_EMSG_DESTROY(), _arg1));
      //When u get a msg this is called. So make your mc play or show notif.
    };
    _root.ExtendedEvents.onWidgetEmsgDestroy.addListener(newPopObj2);
    _root.ExtendedEvents = ExtendedEvents;
   
} // End of the function
setInterval(Popup, 1000);

Use this function in your mod! :)

1 comment:

  1. Great, I would like to use this in monte evo, but how do you use it?

    ReplyDelete