You are not logged in.

panoyun

Intermediate

  • "panoyun" started this thread

Posts: 234

Location: Somalia

  • Send private message

1

Saturday, May 2nd 2020, 1:16pm

Dynamic addevent

<style name="style_geowmzonbyjq" width="100" height="100" onclick.addevent="trace('onclick from the style');"/>

<action name="hbacuoanivja" autorun="onstart">
addlayer('addlayer_background', addlayer_wdropolejjmw);
set(addlayer_wdropolejjmw,
type=container,
keep=true,
visible=true,
bgalpha=1.0,
bgcolor=0x000000,
y=0,
align=center,
handcursor=true,
bgcapture=true,
);
addlayer_wdropolejjmw.loadstyle('style_geowmzonbyjq');
trace(addlayer_wdropolejjmw.name);
trace(addlayer_wdropolejjmw.width);

addlayer('auto',addlayer_enoyncfsdozk);
set(addlayer_enoyncfsdozk,
type=container,
keep=true,
visible=true,
bgalpha=1.0,
bgcolor=0x000000,
width=100,
height=100,
y=0,
align=top,
handcursor=true,
bgcapture=true,
);
layer[get(addlayer_enoyncfsdozk.name)].addevent('onclick', trace('click on layer[',name,']') );
trace(addlayer_enoyncfsdozk.name);

addlayer(calc('addlayer' + 'wgyasybcclva'));
set(layer[calc('addlayer' + 'wgyasybcclva')],
type=container,
keep=true,
visible=true,
bgalpha=1.0,
bgcolor=0x000000,
width=100,
height=100,
y=0,
align=bottom,
handcursor=true,
bgcapture=true,
onloaded=action_oupnrgeaejfc(),
);
trace(layer[calc('addlayer' + 'wgyasybcclva')].name);
</action>

<action name="action_oupnrgeaejfc" scope="local">
for(set(i,0), i LT layer.count, inc(i),
if(layer[get(i)].name == layer[calc('addlayer' + 'wgyasybcclva')].name,
trace(get(i));
layer[get(i)].addevent('onclick', trace('click on layer[',name,']') );
);
);
</action>


Any suggestions? ?
Is this correct? ?
*smile* *smile* *smile*

2

Saturday, May 2nd 2020, 4:53pm

@panoyun
when you post code .. please do use the code tag
(white # icon to the right)

it keeps the formatting and makes everyting much more readable!

Source code

1
like this!

panoyun

Intermediate

  • "panoyun" started this thread

Posts: 234

Location: Somalia

  • Send private message

3

Saturday, May 2nd 2020, 5:53pm


Similar threads