actionscript-3

Flash Actionscript 3 saving a XML file locally has a “Save As” window (How can I remove it?)

余生长醉 提交于 2019-12-25 03:40:47
问题 So, I have a flash application that handles several client profiles for a company. Whenever a new client profile is created, it saves a new XML file localy. My problem is that instead of doing a "silent" file creation, a window pops up just like doing a "Save As" as to confirm that the file is being saved on disk and which name should it be. Is there a way to do a file save within flash without it calling out that window? If so, would it be possible to link me to an example of it? Here is an

Flash Actionscript 3 saving a XML file locally has a “Save As” window (How can I remove it?)

痴心易碎 提交于 2019-12-25 03:40:12
问题 So, I have a flash application that handles several client profiles for a company. Whenever a new client profile is created, it saves a new XML file localy. My problem is that instead of doing a "silent" file creation, a window pops up just like doing a "Save As" as to confirm that the file is being saved on disk and which name should it be. Is there a way to do a file save within flash without it calling out that window? If so, would it be possible to link me to an example of it? Here is an

embedding sources dynamically

喜欢而已 提交于 2019-12-25 03:38:13
问题 is it possible to embed sources dynamically. instead of doing this [Embed(source = '../../../../assets/levels/test.xml')] I could probably do something like this var src = '../../../../assets/levels/test.xml' [Embed(source = src )] 回答1: It's not possible for anything within metadata annotations to be dynamic :/. That is, you can't place variables into metadata annotations. If that was possible, there would be SO many cool possibilities. So your first option is the only way to directly embed

Flex4: How to add a child to spark Scroller in AS

核能气质少年 提交于 2019-12-25 03:36:05
问题 I want to convert the following code to ActionScript (mxml works fine): <mx:Panel title="Some Title" width="400" height="300"> <s:Scroller width="100%" height="100%"/> <mx:ColumnChart id="myChart" attribute="..." /> This doesn't work straight forward: setupChart(); //setup myChart var scroll:Scroller = new Scroller(); scroll.percentWidth = 100; scroll.percentHeight = 100; scroll.viewport = myChart; 回答1: adding a group first works for me setupChart(); var grp:Group = new Group(); grp

How to make my character move relative to the mouse position with actionscript 3?

余生长醉 提交于 2019-12-25 03:35:25
问题 ok so i have a character called character_mc and i want it to move towards the mouse when you press the forward arrow and strafe relative to right angles of that. i am quite new to actionscript so could you please include and example of your code in my original code Here is my current code: import flash.events.MouseEvent; //Event Listners stage.addChild(crosshair_mc); crosshair_mc.mouseEnabled = false; crosshair_mc.addEventListener(Event.ENTER_FRAME, fl_CustomMouseCursor); function fl

actionscript Storing a value after a button is clicked

ⅰ亾dé卋堺 提交于 2019-12-25 03:32:38
问题 I don't program a lot. Sometimes I program a bit of Actionscript 3. Now I wanted to create an flash enviroment where people can click on buttons and play a video. I think I almost figured it out with the following script: public class main extends MovieClip { private var drukknop1:knopje; private var drukknop2:knopje; private var drukknop3:knopje; private var drukknop4:knopje; private var drukknop5:knopje; private var drukknop6:knopje; private var drukknop7:knopje; private var drukknop8

How to integrate AsMock into AsUnit 4?

大城市里の小女人 提交于 2019-12-25 03:31:02
问题 Trying to update AsMock mocking framework to v.1.0, and use it with AsUnit 4. But in runtime get a VerifyError (1153, inacceptible override) at the line with [RunWith("asmock.integration.asunit.ASMockRunner")] metatag in the test case class. I use FlashDevelop as an IDE. Have no idea, what's wrong. Could anyone help? 回答1: Have you added the includes line to the Flex Compiler arguments field within Eclipse/Flash Developer? You need to include -includes asmock.integration.asunit.ASMockRunner

Lazy loading infinite scroll background in Flash CS5/ActionScript 3

本秂侑毒 提交于 2019-12-25 03:29:22
问题 The project I'm working on has a massive background image (800px wide by 2585px tall) that slowly scrolls upwards. Before, I was using the code at: http://www.ilike2flash.com/2010/08/endless-scrolling-background-in-as3.html I modified the code to scroll upwards, but in addition to having a weird intermittent bug that occasionally displays a pixel-tall blank line after the image and before looping the next, it really doesn't seem to handle dynamic loading well (I've tried using several

How do you scale a dynamic textfield in flash from the center point using as3?

纵饮孤独 提交于 2019-12-25 03:26:53
问题 I'm trying to make a text effect where on every frame the textfield increases in size and decreases in opacity. I'm using the scaleX and scaleY properties of my dynamic textfield to enlarge, but it's doing so keeping the left registration point fixed. I want to make it scale up radially outward, or with the center point fixed. Can anyone tell me how to do this? 回答1: You can easily create a wrapper for the TextField (i.e. a Sprite containing the TextField ) to enforce the registration point to

Adobe Flex: toolTip of a spark component with enabled=false

不羁的心 提交于 2019-12-25 03:14:32
问题 I have a Spark Component (a Group) which doesn't behave as wanted. The tooltip is only shown when the component is enabled=true which the following example shows: <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="init(event)"> <s:layout> <s:HorizontalLayout /> </s:layout> <s:Group toolTip="test" enabled="false"> </s:Group> <mx:Canvas toolTip="test" enabled="false"> </mx:Canvas> </s