I have couple of questions about AS3 variables handling by AVM/compiler/scope
.1. This code in Flash will throw an error:
function myFunction() {
var mc:MovieClip=new MovieClip();
var mc:MovieClip=new MovieClip();
}
but it won`t throw an error in Flex (only warning in Editor). Why?
.2. How Flash sees variables in loops? App...
Hi,
For the scenario lets consider Car to be the highest SWF(stage) inside I load tyres. Inside tires I have rims. Now if the rims need to be positioned relative to the stage (car body) how can I do that? Inside rims if I write stage and load it results in an error.
Any Ideas?
...
We have a number of AS/Flex components that we've built over time and improved upon. They've been turned into components so they can be reused in different projects and save us time. So you can think of them as part of an in-house framework of sorts.
We're now realizing that it doesn't make sense to release the source code for these com...
Hello
I'm creating a simple AIR app with resize-functionality. Of course i need to position a resize-arrow to the bottom-right corner. Here's my code:
stage.addEventListener(Event.RESIZE, handleResize);
function handleResize(e:Event):void{
resize_btn.y = stage.stageHeight-resize_btn.height;
}
This doesn't work, my button gets out...
package gpslab.com.facers{
import flash.display.*;
import flash.events.*;
import flash.net.*;
import gpslab.com.facers.resource.ApplicationConst;
import gpslab.com.facers.resource.ApplicationDTO;
import gpslab.com.facers.resource.EventConst;
import gpslab.com.facers.xmlLoader.XMLDispatcher;
import br.com...
Hi!
I'm trying to replicate this function from the Allegro graphics library:
void stretch_blit(BITMAP *source, BITMAP *dest, int source_x,
int source_y, int source_width, int source_height,
int dest_x, dest_y, dest_width, dest_height);
http://www.allegro.cc/manual/api/blitting-and-sprites/stretc...
Hi all - I'm wondering if there is a better way to approach this than my current solution...
I have a list of items, I then retrieve another list of items. I need to compare the two lists and come up with a list of items that are existing (for update), a list that are not existing in the new list (for removal) and a list of items that a...
I'm working on a project in Flash CS4/AS3 and I have a document class set up but I am wondering about using that, as opposed to frame-based scripting. Most of what I have seen so far deals with how to create them, but doesn't offer much about why or when to use them.
I know I can also pull in other classes beyond the document class but,...
Does anyone know how to archieve pixelation effect in AS3 which looks really smooth like this website: http://www.truly-design.com/site ??
...
I'm pulling my hair on this because it should be simple.
I'm trying to create a component and set its default properties.
<CustomComp text="Some text" color2="0x939202" value="4.5" />
But when I initialize it, the parameters still don't register.
I do like this:
[Bindable] private var myColor2:uint = 0x000000;
[Bindable] private ...
I found this question, and it mentions the FlashDevelop wiki. However, I couldn't find anything there at all.
Where is a good place to start? I have done some work with MXML projects using the Flex SDK, but never any ActionScript programming.
...
from my main class i call to create a sprite and add it to the stage
private function addSwatch(evt:MouseEvent):void
{
if (stage.getObjectsUnderPoint(mousePoint()).length == 0)
{
var swatchSide:Number = 100;
var newSwatch:Sprite = new Swatch(0 - swatchSide/2, 0 - swatchSide/2, swatchSide, swatchSide);
newSwatch.x = mouseX;
n...
As flashplayer has only one thread and is event driven, big tasks have to be divided to smaller tasks so that the application stays responsive. For now I've done this with the Timer by doing a small part of work in every TIMER event. Is there a better way of doing this (some library maybe)? What is your recommendation?
...
hello friends,
I have created small application for login in flex desktop application. In which I am refering webservice method for login for this have created the Authentication class. Now I want to refer different Textinput value for mobile no and Textinput value for password. In my Authentication class.
for this I have created the ...
Hi,
I want to implement a Chat room in Flex 3.
Please help me.
Thanks!!
...
I wanted to remove an event listener from main class stage, but i get the error 1120: Access of undefined property stage. How do I actually access the stage?
custom class:
import main;
main.disableVcam();
main class:
public static function disableVcam():void {
trace("disable");
stage.removeEventListener(Mouse...
My flash code:
var request=new URLRequest('http://localhost/test.php');
request.method = URLRequestMethod.POST;
var data = new URLVariables();
var bytes:ByteArray = new ByteArray();
bytes.objectEncoding = ObjectEncoding.AMF3;
//write an object into the bytearray
bytes.writeObject(
{ myString:"Hello World"}
);
data.data = bytes;
...
I am trying to cancel a tooltip event (I only want it to display when the mouse is hovered over a certain area), and can't seem to figure it out. I tried stopPropagation, preventDefault, and stopImmediatePropagation, but none of them seem to work.
Here the code I am using:
private function toolTipCreateHandler(event:ToolTipEven...
Hey guys I'm having such a hard time of it today.
I have a game, I've loaded into a parent SWF -
I would like my parent SWF to accept events I dispatch from within the game,
or have the ability to talk both ways.
--
Reason is, I would like to unload and load the game back in, once the end screen is active.
Any help and I'll give you...
i wanna load a movieclip inside another movieclip with loadmovie or anything like this. so my question is.... could have i access to the location of the loaded swf-file inside the loaded swf-file?
example:
swf#1 loads swf#2 inside itself, so now the swf#2 should check its own uri with an identical key.. but without access to the loaded...