佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1364|回复: 4

怎样做一个按钮后能出现一个小视窗的效果?

[复制链接]
发表于 26-2-2008 04:39 PM | 显示全部楼层 |阅读模式
怎样做一个按钮后能出现一个小视窗的效果?
请指教。。。。。。。。
回复

使用道具 举报


ADVERTISEMENT

发表于 27-2-2008 06:40 PM | 显示全部楼层
原帖由 lonely_boy 于 26-2-2008 04:39 PM 发表
怎样做一个按钮后能出现一个小视窗的效果?
请指教。。。。。。。。



不明白你的視窗是指哪個?

1. 使用 getURL 函數呼叫出個browser打開一個 url
2. 自己使用 MovieClip 製作一個
3. 使用組件(Component), 應用方法請看 Flash 所提供的 help
回复

使用道具 举报

 楼主| 发表于 27-2-2008 07:30 PM | 显示全部楼层
如果不要用url的呢?
类似酱的,可是我只做到能drag来drag去,
就是做不到按了按钮后出来。。。
有什么步骤漏了吗?

http://www.idcnews.net/html/edu/flash/20070930/73411.html
回复

使用道具 举报

发表于 27-2-2008 10:31 PM | 显示全部楼层
请看看super-tomato第3个方法吧。。
使用flash windows component,
查看help
回复

使用道具 举报

发表于 28-2-2008 11:02 AM | 显示全部楼层
簡單例子
  1. MovieClip.prototype.createStandard = function(w:Number, h:Number, bgColor:Number) {
  2.         this.lineStyle(1, this._parent.style.lineColor, 70);
  3.         this.beginFill(bgColor, 80);
  4.         this.moveTo(0, 0);
  5.         this.lineTo(w, 0);
  6.         this.lineTo(w, h);
  7.         this.lineTo(0, h);
  8.         this.endFill();
  9. }

  10. MovieClip.prototype.createText = function(x:Number, y:Number, w:Number, h:Number, content:String) {
  11.         this.createTextField("txt", this.getNextHighestDepth(), x, y, w, h);
  12.         this.txt.html = true;
  13.         this.txt.htmlText = content;
  14.         this.txt.wordWrap = true;
  15.         var format:TextFormat = new TextFormat();
  16.         format.color = this._parent.style.textColor;
  17.         this.txt.setTextFormat(format);
  18. }

  19. MovieClip.prototype.drawStyle = function() {
  20.         this.createEmptyMovieClip("body", 0);
  21.         this.body._x = 0;
  22.         this.body._y = 30;
  23.         this.body.createStandard(this.style.width, this.style.height - 30, this.style.bgColor);
  24.         this.body.createText(5, 5, this.style.width - 10, this.style.height- 40, this.style.contentLabel);
  25.        
  26.         this.createEmptyMovieClip("titlebar", 1);
  27.         this.titlebar._x = this.titlebar._y = 0;
  28.         this.titlebar.createStandard(this.style.width, 30, this.style.titleColor);
  29.         this.titlebar.createText(5, 5, this.style.width-25, 20, this.style.titleLabel);
  30.         this.titlebar.onPress = function() { this._parent.startDrag(); }
  31.         this.titlebar.onRelease = function() { this._parent.stopDrag(); }
  32.        
  33.         this.createEmptyMovieClip("closeBtn", 2);
  34.         this.closeBtn._x = this.style.width-20;
  35.         this.closeBtn._y = 5;
  36.         this.closeBtn.createStandard(15, 15, this.style.lineColor);
  37.         this.closeBtn.onRelease = function() { this._parent._visible = false; }
  38.         this.closeBtn.createText(2, -2, 12, 17, "X");
  39.         this._x = this.style.x;
  40.         this._y = this.style.y;
  41.        
  42.         this.onMouseMove = function(){ updateAfterEvent(); }
  43. }

  44. this.createEmptyMovieClip("win", 0);
  45. win.style = {
  46.         width:300,
  47.         height:300,
  48.         x:100,
  49.         y:50,
  50.         lineColor:0x003366,
  51.         titleColor:0x006699,
  52.         bgColor:0x0099CC,
  53.         textColor:0xFFFFFF,
  54.         titleLabel:"Simple Window",
  55.         contentLabel:"Hello World!! This sample was created by <u><i>Actionscript 2.0</i></u> and provided by <font size="15"><b>Super-Tomato</b></font>"
  56.         }
  57. win.drawStyle();
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 25-9-2025 04:21 PM , Processed in 0.113520 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表