actionscript-3

Adobe Air for Windows 64 bit?

不问归期 提交于 2020-01-23 03:44:11
问题 We are developing some memory intensive Adobe Air Desktop applications that sometimes peek above the 32 bit 1.3 Gb Limit in Windows and get purged by the OS. Unfortunately we can't find any options from Flex Builder to export to Windows 64 bit. It seems from the Adobe forum that more people are interested in this feature and Adobe seems not committed yet to implemented it. If anyone has the same issue and would like this supported please vote on the Adobe forum: https://bugbase.adobe.com

ActionScript - Forced Garbage Collection Not Working In ADL?

荒凉一梦 提交于 2020-01-23 03:29:06
问题 when launching the following code in ADL, why does the square continue to rotate? var square:Sprite = new Sprite(); square.graphics.beginFill(0xFF0000); square.graphics.drawRect(-25, -25, 50, 50); square.x = square.y = 100; addChild(square); addEventListener(Event.ENTER_FRAME, rotateSquare, false, 0, true); function rotateSquare(evt:Event):void { square.rotation += 2; } System.gc(); Update the following display object has a weak referenced ENTER_FRAME event listener. however, calling:

AS3 Run code continuously while holding a Button down - Air For iOS/Android

徘徊边缘 提交于 2020-01-22 15:04:26
问题 I am developing an iOS game in Flash CS6. I have a basic movement test that I put in an Event.MOUSE_DOWN handler. What I'm expecting/wanting is when I held my finger down on the button, that the player would keep moving until I stop touching the screen. What happens though, is I have to keep constantly tapping to keep the player moving - rather than just hold my finger on the button and the player keeps moving. What code should I use to accomplish what I want? 回答1: To accomplish this, you'll

Flex/ActionScript - rotate Sprite around its center

隐身守侯 提交于 2020-01-22 10:46:12
问题 I have created a Sprite in Actionscript and rendered it to a Flex Canvas. Suppose: var fooShape:Sprite = new FooSpriteSubclass(); fooCanvas.rawChildren.addChild(myshape); //Sprite shape renders on screen fooShape.rotation = fooNumber; This will rotate my shape, but seems to rotate it around the upper-left point of its parent container(the canvas). How can I force the Sprite to rotate about is own center point? I could obviously write code to calculate the rotation, and then have it re-render,

Zoom to and from point

末鹿安然 提交于 2020-01-22 02:24:12
问题 I'm trying to zoom a DisplayObject into a certain point. I figured it would be easy, but I've spent a day now trying to figure it out. Basically, I think this should work. Emphasis on should. //newPoint is the point being centered. There is no initial scaling, so I do not need to compensate for that (yet) //scale is the zoom level //container is the parent of the obj //obj is the object being scaled/panned var p:Point = new Point( ( this.container.width - this.obj.width * scale + newPoint.x *

Is it possible to create video file from BitmapDatas in Flash?

筅森魡賤 提交于 2020-01-22 02:21:06
问题 Basically I'd like to know if there are any libraries out there that lets me create a video file in the flash runtime. I know such a process would take a lot of resources, but I would still like to know if it was possible? I would guess it could work like just passing it a bitmapdata for each frame. 回答1: Try this. Usage: var myWriter:SimpleFlvWriter = SimpleFlvWriter.getInstance(); myWriter.createFile(myFile, 320,240, 30, 120); myWriter.saveFrame( myBitmapData1 ); myWriter.saveFrame(

Actionscript to java source converter

泪湿孤枕 提交于 2020-01-21 11:58:48
问题 is there a tool which can convert actionscript3 source code to java source? 回答1: I ran into this page awhile ago because I needed an actionscript to java converter too. I wrote one myself. It's very simple and requires manual adaptation after conversion (as most such converters do), but it does a good job of automating the boring stuff. You can find it on my blog. 回答2: I believe Haxe (which has similar syntax to AS3, also based on the ECMA Specification) is able to compile to Java (as well as

How do I set the dataProvider for an <s:List> component to be an XML file?

♀尐吖头ヾ 提交于 2020-01-21 10:14:28
问题 I've got the latest Beta of Adobe Flash Builder 4. I want to use a <s:List> component, and specify the dataProvider as being an XML file. However, after loads of research (including looking at doc links off labs.adobe.com), I still can't figure out how to do it. The XML file will look something like this: <?xml version="1.0" encoding="ISO-8859-1"?> <imageList> <image location="path/to/file1.jpg" /> <image location="path/to/file2.jpg" /> <image location="path/to/file3.jpg" /> </imageList> 回答1:

How do I set the dataProvider for an <s:List> component to be an XML file?

陌路散爱 提交于 2020-01-21 10:14:12
问题 I've got the latest Beta of Adobe Flash Builder 4. I want to use a <s:List> component, and specify the dataProvider as being an XML file. However, after loads of research (including looking at doc links off labs.adobe.com), I still can't figure out how to do it. The XML file will look something like this: <?xml version="1.0" encoding="ISO-8859-1"?> <imageList> <image location="path/to/file1.jpg" /> <image location="path/to/file2.jpg" /> <image location="path/to/file3.jpg" /> </imageList> 回答1:

Can I bind a Flex component property to a function?

泪湿孤枕 提交于 2020-01-21 03:19:26
问题 I want to set the enabled property on a button based on the return value of a function that has one or more parameters. How can I do this? private function isUserAllowed (userName:Boolean):Boolean { if (userName == 'Tom') return true; if (userName == 'Bill') return false; } <mx:Button label="Create PO" id="createPOButton" enabled="<I want to call isUserAllowed ('Bill') or isUserAllowed ('Tom') here>" click="createPOButton_Click()" /> 回答1: <mx:Button enabled = "{this.myFunction(this.myVariable