zhuguifei
2026-03-10 58402bd5e762361363a0f7d7907153c77dbb819f
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
103
104
105
106
107
/**
    @name Edo.controls.SWF
    @class
    @typeName swf
    @description flash对象
    @extend Edo.controls.Control
*/
 
Edo.controls.SWF = function(){        
    Edo.controls.SWF.superclass.constructor.call(this);
}
Edo.controls.SWF.extend(Edo.controls.Control,{
    /**
        @name Edo.controls.SWF#minWidth
        @property
        @type Number
        @default 100        
    */
    minWidth: 100,
    /**
        @name Edo.controls.SWF#minHeight
        @property
        @type Number
        @default 50        
    */
    minHeight: 50,
    /**
        @name Edo.controls.SWF#defaultWidth
        @property
        @type Number
        @default 100        
    */
    defaultWidth: 100,
    /**
        @name Edo.controls.SWF#defaultHeight
        @property
        @type Number
        @default 50
    */
    defaultHeight: 50,
    
    flashVersion : '9.0.45',
    /**
        @name Edo.controls.SWF#backgroundColor
        @property
        @type color
        @default #ffffff
        @description 背景色
    */
    backgroundColor: '#ffffff',
    /**
        @name Edo.controls.SWF#wmode
        @property
        @type String
        @default opaque
        @description 透明模式
    */
    wmode: 'opaque',   
    /**
        @name Edo.controls.SWF#url
        @property
        @type String
        @description flash地址
    */
    url: undefined,
    swfId : undefined,
    swfWidth: '100%',
    swfHeight: '100%',
    
    expressInstall: false,
    
    createChildren: function(el){          
        Edo.controls.SWF.superclass.createChildren.call(this, el);        
        
        var params = {
            allowScriptAccess: 'always',
            bgcolor: this.backgroundColor,
            wmode: this.wmode
        }, vars = {
            allowedDomain: document.location.hostname,
            //elementID: this.getId(),
            elementID: this.id
            //,eventHandler: 'Ext.FlashEventProxy.onEvent'
        };
        
        var id = this.id + 'swf';
        
        Edo.util.Dom.append(this.el, '<div id="'+id+'"></div>');
        
        new swfobject.embedSWF(this.url, id, this.swfWidth, this.swfHeight, this.flashVersion,
            this.expressInstall ? Edo.controls.SWF.EXPRESS_INSTALL_URL : undefined, vars, params);
        
        this.swf = Edo.getDom(id);
    },
    syncSize: function(){
        Edo.controls.SWF.superclass.syncSize.a(this, arguments);
        
        
//        this.editor.wrapping.style.width = (this.realWidth-1)+'px';
//        this.editor.wrapping.style.height = (this.realHeight-1)+"px";
//        
//        Edo.util.Dom.setSize(this.el, this.realWidth, this.realHeight);
    }
});
 
Edo.controls.SWF.regType('swf');   
Edo.controls.SWF.EXPRESS_INSTALL_URL = 'http:/' + '/swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf';