actionscript-3

FlashBuilder workspace update issues

南笙酒味 提交于 2019-12-13 06:31:21
问题 When working on several AS3 projects that share a common code base, FlashBuilder seems to be losing workspace data when switching from one project to the next. I will often get a message that such class could not be found , when the class is actually in the path but was probably modified in the previous project. To fix this error, I find myself having to remove the external library folder , restart FB, then re-add the library folder and all is well. Please tell me there's another way to

URL Loader class in Air application not returning results

假装没事ソ 提交于 2019-12-13 06:31:18
问题 I am using the class URLLoader in my air application and if i used parameters in url , flex showing an error #2032. if the same code used in web application, that is running in web browser, returning proper results. I didn't get a proper solution yet. Is there any way to return results in my air application? I used a web debugger fiddler, to check whether data is returning from server or not. Data is returning properly from the server, but it is not showing in air application. here is the way

How to list objects in library using as3 at runtime

断了今生、忘了曾经 提交于 2019-12-13 06:25:16
问题 i would like to, somehow, interact with my library.. I have a lot (near 100) of objects exported as classes at specific folder into library, and i would like to get its properties. How can i do it? there is some AS3 method that can list exported object classes? 回答1: in runtime , try this : trace(ApplicationDomain.currentDomain.getQualifiedDefinitionNames()); before version 11.3 use this library : http://etcs.ru/pre/getDefinitionNamesSource/ 来源: https://stackoverflow.com/questions/12084097/how

multiple swf communication using as3

╄→гoц情女王★ 提交于 2019-12-13 06:23:53
问题 My need : If I playing one swf, the other swfs should pause if it was playing. I can able to communicate two swfs using javascript(both swfs are different name). But come to multiple swfs, I don't know how to differentiate the swfs beacause all are same name. I have embed 3 swf files in my html page using the following script. swfobject.embedSWF('http://webserver/aruldass/versemusic/modules/mod_playerjr/player-songs.swf', 'jwplayer1', '280', '230', '9', false, flashvars, params, attributes);

Dynamic XML filtering based on params

馋奶兔 提交于 2019-12-13 06:21:31
问题 Follow up question on Filtering XML based on multiple params - Flex. I was trying to create the Query part dynamically so that params and the keys take over for building the criteria part. Just to show: //building a dynamic query like this var q1:String = "descendants (\"E1" ) == \"111\" )"; Alert.show("Query>>"+q1.toString()); // Output: descendants ("E1" ) == "111" var r2:XMLList = xmlData..*.(descendants ("E1" ) == "111"); //returns correct result var r1:XMLList = xmlData..*.(q1.toString()

Checkbox as3 function

为君一笑 提交于 2019-12-13 06:19:46
问题 I have 16 checkboxes and I need to see which of them was selected. Is there a function that can do that ? I am able to do them with if() but it will be way to long thanks for the help !! 回答1: Put your checkboxes in an array, then create a function to iterate over the array and see which box was selected (you can use "for each" and "if"). Add all selected ones to a new array and use this as the function's return value. 回答2: You should enumerate checkboxes with progressive index, so you can

how to use Always Compile in flashdevelop

不羁岁月 提交于 2019-12-13 06:05:42
问题 Where is this option? how to set the Main.as as Always Compile? The breakpoints and step by step function not work for me... 回答1: Open the Project panel (look in View menu if it's hidden), select the desired main class, and: FD3 : Right Click > Always Compile FD4 : Right Click > Set Document Class 回答2: In 'project properties' You have tab :'Compiler options' , first put text in 'Link report' option and compile , it will generate XML with compiled classes , than write additional Classes in

Display dynamic variable on next key frame AS3

喜欢而已 提交于 2019-12-13 05:58:46
问题 I am creating a game using AS3. I need to display the final score for the player on the next key frame when the game is over. When the player collides with an enemy the players score increments by 1. This is the code I have which updates the score. var playerScore:int = 0; function updateTextFields():void { playerScoreText.text = ("Score: " + playerScore); } function caught(enemy:MovieClip):void { enemy.removeEventListener(Event.ENTER_FRAME,dropEnemy); removeChild(enemy); playerScore++;

Flash content not go full screen

左心房为你撑大大i 提交于 2019-12-13 05:53:47
问题 I have found this but it is supposed to work as swf in the desktop, not in the html. I am trying to make the content full screen via both at the beginning of the code and mouse event. However stage.displayState returns null . Here is how I do things; at the beginning: stage.displayStatus = StageDisplayState.FULL_SCREEN_INTERACTIVE; and then fullScreenButton.addEventListener(MouseEvent.CLICK, DoFullScreen); function DoFullScreen(e:MouseEvent) { stage.displayState = StageDisplayState.FULL

AS3 - array hit test in 'for each' loop only works properly with last object in array

给你一囗甜甜゛ 提交于 2019-12-13 05:50:57
问题 I'm trying to build a platform game in AS3 by placing all instances of my Platform class into an Array, then running a for each loop with a hitTestObject to check whether the player is touching any of them. My problem is that whilst the player will react correctly to touching each of the platforms in the Array (i.e. stop falling and set y position to the top of the platform), I can only perform the jump function whilst standing on the last Platform in the Array. I'm fairly new to ActionScript