How do i add triggers in flash cs6?

48 Im trying to make my custom beta room but the beta hat boxes arent interactable and dont come up with the " Would you like to pick up this item" Prompt. I was told i have to add triggers in trigger_mc and i have the code to do it i just dont know how to make one (GREEN SQUARES THAT TRIGGER A PROMPT WHEN WALKED ON as shown in the photo)

Discord : Equah#3326

1 Like

Hello! In order to do this you’re gonna have to make a movieclip within trigger_mc. Just double click the green movieclips then you should be inside those clips.

You can just copy a existing trigger or however you wanna do it. After doing so you’re gonna have to define/change the instance name. Usually this is in the properties panel for that specific movieclip.

Make sure you have placed your trigger over the beta box

Put this in your main Action Layer which is usually frame 1 (make sure you change instance_mc to the instance you decided)

triggers_mc.instance_mc.triggerFunction = function ()
{
    INTERFACE.buyInventory(413);
};

Just save/publish and it should work.

4 Likes

before putting the function, check if the var of interface is in the code,
if not (your code will not work), so put in line 1(can be in whatever line, but need to be above the functions):

var INTERFACE = _global.getCurrentInterface();

3 Likes