?? fck_flash.js
字號:
?var dialog = window.parent ;
var oEditor = window.parent.InnerDialogLoaded() ;
var FCK = oEditor.FCK ;
var FCKLang = oEditor.FCKLang ;
var FCKConfig = oEditor.FCKConfig ;
var FCKTools = oEditor.FCKTools ;
var oFakeImage = window.parent.Selection.GetSelectedElement() ;
var oEmbed ;
if ( oFakeImage ) {
if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckflash') ) {
oEmbed = FCK.GetRealElement( oFakeImage ) ;
} else {
oFakeImage = null ;
}
}
window.onload = function() {
oEditor.FCKLanguageManager.TranslatePage(document) ;
LoadSelection() ;
window.parent.SetAutoSize( true ) ;
window.parent.SetOkButton( true ) ;
SelectField( 'txtUrl' ) ;
}
function LoadSelection() {
if ( ! oEmbed ) { return ; }
GetE('txtUrl').value = GetAttribute( oEmbed, 'src', '' ) ;
GetE('txtWidth').value = GetAttribute( oEmbed, 'width', '' ) ;
GetE('txtHeight').value = GetAttribute( oEmbed, 'height', '' ) ;
GetE('chkAutoPlay').checked = GetAttribute( oEmbed, 'play', 'true' ) == 'true' ;
GetE('chkLoop').checked = GetAttribute( oEmbed, 'loop', 'true' ) == 'true' ;
GetE('chkMenu').checked = GetAttribute( oEmbed, 'menu', 'true' ) == 'true' ;
GetE('cmbScale').value = GetAttribute( oEmbed, 'scale', '' ).toLowerCase() ;
}
function Ok() {
if ( GetE('txtUrl').value.length == 0 ) {
GetE('txtUrl').focus() ;
alert( oEditor.FCKLang.DlgAlertUrl ) ;
return false ;
}
oEditor.FCKUndo.SaveUndoStep() ;
if ( !oEmbed ) {
oEmbed = FCK.EditorDocument.createElement( 'EMBED' ) ;
oFakeImage = null ;
}
UpdateEmbed( oEmbed ) ;
if ( !oFakeImage ) {
oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__Flash', oEmbed ) ;
oFakeImage.setAttribute( '_fckflash', 'true', 0 ) ;
oFakeImage = FCK.InsertElement( oFakeImage ) ;
}
oEditor.FCKEmbedAndObjectProcessor.RefreshView( oFakeImage, oEmbed ) ;
return true ;
}
function UpdateEmbed( e ) {
SetAttribute( e, 'type', 'application/x-shockwave-flash' ) ;
SetAttribute( e, 'pluginspage', 'http://www.macromedia.com/go/getflashplayer' ) ;
SetAttribute( e, 'src', GetE('txtUrl').value ) ;
SetAttribute( e, "width", GetE('txtWidth').value ) ;
SetAttribute( e, "height", GetE('txtHeight').value ) ;
SetAttribute( e, 'scale', GetE('cmbScale').value ) ;
SetAttribute( e, 'play', GetE('chkAutoPlay').checked ? 'true' : 'false' ) ;
SetAttribute( e, 'loop', GetE('chkLoop').checked ? 'true' : 'false' ) ;
SetAttribute( e, 'menu', GetE('chkMenu').checked ? 'true' : 'false' ) ;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -