1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
<action name="popup" scope="private:POPUP" args="type, content, width, height, scrollbars"><![CDATA[
if(popup, break(); );
addlayer('popup_bg', popup_bg);
set(popup_bg,
type=container,
align=lefttop, width=100%, height=100%,
zorder=99,
handcursor=false,
bgcapture=false,
capture=false,
//bgcolor=0x123456, onloaded='tween(bgalpha,0.3,1.0);', // optional: colorize the background
ondown='popup_close()'
);
addlayer('popup', popup);
set(popup,
type=container,
parent='popup_bg',
width=calc(min(width,global.stagewidth*1)),
height=calc(min(height,global.stageheight*1)),
align=center,
bgborder='1 0x555555 1',
bgcolor=0x574e4b,
bgalpha=0.7,
bgshadow='0 10 20 0x000000 0.5',
bgcapture=true,
maskchildren=false,
capture=true,
handcursor=false,
alpha=0
);
// optional: add a close button
addlayer('popup_close_x', closex);
set(closex,
//url='%VIEWER%/popups/closex.png',
// fer adapting
type=text,
html=CERRAR,
x.normal=60,
x.mobile=0,
y=0,
interactivecontent=true,
bgcolor=0x2D3E50,
bgalpha=0.8,
bgborder=0,
bgroundedge=1,
padding=5 5 5 5,
css=color:#FFFFFF; font-family:Arial;,
txtshadow=1,
bgshadow=0 4 10 0x000000 0.3,
//end de fer adapating
parent='popup',
align=righttop,
//x=0,
//y=0,
edge=righttop,
scale=0.3,
zorder=99,
alpha=0.7,
onover='tween(alpha,1)',
onout='tween(alpha,0.7)',
onup='tween(alpha,0.7)',
onclick='popup_close()'
);
if(type == 'html',
set(popup.type, html);
copy(popup.html, content);
copy(popup.htmlscrollbars, scrollbars);
,type == 'iframe',
set(popup.type, iframe);
copy(popup.iframeurl, content);
,type == 'image',
set(popup,
bgcolor=0xFFFFFF,
bgalpha=1,
);
addlayer("popup_image", img);
set(img,
url=get(content),
align=center,
width=-20, height=-20,
parent=get(popup.name),
onloaded='popup_imageloaded()'
);
);
tween(global.plugin[pp_blur].range, 40.0);
delayedcall(0.2, tween(global.layer[popup].alpha, 1.0); );
// events when the popup should get closed automatically
set(global.events[popup].onremovepano, popup_close() );
set(global.events[popup].onresize, popup_close() );
]]></action>
|