actionscript

ActionScript 2.0 Screen Capture

无人久伴 提交于 2019-12-11 10:13:03
问题 I made a flash scene, and I want to make a button that, when pressed, saves the scene, or a part of it as JPG. I found a nice tutorial (http://www.screentime.com/software/flash-projector/docs/AS3-mApp-captureScreenToJP.htm), but when I insert the code: mApplication.captureScreenToJPG(fileName:screen.jpg[, x:100][, y:540][, width:100][, height:400]) : Void ...it doesn't do anything. 回答1: To start, I have two remarks : The code mentioned in your question is not a standard ActionScript code, you

Can I change an ActionScript string literal in a SWF without the source FLA file?

旧城冷巷雨未停 提交于 2019-12-11 09:50:01
问题 A customer has asked me to move one of their old websites which is mostly flash based to a new server. The original developer of the site many years ago made a mistake by using "http://127.0.0.1/...." in one important link in some ActionScript. The original development company is long since gone. I am able to decompile the SWF using Sothink SWF Decompiler and find and correct the offending ActionScript. However I am unable to recompile back into a SWF that works completely correctly (numerous

send from javascript to actionscript IE problem

纵然是瞬间 提交于 2019-12-11 08:59:56
问题 I tried to send a string from an html page (with javascript) to a swf file (action script 2). i searched in google, found this page. but the example code (version 1, not 2, you can find it in the source file .zip) didn't work in IE (IE said: object doesn't support this property or method) where is the problem? (i don't want to use SWFObject.) the action script ::: //From Evan Mullins @ circlecube.com //View post at http://blog.circlecube.com/2008/02/01/actionscript-javascript-communication/

removing timer is not working

对着背影说爱祢 提交于 2019-12-11 08:49:30
问题 How do I correctly remove/stop a timer in actionscript? I do it like in this piece of code but timer has been set to fire frame1SoundTimerHandler in 200 seconds later : playingScreenFramesObj.myTimer2.stop(); playingScreenFramesObj.myTimer2.removeEventListener(TimerEvent.TIMER, frame1SoundTimerHandler); playingScreenFramesObj.myTimer2 = null; It seems that despite stopping/removing the timer with the code above the handler will run in 200 seconds. Where is the mistake I make? Chris 回答1: You

How to mute other flash objects on the page with ActionScript or Javascript?

匆匆过客 提交于 2019-12-11 08:49:25
问题 Is there any way to mute other flash objects on the same page with ActionScript or Javascript? I can understand if this would be a security issue but my flash does have a user-initiated mode which takes over the screen and I was hoping this might be an exception where it's clear it has full priority for the user. 回答1: Exposing internal controls in a Flash movie is up to the programmer who writes it. If they haven't exposed an external mute/volume control and have documented it, you're out of

AS3 How to remove previous loaders

妖精的绣舞 提交于 2019-12-11 07:47:38
问题 In Flash CS4, I'm creating a photo gallery. My goal is to load different thumbnails from a number of images. I have managed that when one clicks an image, a number of thumbnails are being displayed, but when one clicks another image, the new thumbnails are placed on top of the old ones. Can someone help me on how to get rid of the old thumbnails? Here is the code: for (var i:int = 0; i < thumbnails.length(); i++) { imgLoader.unload(); imgLoader = new Loader(); imgLoader.load(new URLRequest

Setting anchor point of sprite to middle

↘锁芯ラ 提交于 2019-12-11 07:37:38
问题 I am generating sprites programatically like this: this.food = new Sprite(); this.food.graphics.beginFill(0xFFFFFF); this.food.graphics.drawRect(0, 0, 10, 10); this.food.filters = [new GlowFilter(0xFF6699, .80, 5, 5, 2, 2, false, false)]; this.food.graphics.endFill(); this.food.x = this.x; this.food.y = this.y; this.stage.addChild(this.food); And later on I'm doing this: public function update():void { // Spin the food this.food.rotation += 1; } I basically want the food sprite to spin slowly

Unable to solve flash error 5000: The class … must subclass 'flash.display.MovieClip'

↘锁芯ラ 提交于 2019-12-11 07:32:33
问题 I'm getting the following error on my flash project 5000: The class ... must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type. I looked at the class and made sure that I import flash.display.MovieClip and I do. I tried to change the base class in the linkage to flash.display.MovieClip but I got the following message: "The base class specified is a native class and will be defined in the player at runtime. It cannot be edited." How can I fix this issue?

Comparing two bitmaps against each other for match as3

≡放荡痞女 提交于 2019-12-11 07:29:21
问题 I'm trying to position an image on top of another image based upon the make-up of the smaller image. The smaller image is a cut-out of a larger image and I need it to be positioned exactly on the larger image to make it look like a single image, but allow for separate filters and alphas to be applied. As the images are not simple rectangles or circles, but complex satellite images, I cannot simply redraw them in code. I have quite a few images and therefore do not feel like manually finding

How can I solve my hitTestObject Collision Null Object Ref Error?

馋奶兔 提交于 2019-12-11 07:15:09
问题 I've been trying for days now to add a simple hitTest between my player class and some "buildings" without success. I've tried adding the hitTest to the player class & when didn't work, the building class. I've tried variations of the code on both also with no luck. I've been reading tutorials for days & no matter what I try, nothing seems to work - so, I must be doing something so simply wrong that the common sense just eludes me. I have three classes that could/should be affected by the