actionscript-3

Send data from popup to main application.

和自甴很熟 提交于 2019-12-13 05:49:07
问题 I'm not getting the answer I'm looking for. I want to send the request data i get to the main application. <?xml version="1.0" encoding="utf-8"?> <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" remove="titlewindow1_removeHandler(event)" width="400" height="220" layout="absolute" title="USER LOGIN"> <mx:Metadata> [Event(name="commEvent", type="flash.events.Event")] </mx:Metadata> <mx:Script> <![CDATA[ import data.Data; import mx.events.FlexEvent; import mx.managers.PopUpManager;

Change progress bar color in flex

怎甘沉沦 提交于 2019-12-13 05:46:23
问题 How to chnage progress bar color to green in the following code <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="100" height="100" creationComplete="init()"> <mx:Script> <![CDATA[ import mx.controls.Alert; import flash.net.NetStream; private var myMic:Microphone; private var nc:NetConnection; private function init():void { initMic("0x19D319"); myMic = Microphone.getMicrophone(); myMic.setSilenceLevel(0); myMic.rate = 44;

how do I link a button inside a movie clip into the mainframe (flash CS6 AS3)

穿精又带淫゛_ 提交于 2019-12-13 05:44:57
问题 i have made a movie clip with some buttons inside. The idea behind this was to allow a scrolling system to be used. The only problem is i can't seem to figure out how to link a button inside a movie clip with a frame from outside of the movie clip and on the main stage. My code atm is: stop(); import flash.events.MouseEvent; sports1.addEventListener(MouseEvent.CLICK,sport1) function sport1(e:MouseEvent) { MovieClip(root).gotoAndStop(sports) } What i would like to happen is that each button

Automated importing/renaming of Flash assets

*爱你&永不变心* 提交于 2019-12-13 05:40:10
问题 So I have an AS3 flash project with A LOT of assets, roughly 1000 at the time being but that may expand to several thousand later. They are all images but half of them are Animated GIFs so I can't import them at runtime. I considered simply dragging them into the flash project but I don't seem to have any control over the naming scheme. Basically, what I want to know is: Is there a way to automate importing and renaming of flash assets, like "Import these 1000 files and export them for

Accessing event.target or event.currentTarget beyond the listener Function

对着背影说爱祢 提交于 2019-12-13 05:38:59
问题 Originally I had two functions, the first function being dataLoaded which had an eventListener in it that spawned a new function called itemClicked . But if I wanted to add a delayedFunction and have itemClicked as an intermittent stage between dataLoaded and delayedFunction , how can I access the event.target or event.currentTarget of the original listener when I come to reference it in my delayedFunction ? private function dataLoaded(event:Event):void { //items properties call - add other

Sort dates in a Flash AS3 DataGrid

旧城冷巷雨未停 提交于 2019-12-13 05:36:38
问题 This has been driving me crazy, I need to sort a Flash DataGrid column (not Flex) by date. I have tried giving the date column a sort function like below: colTwo.sortCompareFunction = sortDate; and this is the function: private function sortDate ($obj1,$obj2) : int { trace("created date in sort "+$obj1["created"]); var t1:Array = $obj1["created"].toString().split("-"); var t2:Array = $obj2["created"].toString().split("-"); var t1dt:Number=(new Date(Number(t1[0]),Number(t1[1]),Number(t1[2])))

AS3 error #1009

∥☆過路亽.° 提交于 2019-12-13 05:34:42
问题 When I run the following code I get a error #1009 saying that the var 'list' is null? Can someone please tell me what's wrong with this AS3 code, I've done lots of searching and read lot of info but no matter how simple the code it's still the same erro #1009 issue. Thanks, package { import flash.display.Sprite; import flash.events.MouseEvent; public class Main extends Sprite { public var list:Array; public function Main() { stage.addEventListener(MouseEvent.CLICK, add); } public function add

Is it possible to load a local file without having to ask the user to browse to it first in an AIR Application?

浪子不回头ぞ 提交于 2019-12-13 05:32:43
问题 I'm writing a small application for myself and instead of using a database I'd like to just use Excel to store the small amount of data I have on my local file system. I want to be able to load that data without having to use the typical FileReference browse() method as it would just be annoying to do every time I use the application. The code below seems to find the file fine as the file.exists method below and most of the other attributes seem to be correct but the file.data is always null.

Program help needed in Actionscript 3 game

主宰稳场 提交于 2019-12-13 05:31:21
问题 I have been making this game in AS3 and the basics work. The thing i am having trouble with is making a 'start' menu appear when the game starts but also when the player dies. I have been trying the .visible code but that didn't seem to work. Question: What code do i add to my game that makes the start button appear when the game starts but also when the player dies. Code: package{ import flash.display.MovieClip; import flash.events.KeyboardEvent; import flash.ui.Keyboard; import flash.events

AS3 How can I solve the bug of setChildIndex

倾然丶 夕夏残阳落幕 提交于 2019-12-13 05:30:58
问题 I've gathered all game pages on different frames of movieclip called game. in that game movieclip there are 4 different frames. on third frame I have some drag & drop functionality. When I drag one item, I want it to be on the front, I mean all other objects on that frame must not block the view of current dragging object. I used this.setChildIndex(currentDraggingObject,this.numChildren-1); but the problem is whenever I drag objects, when I change the frame, those objects are shown on that