0
голосов
1ответов
737 просмотров

Emulating Mouse Event AS3

I have a project that involves polling a hardware switch each update and converting its states to a custom events: ToggleSwitchEvent.BackWardButtonDown ToggleSwitchEvent.BackWardButtonUp ToggleSwitchEvent.Click etc .... The hardware switch acts similar to a two button mouse. So I would like to...

1
голосов
2ответов
202 просмотров

Group for Array

Possible to group multiple MC and post it in an Array? exp: array([mc1,mc2,mc3],[ac1],[bc1,b2]) If its possible how could it be achieve in a for...loop function?

1
голосов
2ответов
979 просмотров

How to tell when the main swf gets fully loaded?

as I learned the hard way, Flash streams your .swf, that is, it can start playing back the file even if only the first couple of frames are loaded. Normally, when loading an external .swf you would just register a handler to the COMPLETE event of the Loader or URLLoader class and that would be i...

1
голосов
3ответов
465 просмотров

How to access MC properties inside an Array

Lets say I have a MC with a x position of 100. And I push it in An array newArray.push(MC) how can I access the array and get MC.x?

10
голосов
5ответов
8237 просмотров

AS3: Check if a Dictionary is empty

Flash implements a dictionary (that is, something like a HashMap) using two approaches. One approach is the flash.utils.Dictionary class, and the other is a generic Object. I'd like to check how many key:value pairs are in the dictionary. In most cases I'd simply like to know it there are any key...

0
голосов
2ответов
5813 просмотров

How to manually set focus in AS3 so mouse wheel works?

(This is a question for Flash 9/10 AS3.) I'm trying to solve a problem where the user has to click on an area before it starts getting mouse wheel events. I assume the focus is set elsewhere so in the ctor for my movieclip that is asking for events, I say "stage.focus = this". This ought to wor...

2
голосов
5ответов
4179 просмотров

Optimizing AS3 SWF files for size?

Are there any tips / best practices / secrets for optimizing the size of AS3 SWF files? In particular, any way to get a breakdown of what is taking up space inside the SWF, like you used to be able to in the old Flash 7/8 days? I'm not using the Flash IDE any more, but now I'm using either Flex B...

2
голосов
3ответов
1646 просмотров

Flash/PHP File Upload Speed Issues

I am trying to write a simple, in-house file delivery application for uploading files for easy download on our client's end. I am using Flash with a very basic PHP script receiving the file. So far, this does work. The problem statement is: using FTP, a 100 MB file will upload in 2-3 minutes. Us...

0
голосов
1ответов
184 просмотров

Find which AS3 classes are included in a SWF

I have been investigating swfmill and ran it against some of my AS3 SWFs, I get <UnknownTag id="0x52"> <data>...</data> </UnknownTag> and UnknownTag id="0x4C"> <data>...</data> </UnknownTag> These lines are most likely contain the d...

0
голосов
1ответов
319 просмотров

actionscript3 print array value on button rollover

I have created a flash map of the uk which is splti into regions, each region is a button that is fully visible when not rolled on and and fully transluscent when rolled over(to show the same region in a different color). What I need now is for when the button is rolled over I need it show the r...

4
голосов
3ответов
1360 просмотров

AS3, loading in a SWF as a custom type

Fundamental question here. Typically in AS3 you load in a SWF via the Loader, and what you get is some sort of pseudo MovieClip that is of type "Loader". Is there any holy way under the sun to cast this loaded SWF to a custom type that extends MovieClip and not Loader, assuming the SWF was publi...

5
голосов
2ответов
9005 просмотров

Reset a flex label width to "auto" after setting an explicit width?

Once I've set either the width or percentWidth property on a flex label, is there a way to reset the width to its default (i.e., the width of the text plus padding)? I'm using the label as a renderer. In some cases, I'd like it to automatically size to the text, and in other cases, I'd like i...

1
голосов
3ответов
2572 просмотров

Error #3119: Database file is currently locked

I have developed to applications in flex. The one application constantly retrieves data from the internet, while the other can be opened and closed when you want, both apps use the same database. The problem is that at random I get an Error #3119: Database file is currently locked. Is it not poss...

0
голосов
1ответов
2478 просмотров

Play random sound and match to movie clip quiz AS3, CS4

I am creating a quiz in which the user matches an object (movie clip), to a sound clip that is played. The sounds are stored in an array and a random one is chosen. Then 4 random movie clips are created dynamically which hold the object image. I need a way to link the sound clip to the movie clip...

4
голосов
4ответов
7347 просмотров

Creating a large 2D array and populating it in AS3

I was wondering if there was a better way to create a large 2D array and populate it with a single item with AS3? This is a quick example what I'm currently doing: private var array:Array = [[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,...

6
голосов
5ответов
6597 просмотров

Play FLV from ByteArray in Flash Player

I have a flash video file (FLV) stored in the ByteArray object and would like to play this video. Is there any way to achieve it? Maybe using Alchemy? Thank you!

1
голосов
1ответов
2419 просмотров

How can i give password validation in flex

I want the validator for password text input. At least one Upper case letter At least one numeric character At least one special character such as @, #, $, etc. should be there in password how can i give it in action script or mxml.please help me. Thanks.

0
голосов
1ответов
172 просмотров

Previous array MC position

I'm basically trying to create a tree diagram. I've created the 1st level and I wanted to put it into an array so the next level would be able to get the properties from the previous level/array. But now it seems like I cannot push the circles with its own unique"name" into circlesNewArray. what...

1
голосов
1ответов
2338 просмотров

ListItemRenderer background color

Using flex4, I have a list with an item renderer: <mx:List id="queueView" dataProvider="{presenter.queue.items}"> <mx:itemRenderer> <fx:Component> <mx:VBox> <mx:Label text="{data.name}"/> <mx:Label text="{data.artist.name}"/> ...

0
голосов
1ответов
329 просмотров

childAllowsParent

A simple question, really - but one I've been beating my head against the wall for hours and hours trying to solve: How do you make the childAllowsParent property of an SwfLoader go from false to true, that is, how as a parent application do you set up security to make the child app's events and...

0
голосов
1ответов
379 просмотров

Is There an Offset Equation for Z Position Change in Actionscript?

Say I have a movie clip that when loaded I set it's .z position to 2000 to make it look far off in the background... How in the world can I set it's x and y points with any certainty as to where it will appear on the stage? Is there an equation? E.g.; original.x = 200; original.y = 200; origin...

2
голосов
3ответов
683 просмотров

Can an overlapping sibling prevent an Event?

Below is the code for a simple Flex actionscript project. A sprite is partially covering a hyperlink. What's happening is that when you hover over the sprite, if you're also hovering over the hyperlink, the hyperlink is activated. I want to prevent that. I want the hyperlink to be activated only ...

6
голосов
3ответов
15909 просмотров

Set Dynamic Variable name In ActionScript 3.0

I need to set custom variable name for every iteration. Why this isn't possible? for (var i:uint = 0; i < 50; i++) { var ['name' +i] = new Sprite(); } *//1840: Syntax error: expecting identifier before left bracket*

0
голосов
1ответов
1131 просмотров

3d maths in Flash AS3

I'm trying to code a 3d wall like http://www.flashloaded.com/flashcomponents/3dwall/ The shape I am looking to create is like a bath or arena where it is a curve cornered rectangle with sloping sides. The image below shows what i'm trying to achieve if viewed from above. I hope that helps. ...

1
голосов
1ответов
3443 просмотров

Buttons in AdvancedDataGrid in Flex

Is it possible to have a Button object in a column in an AdvancedDataGrid object in flex 4? And how would I do this?

1
голосов
1ответов
476 просмотров

Flex: Placing items on the canvas element

I am writing simple game on flex. In the game there are 2 objects Board and Stone (both are extended from the Canvas super class) When I started to place Stones instances to the Board Canvas, I come across the problem, I can't understand how to set Stone on the defined position on the board. So...

0
голосов
1ответов
1054 просмотров

How can a child Sprite prevent a Mouse Event from reaching its parent?

Below is the code for a simple Flex actionscript project. A sprite is partially covering a hyperlink. What's happening is that when you hover over the sprite, if you're also hovering over the hyperlink, the hyperlink is activated. I want to prevent that. I want the hyperlink to be activated only...

2
голосов
2ответов
531 просмотров

actionscript: undefined public variables?

I have a class like this.. public class Doc { public function Doc():void {} public var myVar:Boolean; } How can I know if the value held by myVar is default false, or someone has assigned false to it ?!? Isn't there an undefined state? How can I achieve such a thing?

1
голосов
2ответов
2611 просмотров

flex 3 data grid: hide value if == 0 and show checkbox on Booleans

I have a data grid. How can I hide a value of a column if it's "0" ? Do I have to use item renderers? How? Is there an easier way? Second thing, if I have a boolean column whose values are actually the strings "true" and "false" how can I render it as a non editable check box? thanks

0
голосов
1ответов
506 просмотров

Flex: Highlighting element on mouse over

I have a canvas with several small canvases on it. Like this: public class Board extends Canvas { public function Board() { //cellWidth = this.width/boardSize; //this.drawMech(); addEventListener(FlexEvent.CREATION_COMPLETE, creationComplete); super(); ...