dojox/embed/flashVars.js

  • Provides:

    • dojox.embed.flashVars
  • dojox.embed.flashVars.serialize

    • type
      Function
    • parameters:
      • n: (typeof String)
        The name for the object, such as: "button"
      • o: (typeof Object)
        The object to serialize
    • source: [view]
        var esc = function(val){
         // have to encode certain characters that indicate an object
         if(typeof val=="string"){
          val = val.replace(/;/g,"_sc_");
          val = val.replace(/\./g,"_pr_");
          val = val.replace(/\:/g,"_cl_");
          //val = escape(val);
         }
         return val;
        };
        var df = dojox.embed.flashVars.serialize;
        var txt = "";
        if(dojo.isArray(o)){
         for(var i=0;i    txt += df(n+"."+i, esc(o[i]))+";";
         }
         return txt.replace(/;{2,}/g,";");
        }else if(dojo.isObject(o)){
         for(var nm in o){
          txt += df(n+"."+nm, esc(o[nm]))+";";
         }
         return txt.replace(/;{2,}/g,";");
        }
        // Dev note: important that there is no double semi-colons
        return n+":"+o; // String
    • summary
      Key method. Serializes an object.
    • returns
      String
  • dojox.embed.flashVars

    • type
      Object
    • summary
  • dojox.embed

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary