I need a formula that returns normalize numbers for xy point - similar to actionscript's normalize() function.
var normal = {x:pt1.x-pt2.x,y:pt1.y-pt2.y};
normal = Normalize(1) // this I do not know how to implement in Javascript
...
I just started using Keith Peters Minimal Components. I am having an issue related to PushButton Class and I am hoping that someone has run into the same issue or may know what the solution is.
The problem is pretty simple. The TextField or Label if you will, on the button is not showing up. Here is the code.
bn = new PushButton();
bn...
Hi:
I'm in the midst of creating a Bumptop styled selection tool. Right now I got as far as creating the tool itself (which actually works pretty good) and spreading some random square items on the stage. This is the class that creates the selection tool :
package com.reyco1.medusa.selectiontool
{
import flash.display.Sprite;
i...
Hi,
I'm using the ravis FusionWidgets component in flex to create guages.
I have a problem to change a guage in my program.
I build an mxml component with the guage like this:
"ns1:FusionWidgets id="myGuage" width="{guageWidth}" height="{guageHeight}" FCChartType="{guageType}" FCDataXML="{guageXML}" y="0" x="0"/"
when the guageType and...
for example:
package{
public class A {
var test:String;
public function A()
}
}
class B{
}
the code is in the same file, we call B is inner class, then how to call the constructor of class B
...
I have two frames with as3 code:
// frame1:
gotoAndPlay("show controls");
// frame2 - have movieclip with name slide0
// create menu items click listeners
for (var i:int = 0; i < slides.items.length; i++) // slides.items.length = 1
this["menu_item"+i].addEventListener(MouseEvent.CLICK, menu_item_click);
// click on the first menu...
Hi there!
I have created a simple SWF-loader in ActionScript 3.0. It loads an SWF from a server and then plays it. While downloading, it displays the "loading" screen.
Its main defect is that it can load only one Flash application - the one which it is compiled for. Let's say it's named test1.swf.
Is there any way to make the loader supp...
Both JS and AS3 implement RegEx as defined in the ECMAScript edition 3 language specification (ECMA-262).
Although I may not have any trouble converting the regular expressions themselves, in javascript I see the string.replace() function used.
AS3 only has exec() and test(), are they equivalent to replace()?
...
Hello.
Is it possible to dynamically (not in the project's options) change the dimensions of the stage by using ActionScript 3?
I'd want to create a 400x300px loader, but I also want it to load animations that have bigger or smaller dimensions. I would then change the width and height of the loader to make the loaded animations fit well....
I'm trying to add an instance of a MovieClip inside an array.
Inside the House Class is a property called HouseObjects. Inside that array, I created a Comp and a Light class. MovieClips are dynamically placed on the stage, via linkage. The MovieClips also act as "toggle buttons." If the button state is ON, value is 1. If the button state...
I have a signal like this:
public var e_collision:Signal = new Signal(GameObj);
When the object collides with another, I pass the other object as the argument.
But if the object collides with a wall, the wall is not a GameObj, I would like to know, can I pass null instead?
...
I am using Flex 4 & zend to create a simple areaseries chart. Currently, I am pulling 20 yrs of data from the database & displaying it by default. I then want to let the user choose the dates he wants, but without going back to the server....how can I do that?
<mx:AreaChart id="Areachart" dataProvider="{employeesResult.lastResult}">
<mx...
Hey,
I am trying to parse some XML in AS3 that I recieve thru a WebService call to C#. C# is serializing using a DataContract so the namespace is non standard.
Here is what the xml looks like:
<User xmlns="http://schemas.datacontract.org/2004/07/UserDatabaseManipulation.POCO" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
...
Well i am building the script as shown below
http://www.uberprints.com/studio/?pId=AA2001OR&cId=NAT&dec=S
Now click at "add image" and load any image.. The image will be shown on the shirt and the blue border shown around the image comes by-default or is it a movieclip ??
Secondly the image itself is a movieclip or external s...
Hi,
I'm currently creating a website with AS3 in FlashDevelop, so it's code only — no timeline stuff.
I have a class that loads images with a method that I call from my main source. I was wondering how I go about making sure that the images are loaded before executing more code outside of the class. I know how to do it using Event.COMP...
i have a number variable, vx, that is changing with an enter frame event. in the enter frame function i have the following code:
if (Math.abs(vx) <= 0.05);
{
trace(Math.abs(vx));
}
immediately, it's starts outputting numbers that are well above 0.05:
12.544444075226783
12.418999634474515
12.29480963812977
12.17186154174...
Can anybody say me what is faster: Array or ArrayList? (ActionScript3)
I tried to find a page about this but didn't find anything.
Thank you.
...
Hi everybody ::- ). Do you know of any tool that can generate documentation based on a custom comment format, as long as that format is consistent across the application? I have an ActionScript3 project but I strongly dislike JSDoc style (the one with /* * * * comments). I have an abbreviated and dare-say nicer looking format to which I ...
Can anyone provide an example of how to write a callback instead of using an event to communicate between two classes (objects) in Actionscript 3.0?
...
In 90% of the example projects I see for ActionScript / Flex I notice the following two coding conventions:
1) private member variables with getters/setters start with an underscore as in "_credentials"
and
2) interfaces start with the letter "I" as in "ISessionInfo"
Coming from the Java world, I find both of these conventions unnec...