actionscript

How do I detect that Drag and Drop operation ended?

This is in reference to My Other Question How do can you detect and dispatch an event when a drag and drop operation ends prematurely? I need to know that the user is no longer dragging an item. Even if the dragDrop and dragComplete events do no fire. Its almost as if I need to add an event listener to the dragManager, but that's not ...

FlexUnit4: [Test(expect="Error")] doesn't catch errors?

The title says it all. The following code produces a failed test, not a passing test (as I would expect): [Test(expects="Error")] public function someTest():void { throw Error("this test doesn't pass"); } ...

AS4 Flash Importing Custom Classes

I am trying to import classes to no avail. test.fla timeline 1: var main:Main = new Main(); main.as package{ import flash.display.MovieClip; public class Main extends MovieClip{ public function Main() { var _myClass:myClass;//this line will fail trace("Main"); ...

Assigning icons to a ComboBox's List using dynamically-loaded external images.

I'm trying to implement this for an instance of ComboBox specifically, which uses a List to display the dropdown menu full of items. Lists can have icons associated with them, as described in the documentation: var comboBox = addChild(new ComboBox()); comboBox.dataProvider = new DataProvider([{label:'item1',iconClass:IconClass1},{label:...

Flex SWFLoader alignment issue when new image is loaded

I've got a SWFLoader aligned to the center of an App like below: <mx:SWFLoader id="imgLoader" scaleContent="true" width="100" height="100" horizontalCenter="0" verticalCenter="0"/> The problem is that when I load new images of various sizes, they are not aligned to the center of the app. If the image is 10x10 pixels it is aligned to 0...

action script2.0 help

in flash when i click on button this open a new window. but i need this in self window. my action script is that on (press) { getURL("index.html", _self); } ...

How do utilize the fullscreen in ActionScript?

Does anyone know how to make your website fill the entire screen in ActionScript? ...

Geocoded highscore table in Flash?

How do I make a Flash quiz with an internal high score table dividing players by country? I want to make a geography Flash quiz of the "how well do you know other countries?" variant. The catch is, after each question there should be a stats page comparing your score with players from other countries' scores, so you can see who knows ea...

Dead-simple introduction to TDD (Test driven development)

Hello. Even though there are plenty introductions to TDD (even in PHP, my primary programming language now), I'm feeling a bit stuck about it. My friend introduced me TDD a while ago, but I wasn't actually able to understand it - what's the point in writing tests to everything first - even the simplest tasks - when in the end, it looks...

resize flash stage

I created a game but I made the game a little too big. It would be alot of hard work to shrink all the objects in the game and resize the stage using the properties. I notice that in debug mode the whole screen can shrink when you adjust the window. Is there some code I can use to this on it's own? and will it be costly on performance ??...

connecting to kongregate api

Just checking to see if anyone uses kongregate. If so, I am having issues. When I connect to kongregate locally on debug mode it works fine. but when I upload the game to their servers, I get the following error. TypeError: Error #1010: A term is undefined and has no properties. at com.objects::Engine/GameMenu() at Function/http://adob...

AS2 TweenLite : using TintPlugin

Hi, I have a problem with the TweenLite Tint Plugin in AS2. Is there a way to decrease the alpha color ? For instance : TweenLite.to ( mc, 1, { tint : 0x586AB4, blurFilter : { blurX : BLUR_FILTER, blurY : BLUR_FILTER }, dropShadowFilter : { blurX : BLUR_X, blurY : BLUR_Y, distance : SHADOW_DISTANCE, strength : SHADOW_STRENGTH, angl...

SecurityError: Error #2122: Security sandbox violation: LoaderInfo.content:

I am creating a game that uses tiling and xml files. I am trying to retrieve these files from an outside server. When I run the program in debug mode on my local machine, it works great. But when I upload to a server. I get this error SecurityError: Error #2122: Security sandbox violation: LoaderInfo.content: A policy file is required,...

Loading a bitmap from the flash library

OK!! I built a game that grabs a tileSheet (bitmap image) and some xml files from an outside source (not from the library). Turns out that this is a bad idea if I want to post my game on most sites. Cause majority sites only give me ability to load a single file. NOW, I need to figure an alternative. I tried doing the cross-domain thin...

embedding sources dynamically

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 )] ...

embedding a Movieclip with flashDevelop

I am trying to embed a movieClip with flashDevelop but apparently its not working because its not recognizing the movieclips that are within it. here is my code package com.objects{ import flash.display.MovieClip import flash.text.TextField; import flash.events.*; import flash.text.TextFormat; [Embed(source='../../...

flashdevelop not compiling correctly

When I try to compile my application in flash develop. it wont compile. even if I put a simple trace in the Main class. Nothing happen. the sdk is in the correct place. ...

Save a file from server using flash

I have added a button in flash I want this button to save a mp3 file from the server when a user clicks on it inside a browser. One way to do this is: import flash.net.FileReference; import flash.utils.ByteArray; var fileReference:FileReference = new FileReference(); var data:ByteArray; // load up your data into this ByteArray fileR...

External SWF variable updates global variable in Main timeline

I have been searching all over and have yet to find an actual working solution for this I have 2 movie clips, one being loaded into a container MC via "loadMovie();" In the main movie there is a variable with no value, in the external movie there are 5 frames, each with a value to update the variable in the main movie. IE: if on fram...

Is actionscript case sensitive?

on(rollover) and on(rollOver) both work,but I'm not sure if it's case sensitive? ...