actionscript-3

this.width within a class always returns the same value.

Within my AS3 class I am calling this.width, and the value it returns is always 1, even though this is impossible given the contents of the object. Is this a standard behavior for AS3? Simple version of class is posted below. It is attached to a MovieClip symbol that just contains a simple hexagon. package { import flash.display....

How can I calculate shades of a given hex color in actionscript 3?

Hi all - I need a way to calculate lighter hex color(s) based on a provided one. I realize I could use a color transform, but I need the actual value in order to generate a gradient. Thanks in advance for any help - b ...

AS3 Error #2044. Once dissmissed the app works fine.

I'm working in as3 and my code is producing an error: "Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed." Other then the fact that the app is producing this error and interrupting users who have a the debug version of the adobe flash player the app works just fine, I "Dismiss All" errors and I've been debugg...

how to create simplest text link to open visitors email client in as3

I would like to know the simplest way to use a text link and open a visitors email client. ...

Whats the simplest way to obscure or hide the paths being used in a PHP - AS3 project

I am working on a project that uses PHP , AS3, and AMFPHP . The project allows users to upload and download images among other things. Since I am fairly new to PHP/FLash security I have been trying to gather as much info about making things as secure as possible. I've got some good advise about using .htaccess files, and a few other tri...

when i debug my code nothing appears on screen. I've rechecked the code and consulted with others yet nothing appears. my html template is fine.

package { import flash.display.Sprite; import flash.events.*; public class asgnv2 extends Sprite { var lineY = 0; public function asgnv2() { stage.addEventListener(Event.ENTER_FRAME, update); graphics.lineStyle(1); } function update(e){ graphics.clear(); graphics.moveTo(0 ,lin...

I Want Access To a Public Static Const in my Actionscript Without Instantiating an Object... Is That Possible?

I've got a static property I would like to access by importing it's class without instantiating an object of that class. Is this possible? Essentially I'm writing a bunch of styleSheet Objects over and over. I figure If I have a class called CSS and like this: package com { import flash.text.*; public class CSS { pu...

Read xml file from client

I'm trying to read a xml file from client. After search for it. I have got to upload the file to the server with this code. var imagesFilter:FileFilter = new FileFilter("*.jpg,*.gif,*.png", "*.jpg;*.gif;*.png;*.jpeg"); fileRef.browse([imagesFilter]); But what I want to do is to read the file from client and parse it without uploading ...

Flash Actionscript 3.0 FLVPlayback and VideoEvent.STATE_CHANGE Oddities

Hello all, This is my first post, but this question has racked my brain and Google's servers all night, so I thought I would pose the question here. Let me get started on the preliminaries of my problem so I can elaborate the issue. I know FLVPlayback is buggy but this seems like either a version problem or I might be in need of an upd...

unsigned array with keys in AS3?

hey how to create unsigned arrays with keys in actionscript 3? in php its simple: array('key' => 'val'); in ac3 you can create unsigned arrays like that: ['val'] ['key': 'val'] // breaks ...

Flash CS4 + SQLITE

Hi, I'm looking for some information regarding using SQLITE with AIR in Flash CS4, I cannot find any good examples, they're all built for Flex (which I don't want to use). Can anyone give me some basic examples of how to do this with Flash CS4 or direct me to some code examples / tutorials? I cannot find any anywhere... ...

flash as3: anonymous objects creation when calling a function?

Hi. If I want to send an object to a function with one child called foo equals "bar", i need to do the following: var obj:Object = new Object(); obj.foo="bar"; myfunction(obj); is there a way to declare the object in the function itself ? something like that: myfunction(new Object{foo:"bar"}); thank you! using flash-as3. ...

Flash programming tutorials

I want to use Flash to write games. I don't want to learn about how to create glossy buttons for my 2005 website, or how to use the motion tween interface-- I just want to learn ActionScript 3 and the development environment. Suggestions? EDIT: I already know plenty about game programming; I'm just new to flash. EDIT: I found this sit...

Actionscript Mouse event problem

Hi, i am trying to implement the following control on a movieclip object. When the mouse pointer is over the object and if the left mouse button is clicked and stays clicked then a mask that overlaps the movieclip object is starting to disappear. I tried the MouseEvent.DOWN, etc but i did not succeed to implement this functionality. Prob...

AS3 + addChild() getting image from library to the stage

Hi, I have an .fla file with 1 image in the library and 1 .as file. I have linked the image up with the Class name of libraryImages and Base class is flash.display.BitmapData. This is my AS: package { import flash.display.Bitmap; import flash.display.BitmapData; import flash.display.MovieClip; public class Banner ext...

Why would same SOAP request work in one Flex project and not another?

This is a pretty odd situation I have here. I have used a piece of code to interact with a backend SOAP service for several months - it works fine. I tried it out in a different project (first as an swc library and then just by cutting and pasting) and it just doesnt work. If I try the exact same code in the original flex project, conne...

Can I load bitmap data from the library in AS3 without specifying a class name for linkage?

I have a movie clip that holds one bitmap image, some simple AS3 to change the image displayed, and a ton of bitmaps I've imported into my library. Currently, I swap the images by changing the bitmapData holder.bitmapData = new test2(1,1); but this requires me to check off 'Export for ActionScript' in every symbol. I'd rather not go ...

Get Flash CS4 Intelisense to recognize Objects on stage?

When I create an object of a movieclip in code I get the flash intlesense to pop up in Flash CS4 Actions panel which is very helpful but if I simply place a moveclip on the stage then give it an object name in the options the Flash intlesense does not pop up in my code. Anyway to get Flash intlisense to work with objects placed on the s...

Flex component communication

I use a popup loaded from different MXML file: private function showAddPopUp():void{ addPopUP = PopUpManager.createPopUp(this, add_popup, true); PopUpManager.centerPopUp(addPopUP); } That file is as follows (add_popus.mxml): <mx:VBox width="100%" height="100%" paddingLeft="5" paddingTop="5" paddingRight="...

Problem with Actionscript Regular Expressions

I have to parse out color information from HTML data. The colors can either be RGB colors or file names to a swatch image. I used http://www.gskinner.com/RegExr/ to develop and test the patterns. I copied the AS regular expression code verbatim from the tool into Flex Builder. But, when I exec the pattern against the string I get a n...