actionscript

ActionScript 3.0 URLRequest with Relative Link

醉酒当歌 提交于 2020-01-16 18:55:21
问题 I am trying to pass some data between PHP and Flash. In Flash I have managed to get the code below working. The problem is I want to use a relative link such as "data/config.php" however this gives me the following error: Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. I tried looking up the error but it seems to have many possible causes and I can't figure out a way around it in my case. Here is the code (this works when the url is absolute): submit_btn.addEventListener

ByteArray issue with Actionscript project

徘徊边缘 提交于 2020-01-16 18:48:24
问题 I'm trying to create a project for this library in FDT 5 IDE I create a new project: File->New FDT Project->Web->AS3 then hit finish Copied the files form here: https://github.com/jwagener/recorder.js/tree/master/flash However the IDE is showing problems in the project: Description Resource Path Location Type Could not resolve type reference to 'flash.utils.ByteArray' at line 576 column 25. MultipartURLLoader.as /recorder/src/ru/inspirit/net Unknown Flash Problem Could not resolve type

Camera.setMode sets small resolution

。_饼干妹妹 提交于 2020-01-16 17:59:35
问题 I have a Lenovo tablet with Windows 8.1 with front and rear cameras. The rear camera is IMX175 and should supports 3280*2464 pixels. When I call setMode with those dimensions I never got them back (in Camera.width/height) but some lower numbers. In IE (11) I get 1280*960 In Chrome I get 1920*1440 I tried to change the frame rate to several options, set the stage.quality to StageQuality.BEST. Any help will be appreciated 回答1: There are several reasons between the cam-specifications, flash

My Actionscript 3.0 Stage will not clear

拟墨画扇 提交于 2020-01-15 11:44:08
问题 I am working on a side-scrolling game in Flash Actionscript 3.0. Right now I am trying to allow the Player to advance to the next level by touching a certain object. Before the next level is loaded, I try to remove all of the previous level's assets (background and "floor"), which are MovieClips, from the stage. When the next level loads, I can still see the previous level's assets, although the Player cannot interact with them. I have looked around the Internet and tried a few methods to fix

How to add dynamically text and tags inside textFlow

折月煮酒 提交于 2020-01-15 11:26:09
问题 <s:RichEditableText editable="false" styleName="chatWin" height="550" width="100%"> <s:textFlow> <s:TextFlow> <s:p>Inline<s:br />TextFlow</s:p> </s:TextFlow> </s:textFlow> </s:RichEditableText> I want to add this <s:p> tag dynamically, thus making a chat...i've tried this: var p:p = new p(); but this don't work 回答1: Instead of a declarative text flow within MXML, you could programmatically update the text by appending to a string variable and reflowing with TextConverter.importToFlow().

ActionScript: Multiple public functions in one .as file?

泄露秘密 提交于 2020-01-14 15:06:50
问题 As I've been working with AS I've developed a collection of utility functions. For example: $ cat utils/curried.as package utils { public function curried(f:Function, ...boundArgs):Function { function curriedHelper(...dynamicArgs):* { return f.apply(null, boundArgs.concat(dynamicArgs)); } return curriedHelper; } } And I've found that, some times, I want to keep more than one public function in each file... But ActionScript restricts me to one public definition per file, if that file defines

ActionScript: Multiple public functions in one .as file?

心已入冬 提交于 2020-01-14 15:06:13
问题 As I've been working with AS I've developed a collection of utility functions. For example: $ cat utils/curried.as package utils { public function curried(f:Function, ...boundArgs):Function { function curriedHelper(...dynamicArgs):* { return f.apply(null, boundArgs.concat(dynamicArgs)); } return curriedHelper; } } And I've found that, some times, I want to keep more than one public function in each file... But ActionScript restricts me to one public definition per file, if that file defines

Upload image thumbnail to server, without uploading whole image

折月煮酒 提交于 2020-01-14 12:58:29
问题 As far as I know, what I ask here isn't possible, but I thought I'd ask anyway in case I'm missing something. Suppose you want to let users upload JPG images, and these images are scaled into smaller icons and the original images are always discarded and never required again. Is there any way that would commonly work in most modern browsers that would let the user select a single image on their hard drive, have that LOCALLY turned into a thumbnail and upload the created thumbnail to a server?

Is there a way to call a Javascript class method from ExternalInterface?

天涯浪子 提交于 2020-01-13 20:39:47
问题 I can call JS functions with ExternalInterface.call('func_name',.args) . OK But what if I would like to call a js class instance method instead? ExternalInterface.call('obj.method_name',.args) //this seems not to work Is there any way of doing it? 回答1: It was only a matter of scope. You must instantiated the swf object outside the js class. Then I can reference it in ExternalInterface.call() . window.addEvent('domready',function(){ swf = new Swiff('../files/swf/italy.swf',{ id:'italy',

NetStream.appendBytes

谁都会走 提交于 2020-01-13 11:17:07
问题 I have a netConnection connected to a Flash Media Server. I am trying to use the new appendBytes function from Flash Player 10.1 to stream a local FLV file to FMS. I'm having issues however... Documentation I get online function playFile(data:ByteArray):void { // data is bytearray data from an already loaded FileReference object netStream.play(null); netStream.appendBytesAction(NetStreamAppendBytesAction.RESET_BEGIN); netStream.appendBytes(data); } However, I'm getting an error with the