转载

《Flexpaper二次开发入门教程》(十七) 删除Flexpaper浏览器的LOGO(5.5节) ...

下面是某位高手的对FlexPaperViewer LOGO的处理:

1. 去掉加载页的进度条的LOGO图片
源文件:DupImage.as
找到语句:private var _skinImgl:Bitmap = new MenuIcons.LOGO_SMALL();
替换为: private var _skinImgl:Bitmap = new Bitmap();
2.
去掉工具栏最右边[关于...]对话框的显示的按钮
源文件:FlexPaperViewer.mxml
将源码中所有的bttnInfo.visible = true;  替换成 bttnInfo.visible = false;
3.
除去初始装载时的LOGO图标
源文件:FlexPaperViewer.mxml
将控件lblProgressspin1的初始属性分别加入: visible="false"
4.
除去加载页的LOGO图标  
源文件: FlexPaperViewer.mxml
<fp:FlexPaperViewer_Base ...>的属性最后行加入creationComplete处理:
<fp:FlexPaperViewer_Base xmlns:mx="http://www.adobe.com/2006/mxml"
                                                 addedToStage="bindStageEvents(event)"
                                                 xmlns:fp="com.devaldi.controls.flexpaper.*"
                                                 xmlns:ct="com.devaldi.controls.*"
                                                 xmlns:st="com.devaldi.skinning.*" 
                                                 creationComplete="initApp()">
然后加入处理initApp()函数到<mx:Script>
   //---------------------------
二次编程加入
                        public function initApp():void {        
                                paper1.removeElementAt(2);
                        }
最后将源码中的函数papersLoadingHandler(event:Event)最后一行加上:paper1.removeElementAt(2);

 

Mark只测试过第四点,在FlexPaperViewer.mxml文件中找到下面的方法,并在最后一行加入paper1.removeElementAt(2);结果可以达到去掉FlexPaperViewer右下角的logo

protected override function papersLoadingHandler(event:Event):void{

                //mark edit 2012-1-25

//              spin1.start();

//              spin1.visible = true;

                spin1.visible = false;

                super.papersLoadingHandler(event);

                //mark add 2012-1-25

                paper1.removeElementAt(2);

}
效果如下:

《Flexpaper二次开发入门教程》(十七) 删除Flexpaper浏览器的LOGO(5.5节) ...

 

转载请注明:转自http://ajava.org,请保留文章的完整。

正文到此结束
Loading...