actionscript-3

Preloader in as3 using preloader sample provided in cs5

I am working on a project in which i want to add preloader and for that i have used the sample preloader provided in cs5 (in sample files). i have moved(from another fla) all my code to second frame and all library content to current fla's library. Now the problem is that the size of first frame is now 182kb (the size of library content...

Error #1030: Stack depth is unbalanced

I've got this strange problem where this code: private function initLevel():void { var levelMap:Array = [ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] ]; for (var y:* in levelMap) { for (var x:* in levelMap[y]) {...

Flex Canvas keyboard event handling

In the attached code sample, keyboard events just don't work. The control never reaches handleKeyDown, no matter which key I press. <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Canvas creationComplete="initIt()" id="can1"> <mx:Label text="it's here" y="2000"/> <...

Friends Invite for Facebook HTML and Javascript

How can i add in my facebook application invite friends. First of all i use actionscript, in order to handle invite issue i searched so many sites but i ve got nothing, cuz facebook doesn't support invite actions. then i learnt that javascprit can handle this, however i couldn't find anything valuable about that ...

AS3 -> PHP -> DB, how to make it secure?

I have to make connection to the DB and Insert a row based on the data that the SWF sent me... I will need to make it so that the SWF->PHP part is secure by not letting users tamper with data. I don't want to use SSL because its not a suitable solution... what other method is available? ...

How to define interface method with diffferent arguments in AS3?

Hi! I'm trying to define interface in which one method (initPage) needs to have different arguments in every implementation. How can I do this? Using ...args for me is not good, because I'm loosing strong type checking. public interface IPage { function initPage(...args):void; function showPage():void; function hidePage():vo...

Link TemplateMonster with Flash Moto CMS

Hey, I've installed Flash Moto CMS, and I want to link it with any kind of TemplateMonster but I have no idea on how I can do this right now. So I'm asking you for help ! Any documentation, any video tutorials !!! Thanks ...

Footer in Spark application

I'd love to be able to setup a footer at the bottom of my spark application, which runs in a browser. I was reading through the documentation of Application and the awesome Adobe examples. Unfortunately I keep getting lost when the documentation talks about how to position the control bar area at the bottom via spark.skins.spark.Applicat...

AS3 OOP Game Development Structure

Hello, I'm wondering what is the best practise for gamedevelopment for actioncript 3. I'm currently in the progress of creating a tile-based game, but I'm already having some troubles using seperate classes. This is the current situation: Main class Generates the tiles Adds player class Adds interface class The interface class con...

How to manage complex models? or just Cache data from database?

My app has windows that are components. In my case, now I have 2 components that have a drop down list that show the current logged user lists. So when I use one component for the first time it make a request to database, save data in model, and load data from model, but when the second component opens, it will just load data from model....

[Adobe AIR] How can I catch the event of image loading completed?

Core of my code is following: var img:Image = new Image; img.source = 'http://..........'; img.autoLoad = true; img.cachePolicy = 'on'; img.addEventListener(Event.COMPLETE, function(event:Event):void { trace('Loaded!', img.source); }); img.addEventListener(SecurityErrorEvent.SECURITY_ERROR, function(event:Event):void { trace('E...

Opening software keyboard on Android Flash 10.1

I'm developing a mobile Flash application (not an AIR app) running in the browser. According to Adobe: Flash Player 10.1 provides support for use of native device virtual keyboards with TextField support if no physical keyboard is detected. A virtual keyboard is automatically raised and lowered in response to focus changes ...

how to add childs to canvas in varius orders

Hi, I need help to add childs to canvas. I want to add childs to canvas in top-down direction and left-right direction? I'm using the addChild function but I don't want to calculate the X and the Y for each Item. is there a way to do that? ...

Need a unitive criterion to measure the swf performance on different devices?

In our project, swf assets are provided by cp(content provider). To guarantee these assets are not overproof, we need an application to check them. This application is run on different devices. So, we need a unitive criterion(not CPU occupancy) to measure the performance of all the swfs. I had an idea, that is to calculate the number of...

Math Equations for Random Snow in a Snow Globe

I've been experimenting with this and I haven't been able to come up with an adequate solution. Hoping one of you Mathletes can point me in the right direction. I'm building a Snow Globe in ActionScript 3 and I need to come up with a set of equations to control two level of snowflakes - one level random, and the other interactive where ...

Actionscript Filtering XMLLists (Hierarchy) Best Practices?

I have been trying to decide what the best way to filter a set of data for a tree view is. The filters are in the following XML format: (sometimes) Filtering two datasets: > AND So I've been thinking about writing special conditions for the following, which are required at times because som...

Whats the right / best way to filter HierachalData in Actionscript that consists of varying filters, how they apply, and differing hierarchal datasets

I have been trying to decide what the best way to filter a set of data for a tree view is. The filters are in the following XML format: using periods instead of carots .Category. .FilterCategory(sometimes) FilterAgainstAttribute, FilterDataToCompare, FilterCategory. .Filter Attributes(FilterAgainstAttribute, FilterDataToCompare, Filter...

ActionScript 3 not working (Flash CS5)

I was recently trying to help a friend get started with Flash, and ran into a very weird bug. It looks like AS3 isn't being evaluated. Something as simple as a trace statement on the first frame of the movie doesn't produce any output. When I switch over to AS2, the trace statement works. What's going on here? Is it a problem with his Fl...

Adobe Facebook API Facebook.login VS Facebook.ui popups

I'm currently building an application using the Adobe Facebook API and I've run into an issue where for the login method the Facebook login popup displays but when doing a Facebook share/post the popup is blocked. This code works fine and displays me a Facebook login popup without question (Firefox): var permissions:Array = ['publish_s...

Creating an MCQs exam and have an error with the counter of the score in Actionscript 3

I'm going to make a counter that will count the correct answers of an exam questions. The counter will collect only the correct answers from each frame. Here is the first frame: var counter:Number = 0; var correctAns:Number; correctAns = ans1_mc.alpha; function clicked1(event:MouseEvent):void { ans1_mc.alpha = 1; ans2_mc.alpha = 0; a...