Posted
Filed under Action Script

[원문]
http://osflash.org/flashcoders/undocumented/asnative

ASnative

In general, ASnative (i, j) returns a function reference. It’s like all the Flash functions are stored in a spreadsheet, and you can access them by rows and columns with ASnative. A convenient way to work with ASnative functions is to assign the result to a variable, and then execute the variable as a function.

The following list is pulled from the old flashcoders wiki, theres some annotations for various parts that could probably be added in here. You can visit the web archive to see the old page

List of ASNative functions

ASnative(1, 0) - [_global] ASSetPropFlags

ASnative(2, 0) - <not declared> former ‘ASnew’ (Flash 5)

ASnative(3, 0) - <not declared> former ‘String - internal function’ (Flash 5)

ASnative(3, 1) - <not declared> former ‘Number - internal function’ (Flash 5)

ASnative(3, 2) - <not declared> former ‘Boolean - internal function’ (Flash 5)

ASnative(3, 3) - <not declared> former ‘Object’ (Flash 5)

ASnative(3, 4) - <not declared> former ‘Number.prototype.toString’ (Flash 5)

ASnative(4, 0) - [_global] ASSetNative

ASnative(5, 0) - [Mouse] show

ASnative(5, 1) - [Mouse] hide

ASnative(9, 0) - [_global] updateAfterEvent

ASnative(10, 0) - [_global] MMSave - former ‘DashBoardSave’ (Flash 5)

ASnative(11, 0) - [System.Capabilities] Query -’Query’ is deleted after use!

ASnative(12, 0) - [System.security] allowDomain

ASnative(100, 0) - [_global] escape

ASnative(100, 1) - [_global] unescape

ASnative(100, 2) - [_global] parseInt

ASnative(100, 3) - [_global] parseFloat

ASnative(100, 4) - [_global] trace

ASnative(100, 5) - <not declared> XML escape-function

> → >

< → <

’ →

& → &

” → “

ASnative(101, 0) - [Object.prototype] watch

ASnative(101, 1) - [Object.prototype] unwatch

ASnative(101, 2) - [Object.prototype] addProperty

ASnative(101, 3) - [Object.prototype] valueOf

ASnative(101, 4) - [Object.prototype] toString

ASnative(101, 5) - [Object.prototype] hasOwnProperty

ASnative(101, 6) - [Object.prototype] isPrototypeOf

ASnative(101, 7) - [Object.prototype] isPropertyEnumerable

ASnative(101, 8) - [Object] registerClass

ASnative(101, 9) - [_global] Object | [_global] Function - player-declared, before setup-actionscript is run

ASnative(101, 10) - [Function.prototype] call

ASnative(101, 11) - [Function.prototype] apply

ASnative(101, 12) - [AsBroadcaster] broadcastMessage

ASnative(102, 0) - <not declared> former String.prototype.toUpperCase (Flash 5)

ASnative(102, 1) - <not declared> former String.prototype.toLowerCase (Flash 5)

ASnative(103, 0) - [Date.prototype] getFullYear

ASnative(103, 1) - [Date.prototype] getYear

ASnative(103, 2) - [Date.prototype] getMonth

ASnative(103, 3) - [Date.prototype] getDate

ASnative(103, 4) - [Date.prototype] getDay

ASnative(103, 5) - [Date.prototype] getHours

ASnative(103, 6) - [Date.prototype] getMinutes

ASnative(103, 7) - [Date.prototype] getSeconds

ASnative(103, 8) - [Date.prototype] getMilliseconds

ASnative(103, 9) - [Date.prototype] setFullYear

ASnative(103, 10) - [Date.prototype] setMonth

ASnative(103, 11) - [Date.prototype] setDate

ASnative(103, 12) - [Date.prototype] setHours

ASnative(103, 13) - [Date.prototype] setMinutes

ASnative(103, 14) - [Date.prototype] setSeconds

ASnative(103, 15) - [Date.prototype] setMilliseconds

ASnative(103, 16) - [Date.prototype] getTime

ASnative(103, 17) - [Date.prototype] setTime

ASnative(103, 18) - [Date.prototype] getTimezoneOffset

ASnative(103, 19) - [Date.prototype] toString

ASnative(103, 20) - [Date.prototype] setYear

ASnative(103, 128) - [Date.prototype] getUTCFullYear

ASnative(103, 129) - [Date.prototype] getUTCYear

ASnative(103, 130) - [Date.prototype] getUTCMonth

ASnative(103, 131) - [Date.prototype] getUTCDate

ASnative(103, 132) - [Date.prototype] getUTCDay

ASnative(103, 133) - [Date.prototype] getUTCHours

ASnative(103, 134) - [Date.prototype] getUTCMinutes

ASnative(103, 135) - [Date.prototype] getUTCSeconds

ASnative(103, 136) - [Date.prototype] getUTCMilliseconds

ASnative(103, 137) - [Date.prototype] setUTCFullYear

ASnative(103, 138) - [Date.prototype] setUTCMonth

ASnative(103, 139) - [Date.prototype] setUTCDate

ASnative(103, 140) - [Date.prototype] setUTCHours

ASnative(103, 141) - [Date.prototype] setUTCMinutes

ASnative(103, 142) - [Date.prototype] setUTCSeconds

ASnative(103, 143) - [Date.prototype] setUTCMilliseconds

ASnative(103, 256) - [_global] Date

ASnative(103, 257) - [Date] UTC

ASnative(104, 0) - [_global] TextField

ASnative(104, 1) - [TextField.prototype] scroll getter-function

ASnative(104, 2) - [TextField.prototype] scroll setter-function

ASnative(104, 3) - [TextField.prototype] maxScroll getter-function

ASnative(104, 4) - [TextField.prototype] maxScroll setter-function

ASnative(104, 5) - [TextField.prototype] borderColor getter-function

ASnative(104, 6) - [TextField.prototype] borderColor setter-function

ASnative(104, 7) - [TextField.prototype] backgroundColor getter-function

ASnative(104, 8) - [TextField.prototype] backgroundColor setter-function

ASnative(104, 9) - [TextField.prototype] textColor getter-function

ASnative(104, 10) - [TextField.prototype] textColor setter-function

ASnative(104, 11) - [TextField.prototype] tabIndex getter-function

ASnative(104, 12) - [TextField.prototype] tabIndex setter-function

ASnative(104, 13) - [TextField.prototype] autoSize getter-function

ASnative(104, 14) - [TextField.prototype] autoSize setter-function

ASnative(104, 15) - [TextField.prototype] text getter-function

ASnative(104, 16) - [TextField.prototype] text setter-function

ASnative(104, 17) - [TextField.prototype] type getter-function

ASnative(104, 18) - [TextField.prototype] type setter-function

ASnative(104, 19) - [TextField.prototype] htmlText getter-function

ASnative(104, 20) - [TextField.prototype] htmlText setter-function

ASnative(104, 21) - [TextField.prototype] variable getter-function

ASnative(104, 22) - [TextField.prototype] variable setter-function

ASnative(104, 23) - [TextField.prototype] hscroll getter-function

ASnative(104, 24) - [TextField.prototype] hscroll setter-function

ASnative(104, 25) - [TextField.prototype] maxhscroll getter-function

ASnative(104, 26) - [TextField.prototype] maxhscroll setter-function

ASnative(104, 27) - [TextField.prototype] maxChars getter-function

ASnative(104, 28) - [TextField.prototype] maxChars setter-function

ASnative(104, 29) - [TextField.prototype] embedFonts getter-function

ASnative(104, 30) - [TextField.prototype] embedFonts setter-function

ASnative(104, 31) - [TextField.prototype] html getter-function

ASnative(104, 32) - [TextField.prototype] html setter-function

ASnative(104, 33) - [TextField.prototype] border getter-function

ASnative(104, 34) - [TextField.prototype] border setter-function

ASnative(104, 35) - [TextField.prototype] background getter-function

ASnative(104, 36) - [TextField.prototype] background setter-function

ASnative(104, 37) - [TextField.prototype] wordWrap getter-function

ASnative(104, 38) - [TextField.prototype] wordWrap setter-function

ASnative(104, 39) - [TextField.prototype] password getter-function

ASnative(104, 40) - [TextField.prototype] password setter-function

ASnative(104, 41) - [TextField.prototype] multiline getter-function

ASnative(104, 42) - [TextField.prototype] multiline setter-function

ASnative(104, 43) - [TextField.prototype] selectable getter-function

ASnative(104, 44) - [TextField.prototype] selectable setter-function

ASnative(104, 45) - [TextField.prototype] length getter-function

ASnative(104, 46) - [TextField.prototype] length setter-function

ASnative(104, 47) - [TextField.prototype] bottomScroll getter-function

ASnative(104, 48) - [TextField.prototype] bottomScroll setter-function

ASnative(104, 49) - [TextField.prototype] textWidth getter-function

ASnative(104, 50) - [TextField.prototype] textWidth setter-function

ASnative(104, 51) - [TextField.prototype] textHeight getter-function

ASnative(104, 52) - [TextField.prototype] textHeight setter-function

ASnative(104, 53) - [TextField.prototype] restrict getter-function

ASnative(104, 54) - [TextField.prototype] restrict setter-function

ASnative(104, 55) - [TextField.prototype] condenseWhite getter-function

ASnative(104, 56) - [TextField.prototype] condenseWhite setter-function

ASnative(104, 100) - [TextField.prototype] replaceSel

ASnative(104, 101) - [TextField.prototype] getTextFormat

ASnative(104, 102) - [TextField.prototype] setTextFormat

ASnative(104, 103) - [TextField.prototype] removeTextFormat

ASnative(104, 104) - [TextField.prototype] getNewTextFormat

ASnative(104, 105) - [TextField.prototype] setNewTextFormat

ASnative(104, 106) - [TextField.prototype] getDepth

ASnative(104, 200) - [MovieClip.prototype] createTextField

ASnative(104, 201) - [TextField] getFontList

ASnative(105, 0) - [_global] Button

ASnative(105, 1) - [Button.prototype] tabIndex getter-function

ASnative(105, 2) - [Button.prototype] tabIndex setter-function

ASnative(105, 3) - [Button.prototype] getDepth

ASnative(106, 0) - [Number.prototype] valueOf

ASnative(106, 1) - [Number.prototype] toString

ASnative(106, 2) - [_global] Number

ASnative(107, 0) - [Boolean.prototype] valueOf

ASnative(107, 1) - [Boolean.prototype] toString

ASnative(107, 2) - [_global] Boolean

ASnative(110, 0) - [_global] TextFormat

ASnative(110, 1) - [TextFormat.prototype] font getter-function

ASnative(110, 2) - [TextFormat.prototype] font setter-function

ASnative(110, 3) - [TextFormat.prototype] size getter-function

ASnative(110, 4) - [TextFormat.prototype] size setter-function

ASnative(110, 5) - [TextFormat.prototype] color getter-function

ASnative(110, 6) - [TextFormat.prototype] color setter-function

ASnative(110, 7) - [TextFormat.prototype] url getter-function

ASnative(110, 8) - [TextFormat.prototype] url setter-function

ASnative(110, 9) - [TextFormat.prototype] target getter-function

ASnative(110, 10) - [TextFormat.prototype] target setter-function

ASnative(110, 11) - [TextFormat.prototype] bold getter-function

ASnative(110, 12) - [TextFormat.prototype] bold setter-function

ASnative(110, 13) - [TextFormat.prototype] italic getter-function

ASnative(110, 14) - [TextFormat.prototype] italic setter-function

ASnative(110, 15) - [TextFormat.prototype] underline getter-function

ASnative(110, 16) - [TextFormat.prototype] underline setter-function

ASnative(110, 17) - [TextFormat.prototype] align getter-function

ASnative(110, 18) - [TextFormat.prototype] align setter-function

ASnative(110, 19) - [TextFormat.prototype] leftMargin getter-function

ASnative(110, 20) - [TextFormat.prototype] leftMargin setter-function

ASnative(110, 21) - [TextFormat.prototype] rightMargin getter-function

ASnative(110, 22) - [TextFormat.prototype] rightMargin setter-function

ASnative(110, 23) - [TextFormat.prototype] indent getter-function

ASnative(110, 24) - [TextFormat.prototype] indent setter-function

ASnative(110, 25) - [TextFormat.prototype] leading getter-function

ASnative(110, 26) - [TextFormat.prototype] leading setter-function

ASnative(110, 27) - [TextFormat.prototype] blockIndent getter-function

ASnative(110, 28) - [TextFormat.prototype] blockIndent setter-function

ASnative(110, 29) - [TextFormat.prototype] tabStops getter-function

ASnative(110, 30) - [TextFormat.prototype] tabStops setter-function

ASnative(110, 31) - [TextFormat.prototype] bullet getter-function

ASnative(110, 32) - [TextFormat.prototype] bullet setter-function

ASnative(110, 33) - <TextFormat-instance> getTextExtent

ASnative(200, 0) - [Math] abs

ASnative(200, 1) - [Math] min

ASnative(200, 2) - [Math] max

ASnative(200, 3) - [Math] sin

ASnative(200, 4) - [Math] cos

ASnative(200, 5) - [Math] atan2

ASnative(200, 6) - [Math] tan

ASnative(200, 7) - [Math] exp

ASnative(200, 8) - [Math] log

ASnative(200, 9) - [Math] sqrt

ASnative(200, 10) - [Math] round

ASnative(200, 11) - [Math] random

ASnative(200, 12) - [Math] floor

ASnative(200, 13) - [Math] ceil

ASnative(200, 14) - [Math] atan

ASnative(200, 15) - [Math] asin

ASnative(200, 16) - [Math] acos

ASnative(200, 17) - [Math] pow

ASnative(200, 18) - [_global] isNaN

ASnative(200, 19) - [_global] isFinite

ASnative(250, 0) - [_global] setInterval

ASnative(250, 1) - [_global] clearInterval

ASnative(251, 0) - [_global] String

ASnative(251, 1) - [String.prototype] valueOf

ASnative(251, 2) - [String.prototype] toString

ASnative(251, 3) - [String.prototype] toUpperCase

ASnative(251, 4) - [String.prototype] toLowerCase

ASnative(251, 5) - [String.prototype] charAt

ASnative(251, 6) - [String.prototype] charCodeAt

ASnative(251, 7) - [String.prototype] concat

ASnative(251, 8) - [String.prototype] indexOf

ASnative(251, 9) - [String.prototype] lastIndexOf

ASnative(251, 10) - [String.prototype] slice

ASnative(251, 11) - [String.prototype] substring

ASnative(251, 12) - [String.prototype] split

ASnative(251, 13) - [String.prototype] substr

ASnative(251, 14) - [String] fromCharCode

ASnative(252, 0) - [_global] Array

ASnative(252, 1) - [Array.prototype] push

ASnative(252, 2) - [Array.prototype] pop

ASnative(252, 3) - [Array.prototype] concat

ASnative(252, 4) - [Array.prototype] shift

ASnative(252, 5) - [Array.prototype] unshift

ASnative(252, 6) - [Array.prototype] slice

ASnative(252, 7) - [Array.prototype] join

ASnative(252, 8) - [Array.prototype] splice

ASnative(252, 9) - [Array.prototype] toString

ASnative(252, 10) - [Array.prototype] sort

ASnative(252, 11) - [Array.prototype] reverse

ASnative(252, 12) - [Array.prototype] sortOn

ASnative(253, 0) - [_global] XMLNode

ASnative(253, 1) - [XMLNode.prototype] cloneNode

ASnative(253, 2) - [XMLNode.prototype] removeNode

ASnative(253, 3) - [XMLNode.prototype] insertBefore

ASnative(253, 4) - [XMLNode.prototype] appendChild

ASnative(253, 5) - [XMLNode.prototype] hasChildNodes

ASnative(253, 6) - [XMLNode.prototype] toString

ASnative(253, 7) - [_global] XML

ASnative(253, 8) - [XML.prototype] createElement

ASnative(253, 9) - [XML.prototype] createTextNode

ASnative(253, 10) - [XML.prototype] parseXML

ASnative(300, 0) - <not declared> former XML.prototype.parseXML - inner function (Flash 5)

ASnative(301, 0) - [XML.prototype] load

ASnative(301, 1) - [XML.prototype] send

ASnative(301, 2) - [XML.prototype] sendAndLoad

ASnative(301, 3) - [LoadVars.prototype] decode

ASnative(302, 0) - [Cookie] getCookie - inner function

ASnative(302, 1) - [Cookie] setCookie

ASnative(303, 0) - [CustomActions] install

ASnative(303, 1) - [CustomActions] uninstall

ASnative(303, 2) - [CustomActions] list

ASnative(303, 3) - [CustomActions] get

ASnative(400, 0) - [XMLSocket.prototype] connect

ASnative(400, 1) - [XMLSocket.prototype] send

ASnative(400, 2) - [XMLSocket.prototype] close

ASnative(500, 0) - [Sound.prototype] getPan

ASnative(500, 1) - [Sound.prototype] getTransform

ASnative(500, 2) - [Sound.prototype] getVolume

ASnative(500, 3) - [Sound.prototype] setPan

ASnative(500, 4) - [Sound.prototype] setTransform

ASnative(500, 5) - [Sound.prototype] setVolume

ASnative(500, 6) - [Sound.prototype] stop

ASnative(500, 7) - [Sound.prototype] attachSound

ASnative(500, 8) - [Sound.prototype] start

ASnative(500, 9) - [Sound.prototype] getDuration

ASnative(500, 10) - [Sound.prototype] setDuration

ASnative(500, 11) - [Sound.prototype] getPosition

ASnative(500, 12) - [Sound.prototype] setPosition

ASnative(500, 13) - [Sound.prototype] loadSound

ASnative(500, 14) - [Sound.prototype] getBytesLoaded

ASnative(500, 15) - [Sound.prototype] getBytesTotal

ASnative(500, 16) - [_global] Sound

ASnative(500, 32) - [Sound.prototype] id3 getter-function

ASnative(600, 0) - [Selection] getBeginIndex

ASnative(600, 1) - [Selection] getEndIndex

ASnative(600, 2) - [Selection] getCaretIndex

ASnative(600, 3) - [Selection] getFocus

ASnative(600, 4) - [Selection] setFocus

ASnative(600, 5) - [Selection] setSelection

ASnative(666, 1) - [Stage] scaleMode getter-function

ASnative(666, 2) - [Stage] scaleMode setter-function

ASnative(666, 3) - [Stage] align getter-function

ASnative(666, 4) - [Stage] align setter-function

ASnative(666, 5) - [Stage] width getter-function

ASnative(666, 6) - [Stage] width setter-function

ASnative(666, 7) - [Stage] height getter-function

ASnative(666, 8) - [Stage] height setter-function

ASnative(666, 9) - [Stage] showMenu getter-function

ASnative(666, 10) - [Stage] showMenu setter-function

ASnative(667, 0) - [_global] Video

ASnative(667, 1) - [Video.prototype] attachVideo

ASnative(667, 2) - [Video.prototype] clear

ASnative(700, 0) - [Color.prototype] setRGB

ASnative(700, 1) - [Color.prototype] setTransform

ASnative(700, 2) - [Color.prototype] getRGB

ASnative(700, 3) - [Color.prototype] getTransform

ASnative(800, 0) - [Key] getAscii

ASnative(800, 1) - [Key] getCode

ASnative(800, 2) - [Key] isDown

ASnative(800, 3) - [Key] isToggled

ASnative(900, 0) - [MovieClip.prototype] attachMovie

ASnative(900, 1) - [MovieClip.prototype] swapDepths

ASnative(900, 2) - [MovieClip.prototype] localToGlobal

ASnative(900, 3) - [MovieClip.prototype] globalToLocal

ASnative(900, 4) - [MovieClip.prototype] hitTest

ASnative(900, 5) - [MovieClip.prototype] getBounds

ASnative(900, 6) - [MovieClip.prototype] getBytesTotal

ASnative(900, 7) - [MovieClip.prototype] getBytesLoaded

ASnative(900, 8) - [MovieClip.prototype] attachAudio

ASnative(900, 9) - [MovieClip.prototype] attachVideo

ASnative(900, 10) - [MovieClip.prototype] getDepth

ASnative(900, 11) - [MovieClip.prototype] setMask

ASnative(900, 12) - [MovieClip.prototype] play

ASnative(900, 13) - [MovieClip.prototype] stop

ASnative(900, 14) - [MovieClip.prototype] nextFrame

ASnative(900, 15) - [MovieClip.prototype] prevFrame

ASnative(900, 16) - [MovieClip.prototype] gotoAndPlay

ASnative(900, 17) - [MovieClip.prototype] gotoAndStop

ASnative(900, 18) - [MovieClip.prototype] duplicateMovieClip

ASnative(900, 19) - [MovieClip.prototype] removeMovieClip

ASnative(900, 20) - [MovieClip.prototype] startDrag

ASnative(900, 21) - [MovieClip.prototype] stopDrag

ASnative(900, 200) - [MovieClip.prototype] tabIndex getter-function

ASnative(900, 201) - [MovieClip.prototype] tabIndex setter-function

ASnative(901, 0) - [MovieClip.prototype] createEmptyMovieClip

ASnative(901, 1) - [MovieClip.prototype] beginFill

ASnative(901, 2) - [MovieClip.prototype] beginGradientFill

ASnative(901, 3) - [MovieClip.prototype] moveTo

ASnative(901, 4) - [MovieClip.prototype] lineTo

ASnative(901, 5) - [MovieClip.prototype] curveTo

ASnative(901, 6) - [MovieClip.prototype] lineStyle

ASnative(901, 7) - [MovieClip.prototype] endFill

ASnative(901, 8) - [MovieClip.prototype] clear

ASnative(1999, 0) - [Accessibility] IsActive

ASnative(1999, 1) - [Accessibility] SendEvent

ASnative(1999, 2) - [Accessibility] updateProperties -new function in beta-player 6,0,60,48

ASnative(2100, 0) - [NetConnection.prototype] connect

ASnative(2100, 1) - [NetConnection.prototype] close

ASnative(2100, 2) - [NetConnection.prototype] call

ASnative(2100, 3) - [NetConnection.prototype] addheader

ASnative(2100, 200) - [NetConnection] NetConnection inner function - primative object killer

ASnative(2101, 0) - [NetStream.prototype] close

ASnative(2101, 1) - [NetStream.prototype] attachAudio

ASnative(2101, 2) - [NetStream.prototype] attachVideo

ASnative(2101, 3) - [NetStream.prototype] send

ASnative(2101, 4) - [NetStream.prototype] setBufferTime

ASnative(2101, 200) - [NetStream] NetStream inner function

ASnative(2101, 201) - [NetStream] NetStream > [OnCreate.prototype] onResult - inner function

ASnative(2101, 202) - [NetStream.prototype] publish|play|receiveAudio|receiveVideo|pause|seek - inner function

ASnative(2102, 0) - [Camera.prototype] setMode

ASnative(2102, 1) - [Camera.prototype] setQuality

ASnative(2102, 2) - [Camera.prototype] setKeyFrameInterval

ASnative(2102, 3) - [Camera.prototype] setMotionLevel

ASnative(2102, 4) - [Camera.prototype] setLoopback

ASnative(2102, 200) - [Camera] get

ASnative(2102, 201) - [Camera] names getter-function

ASnative(2104, 0) - [Microphone.prototype] setSilenceLevel

ASnative(2104, 1) - [Microphone.prototype] setRate

ASnative(2104, 2) - [Microphone.prototype] setGain

ASnative(2104, 3) - [Microphone.prototype] setUseEchoSuppression

ASnative(2104, 200) - [Microphone] get

ASnative(2104, 201) - [Microphone] names getter-function

ASnative(2106, 0) - [SharedObject.prototype] connect

ASnative(2106, 1) - [SharedObject.prototype] send

ASnative(2106, 2) - [SharedObject.prototype] flush

ASnative(2106, 3) - [SharedObject.prototype] close

ASnative(2106, 4) - [SharedObject.prototype] getSize

ASnative(2106, 5) - [SharedObject.prototype] setFps

ASnative(2106, 202) - [SharedObject] getLocal - inner function

ASnative(2106, 203) - [SharedObject] getRemote - inner function

ASnative(2106, 204) - [SharedObject] getLocal - inner function

ASnative(2106, 205) - [SharedObject] getRemote - inner function

ASnative(2106, 206) - [SharedObject] deleteAll - inner function

ASnative(2106, 207) - [SharedObject] getDiskUsage - inner function

ASnative(2107, 0) - [System] ShowSettings

ASnative(2200, 0) - [LocalConnection.prototype] connect

ASnative(2200, 1) - [LocalConnection.prototype] send

ASnative(2200, 2) - [LocalConnection.prototype] close

ASnative(2200, 3) - [LocalConnection.prototype] domain

ASnative(2201, 0) - [System.Product.prototype] IsRunning - inner function

ASnative(2201, 1) - [System.Product.prototype] IsInstalled - inner function

ASnative(2201, 2) - [System.Product.prototype] Launch - inner function

ASnative(2201, 3) - [System.Product.prototype] Download - inner function

2010/02/26 10:48 2010/02/26 10:48
Posted
Filed under C,C++

mrfc에서 제공 해주는 인터넷 익스플로어를 사용 하여
웹페이지를 네비게이트 했을 때
javascript의 window.close() ; 이벤트에 의해서 창이 닫이고 배경이 보이는 현상이 발생 한다.
그래서 OnWindowClosing  핸들러를 등록 하고 ..
다음과 같이
 *Cancel=TRUE; 처리 한다.

void CViewDlg::OnWindowClosingExplorer1(BOOL IsChildWindow, BOOL FAR* Cancel)
{
 // TODO: Add your control notification handler code here
 *Cancel=TRUE;
 char currentPath[_MAX_PATH];
    _getcwd(currentPath, _MAX_PATH);

 char path[200];
 sprintf(path,"%s\\main\\index.html",currentPath);
    printf("%s",path);
 m_browser.Navigate(path, NULL, NULL, NULL, NULL);

}

2010/02/24 18:47 2010/02/24 18:47
Posted
Filed under Htm&Javascript

[원문]http://home.tiscali.nl/developerscorner/fdc-varia/font-embedding.htm


<style type="text/css">
@font-face {
    font-family: "Ace Crikey";
    src: url(ace.ttf);
}
.ace {
    font-family: "Ace Crikey";
    font-size: 230%;
}
</style>

css-validator:

2010/02/24 10:05 2010/02/24 10:05
Posted
Filed under Htm&Javascript
투명한 iframe을 사용 하기 위해서는
<iframe id="ifm" allowtransparency="true" frameborder="no" src="./menu.html" />

아이프레임으로 연결 한 html 페이지 에서  body 에 다음과 같이 설정 한다.
<body style="background-color:transparent">

2010/02/24 09:45 2010/02/24 09:45
Posted
Filed under Htm&Javascript

Note on pointer and hand

In the past the hand value was Microsoft's way of saying pointer; and IE 5.0 and 5.5 only support hand. Because it's the cursor value that's used most often, most other browsers have also implemented hand.

Since IE 6 and 7 support pointer, there's no more reason to use hand, except when older IEs are part of your target audience. In that case, the only cross-browser syntax is:

element {
	cursor: pointer;
	cursor: hand;
}
2010/02/24 09:42 2010/02/24 09:42
Posted
Filed under Htm&Javascript
[원문] http://nextep.tistory.com/68

A. 설치법.


먼저 http://ckeditor.com/ 에서 CK에디터를 다운로드 받습니다.


FTP를 이용해 자신의 계정에 ckeditor 폴더를 업로드 합니다.


사용할 페이지의 <head>와 </head> 사이에 아래 소스코드를 추가합니다.


1.<script type="text/javascript" src="/업로드폴더/ckeditor.js"></script>

에디터를 사용할 텍스트에리어에 ID나 CLASS 어트리뷰트 값을 이용해 아래와 같이 적용할 수 있습니다.


1. ID를 이용한 방법.

 

1.<textarea id="editor1" name="editor1" style="width:100%;height:200px;"></textarea>
2.<script type="text/javascript">
3.//<![CDATA[
4. CKEDITOR.replace( 'editor1' );
5.//]]>
6.</script>

2. CLASS를 이용한 방법.


1.<textarea name="editor2" class="ckeditor" style="width:100%;height:200px;"></textarea>

예제 : http://coterie.hosting.paran.com/ckeditor/



B. 기본 설정법.


1. 스킨


1.<script type="text/javascript">
2.//<![CDATA[
3. CKEDITOR.replace( 'editor1',{
4.   skin:'스킨폴더명'
5. });
6.//]]>
7.</script>

※ CKeditor 에서는 3가지 스킨을 기본적으로 포함하고 있습니다. (kama,office2003,v2)


예제 : http://coterie.hosting.paran.com/ckeditor/index2.html



2. 인터페이스 컬러


CKEditor 기본스킨을 사용할 시 위지윅 에디터의 인터페이스 UI 컬러를 설정할 수 있습니다.


1.<script type="text/javascript">
2.//<![CDATA[
3.   CKEDITOR.replace( 'editor1',{
4.   uiColor: '#14B8C4'
5. });
6.//]]>
7.</script>

 

예제 : http://coterie.hosting.paran.com/ckeditor/index3.html



3. 언어


ckeditor는 기본적으로 페이지의 언어에 맞춰 설정해 주지만 그렇지 않은경우 아래와 같이 가능합니다.


1.<script type="text/javascript">
2.//<![CDATA[
3.  CKEDITOR.replace( 'editor2',{
4.    language : 'english'
5.  });
6.//]]>
7.</script>

예제 : http://coterie.hosting.paran.com/ckeditor/index4.html


4. 엔터 모드


엔터나 시프트+엔터를 누를때의 입력되는 소스를 결정합니다.


1 = <p></p>

2 = <br />

3 = <div></div>


1.<script type="text/javascript">
2.//<![CDATA[
3. CKEDITOR.replace( 'editor1',{
4.   enterMode:'2'
5.   shiftEnterMode:'3'
6. });
7.//]]>
8.</script>

예제 : http://coterie.hosting.paran.com/ckeditor/index5.html


5. 툴바


툴바에 출력할 아이콘을 설정할 있습니다.


01.<script type="text/javascript">
02.//<![CDATA[
03.  CKEDITOR.replace( 'editor1',{
04.    toolbar:
05.    [
06.      ['Bold','-', 'Italic'],
07.      ['NumberedList']
08.    ]
09.  });
10.//]]>
11.</script>

예제 : http://coterie.hosting.paran.com/ckeditor/index6.html


기본 툴바는 아래와 같습니다. 원하는 것만 선택해서 사용하시면 됩니다.


 ['Source','-','Save','NewPage','Preview','-','Templates'],
 ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
 ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
 ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
 '/',
 ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
 ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
 ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
 ['Link','Unlink','Anchor'],
 ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],
 '/',
 ['Styles','Format','Font','FontSize'],
 ['TextColor','BGColor'],
 ['Maximize', 'ShowBlocks','-','About']


 

C. 커스텀컨피그 파일 사용법.


자신이 설정한 config 파일을 통해 ckeditor를 커스터마이징 할 수 있습니다.


1.<script type="text/javascript">
2.//<![CDATA[
3. CKEDITOR.replace( 'editor1',{
4.   customConfig : '커스텀설정js파일위치',
5.   width: '100%',
6.   height: 300
7. });
8.//]]>

아래는 전에 제가 사용하던 커스텀 설정입니다.

 

01.CKEDITOR.editorConfig = function( config )
02.{
03. config.docType = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<A href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd%22%3E'">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'</A>;
04.  config.font_defaultLabel = 'Gulim';
05. config.font_names = 'Gulim/Gulim;Dotum/Dotum;Batang/Batang;Gungsuh/Gungsuh;Arial/Arial;Tahoma/Tahoma;Verdana/Verdana';
06.  config.fontSize_defaultLabel = '12px';
07.  config.fontSize_sizes = '8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;';
08.  config.language = "ko";
09. config.resize_enabled = false;
10.  config.enterMode = CKEDITOR.ENTER_BR;
11.  config.shiftEnterMode = CKEDITOR.ENTER_P;
12.  config.startupFocus = true;
13. config.uiColor = '#EEEEEE';
14. config.toolbarCanCollapse = false;
15. config.menu_subMenuDelay = 0;
16. config.toolbar = [['Bold','Italic','Underline','Strike','-','Subscript','Superscript','-','TextColor','BGColor','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','Link','Unlink','-','Find','Replace','SelectAll','RemoveFormat','-','Image','Flash','Table','SpecialChar'],'/',['Source','-','ShowBlocks','-','Font','FontSize','Undo','Redo','-','About']];
17.};
2010/02/18 22:57 2010/02/18 22:57
Posted
Filed under JSP, JAVA

[원문]http://blog.naver.com/neofanta/120045663983

FCK Editor v2.4.3

 

복사만으로 간단하게 설치가 되지만, 그대로는 사용할 수가 없다.

설치후에 기본적으로 설정해야 하는 것들을 정리해 본다.

 

 

 

 

 

 

1. 환경 설정하기

fckeditor/fckconfig.js 파일에 필요한 대부분의 필요한 환경 설정을 할 수 있다.

먼저 기본으로 설정해야 할 환경에 대해서 알아본다.

 

서버스크립트별로 주석으로 표시되어 있는 부분을 해제 시켜준다.

FCKConfig.ProtectedSource.Add( /<%[\s\S]*?%>/g ) ; // ASP style server side code <%...%>

 

기본언어를 한글로 바꿔준다.

FCKConfig.DefaultLanguage  = 'kr' ;

 

편집중 엔터 또는 쉬프트+엔터에 대한 사입할 태그를 선택한다.

FCKConfig.EnterMode = 'div' ;   // p | div | br
FCKConfig.ShiftEnterMode = 'br' ; // p | div | br


링크 서버 보기 기능을 없애준다. 서버보기를 통해 불필요한 파일에 대한 업로드 방지와 보안의 일환으로 없애는 것이 좋다.

FCKConfig.LinkBrowser = false ;


이미지 서버 보기 기능을 없애준다.

FCKConfig.ImageBrowser = false ;


플래시 서버 보기 기능을 없애준다.

FCKConfig.FlashBrowser = false ;


여기까지는 보통 새 버전이 나올때마다 또는 새로 설치할 때마다 반드시 확인해줘야 하는 사항이다.

두번째로 종종 사용되는 기능에 대해 알아본다.

 

이모티콘을 추가해보자. 자신만의 이모티콘이 있다면 별도의 폴더에 저장하고 경로를 설정해준 다음 각각의 파일명을 등록하면 된다.

FCKConfig.SmileyPath = FCKConfig.BasePath + 'images/smiley/msn/' ;
FCKConfig.SmileyImages = ['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif',

'tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif',

'angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif',

'thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'] ;


툴바를 내맘데로 바꿔보자.

FCKConfig.ToolbarSets["MyToolbar"] = [
 ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
 ['OrderedList','UnorderedList','-','Outdent','Indent'],
 ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
 ['Link','Unlink','Anchor'],['Image']
] ;
이렇게 별도로 추가한 다음에 fckeditor를 생성하는 스크립트에서는 아래처럼 지정해 주면 된다.

Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.ToolbarSet = "MyToolbar"
oFCKeditor.BasePath = "/fckeditor/"
oFCKeditor.Value = ""
oFCKeditor.Height = 400
oFCKeditor.Width = 780
oFCKeditor.Create "content"

2. 용량이 큰 이미지를 업로드 하기 위하여 설정할 사항

가끔 이미지가 크다 싶으면 업로드가 안되는 경우가 있다. 이것은 서버의 설정 문제이다.

아래 포스트에 자세한 내용이 있다.

http://blog.naver.com/neofanta.do?Redirect=Log&logNo=120039036389

 

3. 한글로된 이미지파일명을 제대로 업로드하고 보여주기

한글이 섞인 파일명으로된 이미지를 업로드하면 업로드는 되는데 표시가 안되고 엑스박스가 나오게 된다. 페이지 케릭터셋을 변경해주어 해결할 수 있다. 아래 굵은 글씨로 되어있는 부분을 추가한다.

 

fckeditor/editor/filemanager/upload/asp/upload.asp

<%@ CodePage=65001 Language="VBScript"%>
<%
Option Explicit
Response.Buffer = True
Response.CharSet = "UTF-8"


 

4. 이미지 업로드 경로를 변경하기

fckeditor/editor/filemanager/upload/asp/config.asp 파일에서 아래의 내용을 변경하면 원하는 곳에 저장할 수 있다.

ConfigUserFilesPath = "/files/fck/"


 

5. 이미지 주소 형태 변경하기

이미지를 업로드하게 되면 주소가 /files/fck/image.gif 처럼 전체 경로로 되어있지 않아서 사이트 내에서는 아무런 오류가 없지만, 만약 입력된 내용으로 이메일이라도 보내게 되면 이미지가 하나도 나오지 않게 된다.

이미지 태그가 아래처럼 만들어지기 때문이다.

<img src="/files/fck/image.gif">

그렇기 때문에 이미지가 어느 서버에 있는지 알수가 없어서 엑스박스로 나오게 된다. 이것은 이미지를 입력할때 해당 이미지의 전체 주소의 형태로 태그가 만들어지면 해결될수 있는 문제이다.

아래의 포스트에 자세한 내용이 있다.

http://blog.naver.com/neofanta.do?Redirect=Log&logNo=120045457520


6. 편집기 안의 툴바에서 폰트목록에 굴림, 돋움체 추가하기

/fckeditor/fckconfig.js 파일을 열자.

아래 내용으로 변경하고 더 원하는 폰트가 있으면 추가한다.

FCKConfig.FontNames  = '굴림;굴림체;돋움;돋움체;Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;


위처럼 추가를 해도 처음 편집기안에 커서가 위치하게 되면 기본 폰트가 굴림이 아니라 Arial로 되어있다. 매번 변경할 필요 없이 스타일 파일의 기본 폰트를 변경하여 매번 폰트를 바꿔줘야 하는 불편함을 없앨 수 있다.

/fckeditor/editor/css/fck_editorarea.css

body, td
{
 font-family: Gulim, Arial, Verdana, Sans-Serif;
 font-size: 12px;
}

2010/02/18 21:46 2010/02/18 21:46
Posted
Filed under JSP, JAVA

[원문]http://blog.naver.com/neofanta/120045663983

FCK Editor v2.4.3

 

복사만으로 간단하게 설치가 되지만, 그대로는 사용할 수가 없다.

설치후에 기본적으로 설정해야 하는 것들을 정리해 본다.

 

 

 

 

 

 

1. 환경 설정하기

fckeditor/fckconfig.js 파일에 필요한 대부분의 필요한 환경 설정을 할 수 있다.

먼저 기본으로 설정해야 할 환경에 대해서 알아본다.

 

서버스크립트별로 주석으로 표시되어 있는 부분을 해제 시켜준다.

FCKConfig.ProtectedSource.Add( /<%[\s\S]*?%>/g ) ; // ASP style server side code <%...%>

 

기본언어를 한글로 바꿔준다.

FCKConfig.DefaultLanguage  = 'kr' ;

 

편집중 엔터 또는 쉬프트+엔터에 대한 사입할 태그를 선택한다.

FCKConfig.EnterMode = 'div' ;   // p | div | br
FCKConfig.ShiftEnterMode = 'br' ; // p | div | br


링크 서버 보기 기능을 없애준다. 서버보기를 통해 불필요한 파일에 대한 업로드 방지와 보안의 일환으로 없애는 것이 좋다.

FCKConfig.LinkBrowser = false ;


이미지 서버 보기 기능을 없애준다.

FCKConfig.ImageBrowser = false ;


플래시 서버 보기 기능을 없애준다.

FCKConfig.FlashBrowser = false ;


여기까지는 보통 새 버전이 나올때마다 또는 새로 설치할 때마다 반드시 확인해줘야 하는 사항이다.

두번째로 종종 사용되는 기능에 대해 알아본다.

 

이모티콘을 추가해보자. 자신만의 이모티콘이 있다면 별도의 폴더에 저장하고 경로를 설정해준 다음 각각의 파일명을 등록하면 된다.

FCKConfig.SmileyPath = FCKConfig.BasePath + 'images/smiley/msn/' ;
FCKConfig.SmileyImages = ['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif',

'tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif',

'angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif',

'thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'] ;


툴바를 내맘데로 바꿔보자.

FCKConfig.ToolbarSets["MyToolbar"] = [
 ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
 ['OrderedList','UnorderedList','-','Outdent','Indent'],
 ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
 ['Link','Unlink','Anchor'],['Image']
] ;
이렇게 별도로 추가한 다음에 fckeditor를 생성하는 스크립트에서는 아래처럼 지정해 주면 된다.

Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.ToolbarSet = "MyToolbar"
oFCKeditor.BasePath = "/fckeditor/"
oFCKeditor.Value = ""
oFCKeditor.Height = 400
oFCKeditor.Width = 780
oFCKeditor.Create "content"

2. 용량이 큰 이미지를 업로드 하기 위하여 설정할 사항

가끔 이미지가 크다 싶으면 업로드가 안되는 경우가 있다. 이것은 서버의 설정 문제이다.

아래 포스트에 자세한 내용이 있다.

http://blog.naver.com/neofanta.do?Redirect=Log&logNo=120039036389

 

3. 한글로된 이미지파일명을 제대로 업로드하고 보여주기

한글이 섞인 파일명으로된 이미지를 업로드하면 업로드는 되는데 표시가 안되고 엑스박스가 나오게 된다. 페이지 케릭터셋을 변경해주어 해결할 수 있다. 아래 굵은 글씨로 되어있는 부분을 추가한다.

 

fckeditor/editor/filemanager/upload/asp/upload.asp

<%@ CodePage=65001 Language="VBScript"%>
<%
Option Explicit
Response.Buffer = True
Response.CharSet = "UTF-8"


 

4. 이미지 업로드 경로를 변경하기

fckeditor/editor/filemanager/upload/asp/config.asp 파일에서 아래의 내용을 변경하면 원하는 곳에 저장할 수 있다.

ConfigUserFilesPath = "/files/fck/"


 

5. 이미지 주소 형태 변경하기

이미지를 업로드하게 되면 주소가 /files/fck/image.gif 처럼 전체 경로로 되어있지 않아서 사이트 내에서는 아무런 오류가 없지만, 만약 입력된 내용으로 이메일이라도 보내게 되면 이미지가 하나도 나오지 않게 된다.

이미지 태그가 아래처럼 만들어지기 때문이다.

<img src="/files/fck/image.gif">

그렇기 때문에 이미지가 어느 서버에 있는지 알수가 없어서 엑스박스로 나오게 된다. 이것은 이미지를 입력할때 해당 이미지의 전체 주소의 형태로 태그가 만들어지면 해결될수 있는 문제이다.

아래의 포스트에 자세한 내용이 있다.

http://blog.naver.com/neofanta.do?Redirect=Log&logNo=120045457520


6. 편집기 안의 툴바에서 폰트목록에 굴림, 돋움체 추가하기

/fckeditor/fckconfig.js 파일을 열자.

아래 내용으로 변경하고 더 원하는 폰트가 있으면 추가한다.

FCKConfig.FontNames  = '굴림;굴림체;돋움;돋움체;Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;


위처럼 추가를 해도 처음 편집기안에 커서가 위치하게 되면 기본 폰트가 굴림이 아니라 Arial로 되어있다. 매번 변경할 필요 없이 스타일 파일의 기본 폰트를 변경하여 매번 폰트를 바꿔줘야 하는 불편함을 없앨 수 있다.

/fckeditor/editor/css/fck_editorarea.css

body, td
{
 font-family: Gulim, Arial, Verdana, Sans-Serif;
 font-size: 12px;
}

2010/02/18 21:46 2010/02/18 21:46
Posted
Filed under JSP, JAVA
[원문]http://blog.daum.net/_blog/hdn/ArticleContentsView.do?blogid=0Cnf6&articleno=16498176&looping=0&longOpen=

FCKeditor는 오픈 소스로서 웹 환경에서 html편집 기능을 제공 합니다...

1. 톰캣 환경에서 내가 만든 웹프로젝트 안에 FCKedit라는 폴더를 만듭니다.

2. fckeditor 다운로드
2-1. http://www.fckeditor.net/download/ 에서 다운로드
2-2. FCKedit 폴더에 다운로드 된 압축 파일의 압축을 풉니다.
      위의 URL에서 다운받은 것을 사용 하시면 추려낼것들이 좀 많습니다...
      하지만 추려 내지 않고 돌려도 잘 돌아 갑니다...

3.  java 버전용 fckeditor 를  다운로드(FCKeditor-2.3.zip)
3-1. http://sourceforge.net/project/showfiles.php?group_id=75348&package_id=129511 에서 다운로드합니다..
     다운로드 하였다면 압축을 풀고 , 하나 하나 옴겨 보죠...^^
3-2. 먼저 FCKeditor-2.3 의 web/WEB-INF/web.xml을 열어서 톰켓 환경의 web.xml에 추가합니다.
<servlet>
                <servlet-name>Connector</servlet-name>
                <servlet-class>com.fredck.FCKeditor.connector.ConnectorServlet</servlet-class>
               

......<중간 생략>......
 
  <servlet-mapping>
    <servlet-name>SimpleUploader</servlet-name>
    <url-pattern>/simpleuploader</url-pattern>
  </servlet-mapping>

3-3. 그리고 나서는 FCKeditor-2.3 /web/WEB-INF/lib에있는 commons-fileupload.jar파일을
       프로젝트의 WEB-INF/lib안에 복사 하고  빌드패스에 추가 하여 줍니다.
3-4. FCKeditor-2.3/src의 com폴더를 WEB-INF/src에 복사 합니다..
        이렇게 하면 기본적인 jsp에서 사용할수 있는 FCKeditor를 셋팅 됩니다.

기본 셋팅을 했으니까 jsp페이지를 만들어 보죠...
4-1. jsp페이지를 testfck.jsp로 만들도록 하겠습니다...
       페이지에서는

<%@ page   language="java" contentType="text/html;charset=euc-kr"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>


<html>
<head>
   
    <title>FCKeditor</title>

<link href="/css/style.css" rel="stylesheet" type="text/css">

<script language="javascript"  src="/js/message.js" type="text/javascript"></script>
<script type="text/javascript" src="/FCKedit/fckeditor.js"></script>
</head>

<script LANGUAGE="JavaScript"><!--
       
        /**
     * doInit()
     * 개     요 : 화면 로딩시 실행, 일반 textarea를 editor가 포함된 형태로 변형
     * return값 : void
     */
        function doInit() {
       
                var sBasePath = "/FCKedit/";
                oFCKeditor = new FCKeditor( 'FCKeditor' ) ;
                oFCKeditor.BasePath = sBasePath ;
                oFCKeditor.ReplaceTextarea();
        }
        
--></script>

<body style="background-color:transparent" onload="doInit();" oncontextmenu="return false" >
<form id=MsgForm name=MsgForm  method="post" style="width:100%;height:450;" target="myhiddenFrame">
<table id=totalTable width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
        <tr height="100%">
                <td class="td_C5" valign="top" height="100%">
                        <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">    
                                <tr height="100%">
                                        <td height="100%" id=MSG>
                                                

                                                     <textarea id='FCKeditor' name='FCKeditor' style='width:100%;height:100%;'>
                                                             <c:forEach items="${sessionScope.HelpMsg}" var="it">
                                                                     <c:out value="${it.hlp_msg}"/>
                                                             </c:forEach>
                                                     </textarea>
                                               

                                        </td>
                                </tr>
                        </table>
                </td>
        </tr>
</table>
</form>

</html>

이렇게 구성 하면 jsp페이지 에서 FCKeditor를 볼수 있습니다...
설명을 한다고 했는데 ,, 잘 이해가 되실지 모르겠습니다.....
이글에 대한 궁금한점 리플 달아 주시면 성심 성의껏 답변 해드리겠습니다..

다음 글에서는 FCKeditor의 이미지 업로드에 관한 강좌를 올리도록 하겠습니다...

jsp에서 FCKeditor 사용하기 - 2

FCKeditor에대한 두번째 강좌 이네요..^^
이번 강좌는 편집 문서에 이미지를 넣기 위한 과정으로 좀 까다롭더군요..^^
이거 때문에 고생좀 했습니다..^^

이글을 보시고 FCKeditor를 사용하시는 분들은 고생을 덜하셨으면 합니다..^^

첯 강좌에 commons-fileupload.jar를 lib에 추가 하고, src에 com패키지를 추가 한것을 기억
하실 껍니다..
이 두녀석이 서버의 특정 루트에 파일을 업로드 하게끔 해주는 녀석 입니다..^^
그냥 디폴트로 사용한다면 컨텍스트 아래에 UserFile이라는 이름으로 폴더가 생성 됩니다..
업로드 제한 사이즈 또한 디폴트 용량이 1M안쪽인것 같습니다....
실제 디폴트 용량이 얼마 인지는 저두 확실히 파악하지는 못했습니다....
암튼 수정을 가하지 않고 쓸려니 파일 용량에서 걸리더군요..^^

com패키지 안을 열어 보시면 ConnectorServlet.java파일이 있습니다..
이녀석이 이미지를 업로드 할때 FCKeditor의 frmupload.html에서 녀석을 불러들이고,
ConnectorServlet.java파일 에서는 commons-fileupload.jar파일에 들어 있는 FileItem클래스를
이용하여 파일을 업로드 하게 됩니다..

**** 주의 ****
파일 업로드시 현재 자신이 사용하고 잇는 인코딩 방식을 잘 채크 하고 잇어야 합니다..
사용하는 인토딩 방식에 따라 한글파일 일 경우 파일명이 깨지는 현상이 발생 하기 때문입니다.
****************************************************************************************

ConnectorServlet.java파일에는 몇개의 함수가 존재 하는데..
함수에 대해 잠시 알아 보죠..
init();
서블릿이 구동될때 실행 됩니다.
web.xml에서 폴더명을 가지고 와서 컨택스트폴더 아래에 파일이 업로드될 폴더를 만듭니다.
web.xml에서 폴더명을 얻지 못하였다면 디폴트로 정의된 UserFile이라는 폴더를 생성 합니다.

doGet(HttpServletRequest request, HttpServletResponse response);
UserFile폴더에 들어 잇는 파일명을 읽어 옵니다..
이미지 설정 다이얼로그에서 서버 보기버튼을 누를 때 (browser.html)이 실행되면서 호출 됩니다.
한글 파일의 경우 인코딩 주의

doPost(HttpServletRequest request, HttpServletResponse response);
FCKeditor에서 서버에 전송할때 실제 업로드를 하는 함수 입니다.
이 함수에서 파일 업로드 최대 사이즈 업로드 버퍼 용량등을 조절 가능 합니다.
frmupload.html에서 파일을 선택후 업로드 버튼을 누를때 실행 됩니다.
한글파일의경우 인코딩 주의

getFolders(File dir,Node root,Document doc);
폴더명을 읽어 옵니다.

getFiles(File dir,Node root,Document doc);
파일명을 읽어옵니다.


web.xml을 수정 하고 나면
컨텍스트에 맞게끔 경로 수정이 필요 합니다...

fckconfig.js에서  파일 업로드 경로를 설정 할수있습니다..

web.xml 의
<servlet-mapping>
<servlet-name>Connector</servlet-name>
<url-pattern>/editor/filemanager/browser/default/connectors/jsp/connector</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SimpleUploader</servlet-name>
<url-pattern>/editor/filemanager/upload/simpleuploader</url-pattern>
</servlet-mapping>  

위 url-pattern 경로대로 Connector 부분과 UploadURL 을 현재 경로를 재구성해도 되지만
경로를 저리 길게 잡을 필요는 없어서 저는 아래와 같이 xml을 수정 하였습니다

<servlet-mapping>
<servlet-name>Connector</servlet-name>
<url-pattern>/connector</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SimpleUploader</servlet-name>
<url-pattern>/simpleuploader</url-pattern>
</servlet-mapping>  

그리고는 fckconfig.js에서 url설정 부분을 아래와 같이 변경 합니다...

FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=/danpum/connector' ;

FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=/danpum/connector' ;

FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=/danpum/connector' ;

FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'simpleuploader?Type=File' ;

FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'simpleuploader?Type=Image' ;

FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'simpleuploader?Type=Flash';


그러면 이미지 업로드 설정은 끝이 납니다,....^^
위와 같이 설정 하면, UserFile이라는 폴더가 컨택스트 폴더 아래에  생성 되고 ,
UserFile/image라는 폴더가 생성 되어 image폴더 안에 파일을 업로드 할수 있습니다.  

설치방법 2

[원문]http://pskppoppo.egloos.com/2771426

현재 개발환경은 eclipse 3.5, jdk 1.6, Tomcat 6.0 버전대이다.

기존 개발시 사용하던 FCKeditor_2.3.2 버전과 세팅방법이 확연히 다르다.

우선 아래의 파일두개를 다운로드한다.

FCKeditor_2.6.5.zip 이건 2.6버전 압축파일, fckeditor-java-demo-2.5.war 이건 필요한 라이브러리들이있는 데모 war 파일

우선 FCKeditor_2.6.5 압축을 푼다.
































기존 2.3버전대랑 디렉토리 구조가 다르다. 2.3버전대에서는 바로 /editor/fckeditor.html 이 존재했지만, 2.6버전대에서는 /fckeditor/editor/fckeditor.html 로 서로 경로가 달랐다.

그리고 2.3버전대에서는 Tomcat 디렉토리안에 압축을 푼후 server.xml 에 아래와 같이 context를 잡아주면 되었다.
<Context docBase="D:/dev/was/apache-tomcat-6.0.16/webapps/FCKeditor_2.3.2" path="/FCKeditor" reloadable="true"/>

이러면 jsp안에서 <%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="FCK" %> 이런식으로 선언을 하고 쓸수 있었다.

문제는 2.6버전 일단 2.6버전의 압축파일을 풀어보면 알겠지만 WEB-INF 디렉토리가 없다. 다시말하면 배포된 파일이 아니란 사실이다.

우선 2.6버전을 압축을 풀고 fckeditor 디렉토리를 WebContent 로 복사한다.



































그러면 위와같은 구조가 되겠지? 그런다음 위에있는 fckeditor-java-demo-2.5.war 파일의 압축을 풀어 WEB-INF/lib 폴더에 들어가 아래 파일들을 모두 복사한다.
commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
imageinfo-1.9.jar
java-core-2.5.jar
slf4j-api-1.5.8.jar
slf4j-simple-1.5.8.jar

그리고 Tomcat 설치경로 lib 폴더에 붙여넣는다.

다음으로 src 디렉토리에 fckeditor.properties 파일을 만들어 줘야한다.



































fckeditor.properties

그리고 WebContent/WEB-INF/web.xml 에 FCKeditor 부분을 추가해줘야한다.
<display-name>FCKeditor</display-name>
<description>FCKeditor</description>

    <servlet>
        <servlet-name>
ConnectorServlet</servlet-name>
        <servlet-class>net.fckeditor.connector.ConnectorServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>
ConnectorServlet</servlet-name>
   <!-- Do not wrap this line otherwise Glassfish will fail to load this file -->
        <url-pattern>/fckeditor/editor/filemanager/connectors/*</url-pattern>
   </servlet-mapping>

솔까 위에 주석부분은 뭘 뜻하는지 정확히 모르겠음. 이제 완료되었으면 사용할 jsp 단에서 tablib 부분을 선언해줘야한다.

기존 <%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="FCK" %> 이렇게 된것을
 
이렇게 말이다. <%@ taglib prefix="FCK" uri="http://java.fckeditor.net" %>

이렇게 하면 Tomcat의 server.xml 에서 설정했던 FCKeditor 관련 Context는 필요가 없어진다.




2010/02/18 18:50 2010/02/18 18:50
Posted
Filed under JSP, JAVA

n order to specify the scope, you preceed your variable with the scope
type.  Therefore for a request-scope variable, the variable would be :
"requestScope.variable".  There are several scope types:

  pageScope
  requestScope
  sessionScope
  applicationScope

Additionally, when you have multiple c:if tags that test different
conditions of the same variable, I would suggest rewriting the block as
follows:

<c:choose>
  <c:when test="${requestScope.mode=='a'}">
    first thing
  </c:when>
  <c:when test="${requestScope.mode=='b'}">
    second thing
  </c:when>
  <c:otherwise>
    a catch all section
  </c:otherwise>
</c:choose>

Consider the above more like a switch or if/elseif combo rather than
multiple if statements.

2010/02/18 13:49 2010/02/18 13:49