actionscript-3

Flex renderer data inside a panel...

I have a page (below) that has a datagrid that lists "item"'s returned from an XML file (below) and when it loads it created a page in the viewstack for each item it finds (working) it also renders a page (below) inside each panel but i am having issues passing the data. Each page renders and loads but with the FIRST result of the XML da...

Using ExternalInterface.addCallback in AIR

We're building an Ajax AIR app but want to include a Flex component in it to display photos. Currently using Doug McCune's 'coverflow' but also looking at Sebastiaan Holtrop's 'sebCoverflow'. We're trying to communicate between JS and the Flex component but can only do this one-way (AS->JS) using ExternalInterface.call(). ExternalInte...

Avoiding escape sequence processing in ActionScript?

I need to mimic C# functionality of the @ symbol when it precedes a string. @"C:\A\File\Path" for example What is the best way to do this? Also there are some sites that will escape larger strings for you so that they survive the processing but I could not find one for Actionscript. Help? ...

as3 sandbox security violation with http://schemas.xmlsoap.org/soap/encoding/

Hi guys ! I implemented a gSoap c++ webservice-server to be accessed by Flash (as3) Everything runs smooth as long as i test the .swf locally, the .wsdl is loaded fine, and the communication works, even with the server running on an external ip already. But the moment i put that .swf online - its coming up with sandbox security violat...

How can you get the height of an swf to expand with the content?

I am creating a site in flash that is reading in entries from a database. I want the swf to expand downward on the html page so the user can use the browser scroll bars to see all the content. I don't want to paginate everything into a 800 px high swf or something - I want the page to expand just like it would if it were html. Possible? ...

How do I limit the following cursor to a specific area

I have a flash cs3 file where I want a mask to move on the y axis (up and down) when the user is scrolling over the navigation area. In my code, I have: maskMC.startdrag(); How do I limit the area where the mask will move, then make it return it back to it's original position when the user moves away from the specific area (in this ca...

how do i pass the id of an image in flex

Hi, My application is going to have multiple images.. <mx:Image id="img1" source="@Embed(source='assets/mrute1.jpg')" mouseDown="mouseMoveHandler(event);"/> <mx:Image id="img2" source="@Embed(source='assets/mrute2.jpg')" mouseDown="mouseMoveHandler(event);"/> <mx:Image id="img3" source="@Embed(source='assets/mrute3.jp...

registering event listeners in a controller

I'm working on creating a simple MCV application, in order to understand MVC better. The problem I'm having is registering event listeners. The way I see MVC is that the view dispatches events, the controller listens for these events and acts on them, either updating the model or amending the view. So in my MVC app I have a controller wh...

Dynamically acessing items in a ObjectProxy using AS3

I am trying to implement a find feature on a list. In the action script method to implement the find, I'm trying to loop over the contents of the list.dataProvider and get the contents of the labelField which is dynamic. Is there a way to use the contents of a variable to get the field out of a ObjectProxy. I see that ObjectProxy ha...

Handling TextInput width and styles in Flex

Hello! I made a Form container with few TextInput fields in Flex and I would like to change a style of clicked TextInput element. I managed to do it with MouseEvent.CLICK event listener but it is not what I expected. I would like to change style of TextInput when user try to edit that field. However, I want to change back to 'default' st...

SOAP web services from AS3, without Flex?

What's the best library/package/class out there for calling SOAP web services from ActionScript 3, without using the Flex framework? ...

Flash AS3 Full Screen not working on a tablet PC.

I have a Flash (AS3, CS3) piece that has a button that will make the piece go full screen. stage.displayState=StageDisplayState.FULL_SCREEN; This works great in all of the computers that I have tested it in except a tablet PC (HP 2710p is the only tablet I have to test on, but I hear the same behavior happens on all tablets). Does an...

AS3: Faster to use EventListeners or ArrayLoops?

I am writing a game in AS3 and have, as an example, around 40 objects on screen. Let's say they are clouds. I'm wondering which of the two paths would be less a strain on system resources: a) Put an eventListener on each object and have it update itself, or b) Loop through the array and manually update each object Or is the performanc...

actionscript error 1119

Hey guys, I'm new to actionscript and have to create a DDR-like game for an assignment. I converted all my arrows into symbols and gave them an instance name. so far I didn't include any functions; just set all my symbols to visible = false or true. But for whatever reason it just plays everything anyway. And I'm getting an error: 1119...

How to get XML tag names in AS3

I am trying to get the child XML tag names in my AS3 program. For example, I have a file with information like this: <LocationInfo> <City>New York City</City> <State>NY</State> <Zip>10098</Zip> </LocationInfo> I load the file into an ArrayCollection and can access each item I need by name such as ["City"] // Returns New...

In Flex, What is the difference between a skin and an itemRenderer?

Indeed they both (skins and itemRenderers) seem to do drawing using the flash.graphics.* package. I have copy pasted code between skins and itemRenderers before, so I really don't understand the difference. I have had more experience implementing itemRenderers than skins, so that might be part of the problem. Thanks, let me know. ...

Using a For loop with an array and addEventListener

I have this map I'm creating in Flash. You click on a state, then you can click on an icon to view a tooltip/popup of some information. What I was trying to do was instead of creating new functions and event listeners for every different icon is to use a for loop...but it's not going so well. I haven't touched AS in a long time so bear w...

gotoAndStop oncomlete with TweenMax

Hello all I'm trying to get onComplete (frame 5 in this case) to skip to a given frame after a series of animations. Here is what i have written so far. Shouldn't this work? stop(); import gs.TweenMax; import gs.plugins.*; TweenPlugin.activate([DropShadowFilterPlugin]); import fl.motion.easing.*; TweenMax.from (redSquare_mc, 1, {x:...

AS3 JSON parsing

I have a bit of a dilemma. I have a JSON object that has a format I'm unfamiliar with (starts with an array [] instead of an object{}) and was wondering how I might parse it in AS3. The object looks like: [ { "food": [ { "name": "pasta", "price": 14.50, "quantity":...

Flex reset chart axis minimum/maximum

Hi, I am showing a stacked bar chart with Flex, and I am dynamically changing the data of the dataprovider. However, the minimum and maximum for the y-axis do not get reset with the new data. So if one dataset had a value of -100,000, but the next dataset has only positive values, the y-axis still starts at -100,000. How can I force t...