How to customize the flash Webviewer? Especially , I want to disable the textselection button

First, please read carefully the README_FIRST.txt file that is included with the download.

You listed some error messages, such as…

D:\FlashWebViewerSDK\Samples\ReaderControl\src\com\pdftron\webviewer\ThumbnailItem.as(30): col: 40 Error: Type was not found or was not a compile-time constant: DocumentViewer.
public function ThumbnailItem(viewer:DocumentViewer, page:uint, width:Number, height:Number)

It looks like you’re not including the WebViewer.swc file (located in Samples\ReaderControl\lib folder).

Your project then includes the ReaderControl.swc generated by the ReaderControl project (loacted in Samples\ReaderControl\bin folder).

If you’re using FlashBuilder, then these instructions work fine for us.

  1. Extract to FlashWebViewerSDK folder

  2. Open Flash Builder

  3. Switch to new workspace and set to the directory where FlashWebViewerSDK was extracted

  4. Select File → “Import Flash Builder Project…”

  5. Select “Project Folder:” radio button

  6. Browse to “Samples\ReaderControl”

  7. Select Finish.

  8. Repeat steps 4-7 but for “Samples\WebViewerDemo”

  9. Copy output of “Samples\WebViewerDemo\bin-debug” to your server. For example “c:\www_root\webviewer”

  10. Load webpage “http://localhost/webviewer/WebViewer.html” in your browser.

As for customization, all source code that we provide is already included. See “Samples\ReaderControl\src\com\pdftron\webviewer\ReaderControl.mxml” as your starting point. Everything you want to change is there, or can be found from there. Also the documentation folder shows the API that ReaderControl uses.