flash

Save encoded .mp3 to applicationStorageDirectory Adobe Air iOS

本小妞迷上赌 提交于 2019-12-22 21:43:14
问题 I'm developing an iOS iPad app w/ Flash CS5.5 AIR v.3.1 I'm using ShineMp3Encoder to encode a Wav to a Mp3 from: https://github.com/kikko/Shine-MP3-Encoder-on-AS3-Alchemy Basically it converts a byteArray (wav) to a byteArray (mp3) or "mp3encoder.mp3Data" in the code. I have no trouble saving this using a (new FileReference()).save(mp3Data, filename); but because this is being used in a iOS AIR app I wanted to switch to using the File.applicationStorageDirectory so that I could put the saved

Difference between calling stage.width and stage.stageWidth?

核能气质少年 提交于 2019-12-22 21:11:26
问题 In as3 What is the difference between calling stage.width and stage.stageWidth I read somewhere that if we have nothing on stage then the value of stage.width is 0 , but what happen when I have nothing on stage but loading contents dynamically on stage? I have tried this and when i have loaded content dynamically on stage then i have got stage.width=value; // where value is dynamic number Can anyone explain this?? thanks. 回答1: According to the Adobe Reference for the Stage Class: stage.width

Embedding fonts for AS3. How?

爱⌒轻易说出口 提交于 2019-12-22 20:59:17
问题 I embedded font using Flash Professional CS5, but I still can't use it in my AS code. How should I embed the font to be able to use it in AS3 as well in Flash Professional CS5? 回答1: Embed the font inside your fonts.fla file. http://www.adobe.com/devnet/flash/quickstart/embedding_fonts.html Export fonts.fla to the SWC library. ( under export settings check the SWC box in Flash CS5 ) Use the swc with the code! Then you should be able to see it: 回答2: I do something slightly more different. :D

Silverlight [WPF/E] 银光

坚强是说给别人听的谎言 提交于 2019-12-22 18:58:26
Silverlight [WPF/E] 银光 1、Silverlight是什么? WPF和XAML。大家知道Silverlight的原名叫WPF/E,它是WPF的一个子集。所以Silverlight包含了WPF技术,它可以大大的扩展浏览器中的页面元素。有了它我们可以创建图像、动画,媒体和其他胖客户端特性。超越了网页界面只能使用HTML的局限。XAML让我们可以方便的创建WPF元素。 JavaScript扩展。Silverlight对JavaScript进行了扩展,提供对WebUI更加强大的控制能力和与WPF元素协同工作的能力。 跨浏览器、跨平台支持。一个Silverlight程序可以在大多数的浏览器上运行,这样我们开发Silverlight应用的时候就不用考虑他将运行在什么平台上。 可与现有应用程序集成。Silverlight可以无缝的与现有的JavaScript和Asp.Net Ajax 代码集成,并作为已创建功能的一个重要的补充。 采用.NET编程模型和相关的开发工具。我们可以采用托管的JScript和IronPython来编写Silverlight应用程序,也可以使用C#和Visual Basic来完成。你还可以使用Visual Studio 这样的工具来创建Silverlight应用程序。 LINQ。Silverlight包含LINQ,它可以让你在

Save a download without filereference

半世苍凉 提交于 2019-12-22 18:07:42
问题 Is there anyway to download a file with the URLLoader and then save it to the disk without using filereference or anything that uses a dialog? This is what I have but isn't working: public function onDownloadComplete(e:Event):void { DownloaderProgress.label = 'Download Done'; var loader:URLLoader = URLLoader(e.target); var rtsFile:File = File.applicationStorageDirectory.resolvePath("RTS.zip"); var rtsStream:FileStream = new FileStream(); rtsStream.open(rtsFile, FileMode.WRITE); rtsStream

Unsafe Javascript Access from Iframe in Chrome Extension

寵の児 提交于 2019-12-22 17:49:06
问题 I'm building a Chrome Extension that will be using Iframes that load Flash content. Using Mootools in the Iframe, I'm creating a .swf object and then injecting it into itself. This Iframe, main.html, is inserting the flash object like so: window.addEvent("domready", function () { var flashContainer = $("flash-container"); new Swiff("http://www.example.com/content.swf", { "width":"100%", "height":"90%", "id":"flash-content" }).inject(flashContainer); }); This produces the following error:

FB Profile says “it is a gc root”, but it seems wrong?

感情迁移 提交于 2019-12-22 17:38:56
问题 People like flash builder profile tool very much.But recently, a problem came to me when I tried to find a memory leak. Here is the simplified sample. package { import flash.display.Sprite; import flash.sampler.pauseSampling; import flash.system.System; import org.robotlegs.base.ContextBase; import org.robotlegs.mvcs.Context; public class MemoryLeak extends Sprite { public function MemoryLeak() { makeAndDrop(); } public function makeAndDrop():void{ var _context : Context = new Context(this);

Find the total bytes used by a bitmap in Flex

淺唱寂寞╮ 提交于 2019-12-22 14:52:22
问题 If I load a bitmap using a loader in Flex, I can use the loaderInfo.bytesTotal to get the size, total bytes used, of a bitmap. If I create a bitmap in run time, how can I find out the size, the total bytes used, by that bitmap. Please advice. Thanks 回答1: var bitmapByteSize:int = bitmap.bitmapData.getPixels(bitmap.bitmapData.rect).length; That might do the trick. 回答2: I think a better solution than the one above would be: var bitmapByteSize:uint = bitmap.bitmapData.width * bitmap.bitmapData

Find the total bytes used by a bitmap in Flex

拜拜、爱过 提交于 2019-12-22 14:51:33
问题 If I load a bitmap using a loader in Flex, I can use the loaderInfo.bytesTotal to get the size, total bytes used, of a bitmap. If I create a bitmap in run time, how can I find out the size, the total bytes used, by that bitmap. Please advice. Thanks 回答1: var bitmapByteSize:int = bitmap.bitmapData.getPixels(bitmap.bitmapData.rect).length; That might do the trick. 回答2: I think a better solution than the one above would be: var bitmapByteSize:uint = bitmap.bitmapData.width * bitmap.bitmapData

Interact with a running Flash process?

主宰稳场 提交于 2019-12-22 14:42:19
问题 Is it possible to write a program that interacts with a running instance of Flash? In recent versions of Java, there is a notion of "attaching" your own process to a running JVM. By writing some somewhat ugly code using Reflection and the like, you can dig around, grab a reference to an object, print the value of a variable, call a method, etc.. Obviously Flash is not Java (duh), but is it possible to achieve something similar? A couple of things I've already looked at are the various SWF