I seem to have trouble getting a keyboard event within a class to work, I have an ENTER_FRAME event which works fine, but the keyboard event never gets called. Any ideas? here's the code
package
{
import flash.display.MovieClip;
import flash.display.Stage;
import flash.events.*;
public class mainGame extends MovieClip
{
var myPlayer:...
I load an image and add it to the MC someMC. If "something" is true, the someVariable gets the someMC scaleX number. Let's say its 0.82.
What I need is to get that number into the s.value in my Slider object. Since I want the Slider value to be where my image scale is.
This of course doesn't work because of variable scope limitations.
...
Is there a way to change private static field of an alien class?
For example:
package mx.managers {
public class TooltipManager ... {
private static var _impl:IToolTipManager2; // <- assign my own value here
...
}
}
In Java it is possible to do it using Reflection API. What about Flex?
...
How would I increase the child index of a movie clip by 1?
...
Hi there, I've looked through the forums, and couldn't find the answer to my question outright, so I figured I'd just ask it. Apologies if this question has been asked already.
I'm trying to load an external html file into a dynamic text field. The dynamic text field has html display enabled. The html file contains a list of links in ...
Hi,
I am using context menu using the code given below in a flex air application. For me all Context Menu Clipboard Items are working fine except "clear".
Plese suggest me where I am wrong.
var cMenu:ContextMenu = createContextMenu();
private function createContextMenu():ContextMenu
{
var editContextMenu:ContextM...
Say I have a BitmapData of 600x600 and I want to scale it down to 100x100.
...
I created a samble checkbox:
<mx:CheckBox label="checkbox"/>
Is there any way to disable checkbox state changing when clicking on it's label?
Checkbox should change is's state only when i click
[V]
but do not change state when i click it's label
...
Hi,
Im loading images into Flash and using JPGEncoder to encode the image to a ByteArray and send this to AMF PHP which writes out the bytearray to a file. This all appears to work correctly and I can download the resulting file in Photoshop CS4 absolutely fine. When i try to open it from the desktop or open it back in Flash it doesnt w...
I'm working on a basic editor application. It uses an array of varying size that I want to store to disk. This will eventually be in an AIR application, but for now it's just an AS3 project in Flex.
I want to store the array in a file. The application edits the data, so it doesn't need to be human readable. I want it to be in whatever ...
Does anyone have any examples on how to create a dynamic number of TextInput boxes and have each of the text being typed in these boxes be bound to a label? For example, say I have an XML file that specifies that I want 3 TextInput boxes. Flex should then take this data, create the TextInput boxes, create bindable variables for each Text...
Hello, I'm trying to create a grid where the users can 'draw' across it and change the colors of the grid squares to a chosen color.
In this code, I'm creating the grid with squares. I've got the functionality 'working', but it's only working on the last square instanced.
How do I get it to work on all the squares, not just the last on...
I'm not using the Flex libraries or anything from Flash. I'm developing a pure AS3 project in Flexbuilder which I would like to deploy as an AIR application.
What are my options? What's easiest? I'm having trouble finding a straight answer here.
...
Hi all. I’m in need of some dire help here. I'm writing an application in Flex 3 that utilizes a TileList with a custom itemRenderer to display info from a service. Unfortunately, I'm running into an exception with the drag/drop/rearrange portion of the TileList. With dragEnabled and dragMoveEnabled, I receive a fully-reproducible ex...
I have seen questions here asking about xsd->actionscript objects, but these seem to require xsd->java->actionscript and is all in source code. Our requirements are a bit different:
receive an xsd during runtime that we have never seen before
Create an instance object based on the xsd
fill in the values of the instance (either from an ...
I wrote a AS3 script, basically the script just a form that allow user to enter their email address. After launch the site for couple of months, I found I receive a lots of BOT spammers. I know, 1 way of prevent BOT is using recaptcha thing, beside recaptcha, is there any way to prevent bot to submit my AS3 form??
...
I have a task of getting the snapshot of Adobe Flex application (imagine graphs, charts and tables) and produce the PDF file of it from inside of that same Flex application.
Imagine having a button that would do the screenshot and dump it into PDF file. Does anybody know the framework and/or component that would have such functionalit...
I am in the process of creating a new - "lite" - version of a Flex application I created a while ago. I have been porting over many of the Classes and Components to a Flex Library Project that compiles an SWC file. Because both are Cairngorm applications, I'm not able to completely eradicate duplicate code, but it seems logical that I sh...
Hello,
I've tested the following code:
function aa(...aArgs):void
{
trace("aa:", aArgs.length);
bb(aArgs);
}
function bb(...bArgs):void
{
trace("bb:", bArgs.length);
}
aa(); //calling aa without any arguments.
The output is:
aa: 0 //this is expected.
bb: 1 //this is not!
When I pass empty arguments (aArgs) to bb functi...
Why do you think the code below does not work?
What would you change/add to make it work?
Any help is appreciated..
function TraceIt(message:String, num:int)
{
trace(message, num);
}
function aa(f:Function, ...args):void
{
bb(f, args);
}
aa(TraceIt, "test", 1);
var func:Function = null;
var argum:Array = null;
function bb(...