I am using the Flex SDK within visual studio and trying to dynamically add a button to the stage. Here is a quick example of what I am doing.
public class Test extends Sprite
{
public function Test()
{
init();
}
private function init():void
{
var btnBrowse:Button...
I am trying to rotate a Sprite in three dimensions around its centerpoint, and I am struggling to understand some of the behavior of matrix3D.
Ive overridden the set rotationX, rotationY, and rotationZ methods of the Sprite as follows:
override public function set rotationX (_rotationX:Number) : void {
this.transform.matrix3D.pr...
My problem is that I can't figure out how to decouple the loader from this loadNewRow function. Ideally, I'd like to figure out how to load all the swf's give them dynamic names... like thmb1loaded, thmb2loaded, thmb3loaded.. push into an a ("loaded") array and then have that be used to build the grid.
Right now, its loading them every ...
I am looking to make a card game in Flash CS4 using AS3 and I am stuck on the very first step.
I have created graphics for a standard 52 card deck of playing cards and imported them into the library in Flash and then proceeded to convert them all to Movie Clips.
I have also used the linkage to make them available in the code. The movie...
What easiest way to place cursor (focus?) into an textfield input box for receiving user input after an event? Focus Manager classes have always seems very confusing to me.
...
Below I have an array that works but it is far too long and I am thinking there is a far easier way to generate the same result using a loop but I just can't get my head around it at the moment. The array is as follows:
var CardDeck = new Array();
CardDeck[0] = new C1();
CardDeck[1] = new C2();
CardDeck[2] = new C3();
CardDeck[3] = new ...
I'm about to write a class called CurrentDate and need a solid package name. The obvious answers are com.destroytoday.date or com.destroytoday.time, but I'm not sure if I'll have more date-related classes in the future to justify an entire package. Are there any names I can use that would allow non-date-related classes in the future?
To...
Consider this (psuedo-code):
var country = new Country();
addChild(country);
var state = new State();
country.addChild(state);
var city = new City();
state.addChild(city);
I can dispatch events from the city up to the country like this (in the City class):
dispatchEvent(new CustomEvent(CustomEvent.WHATEVER));
Because events bubbl...
I would like to do the following:
Have a few objects (e.g. 20 of them), each time I mouse over any one of them, it moves up and each time my mouse leaves, it moves down.
obj1.addEventListener(MouseEvent.MOUSE_OVER, moveMyself1);
obj1.addEventListener(MouseEvent.MOUSE_OUT, moveMyself2);
obj2.addEventListener(MouseEvent.MOUSE_OVER, moveMy...
I love tumblr because it is so easy to use and you can generate xml's of all or parts of the content.
Does anybody have experience in using tumblr or similar platforms as a backend for flex/actionscript projects ? Advantages/Disantvantages?
Are there some minimalistic examples out there ?
Thanks a lot
...
Hi all,
I'm having a blackout here. I thought I understood these principles, but I can't seem to get it working anymore. I want to let a DeleteButton inherit from a general Button class. This DeleteButton should alter the protected padding values and have a static label. This is what I have:
public class Button
{
private var _label...
Hello, thanks in advance..
I have a question about a TypeError: Error #1034: Type Coercion failed: error. I'm loading a SWF into my application into a child domain of the parent SWF. I thought this was supposed to allow the 2 SWF's to share the class definitions?
var myContext:LoaderContext = new LoaderContext( false, new ApplicationDo...
Hi there,
I am using the following code to create a dynamic reflection of an image:
{
input image4 src;
output pixel4 dst;
parameter float imageheight
<
minValue: 0.0;
maxValue : 1000.0;
defaultValue :300.0;
>;
parameter float fadeheight
<
minValue : 0.0;
maxValue: 1000.0;
defaultValue: 50.0;
>;
parameter fl...
I am adding "layer" objects to the stage with a depth value.
I have then created my own camera class. When I tell the camera to move to the right what Im actually doing is telling each layer object to move to the left.
The distance that the layer moved to the left is based on the value of its depth variable...
var fCameraDepth = 1;
va...
Is there a way to make the datagrid scroll if it's width exceeds it's parent container (instead of making the parent container scroll?)
I have a datagrid with a fixed column, and of course I want the scrollbar to appear for the datagrid and not the enclosing HBox.
I already set minWidth of the HBox to 0, tried autoLayout=false, but wit...
I have a data structure as the image below illustrates. I need to quickly figure out the index of the cells to the right or left of the highlighted cell group.
You can see in the code below I am naively looping through ALL cells at every index to determine if there is a cell at the requested index. This works great when I have a few (...
I'm having issue to init a menu item inside of CustomEvent. It's weird I can handle any mouseEvents (click, over or out) without any problem. But NOT with Event.INIT or Event.COMPLETE.
For some reason, It doesn't fire...
Does anyone know is there a better way to do that?
My code:
private function handleMenu(event:CustomEventCenter):vo...
There's a few questions on stack overflow on this topic but I'm still unclear:
I know the flash engine is single threaded so when it receives an event, does it essentially break off, execute any registered event listeners (in no guaranteed order) then return to the current scope?
If I have this code:
addListener("stuff", function():vo...
Hi,
I want to develop a zooming effect like this gallery: http://www.monoslideshow.com/
Can anyone give me a hint? I'm not sure about the math that i have to do for getting something similar
Thanks in advance
...
I've been using FDT for a long long time, on my new machine, with the Enterprise edition, I cannot add breakpoints on the editors gutter, and the debugger doesn't show any variables when testing with the external player.
Any ideas on how to fix, is it some obscure Eclipse setting, or and FDT setting?
...