python,actionscript,cross-platform
Cross-platform Python is very good on cross-platforms. Which is you can use Django for web, Kivy for mobile apps, Pygame for games etc etc. Python is an Open Source Code which is pretty awesome!! Reliable Too broad. It depends on people, too subjective.. Fast Yes, Python is probably faster...
actionscript-3,flash,actionscript,adobe
Instead of tellTarget("/something") use (root as MovieClip).something. Instead of on (release) { use addEventListener. import flash.events.MouseEvent; button.addEventListener(MouseEvent.CLICK, buttonClick); function buttonClick(event:MouseEvent):void { (root as MovieClip).incorrect.nextFrame(); } ...
arrays,actionscript-3,flex,actionscript
Try following. It will work and remove the button which is pressed. public function removeButton(event:MouseEvent):void { myGroup.removeElementAt(myArray.indexOf(event.currentTarget)); myArray.splice(myArray.indexOf(event.currentTarget), 1); } ...
actionscript-3,loops,actionscript
If you're trying to get cars to reposition to the top of the screen as @onekidney guessed, you could easily do so by using the % operator: function fl_EnterFrameHandler(event:Event):void { car1.y = (car1.y + 12) % stage.stageHeight; car2.y = (car2.y + 12) % stage.stageHeight; car3.y = (car3.y + 12) %...
actionscript-3,flash,actionscript
After removing your TextField, you can re-position all other text fields like this : // the menu items container var menu:MovieClip = new MovieClip() addChild(menu); for(var i=0; i<5; i++){ var txt:TextField = new TextField(); txt.x = 20; txt.y = 26*i + 20; txt.height = 24; txt.width = 120; txt.text =...
flash,silverlight,actionscript,html5-video,flash-player
Clearly didn't do my homework, have found that this will be nearly impossible: Are overlays on top of full-screen flash video possible?...
actionscript-3,flash,actionscript,floating-point
The initial problem, as reported in Hobo Sapiens's comment, is that you have declared i as int, but want it to store fractions. However, even after you have fixed that, you are likely to encounter rounding error issues. Adding up a floating point approximation to 0.1 is not a good...
actionscript-3,flash,actionscript,flash-cs5
Your problem doesn't come from this code. You just have to put your transparent flash buttons over the icons (they are under them).
No, unfortunately, it's not possible. If your embed swf is AS3 based you can pass LC name to it when swf is loaded (or listen for the name in event from it, not difference), if it's AS2 the only way to pass variables is to load it with Loader by...
arrays,actionscript-3,flash,random,actionscript
Your problem is your nested loop. With each iteration, you add one new dot, and then loop over all of the existing ones, and remove them if it collides with the box. I don't think that's what you intended to do. It looks like you just want to make sure...
actionscript-3,flash,timer,actionscript
Ok, first, you have some invalid code (not sure if that is just a copy paste error or your actual attempted code). Take out: **strong text** & change TimerEenter code herevent.TIMER to TimerEvent.TIMER. Now that that's out of the way, on to your actual error. The error is being cause...
I found more info here. So while this works in JavaScript: string = string.replace(/\b\w+\b/g, function(m){ return /^[A-Z]/.test(m) ? "Word" : "word" }); We would have to remove the parameter and use the arguments object available to all functions like so: string = string.replace(/\b\w+\b/g, function():String { var match:String = arguments[0]; //var...
I would add a counter, based upon your framerate (say you have 24fps, 3 seconds is 72frames): var hit = false; var counter; onClipEvent(enterframe) { if (_root.char.hitTest(this)) { hit = true; } if(!hit) { waitcounter = 0; } else { waitcounter++; } if(waitcounter >= 72) { unloadMovie(this); _root.gotoAndStop("StageL2"); } }...
Your for loop do 21 iterations but your array has only 20 elements, so you should do : ... for (var i:int = 0; i < toyArray.length; i++){ addToys(1200 * Math.random(), 200 * Math.random() * 2) } ... ...
actionscript-3,class,actionscript,superclass
If you are going to instantiate it anyway, why not accept an object instead which allows you to type it to :SuperClass? careless(SomeClass); //vs. careless(new SomeClass); Not too much of a problem there as far as your code goes. There are a few differences though: The object has to be...
actionscript-3,flex,actionscript,flex4.6
The .data property is defined in DataEvent, not Event. But your parameter of the method is of type Event. Change the type of the parameter to DataEvent....
actionscript-3,flash,background,actionscript,uiloader
Based on the Alsacrations jQuery solution (http://www.alsacreations.com/astuce/lire/1216-arriere-plan-background-extensible.html) : function backgroundCover(){ var image_width:Number = uilBackground.content.width; var image_height:Number = uilBackground.content.height; var over = image_width / image_height; var under = image_height / image_width; var body_width = uilBackground.width; var body_height = uilBackground.height; if (body_width / body_height >= over) { uilBackground.content.width = body_width; uilBackground.content.height =...
actionscript-3,flash,actionscript,google-play,admob
maybe you can try to run this flash file.it is a file by flash pro cc https://github.com/lilili87222/Admob-ANE/blob/master/demo.fla...
How about something like the following: function getAngle(y, x) { var angle = Math.atan2(-x, -y) * 180/Math.PI - 90; return angle < 0 ? 360 + angle : angle; // Ensure positive angle } ...
actionscript-3,flash,actionscript
The difference is that the set method is implicitly called when you set a property of the same name. You do not have to type the ( ) that do the function call but assign the value via =. player_X = 5; vs. setPlayerX(5); It can help with information hiding...
If you create the movie clip with ActionScript, just call the removeMovieClip method. ant_mc.removeMovieClip(); However, if you create the movie clip in the editor, then you will need to use the swapDepths method first. ant_mc.swapDepths(0); ant_mc.removeMovieClip(); ...
actionscript-3,flash,actionscript
Well, it depends. In Flash, you have the option of relying on the Flash Player's vector rasterizer and rendering system, which will figure out all the redrawing for you. For instance, you can draw once to a Sprite then simply apply transforms to the sprite (set x, y, width, height,...
string,actionscript-3,flash,actionscript,flash-cs5
You should be able to string together multiple parseint statements like this: var total:number = parseint(amount1.text) + parseint(amount2.text) + parseint(amount3.text) + parseint(amount4.text) + parseint(amount5.text); output1.text = total; If you go this route, you will need to handle stituations that involve NaN Here is the documentation on parseint if you haven't...
actionscript-3,flash,actionscript,drag-and-drop
startDrag(); and stopDrag(); are methods of the Sprite class, and also inherited by MovieClip, which is a subclass of Sprite It's a good idea to check the official Adobe documentation to see what classes inherit what methods; Sprite class TextField class Because Sprite and MovieClip are both base classes of...
actionscript-3,flash,actionscript
Your issue is confusion between object references and instantiation. When you use the new keyword, you are creating a whole new object. So in ConStartMenu when you do this: public var menuDisplay:Menu = new Menu(); You are creating a new Menu object. And, in SideMenu when you do this: public...
Simply use removeItemAt(): var i = 2; // or whatever indexed item you actually need to remove tileList.dataProvider.removeItemAt(i); ...
actionscript-3,flash,actionscript,adobe,flash-cc
Sounds like you want to constrain the object so you can't scroll it to a point where it's edge is seen? In that case, you need to sanitize your value so it doesn't go beyond that point. So, for moving the object down, instead of just subtracting 200 like your...
arrays,actionscript-3,flash,actionscript
var listAry:Array = []; var orangeJuice:Object = new Object(); orangeJuice.name= "Orange Juice"; orangeJuice.matchingImage=oj; listAry[0]=orangeJuice; ////etc etc There you go buddy. Hope that helps if you have any questions just ask....
html5,flash,video,actionscript,ffmpeg
An approach that will work on some browsers currently, and on most browsers going forwards is to use the HTML5 Video Media Source Extension mechanism. This essentially allows you replace a static 'src' file for a video in your HTML5 page, with a dynamic src buffer which you can then...
In your Tamagotchi Class you have var food:Food = new Food(); And in your Food Class you have var tam:Tamagotchi = new Tamagotchi(); This seems rather infinite loopy... (One gets created, which creates the other, which creates the first one again, which creates the other again, and so on...)...
flash,actionscript,actionscript-2,flash-8
If you want several arrows btn1, btn2... to disappear one after the other, you can do like that: var a:Array = [btn1, btn2]; var l:Number = a.length; var n:Number = 0; var keyListener:Object = new Object(); keyListener.onKeyDown = function():Void { if (Key.getCode() == Key.UP && n < l) { a[n]._visible...
Is this a list of list? Yes. It is. In c# it would be private List<List<Tile>> map = new List<List<Tile>>(); There is a difference (in c# at least) for how you access array elements. If you did a multidimensional array it would look like this: string[,] map2 = new...
Unless you're on IE, Windows 8, this feature won't work. Other browsers don't report the browser zoom amount, so that property will not be found. http://blogs.adobe.com/flashplayer/2014/09/improved-resolution-of-stage3d-content-on-browser-zoom.html
actionscript-3,flash,actionscript,flash-cs6
If you only need the variable i within the loop itself and don't need the variable beyond the scope of the loop, you can also declare it within the loop parameters: for(var i:int = 0; i < 5; i++) { trace(i); } In terms of performance it's a marginal difference,...
actionscript-3,flash,variables,actionscript
You can try: var ClassName:Class = getDefinitionByName('CustomClip') as Class; //DisplayObject/DisplayObjectContainer/Sprite/MovieClip, the base class you are using in your CustomClip var clipToUse:DisplayObject = new ClassName(); addChild(clipToUse); ...
android,actionscript-3,actionscript,camera,camera-roll
With the few details mentioned in your questions, I think this is a problem of permissions and the code is fine. Try to add this permission : <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> You can add it directly to your your_app-app.xml, where your_app is the name of your application ( project ), before </application>...
flash,flex,actionscript,indesign,extendscript
The Flash/Flex Panels are deprecated. Take a look at Extension Builder 3. You can build panels for ID CC 2014 with HTML5 and Javascript/Extendscript now. http://labs.adobe.com/technologies/extensionbuilder3/ To your questions. A1) In extendscript you can address InDesign CC like this. You can ommit the target if you want. #target "indesign-10" var...
json,actionscript-3,flash,actionscript
To do what you are looking for, you can do like this : function parseJSON(e:Event):void { var parsedJSON = JSON.parse(json.data); // trace('request-time : ' + parsedJSON['request-time']); for(var city_name:String in parsedJSON.data){ // extract data without fixing the city name in the code var city:Object = parsedJSON.data[city_name]; trace('city : ' + city_name);...
You need to add the KeyboardEvent listener to the stage - currently it'll only work if your character has text focus, which it won't ever have. A simple setup that I like, it to have an Input class, that adds the necessary event listeners and you can then use to...
As hinted by Timofei Davydik Adding [Bindable] annotation to the class made it happen: [Bindable] public class SelectRowDataGrid extends DataGrid { ... ...
actionscript-3,flash,timer,actionscript
You should update your dynamic text field inside the timerHandler like this : function timerHandler(event:TimerEvent):void { trace(upCounter); upCounter++; text_field.text = (upCounter).toString(); } Also, you have to remove this line : myTimer:String; because it is useless....
actionscript-3,flash,actionscript,mouseevent
Disable mouse interaction with children of antwoordBox's: antwoordBox1.mouseChildren = false; antwoordBox2.mouseChildren = false; Register event listener: addEventListener(MouseEvent.CLICK, antwoordboxclick); Inside the event handler: if (event.target == antwoordBox1) trace('antwoordBox1 selected'); else if (event.target == antwoordBox2) trace('antwoordBox2 selected'); ...
actionscript-3,flash,actionscript,flash-cs6
First: You have a syntax error in these two lines: _player.x = MovieClip.(root).character.x + 5; _player.y = MovieClip.(root).character.y + 5; There should not be a period after MovieClip, so it should look like this: _player.x = MovieClip(root).character.x + 5; _player.y = MovieClip(root).character.y + 5; Second: You are always creating a...
flash,coldfusion,actionscript,flash-player
Turns out that the contentType "text/xml" was deprecated and the newer version of flash player must be more strict about setting it to valid value and updating my value to the default. As soon as I changed it to "text/plain" all started working
Objects When we talk about an Object in ActionScript 3, it is important to note that everything inherits Object and that a vanilla Object instance is dynamic (meaning you can freely attach data to it without that data being defined within the class definition). You are able to initialize a...
arrays,actionscript-3,flash,actionscript
What kind of syntax are you using there and have you even checked the documentation of the Array class? That should be the first thing you check always, as there is a pretty straightforward method for it: var arr:Array = ["1111", "2222", "3333"]; trace(arr.indexOf("3333")); //traces the index: 2 ...
actionscript-3,flash,flex,actionscript,swfloader
mxml file must be named differently in loaded applications
actionscript-3,flex,actionscript,flex4.6
According to the manual, maxChars is not checked when text is altered in code. So, you have to manually control the new value of text to not exceed 2 chars. An example: protected function onNumberClick(event:MouseEvent):void { var s:String=txtGuestCount.text; if (s.length==2) s=s.substr(1); // drop first char s+=event.currentTarget.label; // if (s.length>2) s=s.substr(0,2);...
javascript,flash,actionscript,adobe
Yes it is possible, but its a little more effort as i see your using the timeline animation. Easier way to reference everything is to set up a scope of variables that can be accesses anywhere: In your situation its best to put your whole content movie inside an Empty...
actionscript-3,flex,actionscript,progress-bar
Add event handler to ProgressBar: progress="progressHandler(event)". private function progressHandler(event:ProgressEvent):void { var percent:int = Math.round(event.bytesLoaded / event.bytesTotal * 100); idOfProgressBar.label = "Downloading " + percent + "%"; } ...
May be you should put all the sprite into a Vector and you manualy remove them when you need. private var vec:Vector.<Sprite> = new Vector.<Sprite>(); private function update():void { // reduce the alpha of all other sprites // check all other sprites from the newest to the oldest (so we...
arrays,actionscript-3,flash,actionscript
Make those blocks instance of a custom class (export to as -> custom class). Run a loop on the display list and check if the objects are instances of that custom class, eg: for(var i:int = 0; i < this.numchildren; i++) { if(this.getChildAt(i) is MyCustomClass) { myarray.push(this.getChildAt(i)); } } ...
java,android,flash,actionscript
This really depends on how much work you are doing. Most times, I can use the main thread for small graphical calculations. Im not sure what you are doing, but something like setting a position based on an input sounds like a main thread thing. Generally, if you expect an...
You can center your Bitmap like that: var mybitmap_data:atkbr_jpg = new atkbr_jpg(); var mybitmap:Bitmap = new Bitmap(mybitmap_data); var mysprite:Sprite = new Sprite(); mysprite.addChild(mybitmap); mysprite.x = (stage.stageWidth - mysprite.width) / 2; mysprite.y = (stage.stageHeight - mysprite.height) / 2; addChild(mysprite); ...
In you case you could access instance you created like this: _parent[nameOfTrails] The point is that you can access an object using string with his name by searching proper object for property with that name. In your example you creating variable with id of nameOfTrails value inside some object which...
actionscript-3,flash,flex,actionscript
You can only access static vars/method from the Class object itself (eg. MyClass.method()), or from within the class declaration (static or instantiated). Here is a simplified example: MyClass.staticFunction(); //allowed var myInstance = new MyClass(); myInstance.staticFunction(); //NOT allowed //inside the MyClass.as this.staticFunctionInSameClass(); //allowed What you are trying to do is access...
actionscript-3,flash,actionscript,air
Either need a cross-domain or the path to the file is incorrect. Your AIR app is probably not running in the same folder as your mp3. See where your compiled air app is being stored and move the mp3 to that folder. http://www.judahfrangipane.com/blog/2007/02/15/error-2032-stream-error/ You may also want to use a...
actionscript-3,flash,flex,actionscript
You can check it manually by file signature. You need to read file signature from file raw data (usually first N byte) and compare it with expected file signature. Here is incomplete list of file signatures: http://en.wikipedia.org/wiki/List_of_file_signatures. But if you want to use some specific file format, I am sure...
actionscript-3,flash,timer,actionscript,range
You need to scale your values to map one range to the other. To go from 0 to 90 in 4 seconds, you'll have 90 / 4 or 22.5 values per second. So on every tick of your timer, you'd increment by 22.5 to go from 0 to 90 in...
xml,actionscript-3,flash,actionscript
Here is an example on how to do what you'd like: Using this test XML: var xml:XML = <data> <profile> <first_name>ann</first_name> <last_name> lee</last_name> <photography>sport</photography> <photography>landscape</photography> <photography>still life</photography> <image>img1.jpg</image> </profile>; <profile> <first_name>john</first_name> <last_name> thomas</last_name>...
actionscript-3,flash,actionscript,get
I think there are many points in your case that should be clarified : If you want send a URL request to a server, but ignores any response, and I think this is your case because you can't get response, It's better to use sendToURL instead of URLLoader.load(). If you...
actionscript-3,flash,actionscript,drawing
To draw something in your stage, you have added some MouseEvent listeners to your stage, so to stop drawing, you have simply to remove these listeners and clear your Graphics object, if you need of course, like this : stage.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDown1) stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUp1); stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMove1); Line.graphics.clear(); Hope that can help....
In your code, XMove is always equal to YMove, and the value of RandomNumber won't change when you call RandomNum(e:ComponentEvent) function.so the character will just move diagonally. Try this. function getRandomNumber():Number{ //return a random number in range. Math.random() * (max - min + 1)) + min; return Math.floor(Math.random() * (5...
arrays,object,memory,actionscript
The objects stored in arrayOld get garbage collected if there are no other references to them. The ones from arrayNew are not copied - they are referenced by arrayOld after the assignment. It's to say that that after: arrayNew[0].name = 'a random silly text'; arrayOld = arrayNew; arrayOld[0].name = 'another...
arrays,actionscript-3,flash,actionscript,flash-cs5.5
In your sample code "Nouns" is actually located at sampleArray[0][0] However you are replacing that with sampleArray[0][0]=["Person","Place","Thing"] Perhaps it would be easier to keep your information in an object. Then reference them that way. Not sure what your end goal is though so that may not work for you. var...
javascript,actionscript,code-conversion,code-converter
I just updated the documentation on how to use Jangaroo as a command line tool: https://github.com/CoreMedia/jangaroo-tools/wiki/Stand-Alone-Compiler After following steps 1 through 6, you can compile your single class like so: mkdir joo\classes jooc -v -g SOURCE -classpath %JOOLIBS%\jangaroo-runtime.jar -sourcepath . -d joo\classes GACodec.as Note that the generated JavaScript file GACodec.js...
arrays,flash,object,actionscript
A Vector will let you easily call the functions of your objects which are stored in that vector. var vector:Vector.<YourObject> = new Vector.<YourObject>(); vector[0].yourObjectFunction(); http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Vector.html Alternatively, you can cast the members of an Array to a specific type and then call the functions. (array[0] as YourObject).yourObjectFunction(); ...
actionscript-3,flash,actionscript,adobe,flash-cs6
In AS3/Flash, the bottom most layer is 0. So doing addChildAt(character, 1) would make your character the second to the bottom layer. addChildAt(character, 0) would make it the very bottom/back layer. If you want to make it the top most layer, you do any one of the following: addChild(character); //this...
actionscript-3,flash,actionscript,flash-cs5,flash-cs4
Your issues is likely these two lines: aBox == stage as MovieClip; aSp.source == aBox ; You're doing a comparison by using two ==, which effectively does nothing in your case. Use a single = to assign a value. This is how I would suggest you approach this: In the...
It seems that ArcusNode is no more maintained (last commit is from 2 years ago). You could try MonaServer which is a complete open source and lightweight server. It supports each features of RTMFP (object replication, NetStream, NetGroup...). They are also some samples here : Mona Samples (source codes are...
flash,actionscript,actionscript-2
You can't really use that as that is meant for loading media (such as images and other movie clips). Since html files are generally text, you can load in the data using the classes for loading in text files. It's been quite awhile since I've had to think in AS2,...
actionscript-3,flash,flex,actionscript,arraycollection
If you want to remove duplicate entries from the result, you should do like this: public function processorNameFormat(item:Object, column:GridColumn):String { var processorNames:String = ""; if (!(item is ProcessOrderDO)) { return ""; } var d:Dictionary=new Dictionary(); var poDestReqList:ArrayCollection = item.processOrderDestinationRequirementDOList ; for each(var destReq:ProcessOrderDestinationRequirementDO in poDestReqList) { var s:String=destReq.processorName; if (d[s])...
actionscript-3,flash,actionscript,flash-cs6
For player physics, it's more clear approach to make a central ENTER_FRAME handler function that just for calculating the transformations to be applied to player. You can still get information from out, but you just process the final output there. Else, it could be problematic, especially when things gets more...
actionscript-3,if-statement,actionscript,boolean
Why? Whichever you do, the compiler will optimise it on whatever platform you are currently compiling on. If you need to check if it's 0, use (i == 0), if you want to know if it's less than zero, use that one instead. Write what you would read out loud....
actionscript-3,flash,button,actionscript
learn_button.addEventListener(MouseEvent.CLICK, onButtonClick); textField.visible=false; function onButtonClick(e:MouseEvent):void { textField.visible=true; textField.text = "Three paragraphs of text..."; } ...
ios,actionscript,air,adobe,ios-simulator
To fix this issue we need to update the AIR SDK https://helpx.adobe.com/air/kb/archived-air-sdk-version.html Copy it here: Mac OS X: /Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK Windows 7 (64-Bit): C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\eclipse\plugins\com.adobe.flash.compiler_4.7.0.349722\AIRSDK and update the *-app.xml file header to this one: <application xmlns="http://ns.adobe.com/air/application/17.0"> See...
actionscript-3,flash,actionscript
Problem solved! I added the self signed certificate to my keychain on the Mac and set it to Always Trust. This worked a treat.
actionscript-3,flash,actionscript,flash-cs6
From the class you can access a variable like this: MovieClip(root).variable
I figured out a simple solution and wanted to post here for others who may need it. I created a Boolean variable (btnPhValue) and set it's value based on the value of the field AthleticsFavs in my SchoolList array. Then I set the radioButton.selected value to the Boolean var I...
One simple solution I found so far is, to iterate my dataprovider checking, if the item is selected or not. And here you go! var tmpList:ArrayCollection = ArrayCollection(dg.dataProvider); var obj:Object; for (var i:int=0; i < tmpList.length; i++) { if (tmpList[i].Selected == true) { //Added to my array collection. } }...
actionscript-3,flash,actionscript
There are several ways to achieve what you are looking for, I recommend you to check also about Touch/Gesture events, also, check this library Gestouch (very powerful and well documented and with several examples) To help you to understand how to start understanding ActionScript and this logic in question, I...
actionscript-3,flash,actionscript,adobe,event-listeners
It should be event listeners. To debug if so, add this code: if (e.target is MovieClip) trace((e.target as MovieClip).currentFrame,"in moveChar"); to moveChar function. If the same frame would appear twice in a row in the trace window, you are adding two listeners to one object, they then act separately. A...
actionscript-3,flash,actionscript,adobe,flash-cs6
Well yeah flash does that, it needs some time to properly add movieclips to Stage. It's the reason why Event.ADDED_TO_STAGE exists, read this article to understand it better. But I'd say you would be pretty safe to go with a simple if statement making sure shark and shark.hitto are properly...