SQLiteMembershipProvider

发布于:
Microsoft.Net

本来打算写个SQLiteMembershipProvider,包括SQLiteRolesProvider,但是写到差不多完成打算放弃。。改用SqlServer..这个东西放在这里存档。写的时候参考了网上很多定法,虽基本功能是可以使用咯。但是没有系统优化整理,网上收集+自己写的七拼八凑的。。本来打算写个SQLiteMembershipProvider,但是写到差不多完成打算放弃。。改用SqlServer..这个东西放在这里存档。基本功能是可以使用咯。没有优化整理而已。

Windows Server 2003/2008上安装Windows Live Wave 3

发布于:
服务器技术

  最近安装 Windows Live Wave 3 时出错,提示无法安装程序:os_check: 0×80280004。原来是由于工作的电脑安装的 OS 是 Windows Server 2003,Wave 3 在安装之前会检查系统,对于 Windows Server 2003 或 Windows Server 2008 之类的 Server OS 并不支持。

  因此需要对安装文件 hack 一下,这里需要用到工具 Resource Hacker,Resource Hacker 可以修改32位的 Windows 可执行文件,非常好用的一款免费工具。

  使用 Resource Hacker 打开下载的 wlsetup-all.exe,打开左侧目录 CONFIG -> CONFIG0 -> 0,找到文件中如下 XML 代码:

<os productType="workstation"/>

把其中的 workstation 替换为 Server 即可。

jQuery.Syntax(优秀的语法着色器,代码高亮)

发布于:
Script

jQuery.Syntax 是一个依赖JQuery的超级快和轻量级的语法着色器,可动态加载语法源文件并通过css对代码进行格式化显示

// -*- mode: javascript; -*-

var foo = function () {
	alert("Hello World");
}

for (var i = 0; i < 100; i += 1) {
	foo();
}

jQuery.Syntax还支持内联的语法高亮。比如:@x = y + 10 (Ruby) 和<img src="logo.png" /> (HTML)等等!

项目主页: http://www.oriontransfer.co.nz/software/jquery-syntax/index.en

文档

  jQuery.Syntax 可以直接安装到你的网站目录, 或者作为某些开源内容管理系统的插件.

  支持的语言与示例 [布局示例]
  安装说明 [高级设置]
  如何设置行模式
  怎样为 jQuery.Syntax项目作贡献

兼容性

  jQuery.Syntax已经开发时充分考虑了兼容性,并支持广泛的网络浏览器。我们一直在测试新的浏览器,如果在您的浏览器显示不正常,请告诉我们。

浏览器 支持版本 备注
Firefox 2+ 完全支持.
Safari 3+ 完全支持.
Opera 9+ 完全支持.
Internet Exploder 6+ 在IE6下仍有少量未知错误.

今天使用 BlogEngine.NET

发布于:
服务器技术

BlogEngine.NET博客系统V1.6

  拥有非常好的分层架构,原生态支持xml作为数据库,也可采用MySQL,SQLite,VistaDB,SQLServer作为数据库,是学习asp.net非常难得的开源系统。

新功能 :

  扩展管理器,可以禁用扩展或改变扩展的设置
  Windows Live Writer发帖支持
  专门为移动设备输出到小屏幕提供支持
  改进的用户和角色管理
  非管理员用户只能编辑和删除自己的文章
  该博客导入工具现在支持blogml、RSS和Atom
  精细控制trackbacks和pingbacks
  使用属性实现用户控件注入
  文章中显示相关内容功能
  新的导航链接添加到文章顶部
  发表评论时发送更丰富的EMIAL信息
  瞬息万变的IT世界,blogengine.net实现全面的MONO支持

  把以前用的 Bitrac,也不是不好,只��闲来无聊,折腾!!下了一个1.6.2.3,官方发布最新是1.6.1,我下了个最新测试版本,非常新,看了一会,于是在月黑风高的2点钟把数据导过来了,换了编辑器。还没有做代码高亮。还准备改一下附件管理,因为附件还没处理,而且我想把附件记录写入数据库,应该还要花些时间折腾吧,呵呵,夜已深,明天再折腾!!

  总的感觉不错的。哈哈。主要是外国人写的程序感觉新颖。崇洋媚一下外。。哈哈

服务器响应HTTP的类型ContentType大全

发布于:
服务器技术

ContentType 属性指定服务器响应的 HTTP 内容类型。如果未指定 ContentType,默认为 text/html。

在asp.net中使用它:

".*"="application/octet-stream"
".001"="application/x-001"
".301"="application/x-301"
".323"="text/h323"
".906"="application/x-906"
".907"="drawing/907"
".a11"="application/x-a11"
".acp"="audio/x-mei-aac"
".ai"="application/postscript"
".aif"="audio/aiff"
".aifc"="audio/aiff"
".aiff"="audio/aiff"
".anv"="application/x-anv"
".asa"="text/asa"
".asf"="video/x-ms-asf"
".asp"="text/asp"
".asx"="video/x-ms-asf"
".au"="audio/basic"
".avi"="video/avi"
".awf"="application/vnd.adobe.workflow"
".biz"="text/xml"
".bmp"="application/x-bmp"
".bot"="application/x-bot"
".c4t"="application/x-c4t"
".c90"="application/x-c90"
".cal"="application/x-cals"
".cat"="application/vnd.ms-pki.seccat"
".cdf"="application/x-netcdf"
".cdr"="application/x-cdr"
".cel"="application/x-cel"
".cer"="application/x-x509-ca-cert"
".cg4"="application/x-g4"
".cgm"="application/x-cgm"
".cit"="application/x-cit"
".class"="java/*"
".cml"="text/xml"
".cmp"="application/x-cmp"
".cmx"="application/x-cmx"
".cot"="application/x-cot"
".crl"="application/pkix-crl"
".crt"="application/x-x509-ca-cert"
".csi"="application/x-csi"
".css"="text/css"
".cut"="application/x-cut"
".dbf"="application/x-dbf"
".dbm"="application/x-dbm"
".dbx"="application/x-dbx"
".dcd"="text/xml"
".dcx"="application/x-dcx"
".der"="application/x-x509-ca-cert"
".dgn"="application/x-dgn"
".dib"="application/x-dib"
".dll"="application/x-msdownload"
".doc"="application/msword"
".dot"="application/msword"
".drw"="application/x-drw"
".dtd"="text/xml"
".dwf"="Model/vnd.dwf"
".dwf"="application/x-dwf"
".dwg"="application/x-dwg"
".dxb"="application/x-dxb"
".dxf"="application/x-dxf"
".edn"="application/vnd.adobe.edn"
".emf"="application/x-emf"
".eml"="message/rfc822"
".ent"="text/xml"
".epi"="application/x-epi"
".eps"="application/x-ps"
".eps"="application/postscript"
".etd"="application/x-ebx"
".exe"="application/x-msdownload"
".fax"="image/fax"
".fdf"="application/vnd.fdf"
".fif"="application/fractals"
".fo"="text/xml"
".frm"="application/x-frm"
".g4"="application/x-g4"
".gbr"="application/x-gbr"
".gcd"="application/x-gcd"
".gif"="image/gif"
".gl2"="application/x-gl2"
".gp4"="application/x-gp4"
".hgl"="application/x-hgl"
".hmr"="application/x-hmr"
".hpg"="application/x-hpgl"
".hpl"="application/x-hpl"
".hqx"="application/mac-binhex40"
".hrf"="application/x-hrf"
".hta"="application/hta"
".htc"="text/x-component"
".htm"="text/html"
".html"="text/html"
".htt"="text/webviewhtml"
".htx"="text/html"
".icb"="application/x-icb"
".ico"="image/x-icon"
".ico"="application/x-ico"
".iff"="application/x-iff"
".ig4"="application/x-g4"
".igs"="application/x-igs"
".iii"="application/x-iphone"
".img"="application/x-img"
".ins"="application/x-internet-signup"
".isp"="application/x-internet-signup"
".IVF"="video/x-ivf"
".java"="java/*"
".jfif"="image/jpeg"
".jpe"="image/jpeg"
".jpe"="application/x-jpe"
".jpeg"="image/jpeg"
".jpg"="image/jpeg"
".jpg"="application/x-jpg"
".js"="application/x-javascript"
".jsp"="text/html"
".la1"="audio/x-liquid-file"
".lar"="application/x-laplayer-reg"
".latex"="application/x-latex"
".lavs"="audio/x-liquid-secure"
".lbm"="application/x-lbm"
".lmsff"="audio/x-la-lms"
".ls"="application/x-javascript"
".ltr"="application/x-ltr"
".m1v"="video/x-mpeg"
".m2v"="video/x-mpeg"
".m3u"="audio/mpegurl"
".m4e"="video/mpeg4"
".mac"="application/x-mac"
".man"="application/x-troff-man"
".math"="text/xml"
".mdb"="application/msaccess"
".mdb"="application/x-mdb"
".mfp"="application/x-shockwave-flash"
".mht"="message/rfc822"
".mhtml"="message/rfc822"
".mi"="application/x-mi"
".mid"="audio/mid"
".midi"="audio/mid"
".mil"="application/x-mil"
".mml"="text/xml"
".mnd"="audio/x-musicnet-download"
".mns"="audio/x-musicnet-stream"
".mocha"="application/x-javascript"
".movie"="video/x-sgi-movie"
".mp1"="audio/mp1"
".mp2"="audio/mp2"
".mp2v"="video/mpeg"
".mp3"="audio/mp3"
".mp4"="video/mpeg4"
".mpa"="video/x-mpg"
".mpd"="application/vnd.ms-project"
".mpe"="video/x-mpeg"
".mpeg"="video/mpg"
".mpg"="video/mpg"
".mpga"="audio/rn-mpeg"
".mpp"="application/vnd.ms-project"
".mps"="video/x-mpeg"
".mpt"="application/vnd.ms-project"
".mpv"="video/mpg"
".mpv2"="video/mpeg"
".mpw"="application/vnd.ms-project"
".mpx"="application/vnd.ms-project"
".mtx"="text/xml"
".mxp"="application/x-mmxp"
".net"="image/pnetvue"
".nrf"="application/x-nrf"
".nws"="message/rfc822"
".odc"="text/x-ms-odc"
".out"="application/x-out"
".p10"="application/pkcs10"
".p12"="application/x-pkcs12"
".p7b"="application/x-pkcs7-certificates"
".p7c"="application/pkcs7-mime"
".p7m"="application/pkcs7-mime"
".p7r"="application/x-pkcs7-certreqresp"
".p7s"="application/pkcs7-signature"
".pc5"="application/x-pc5"
".pci"="application/x-pci"
".pcl"="application/x-pcl"
".pcx"="application/x-pcx"
".pdf"="application/pdf"
".pdf"="application/pdf"
".pdx"="application/vnd.adobe.pdx"
".pfx"="application/x-pkcs12"
".pgl"="application/x-pgl"
".pic"="application/x-pic"
".pko"="application/vnd.ms-pki.pko"
".pl"="application/x-perl"
".plg"="text/html"
".pls"="audio/scpls"
".plt"="application/x-plt"
".png"="image/png"
".png"="application/x-png"
".pot"="application/vnd.ms-powerpoint"
".ppa"="application/vnd.ms-powerpoint"
".ppm"="application/x-ppm"
".pps"="application/vnd.ms-powerpoint"
".ppt"="application/vnd.ms-powerpoint"
".ppt"="application/x-ppt"
".pr"="application/x-pr"
".prf"="application/pics-rules"
".prn"="application/x-prn"
".prt"="application/x-prt"
".ps"="application/x-ps"
".ps"="application/postscript"
".ptn"="application/x-ptn"
".pwz"="application/vnd.ms-powerpoint"
".r3t"="text/vnd.rn-realtext3d"
".ra"="audio/vnd.rn-realaudio"
".ram"="audio/x-pn-realaudio"
".ras"="application/x-ras"
".rat"="application/rat-file"
".rdf"="text/xml"
".rec"="application/vnd.rn-recording"
".red"="application/x-red"
".rgb"="application/x-rgb"
".rjs"="application/vnd.rn-realsystem-rjs"
".rjt"="application/vnd.rn-realsystem-rjt"
".rlc"="application/x-rlc"
".rle"="application/x-rle"
".rm"="application/vnd.rn-realmedia"
".rmf"="application/vnd.adobe.rmf"
".rmi"="audio/mid"
".rmj"="application/vnd.rn-realsystem-rmj"
".rmm"="audio/x-pn-realaudio"
".rmp"="application/vnd.rn-rn_music_package"
".rms"="application/vnd.rn-realmedia-secure"
".rmvb"="application/vnd.rn-realmedia-vbr"
".rmx"="application/vnd.rn-realsystem-rmx"
".rnx"="application/vnd.rn-realplayer"
".rp"="image/vnd.rn-realpix"
".rpm"="audio/x-pn-realaudio-plugin"
".rsml"="application/vnd.rn-rsml"
".rt"="text/vnd.rn-realtext"
".rtf"="application/msword"
".rtf"="application/x-rtf"
".rv"="video/vnd.rn-realvideo"
".sam"="application/x-sam"
".sat"="application/x-sat"
".sdp"="application/sdp"
".sdw"="application/x-sdw"
".sit"="application/x-stuffit"
".slb"="application/x-slb"
".sld"="application/x-sld"
".slk"="drawing/x-slk"
".smi"="application/smil"
".smil"="application/smil"
".smk"="application/x-smk"
".snd"="audio/basic"
".sol"="text/plain"
".sor"="text/plain"
".spc"="application/x-pkcs7-certificates"
".spl"="application/futuresplash"
".spp"="text/xml"
".ssm"="application/streamingmedia"
".sst"="application/vnd.ms-pki.certstore"
".stl"="application/vnd.ms-pki.stl"
".stm"="text/html"
".sty"="application/x-sty"
".svg"="text/xml"
".swf"="application/x-shockwave-flash"
".tdf"="application/x-tdf"
".tg4"="application/x-tg4"
".tga"="application/x-tga"
".tif"="image/tiff"
".tif"="application/x-tif"
".tiff"="image/tiff"
".tld"="text/xml"
".top"="drawing/x-top"
".torrent"="application/x-bittorrent"
".tsd"="text/xml"
".txt"="text/plain"
".uin"="application/x-icq"
".uls"="text/iuls"
".vcf"="text/x-vcard"
".vda"="application/x-vda"
".vdx"="application/vnd.visio"
".vml"="text/xml"
".vpg"="application/x-vpeg005"
".vsd"="application/vnd.visio"
".vsd"="application/x-vsd"
".vss"="application/vnd.visio"
".vst"="application/vnd.visio"
".vst"="application/x-vst"
".vsw"="application/vnd.visio"
".vsx"="application/vnd.visio"
".vtx"="application/vnd.visio"
".vxml"="text/xml"
".wav"="audio/wav"
".wax"="audio/x-ms-wax"
".wb1"="application/x-wb1"
".wb2"="application/x-wb2"
".wb3"="application/x-wb3"
".wbmp"="image/vnd.wap.wbmp"
".wiz"="application/msword"
".wk3"="application/x-wk3"
".wk4"="application/x-wk4"
".wkq"="application/x-wkq"
".wks"="application/x-wks"
".wm"="video/x-ms-wm"
".wma"="audio/x-ms-wma"
".wmd"="application/x-ms-wmd"
".wmf"="application/x-wmf"
".wml"="text/vnd.wap.wml"
".wmv"="video/x-ms-wmv"
".wmx"="video/x-ms-wmx"
".wmz"="application/x-ms-wmz"
".wp6"="application/x-wp6"
".wpd"="application/x-wpd"
".wpg"="application/x-wpg"
".wpl"="application/vnd.ms-wpl"
".wq1"="application/x-wq1"
".wr1"="application/x-wr1"
".wri"="application/x-wri"
".wrk"="application/x-wrk"
".ws"="application/x-ws"
".ws2"="application/x-ws"
".wsc"="text/scriptlet"
".wsdl"="text/xml"
".wvx"="video/x-ms-wvx"
".xdp"="application/vnd.adobe.xdp"
".xdr"="text/xml"
".xfd"="application/vnd.adobe.xfd"
".xfdf"="application/vnd.adobe.xfdf"
".xhtml"="text/html"
".xls"="application/vnd.ms-excel"
".xls"="application/x-xls"
".xlw"="application/x-xlw"
".xml"="text/xml"
".xpl"="audio/scpls"
".xq"="text/xml"
".xql"="text/xml"
".xquery"="text/xml"
".xsd"="text/xml"
".xsl"="text/xml"
".xslt"="text/xml"
".xwd"="application/x-xwd"
".x_b"="application/x-x_b"
".x_t"="application/x-x_t"

五款最好的免费网页嵌入聊天窗口

发布于:
Script

  现在随着虚拟主机租赁的价钱降低,越来越多的朋友有了自己的站点,自己的blog,自己的空间。blog上的访客交互是一个非常重要的环节,因此我们需要一款好的站内聊天程序,来使站长能更好更方便的与来访的朋友交流,也是在线的访客能够互相沟通,最大限度的使访客停留在您的站点甚至在您的blog注册能为会员。下面介绍五个目前最好的blog嵌入聊天服务,这五个我进行了一一测试,由于我更关注界面的协调性,所以我选择了Chatango,请看我blog首页右侧聊天窗,Chatago的几乎完美,唯一的遗憾是不支持中文,对中文用户是致命的弱点,不在乎界面协调性的用户,我推荐Gabbly,Gabbly除了界面无法自定制的缺点以外也几近完美,只是功能上没有Chatango全面。请阅读每个服务较详细的介绍:

1、Gabbly:http://home.gabbly.com/index.jsp?l=zh&c=cn#(游客即时进入在线列表,有在线用户列表)

  简介:

  首先登录网站(http://www.gabbly.com),随后点击“嵌入网页”按钮以获取有关的搭建代码。

  此时根据提示直接在“希望添加Gabbly(盖不理)的网址”处输入需要嵌入Gabbly服务代码的网站地址,随后再根据你的实际需要,输入Gabbly聊天窗口在页面上显示的宽度和高度。完成之后点击“生成代码”按钮,你就能在下面的文本框看到生成的HTML代码。

  该代码放入你的网页中,完成代码输入后在你的页面上就能看到盖不理聊天窗口了(如图)。今后你的Blog来访者就可以聚在那里一起聊天了。

2、Chatango:http://chatango.com/home(界面可定制,管理员可定制头像,可看到发言者的IP。不支持中文收入,对firefox的兼容不佳。发言需选匿名还是注册,显示在线人数,无在线列表)

简介:

  提供嵌入网页实时聊天小窗口。

  将Chatango聊天窗口放到任意网页中,访问者可以不离开网页与你进行对话。

  搜寻其它在线的Chatango用户,与他们进行实时聊天。按照网站的说法,可以替你自动搜寻与你有相似爱好的用户。

  系统提供给一个网址:http://kojiyang.chatango.com. 其它人登陆后会弹出聊天窗口,不需注册或下载任何插件,即可与你进行对话。

  Chatango还提供了一个Windows Application,不用登陆网站,在任务栏的小图标进行相关操作。

  界面又是做得相当漂亮。让人忍不住就想每个页面都去看一眼。

3、Meebo:http://wwwl.meebo.com/index-zh-CN.html(支持MSN,YAHOO,GOOGLE等IM,无在线用户列表)

简介:

  meebo是一家名不见经传的小软件公司,上周三该公司推出了在网页上建立通讯频道的新解决方案,也就是说,访客可通过通讯频道中的IM(即时通讯)工具与个人主页的主人随时进行交流,该频道囊括了时下几乎所有的IM工具,用户不需要一个个安装IM工具的客户端软件,在任何一台联网电脑上打开网页即可进行交流。

4、Woocall:http://woocall.sina.com.cn/(速度不错,界面较粗糙)

简介:

  Woocall的嵌入代码可以放在您网页源代码中的任何位置,但我们仍建议您将代码放在源代码底部的之前,尽大可能地避免和您网页中可能存在的其他代码冲突。以下我们将详细介绍如何部署Woocall。

  1.用网页编辑器打开您即将部署woocall的网页,查看该网页的源代码,在此,以dreamweaver为例。

  2.在dreamweaver的代码显示模式中,我们可以看到网页的源代码。把代码窗口的滚动条往下拉,在代码的最底部,找到标志。

  3.要想在您的网页中嵌入woocall,您必须在这里嵌入Woocall的嵌入代码。请拷贝您获得的Woocall的嵌入代码,并粘贴到前面。

  4.最后,上传更新您修改后的网页,您就会在浏览器中发现,您的网页上出现了woocall的身影。

  5.如果根据上面的操作完成woocall却没有出现,那么请联络我们。

5、Vqq:http://www.vqq.com/free_chatroom.html(界面清爽,载入慢,不支持IE7)

简介:

  1、页面编码:目前涉及到两种编码,GB2312、UTF8。

  如果你的网站用了其他的编码,请及时与我们联系。查看你网站编码:首先打开你的网站,选择菜单“查看=》源文件,在打开的文本文件里查找‘charset’”。

  2、显示位置:

  现在涉及网页4个角。左上、右上、左下、右下。如果你想聊天窗口居正中,只需把申请得到的代码稍微改动。place=RB或RT改为place=center。

  3、自动打开:

  选择否,访问你页面的时候,只显示开始聊天的标志图片。这个图片我们提供了一些,同时也可以自定义(需要完整http地址)。

  选择是,访问你页面的时候,立即打开聊天窗口。如果需要打开之后若干时间后再自动打开聊天窗口,可选择延时选项。如果时间选项不在你需要的范围,也可以直接修改所申请代码。isTime=N,N为数字。此时仍然可以选择风格图片、自定义图片。

  4、自定义宽和高:设置第一次打开聊天窗口的宽和高

  5、为站内每个页面设置一个房间:

  选择否,房间标题处显示申请代码时所填写的聊天室名字;选择是,房间标题处会显示当前页面的标题(document.title)。

  除了以上推荐的五个之外,还有很多其他的免费嵌入聊天服务,其中应该首推Geesee,我没有在上面推荐它是因为,Geesee聊天窗最小定制宽度是470,无法将其嵌入blog的侧边栏,还有一起其他的网站免费嵌入聊天服务我就不一一陈述了,希望网友有好的发现能及时在这里回复推荐给我,谢谢大家。

文章来源:Oscar's 牛牛的百度空间

FlashPaper 2.0 ActionScript API

发布于:
Script

FlashPaper 2.0 文件公开一个根级别的方法

 
  1. 		function getIFlashPaper():FlashPaper.IFlashPaper; 

这将返回一个对象,实现IFlashPaper接口。如果该方法没有定义,显然这个SWF文件不是Flashpaper的2.0文件。如果这个方法存在,并返回 null 或者 undefined,说明他是的Flashpaper的2.0文件但是没有完全加载,所以访问不了API,所以你必须等它完全加载。更多的信息请访问Loading FlashPaper 2.0 documents into Flash.

The IFlashPaper 的接口 ActionScript 2.0 如下:

		interface FlashPaper.IFlashPaper  
		{  
		  function addListener(listener:Object):Void;  
		  function removeListener(listener:Object):Void;  
		  function getViewerType():String;  
		  function getViewerVersion():Number;  
		  function getCurrentPage():Number;  
		  function setCurrentPage(pageNumber:Number):Void;  
		  function getNumberOfPages():Number;  
		  function getLoadedPages():Number;  
		  function showUIElement(part:String, flag:Boolean):Void;  
		  function printTheDocument():Boolean;  
		  function setCurrentZoom(percent:Object):Void;  
		  function getCurrentZoom():Number;  
		  function setSize(w:Number, h:Number):Boolean;  
		  function goToLinkTarget(linktarget:String, window:Object):Void;  
		  function enableScrolling(flag:Boolean):Boolean  
		  function getCurrentTool():String;  
		  function setCurrentTool(tool:String):Boolean;  
		  function getTextSelectionRange():FlashPaper.SelectionRange;  
		      function setTextSelectionRange(sel:FlashPaper.SelectionRange,  
		                        skipBroadcast:Boolean):Void;  
		  function getSelectedText():String;  
		  function getSidebarWidth():Number;  
		  function setSidebarWidth(w:Number):Void;  
		  function getFindText():String;  
		  function setFindText(s:String):Void;  
		  function findNext():Boolean;  
		  function getVisibleArea():Object;  
		  function setVisibleArea(area:Object, skipBroadcast:Boolean):Void;  
		}; 

这是一个方法–让我们看每一段。

IFlashPaper接口支持下列功能: 

addListener(listener:Object):Void;添加或删除各种事件的侦听器。您的听众可以得到以下活动:

onPageChanged(newPageNumber:Number):Void; 当前页(如工具栏)发生改变时的事件.

onZoomChanged(percent:Number):Void;当前缩放级别(在工具栏上操作)发生变化时的事件。

onSelection():Void; Broadcast when the current text selection in the document changes. (For efficiency, the new selection is not passed as an argument; you should call getTextSelectionRange() to get the new selection.)

onToolChanged(newTool:String):Void; Broadcast when the currently active tool (as displayed in the toolbar) changes.

onEnableScrolling(enable:Boolean):Void; Broadcast when scrolling is enabled or disabled, typically by a call to enableScrolling().

onVisibleAreaChanged():Void; Broadcast when any aspect of the visible area of the document changes, including zoom level and scroll position.

Other events might be broadcast, but those events might not be in future versions of FlashPaper. You should not rely on undocumented events broadcast by this mechanism.

removeListener(listener:Object):Void; Removes a listener added by addListener(). If the given object is not a listener for this FlashPaper document, the call does nothing.

getViewerType():String; Returns a string describing the type of user interface that is included in the document. The standard Macromedia FlashPaper viewer always returns the string Macromedia FlashPaper Default Viewer.

getViewerVersion():Number; Returns an integer indicating the version of the user interface code in this particular document. The returned integers are arbitrary and not necessarily consecutive, but larger numbers indicate recent revisions to the viewer, and might indicate bug fixes or enhanced functionality. FlashPaper 2.01 shipped with a viewer version number of 218.

getCurrentPage():Number; Returns the current page number (as displayed in the toolbar). The first page is page 1.

setCurrentPage(pageNumber:Number):Void; Sets the current page. The view scrolls as necessary to ensure the page is visible, but does not adjust zoom.

getNumberOfPages():Number; Returns the total number of pages in the document.

Note: All of the pages may not be able to be displayed yet, depending on the connection speed.

getLoadedPages():Number; Returns the total number of pages loaded (and able to be displayed) so far. This value must be between zero and getNumberOfPages(), inclusive. When getLoadedPages() == getNumberOfPages(), the document is fully loaded.

showUIElement(part:String, flag:Boolean):Void; 隐藏或显示文档中的Flashpaper的用户界面的一部分。当前支持,为部分案例敏感值如下:

“PrevNext” The Previous Page and Next Page toolbar buttons are hidden or shown.

Note: 如果这些按钮被隐藏,当前页的文本框被禁用,但不隐藏.

“Print” The Print toolbar button is hidden or shown.

“Tool” All tool selection buttons on the toolbar are hidden or shown.

“Zoom” All zoom-related controls on the toolbar are hidden or shown.

“Find” All text-search-related controls on the toolbar are hidden or shown.

“Pop” The Open Document in New Browser Window toolbar button is hidden or shown.

“Sidebar” The sidebar (displaying the document outline) is hidden or shown.

Note: 如果该文件没有大纲,它将被省略,因为没有从侧边栏显示的内容。

“Page” The Current Page and Number of Pages fields in the toolbar are hidden or shown.

“Overflow” The Overflow menu on the toolbar is hidden or shown.

Note: This menu appears only when the toolbar is too narrow to display all controls; you cannot use this call to force the Overflow menu to be visible.

“ZoomKeys” This value doesn’t affect the user interface; it is used to enable or disable various keys used to zoom in or out of the document (for example, +, -, p, w).

printTheDocument():Boolean; Simulates a user clicking the Print button. The document must be fully loaded before you call this function. This function returns false if the document is not fully loaded.

setCurrentZoom(percent:Object):Void; Sets the current zoom level. You can pass a number indicating a zoom percentage (for example, 100 for a 100% view). You can also pass the string width to zoom to the current fit-to-width magnification for this document, or pass the string page for the fit-to-page magnification.

getCurrentZoom():Number; Returns the current zoom level.

Note: The zoom level always returns as a number; width and page are never returned.

setSize(w:Number, h:Number):Boolean; Sets the display size of the document, in pixels. This function returns true if resize was successful, false if resize was unsuccessful. Generally speaking, this function fails (returns false) if the document isn’t fully loaded.

goToLinkTarget(linktarget:String, window:Object):Void; Handles an anchor or URL link request.

If the given string is a string of the form anchor:foo, the current view shifts to that anchor with a logical name of foo. The window argument is ignored in this case. If foo is not a valid anchor name in the document, no action is taken.

For all other strings, getURL(linktarget, window) is called. (For more information, see the ActionScript documentation for this function.)

enableScrolling(flag:Boolean):Boolean Used to prevent the user from scrolling the document.

When scrolling is disabled, the following is true:

The scroll bar is disabled, but visible. Panning (using the pointing hand) is disabled. Scrolling using the mouse wheel is disabled. The return value is the previous value of this flag.

getCurrentTool():String; Returns the currently active tool. If no tool is active, an empty string is returned.

The following are currently supported values:

“” (no tool) “pan” (hand tool) “select” (text selection tool) setCurrentTool(tool:String):Boolean; Makes the given tool the active tool. This function returns false if the argument is invalid or the given tool is disabled.

The following are currently supported values:

“” (no tool) “pan” (hand tool) “select” (text selection tool) getTextSelectionRange():FlashPaper.SelectionRange; Returns an object describing the current text selection. If no text is selected, this function returns null.

Note: Unlike the object returned by getVisibleArea(), this call always returns a FlashPaper.SelectionRange, which is a well-defined object that you can examine, decompose, or construct new instances of.

setTextSelectionRange(sel:SelectionRange, skipBroadcast:Boolean):Void; Selects the given range of text. You may pass null to deselect all text. Invalid ranges are clipped to document ranges (this allows you to set a range that begins with zero and ends with a large number, such as 999999, to select the entire document).

If skipBroadcast is false (or omitted), onVisibleAreaChanged() is broadcast to listeners as necessary. If skipBroadcast is true, onVisibleAreaChanged() is never broadcast to listeners.

Note: Unlike the object expected by setVisibleArea(), this call always expects a FlashPaper.SelectionRange, which is a well-defined object that you can examine, decompose, or construct new instances of.

getSelectedText():String; Returns the selected text as a Unicode string. If no text is selected, an empty string is returned.

getSidebarWidth():Number; Returns the width of the sidebar. A document with no outline always returns zero.

setSidebarWidth(w:Number):Void; Sets the width of the sidebar. Pass zero to hide the sidebar completely. A document with no outline ignores this call.

getFindText():String; Returns any text in the Find text box as a Unicode string.

setFindText(s:String):Void; Sets the text in the Find text box to a Unicode string value. This call does not perform a find operation or alter the current selection.

findNext():Boolean; Searches for the text in the Find text box. The search begins from the end of the current selection. To start from the beginning of the document, call setSelectionRange(null) first. Returns true if text is found, false if not. If text is found, the specific range can be found by calling getTextSelectionRange().

getVisibleArea():Object; 返回一个 描述了文档的当前可见区域的对象。

你可以使用返回值来执行下列操作之一:

如果同一个文件在多台计算机显示,并且你要保持显示区域同步。通过setVisibleArea()可能是很有用的.

通过比较以前的返回值和getVisibleArea()以确定可视区域是否发生了变化。 返回的对象应被视为一个不透明的数据类型。不要试图分解返回的对象,因为它的内容和形式可能会在将来版本中改变。

 唯一的公共成员对象,我们保证将来版本中该方法的保证是:

function equals(that:Object):Boolean;

你可以用它来比较两个显示的领域,确定他们是否是相同的。

setVisibleArea(area:Object, skipBroadcast:Boolean):Void; 调整当前可见页面/缩放/滚动到匹配的显示区域的对象描述。

如果 skipBroadcast 为假 (或者省略), onVisibleAreaChanged() 是监听的必要条件。反之, onVisibleAreaChanged()不会监听。

这个对象必须是前一个getVisibleArea()返回的。 不要试图建立自己的对象,因为内容和形式可能会在将来版本中改变。