flash

AS3 Custom DialogBox: How to send pushed Buttons label to Main.fla

不想你离开。 提交于 2019-12-20 07:36:54
问题 I made my own AS3-DialogBox-class. It has 2 Buttons ("Yes" and "No") Within the class there is a listener that starts a function when one of the Buttons was pushed. And within this listener-function I can get and trace the Buttons label ("Yes" or "No") by calling event.currentTarget.MyButtonTextfield.text. So my question is: How can I RETURN these pushed values ("Yes" or "No") from within the classes listener-function to the Main.fla ? Because within the MAIN.fla I want to put the call of the

Movement of Objects in a simulation

血红的双手。 提交于 2019-12-20 07:28:43
问题 i am currently making a flash "pond" with fishes in it, and i have the ability to add food pellets onto the pond, how should i make the movement of my fishes to the food x,y location ? so it will be smooth , rather than setting the x,y location of my fishes to the x,y location of the food pellets. Also is there a good place to learn how to make my fishes move by its own? similar to http://abowman.com/google-modules/fish/ Fish class package { import flash.display.MovieClip; import flash

NetStream http Video not playing on IOS device

社会主义新天地 提交于 2019-12-20 07:22:24
问题 I am trying to play a video on iPad, my code is below : public function init_RTMP():void { videoURL = "http://rest************_iphone_high.mp4"; vid = new Video(); nc = new NetConnection(); nc.addEventListener(NetStatusEvent.NET_STATUS, onConnectionStatus); nc.connect(null); } private function onConnectionStatus(e:NetStatusEvent):void { if (e.info.code == "NetConnection.Connect.Success") { trace("Creating NetStream"); netStreamObj = new NetStream(nc); metaListener = new Object(); metaListener

How can detect sound on webpage with JavaScript in PhantomJS?

故事扮演 提交于 2019-12-20 07:16:08
问题 I need detect all sound in webpage with banners. How I can do this? I look to PhantomJS, but can't find a API for browser sound. 回答1: PhantomJS (1.x and 2) doesn't support either Flash, <video> or the <audio> element. There is no way to detect sound, because there isn't any. From the docs: Support for plugins (such as Flash) was dropped a long time ago. and Video and Audio would require shipping a variety of different codecs. 来源: https://stackoverflow.com/questions/31697239/how-can-detect

Dealing with infinite/huge worlds in actionscript 2

心已入冬 提交于 2019-12-20 07:15:22
问题 How are infinite/huge procedural generated worlds achieved with minimal lag in actionscript 2? In a game like Terraria or Minecraft for example. What would the best way to go about handling huge world like this be? Obviously looping through every block and moving them that way won't work. I've tried placing blocks into 50x50 'chunks' and then moving each of the chunks, but the result isn't anywhere near as smooth as it should be. Is there any way to completely disable sections of the map if

Why is my swf taking up more space than it actually is?

笑着哭i 提交于 2019-12-20 07:12:42
问题 I created a simple flash animation to work like a slideshow on the front page of my website. Because the container was 640 by 500 with a padding of 10 px all around, I made the swf 620 by 480 to fit perfectly. For some strange reason, whenever I preview my site or upload it to my host server, scroll bars appear, indicating that the animation is slightly too big. I can't understand what I'm doing wrong. Here's the HTML pertaining to the animation and the container: <div class="mainspace">

AS3 how to go to next frame in MainTimeline when character die animation ends

倾然丶 夕夏残阳落幕 提交于 2019-12-20 07:09:16
问题 so I need to know if my character(bird) hitTestObject with pipe he plays the die animation after the animation ends it need to go to the game over frame in the main timeline if (bird.hitTestObject(pipe1)) { bird.gotoAndStop(3); //frame 3 = where the die animation is } LINK 1 (here you see different frames for animations frame 3 is die animation) http://gyazo.com/67381832827bfb8a4dac2452076a4217 LINK 2 (the die animation) http://gyazo.com/bf5153a9d00e1478471fff7b73d0c592 so here you can see

Embedding a swf on a wordpress page

六眼飞鱼酱① 提交于 2019-12-20 07:08:12
问题 I'm trying to embed a .swf into a wordpress page. This sounds simple, but it isn't working and I cannot fathom out why. I've uploaded all the relevant files onto the server, and I'm fairly sure all the filepaths are correct. The folder containing the .fla and .swf files also contained an index.html file, which I have put into a template. I've tried putting the supplied code into the HTML on the page, I've tried simply using said template, and the best I'm getting is a blank area which doesn't

How to monkey patch or override a swc class in Flex?

烈酒焚心 提交于 2019-12-20 07:06:10
问题 I'm using a swc from the Axiis project to display visualizations in a project I'm working on. I've run into a bug where re-compiling the library swc would be an easy solution, but I can only use the buggy version of the swc. I have the Axiis source and compiled a version with the bug fixed, though I'm not allowed to use it because of client version restrictions. Does anyone know how I can use the updated Actionscript class/file in my code so it overrides the swc class? 回答1: I'm not sure if

Collision Detection in Flash Functionalities? (hitTestObject)

拜拜、爱过 提交于 2019-12-20 07:04:49
问题 Hello, so I've been recently using hitTestObject to detect collisions in an android app I'm making. After testing for a bit, I realized that the game was detecting "fake" collisions. What I mean by this is that it was detecting a collisions not when the pixels of an object(s) are touching, but (after doing a bit of research) I found out that the boxes of the objects where colliding. So I had the game stop with a collision, and this is how it looks like: I tried outlining the two object's