FlashTextEditor.popUp

Availability

Flash Player 6

Usage

listenerObject = new Object();
listenerObject.popUp = function( eventObject ){
	// insert your code here 

}
myTextEditor.addEventListener("popUp", listenerObject )

Description

Event; broadcast to all registered listeners when Flash Text Editor dialog window is intialized.

Use it to change appearence of the dialog windows. The properties of the event object are:

type - always "popUp"

control - possible values are: "image", "url", "specialChars", "paragraph", "browse", "find", "replace" and "alert"

target - reference to the content of the pop up window

Too see instance names of the content in dialog window roll over it.

Example

The following code handles the popUp event:

popUpListener = new Object(); 
popUpListener.popUp = function( eo:Object ){
	switch (eo.control) {
case "browse": trace("Browse dialog is initialized!"); break;
case "image": // this will disable browse button in the image dialog window eo.target.browse_btn.enabled = false; break;
default: break; } myTextEditor.addEventListener("popUp", popUpListener);

To change FileUpload component preferences in Browse dialog window:

FileUpload component inherits from the UIComponent class.
You can add event listener to FileUpload component to handle the events of the FileReference object.

Example

popUpListener = new Object();
uploadListener = new Object(); popUpListener.popUp = function( eo:Object ){ switch (eo.control) {
case "browse": eo.target.fileUpload.addListener(uploadListener); break;
default: break; } myTextEditor.addEventListener("popUp", popUpListener);

See on LiveDocs

addListener (FileReference.addListener method)

To change FileViewer component preferences in Browse dialog window:

FileViewer component inherits from the UIComponent class.
You can change if component will maintain image aspect ratio.

Example

popUpListener = new Object();
popUpListener.popUp = function( eo:Object ){
	switch (eo.control) {
case "browse": eo.target.fileViewer.aspectRatio = false; break;
default: break; } myTextEditor.addEventListener("popUp", popUpListener);

To change FileBrowser component preferences in Browse dialog window:

FileBrowser component inherits from the UIComponent class.
There is one public method of the FileBrowser component:
FileBrowser.setProperties(serverPath:String, xmlFile:String, extensionFilter:Array, folderFilter:Array);

Example

popUpListener = new Object();
popUpListener.popUp = function( eo:Object ){
	switch (eo.control) {
case "browse": eo.target.fileBrowser.setProperties("http://example.com/FileBrowser/", "xmlbrowse.php", ["jpg","jpeg","swf","gif","png"], ["thumbs"]); break;
default: break; } myTextEditor.addEventListener("popUp", popUpListener);