[flashchart_embed]
Description
This tag is a shortcut for creating the proper HTML embed code for XML/SWF Charts. See the
[flashchart] entry for more info.
Parameters
-swfpath
string, required
The path to the main charts.swf Flash movie.
-libpath
string, required
The path to the charts_library folder.
-datapath
string, required
The path to the XML config file for your chart.
-width
integer, required
Width of the Flash movie in pixels.
-height
integer, required
Height of the Flash movie in pixels.
-bgcolor
string, required
Background color for the Flash movie in hex.
-id
string, optional
Unique ID for the Flash movie. An ID is generated if not provided.
Sample Usage
flashchart_embed(
-swfpath='flashchart/charts.swf',
-libpath='flashchart/charts_library',
-datapath='data.lasso',
-id='mychart',
-width=400,
-height=250,
-bgcolor='#EEEEEE'
);
Source Code
Click the "Download" button below to retrieve a copy of this tag,
including the complete documentation and sample usage shown
on this page. Place the downloaded ".inc" file in your
LassoStartup folder, restart Lasso, and you can begin using this
tag immediately.
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
define_tag(
'embed',
-namespace='flashchart_',
-priority='replace',
-required='swfpath',
-type='string',
-required='libpath',
-type='string',
-required='datapath',
-copy,
-type='string',
-required='width',
-type='integer',
-required='height',
-type='integer',
-required='bgcolor',
-type='string',
-optional='id',
-type='string',
-description='Generates Flash embed code linked to XML config data.'
);
!local_defined('id') ? local('id') = 'chart_' + lasso_uniqueid;
#datapath = encode_stricturl(#datapath);
local('out' = '\
<object
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"
width="' + #width + '"
height="' + #height + '"
id="' + #id + '"
align=""
>
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="' + #swfPath + '?library_path=' + encode_url(#libPath) + '&xml_source=' + #datapath + '" />
<param name="quality" value="high" />
<param name="bgcolor" value="' + #bgcolor + '" />
<embed
src="' + #swfPath + '?library_path=' + encode_url(#libPath) + '&xml_source=' + #datapath + '"
quality="high"
bgcolor="' + #bgcolor + '"
width="' + #width + '"
height="' + #height + '"
name="' + #id + '"
align=""
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer"
/>
</object>
');
return(@#out);
/define_tag;
Related Tags
Comments
none
Newest
Most Popular