Project

General

Profile

Statistics
| Revision:

root / trunk / web / dojo / dojox / embed / flashVars.js @ 13

History | View | Annotate | Download (848 Bytes)

1
/*
2
        Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
3
        Available via Academic Free License >= 2.1 OR the modified BSD license.
4
        see: http://dojotoolkit.org/license for details
5
*/
6

    
7

    
8
if(!dojo._hasResource["dojox.embed.flashVars"]){
9
dojo._hasResource["dojox.embed.flashVars"]=true;
10
dojo.provide("dojox.embed.flashVars");
11
dojo.mixin(dojox.embed.flashVars,{serialize:function(n,o){
12
var _1=function(_2){
13
if(typeof _2=="string"){
14
_2=_2.replace(/;/g,"_sc_");
15
_2=_2.replace(/\./g,"_pr_");
16
_2=_2.replace(/\:/g,"_cl_");
17
}
18
return _2;
19
};
20
var df=dojox.embed.flashVars.serialize;
21
var _3="";
22
if(dojo.isArray(o)){
23
for(var i=0;i<o.length;i++){
24
_3+=df(n+"."+i,_1(o[i]))+";";
25
}
26
return _3.replace(/;{2,}/g,";");
27
}else{
28
if(dojo.isObject(o)){
29
for(var nm in o){
30
_3+=df(n+"."+nm,_1(o[nm]))+";";
31
}
32
return _3.replace(/;{2,}/g,";");
33
}
34
}
35
return n+":"+o;
36
}});
37
}