提前感谢大家的帮助。我做了一个 100% flash 背景拉伸...这是 main.as 的代码:
package {
import flash.display.MovieClip;
import flash.text.TextField;
import flash.events.Event;
import flash.net.navigateToURL;
import flash.net.URLRequest;
import flash.events.MouseEvent;
public class Main extends MovieClip
{
public function Main()
{
init();
checkResize();
clip_mc.addEventListener(MouseEvent.CLICK, siteNav1);
clip_amministra.addEventListener(MouseEvent.CLICK, siteNav2);
clip_chisiamo.addEventListener(MouseEvent.CLICK, siteNav4);
}
function siteNav1(e:MouseEvent):void {
navigateToURL(new URLRequest("http://www.amicolibro.org/index.php"), "_self");
}
function siteNav2(e:MouseEvent):void {
navigateToURL(new URLRequest("http://www.amicolibro.org/log-in-amministratore.php"), "_self");
}
function siteNav4(e:MouseEvent):void {
navigateToURL(new URLRequest("http://www.amicolibro.org/chi-siamo.php"), "_self");
}
private function init():void
{
stage.frameRate=31;
bg_mc.x=0;
bg_mc.y=0;
bg_mc.width=stage.stageWidth;
bg_mc.height=stage.stageHeight;
clip_mc.x=stage.stageWidth/6.3;
clip_mc.y=stage.stageHeight/2.2;
clip_amministra.x=stage.stageWidth/1.3;
clip_amministra.y=stage.stageHeight/2;
clip_chisiamo.x=stage.stageWidth/10;
clip_chisiamo.y=stage.stageHeight/1.19;
}
private function checkResize():void
{
stage.addEventListener(Event.RESIZE, resizeStage);
}
private function resizeStage(event:Event):void
{
init();
}
}
}
是否可以按比例调整按钮 clip_mc、clip_amministra、clip_chisiamo 的大小?
谢谢