ActionScript 3.0 gotoAndStop和gotoAndPlay(ActionScript 3.0 gotoAndStop and gotoAndPlay)
我有一个Flash动作脚本3问题。 这是我的代码
import flash.events.MouseEvent; import flash.display.MovieClip; import flash.ui.Mouse; PlayButton.addEventListener(MouseEvent.CLICK, playButtonClick); PauseButton.addEventListener(MouseEvent.CLICK, pauseButtonClick); function playButtonClick(event_object:MouseEvent){ var currFrameP = MovieClip(root).currentFrame; trace("Frame play = " + currFrameP); MovieClip(root).StoryLine1.gotoAndPlay(currFrameP); } function pauseButtonClick(event_object:MouseEvent){ var currFrameS = MovieClip(root).currentFrame; trace("Frame pause = " + currFrameS); MovieClip(root).StoryLine1.gotoAndStop(currFrameS); }
当我按暂停按钮时,电影停止...但仍然在后台进行。 为什么我这么说? 因为当我点击Play时,电影无法恢复暂停的位置。 电影还在播放时他会恢复。 有人能告诉我如何像正常行为一样暂停和恢复电影。 谢谢
I have an Flash action script 3 problem. This is my code
import flash.events.MouseEvent; import flash.display.MovieClip; import flash.ui.Mouse; PlayButton.addEventListener(MouseEvent.CLICK, playButtonClick); PauseButton.addEventListener(MouseEvent.CLICK, pauseButtonClick); function playButtonClick(event_object:MouseEvent){ var currFrameP = MovieClip(root).currentFrame; trace("Frame play = " + currFrameP); MovieClip(root).StoryLine1.gotoAndPlay(currFrameP); } function pauseButtonClick(event_object:MouseEvent){ var currFrameS = MovieClip(root).currentFrame; trace("Frame pause = " + currFrameS); MovieClip(root).StoryLine1.gotoAndStop(currFrameS); }
When i press Pause Button the movie stops ... but still goes in the background. Why i say that? Because when i hit Play the movie doesn't resume where was paused. He will resume as the movie was still playing. Can someone tell me how to pause and resume the movie like a normal behavior. Thanks
原文:https://stackoverflow.com/questions/15068066
最满意答案
您正在寻找的是键盘(特别是
Suggested Response Keyboard
),您可以在这里阅读如何使用它们: https : //dev.kik.com/#/docs/messaging#keyboardsWhat you're looking for are keyboards (specifically the
Suggested Response Keyboard
), you can read up on how to use them here: https://dev.kik.com/#/docs/messaging#keyboards
相关问答
更多-
将“accept”字段添加到输入。 iPhone不支持上传任意文件,因为用户界面不引用文件系统。 编辑 根据您在Android 4.4上的链接。 显然Android 4.4附带了对WebView的更改,导致这种破坏的行为。 看到这个主题: 在android webview中输入HTML文 ...
-
您正在寻找的是键盘(特别是Suggested Response Keyboard ),您可以在这里阅读如何使用它们: https : //dev.kik.com/#/docs/messaging#keyboards What you're looking for are keyboards (specifically the Suggested Response Keyboard), you can read up on how to use them here: https://dev.kik.com/# ...
-
首先,如果你想向所有用户发送一个爆炸,我建议使用广播API,它允许你批量发送100个消息(而不是常规send() API的25个)。 您可以像这样使用广播API: bot.broadcast(Bot.Message.text('some message'), ['username1', 'username2']); 可以在此处找到此方法的文档。 至于向所有用户发送消息,您需要在某处(例如,在数据库中)有一个用户名列表。 目前,Kik没有提供获取订阅者列表的方法。 这样的东西会起作用: bot.use((m ...
-
我想到了。 我将代码中的路由从“/ incoming”更改为“/”。 这样就可以做出正确的回应。 I figured it out. I changed the route in the code from "/incoming" to "/". That allowed for the right response.
-
我想出了这个问题。 我为我的heroku部署设置了错误的环境变量,所以它抛出了一个keyerror,因为它找不到密钥并停止了进程。 I figured out the issue. I had set the wrong environmental variables for my heroku deployment, so it threw a keyerror because it couldn't find the key and stopped the process.
-
发送到您的机器人的贴纸将作为图像附件发送。 你只需要检查附件字段。 扫描码值和链接将在邮件正文中发送。 Stickers sent to your Bot will come through as image attachments. You just need to check the attachment field. Scan-code values and links will be sent in the message body.
-
Bot连接器:向Kik发送自定义消息导致400错误(Bot Connector: Sending custom message to Kik results in 400 error)[2022-06-21]
尝试: chatId = Message.ChannelConversationId ConversationId是BotFramework使用的Id。 ChannelConversationId是通道使用的本机ID。 Try: chatId = Message.ChannelConversationId ConversationId is the Id used by the BotFramework. ChannelConversationId is native Id used by the ch ... -
通过Kik提供的api参考指南构建我的第一个kik bot(Building my first kik bot through api reference guide provided by Kik)[2023-07-30]
使用您的机器人用户名和API密钥向https://api.kik.com/v1/config发出GET请求,并检查是否已设置webhook 。 如果是,我建议检查您是否正在与正确的机器人交谈,并在调用API时使用正确的机器人用户名/ API密钥。 Make a GET request to https://api.kik.com/v1/config with your bot username and API key and check that webhook is set. If it is, I wo ... -
检查您是否正确设置了webhook。 在您的代码段中,您没有指定incomingPath选项,因此它将默认为/incoming ,因此请确保您的webhook设置为http://1.2.3.5:80/incoming 。 对其他路径的所有请求都将被删除。 否则,您可以通过执行来指定它 let bot = new Bot({ username: '...', apiKey: '...', incomingPath: '/yourincomingpath' }); Check that ...
-
从我们的谈话中,我想我把答案放在这里以供将来参考。 这段代码应该在命令行中的NodeJS上运行,而不是在浏览器上运行。 您需要设置节点环境,使用npm或任何您喜欢的安装所需的依赖项。 然后在节点中运行代码。 $ npm install request以安装请求。 var request = require('request')要求安装的库。 您还需要修改代码并提供适当的回调函数。 您可以在此处阅读请求文档。 From the conversation we had, I thought I put the ...