佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1542|回复: 32

在 flash 里如何create “input box”?

[复制链接]
发表于 23-9-2004 03:08 AM | 显示全部楼层 |阅读模式
我做了一個flash但是我想用密碼來lock著它
不知道有沒有人能幫的了我………

how to convert this source code into “flash code “ ??
EXAMPLE:

    If Input_box = "password" Then
                gotoAndPlay(20);
    Else
        MsgBox "Invalid Password, try again!"
        txtPassword.SetFocus
    End If


something like this ...
回复

使用道具 举报


ADVERTISEMENT

 楼主| 发表于 23-9-2004 03:10 AM | 显示全部楼层
help.....help .....
回复

使用道具 举报

发表于 23-9-2004 11:53 AM | 显示全部楼层
搂主是要在 Flash 里建 InputBox 呢?
还是要把 swf pack 成 exe 然后加密?
回复

使用道具 举报

 楼主| 发表于 23-9-2004 07:48 PM | 显示全部楼层
sson 于 23-9-2004 11:53 AM  说 :
搂主是要在 Flash 里建 InputBox 呢?
还是要把 swf pack 成 exe 然后加密?


我是要在flash里加input box然後把密碼keyin into input box then .....
if the password right then "play"...if wrong just rekeyin.....
回复

使用道具 举报

发表于 23-9-2004 08:54 PM | 显示全部楼层
beach_boy 于 23-9-2004 07:48 PM  说 :
我是要在flash里加input box然後把密碼keyin into input box then .....
if the password right then "play"...if wrong just rekeyin.....

你会 ActionScript 吗?会的话应该没问题。

if (textField.text == "my_password"){
    //play
}else{
    //exit
}
回复

使用道具 举报

 楼主| 发表于 24-9-2004 12:41 AM | 显示全部楼层
sson 于 23-9-2004 08:54 PM  说 :

你会 ActionScript 吗?会的话应该没问题。

if (textField.text == "my_password"){
    //play
}else{
    //exit
}


thanks ...
回复

使用道具 举报

Follow Us
 楼主| 发表于 24-9-2004 12:44 AM | 显示全部楼层
還有如何將 database 或 text file 里的 data or text display on the flash movie?

Example ( in programming source code ) :
       
OPEN "c:\flash\login_msg.txt" FOR INPUT AS #1
INPUT #1, Message
Print Message
CLOSE #1


“login_msg.txt” is a Notepad text file .The content inside the “login_msg.txt” is “welcome”. i just want to display "welcome" in my flash ....

something like this ..
thanks..
回复

使用道具 举报

发表于 24-9-2004 03:18 AM | 显示全部楼层
beach_boy 于 24-9-2004 12:44 AM  说 :
還有如何將 database 或 text file 里的 data or text display on the flash movie?

Example ( in programming source code ) :
       
OPEN "c:\flash\login_msg.txt" FOR INPUT AS #1
INPUT #1, Mes ...


如果你的 External Content 只有一些简单的资料,你可以用 LoadVars object ,
如果很多的话,建议用 XML 。

::用 LoadVars::
var myVars:LoadVars = new LoadVars()
myVars.onLoad = function(success) {
        if (success) {
                trace(this.msg)
                trace(this.msg2)
        } else {
                trace("error :: external data load fail")
        }
};
myVars.load("./content.txt" )
:::在 content.txt 中:::
&msg=this is message one&
&msg2=this is message two&
回复

使用道具 举报


ADVERTISEMENT

 楼主| 发表于 24-9-2004 12:03 PM | 显示全部楼层
sson 于 23-9-2004 08:54 PM  说 :

你会 ActionScript 吗?会的话应该没问题。

if (textField.text == "my_password"{
    //play
}else{
    //exit
}


我 try 過你\所教的方法但還是不行。。。。
Action Script 我只懂些……
Input box how to create?

if (textField.text == "my_password"{
    //play
}else{
    //exit
}

以上的 textfield.text 是 input box 來嗎 ?
my_password 又要鍵入哪裡  ?
如何把 input box 命名為 textField.text ????

thank you…..

回复

使用道具 举报

 楼主| 发表于 24-9-2004 12:05 PM | 显示全部楼层
sson 于 24-9-2004 03:18 AM  说 :


如果你的 External Content 只有一些简单的资料,你可以用 LoadVars object ,
如果很多的话,建议用 XML 。

::用 LoadVars::
var myVars:LoadVars = new LoadVars()
myVars.onLoad = function(suc ...


XML ???
izzit all of this code is for flash 1?
回复

使用道具 举报

发表于 24-9-2004 12:16 PM | 显示全部楼层
请问你是初学 Flash 吗?
用 Flash 5 , Flash MX 还是 Flash MX 2004 ?

如果是初学,建议先去了解 Flash 的
TimeLine,Layer,Instance,MovieClip,Button,Graphic,Group,Font
了解这些后对你学 ActionScript 有很大帮助。
回复

使用道具 举报

 楼主| 发表于 24-9-2004 12:55 PM | 显示全部楼层
sson 于 24-9-2004 12:16 PM  说 :
请问你是初学 Flash 吗?
用 Flash 5 , Flash MX 还是 Flash MX 2004 ?

如果是初学,建议先去了解 Flash 的
TimeLine,Layer,Instance,MovieClip,Button,Graphic,Group,Font
了解这些后对你学 Act ...


我是用 flash MX 的初學者...
回复

使用道具 举报

发表于 24-9-2004 01:33 PM | 显示全部楼层
建立input文本, 在MX可以使用

createTextField("myText", 0, 100, 100, 200, 20);
myText.type = "input";
myText.text = "Super-Tomato";




讀取外部文件方法可以使用loadVariables, loadVariablesNum或LoadVars, 當然LoadVars會比較好, 例子如sson寫過的一樣

var myVars = new LoadVars();
myVars.onLoad = function(success) {
        if (success) {
                trace(this.msg)
                trace(this.msg2)
        } else {
                trace("error :: external data load fail")
        }
};
myVars.load("content.txt");

例子 : http://www.super-tomato.com/tutorial/example.zip



xml的載入例子如下:
http://www.flash8.net/bbs/dispbbs.asp?boardid=10&id=198430

[ Last edited by super-tomato on 24-9-2004 at 01:42 PM ]
回复

使用道具 举报

 楼主| 发表于 24-9-2004 02:06 PM | 显示全部楼层
super-tomato 于 24-9-2004 01:33 PM  说 :
建立input文本, 在MX可以使用

createTextField("myText", 0, 100, 100, 200, 20);
myText.type = "input";
myText.text = "Super-Tomato";




讀取外部文件方法可以使用 ...



thanks ......
回复

使用道具 举报

 楼主| 发表于 24-9-2004 07:56 PM | 显示全部楼层
我寫了一個概念性的 action script 但是有很多问题……
请你们指点指点……
http://www.ck-ho.8k.com

可以的话,希望你们可以把 password 从 External Content ( *.txt ) 那 read 进去….
回复

使用道具 举报

 楼主| 发表于 24-9-2004 07:58 PM | 显示全部楼层
need a help....
help........
回复

使用道具 举报


ADVERTISEMENT

 楼主| 发表于 24-9-2004 08:26 PM | 显示全部楼层
super-tomato 于 24-9-2004 01:33 PM  说 :
建立input文本, 在MX可以使用

createTextField("myText", 0, 100, 100, 200, 20);
myText.type = "input";
myText.text = "Super-Tomato";




讀取外部文件方法可以使用 ...


the test1.fla cant open
the error msg show me this ..----> "Unexpected file format"
回复

使用道具 举报

发表于 24-9-2004 10:52 PM | 显示全部楼层
beach_boy 于 24-9-2004 07:56 PM  说 :
我寫了一個概念性的 action script 但是有很多问题……
请你们指点指点……
http://www.ck-ho.8k.com

可以的话,希望你们可以把 password 从 External Content ( *.txt ) 那 read 进去….




你原本的文件有幾個錯誤, 我已經修改了...
在Flash的equal是 == 和VB不一樣

我之前的文件是MX 2004格式


http://www.super-tomato.com/tutorial/example.zip
回复

使用道具 举报

 楼主| 发表于 25-9-2004 01:49 PM | 显示全部楼层
ic ...thanks you ....very(x9) much...
你真的好厉害....

[ Last edited by beach_boy on 25-9-2004 at 04:59 PM ]
回复

使用道具 举报

 楼主| 发表于 25-9-2004 04:50 PM | 显示全部楼层
那如果我要把external picture (*.jpg/*.gif) input 进去我的flash 里是如何....
对不起,因为我问太多问题了...

[ Last edited by beach_boy on 25-9-2004 at 05:04 PM ]
回复

使用道具 举报

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

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


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

GMT+8, 1-6-2024 01:05 AM , Processed in 0.071695 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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