ActionScript 3.0 :: Handling Evals In Objects Based On Each Set Of Data In An XML File

Feb 15, 2011

I need to make a function that creates an object based on each set of data in an XML file. I am currently using bracket notation to do it, but don't know how to increment the next object's name dynamically. I wanted to do something like this:

[Code]...

View 3 Replies


Similar Posts:


Flash :: Dynamically Create New Sound Objects Based On Raw WAV / DATA Or Other Sound Object?

Jan 31, 2012

Is there any AS3 library or code-snippet that can create altered versions of a Sound object on-the-fly (at runtime)? Either based on:

An existing Sound object; A ByteArray object;

For example, say you have a "dry" sound of a gun-shot. You could:

[Code]...

View 1 Replies

ActionScript 2.0 :: Handling Objects Through A Tree?

Jul 5, 2009

I'm building an application, where objects are attached on a canvas and the tree of that canvas is held on a tree component. Each time that i attach an object the tree adds a new child etc. I want to do this on the other way around.. I want to press a tree node and "communicate" with the specific object, so that i can change its color, delete it etc. I've tried some things but nothing happens!This is my code:

var working_space:XML = new XML();
working_space.addTreeNode("Canvas",0);
myTree.dataProvider = working_space;

[code]......

View 0 Replies

ActionScript 3.0 :: RIA For Handling Objects Across Components?

Feb 10, 2010

I'm used to building web apps using proper architectures, but relatively new to the RIA space.One of the issues in rich client app is approaches to handling communication across components. (I've played around using the EventBroker concept.)In a recent Flex3/AS app I was looking at they took an approach that seemed to work pretty well, but I wonder about the drawbacks (or any other pros)...They took the concept of having a singleton object that would hold objects that could be used obviously from any components within the app by a simple call to...

var myAppModel:AppModel = AppModel.getInstance();

You thus could put any objects in there that you wanted access to from different components. It seemed to serve as the equivalent of a "Session" in the JEE space. I'm not so sure from an OO perspective it's the best thing to do, but it did seem to work pretty well.

View 4 Replies

ActionScript 3.0 :: [CDK] Collision Handling Complex Objects?

Dec 29, 2011

I have been trying to fix my collision handling for hours now, but it seems like I am running in circles. To be blunt, my collision handling sucks. It is easy to break, and hardly works on complex objects(like water in my case, see the test at megaswf . com / serve / 1577272)

For collision detection I am using the collision detection kit, or CDK.My level is made up of different large MCs, such as a "wall" MC containing all of the smaller walls, such as water, a tree, or a wall. CDK allows me to hittest the single walls by hittesting the large one, and not each one individually, making it easier for myself.My code has a lot of repetition(8 directional movement), so I will put a "//..." to simplify.

Main.as:

ActionScript Code:
public class Main extends MovieClip[code]......

I have literally been working on this all day, and only feel like I'm making it worse every time I change something. You don't have to spoon-feed me code, the idea should be enough...

View 0 Replies

Flash :: Web Based Visual Programming Interface Based On Python For Data Visualization

Nov 4, 2011

I just discovered impure.com and was very impressed by what can be achieved in terms of visualizing data using their workspace. Although the platform is free to use, but not open source yet. This causes a few problems because the API section works with .com sites for eg. for ebay, so I cannot visualize ebay listings for regional sites such as ebay.in because the link to ebay.com is hardcoded.I searched around, but didn't find other projects that offer a similar way to work with site APIs and other data sources with the kind of user interface and detail that impure.com does in a realtime way within a browser window.This brings me to the questions:

-What technologies would be involved in creating a similar kind of project

-What are the open source tools that can help develop a fullscreen UI to render the workspace. Are there any alternatives to flash for this, and how do they compare

The goal would be to use standard python data structures, python scripts to do some processing on these data structures, scripts to gather data from csv, json and API sources such as google yahoo, wikipedia and flickr, and scripts to render graphs, tag clouds, network visualizations etc. Then bring them all together into a visual interface that supports drag drop and simple type checking.How would the python backend integrate with the UI.

View 1 Replies

ActionScript 3.0 :: Input About Large Data Handling?

Jan 28, 2009

I'm building a sidescrolling world where you can move around.The idea is that you should be able to move to any point in the world, as well as travelling really fast.I'm pregenerating a long list of data about objects to place, their positions etc.

Now. When moving to a point far away from current position I don't want to loop through the whole list of objects to find what objects should be seen and not, so I'm thinking I should divide the position list into sections, each covering an area equal to the visible area. That way I would only have to roll through the lists closets to the new position.This would however result in an array of thousands of elements each consisting of about 20 objects and I'm figuring that might not be very healthy.One solution would be to split everything up further so that in the end I would have a handable nr of arrays containing a handable nr of elements.

You're probably thinking I should generate positions on the fly, but since one place in the world can be revisited I need to store all positions.

View 4 Replies

ActionScript 3.0 :: Handling Large Files/data Within An AIR Application

Sep 8, 2009

I've run into some problems trying to handle large text files in AIR (300+ MB in size). I can open a filestream and read the file just fine and even store it into a string variable. the problem occurs when i try to manipulate this data. Im trying to get each line as an element in an array so i can manipulate this data.Here's what i've tried:1. read the file into a string variable and perform a split looking for the newline character ). this freezes the program2. i've tried reading the file in one byte at a time and putting each line into an array AS it is being read from the filestream. This not only takes long but eventually freezes.

3. i've tried splitting the final string variable which contains the entire text file into chunks to process it separately.4. i've even tried putting the file contents into a sqlite database, but this also freezes.At this point, im not sure what my options are. Is AIR even equipped to manipulate data at this level? I could use a point in the right direction

View 2 Replies

Flex :: Events - Pass Data To Handling Function?

Jul 28, 2010

In flex, I am handling event like this,

myImage.addEventListener(MouseEvent.CLICK, redoOperation);

Now, I want to pass some value to redoOperation. (function redoOperation myId:String)) How can I pass String to it?

View 1 Replies

Actionscript 3.0 :: Zendamf Not Handling Special Character Data

May 29, 2009

I've written an application that deals with multiple languages, English, French, etc, I'm using Zendamf to retrieve multi-language data from a database, however, I'm running into a problem using Zendamf, and it could kill this project fast:

There seems to be an issue passing special character values via Zendamf. While querying a database that returns data including French-text characters (ie: Québec), the result returned from Zendamf is not handling the special characters (ie: instead of Québec, we receive Qu�c).

I've checked the output of the data via Php: the issue is not with the database result - the characters are returned correctly from the database to the Php result-set - I am able to print these characters correctly before they are sent through Zendamf, either by rendering them in HTML or by writing them to a log file.

However, once I plug the SQL result into an object and pass it to Zendamf, the special characters get mangled. Using Charles Web Debugging Proxy, I can see that the result values are mangled before they are passed back to my AS3 application.

View 1 Replies

ActionScript 2.0 :: Handling Exceptions When External Data Doesn't Load

Sep 23, 2010

I'm loading external data from a txt file into a MovieClip. It contains data that is crucial to the presentation viewing. It is necessary to load, not right away but at some point (the sooner the better). When the txt is on the same server it works instantly, but I'm loading data from another server.

Two problems: the onLoad code is stuck if the file doesn't load (connection problem, server down?) and in offline mode what happens if the data is purged out of browsers cache (history problem)?

How can i handle these exceptions?

1. Some code that uses a "timer" to periodically try to load the data again if the connection is slow and the txt doesn't loads the first time?

2. When it doesn't load at all, and the onLoad fails, how can I simulate notOnLoad - exception for data download fail? And retry the dataLoad?

I've already made cross-server data loading possible using crossdomain.xml policy.

The site is still in development. This problem occurred when the server which contains the data.txt was down due to maintenance, and when one of the test-visitors was downloading so much in the background that his connection didn't had enough bandwidth to load data correctly (browser thought he had connection problems).

View 3 Replies

Data Integration :: Handling Image Events In Main HTML Page

Apr 24, 2007

I have just established a menu based-image in flash in the main html page. Also I do have a second page has details on each option of the menu of the main page. I am trying to whenever I click on any option of the menu in the main page; this should take me to the specific section in the second page describing this option.

View 3 Replies

Flex :: 4 - Data Visualization For Analysis Of Relational Data (link-based Phenomena)?

Mar 15, 2012

I have been goggling a lot to find anything with link-based data visualization in Flex 4. something like below screen shoot (made using Ravis). Where user can drag these nodes, without removing the links and on double click of any node we can set some properties for that particular node. I found this Ravis (Birdeye), but not much of examples and support is available for that.

View 1 Replies

Media Server :: FMS 3.5 Says 'Bad Network Data': Error In Handling RTMP Extended Timestamps / ChunkSize?

Jun 3, 2011

For a client, I am working on a project where a live RTMP stream is published to an Adobe FMS 3.5.6 server from a java application, using Red5 0.9.1 RTMPClient code. This works fine, until the timestamp becomes higher than 0xFFFFFF after 4.6 hours, and the RTMP extended timestamp field starts being used. I have already found: when the extended timestamp was written after the header, the last 4 bytes of the data were being cut off. I have fixed this locally, and now the data being sent seems to me to be conformant to the spec. However, FMS still throws an error message in the core log and then kills the connection from the Red5 client. Here is the error message:

[Code]..

View 6 Replies

ActionScript 3.0 :: File Handling With Flash?

Jun 10, 2011

I am trying to create an app that will read files form a local folder on a memory stick (flash drive) which the app will be on too, then I need to be able to move one of the files in this local directory to a specified folder on the system BUT there has to be a variable taken from a text input to complete something along the lines of

[Code]...

View 2 Replies

Javascript :: Handling File Uploads With Google Gears?

Feb 18, 2010

I've been using this method of file uploading for a bit, but it seems that Google Gears has poor support for the newer browsers that implement the HTML5 specs. I've heard the word deprecated floating around a few channels, so I'm looking for a replacement that can accomplish the following tasks, and support the new browsers. I can always fall back to gears / standard file POST's but these following items make my process much simpler:

Users MUST to be able to select multiple files for uploading in the dialog.I MUST be able to receive status updates on the transmission of a file. (progress bars)I would like to be able to use PUT requests instead of POST I would like to be able to easily attach these events to existing HTML elements using JavaScript. I.E. the File Selection should be triggered on a <button> click. I would like to be able to control response/request parameters easily using JavaScript.

An example of uploading code using gears:

// select some files:
var desktop = google.gears.factory.create('beta.desktop');
desktop.openFiles(selectFilesCallback);

[code]....

Edit: apparently flash isn't capable of using PUT requests, so I have changed it to a "like" instead of a "must".

View 2 Replies

ActionScript 3.0 :: Get Objects Based On Their Class?

Dec 29, 2010

im currently writing a piece of code where i need to get all children that are specific class or extend one.

currently im using this

ActionScript Code:
public function getConnections():Vector.<NodeConnection>{
var res:Vector.<NodeConnection> = new Vector.<NodeConnection>();

[Code].....

The problem with this is that 1st, string comparison is slow, and im expecting that there will be hundreds, of instances on stage. and secondly, It is very probable that i will extend the classes that i use in the functions, so their toString() will produce different name. e.g if i have on stage instances of "Node, ExtendedNode1, ExtendedNode2 " since they are all nodes, id like to all of them be returned.

View 4 Replies

Flash :: Repositioning Objects Based On A Scale?

Jan 19, 2010

I have airplanes that are flying past the screen from a top down view. when the air planes crash, I scale them down to make it appear as if they are falling closer to the ground and farther away from the screen. I have turrets on these crafts as well. they are seperate objects from the air plan. I scale them down as well. The only problem is they dont reposition correctly. they stay in their x and y positions even though they are being scaled it looks as if they are being pulled away from the air plane. is it possible to reposition them correctly based on the size on the object they sit on (i.e. the air planes)

View 1 Replies

ActionScript 2.0 :: Calling Objects Based On Properties?

Oct 18, 2006

How can you call objects based on properties they have instead of object names? For example if i want all the objects in an area to move somewhere else. Thats not what im trying to do but just an example. Also im using flash mx 2004

View 1 Replies

Flash :: Move A Displayobject Based On Another Objects Rotation?

Jan 17, 2010

Ive probably ran into some code like this before. just cant remember where. I have 2 display objects on my stage. One is rotating and the other is positioned 90 degrees from the rotating object. As the object rotates, the other object adjusts its x and y positioning from the rotating object..

If this doesnt make sense, then let me explain what I am trying to do. I have a spaceship in my flash game. this ship has 2 torrets siting on the left and right wing. as the ship turns, the torrets need to remain on the wings.

View 2 Replies

Flex :: Separate Objects Into Two Datagrids Based On Specific Value

Oct 5, 2011

Im using Oracle, BlazeDS, Java and Flex. I have a list of objects displayed in a datagrid(Lets call them Main-objects. Each of these objects have a set of UserComment-objects associated with them(One-to-Many relation in the DB). These comments may come from two different "types" of users, distuingished with either a 1 or 0 in the UserComment-object's "userType" field. Each time the user selects a Main-object in the datagrid, the UserComment's related to this object is displayed in a separate datagrid below.Based on the introduction, i want to separate the UserComment's into two separate datagrids (one for each user-type), instead of the one i have now. So my question is: What is the best approach for performing this task? What is the best way of separating the UserComment's into two separate data grids based on the value of the "userType" field?

View 3 Replies

ActionScript 3.0 :: Check An Objects X,y Coordinates Based On Where It Is On The Stage?

Aug 12, 2011

Is there a way to check an objects x,y coordinates based on where it is on the stage, vs. where it is in the movie clip that is on the stage?

need this to compare with the mouse for instance.

View 2 Replies

ActionScript 2.0 :: Rotating / Dragging Objects Based On Keypress

Jul 22, 2002

I have a bunch of draggable objects and I want to be able to rotate them. Is it best (possible?) to rotate them based on keypress or how might you go about this. Here is my keypress code so far ( draggin works - rotate doesn't )

[Code]...

View 5 Replies

ActionScript 2.0 :: Duplicating MCs Based On Number Of Objects In XML Document

Mar 3, 2005

Any good tutorials on dynamically duplicating movie clips (and working with them, loading into them) based on information (the number of object tags..) in a xml document?

View 2 Replies

ActionScript 3.0 :: Sort Objects Depths Based On Their Y Position

Jun 12, 2008

I've been trying to sort objects depths based on their Y position but have not been able to do it efficiently. I was able to successfully sort objects with a selection sort algorithm and a quick sort algorithm; however, both have only been partly successful. Selection sort gets about 8-10/30 FPS with 13 objects and gets about 14-18/30 FPS. This is not good enough as I figure I could have as many as a hundred objects to be sorted at once.

After digging around, I found that array.sort() is more efficient than a quick sort implemented in AS3 and that calling swapChildren() or swapChildrenAt() at every swap was bogging it down. So now I am copying the objects array and sorting it with sort() and then comparing the two and swapping displayObjects so as only to call the swapChildren() or swapChildrenAt() method once per element. It appears to be running, and at full speed, though it won't swap correctly. Here is my code:

[Code]...

View 14 Replies

ActionScript 2.0 :: Duplicating Mc's Based On Number Of Objects In A Xml Document?

Mar 3, 2005

dynamically duplicating movie clips (and working with them, loading into them) based on information (the number of object tags..) in a xml document?

View 2 Replies

ActionScript 2.0 :: Creating A High Score Table In Flash Using External File Handling

Feb 8, 2012

Creating a high score table in flash, using external file handling, can be achieved using server-side scripts, such as PHP. However, as this is not allowed for my game (school project), I need a way to write a few variables directly to a text file and read it back again. Is this possible? I am using AS 2.0. Any other ways in which a high score table, which is portable and can be saved and updated

View 3 Replies

ActionScript 3.0 :: Saving Data To Text File - Appending Data In Text File - Importing Data From Text File

Aug 23, 2011

How can I save data to a text file and also append a record to data in an existing text file? I've used Authowrware previously and it was quite easy to create a large string of data (a comma separated list) and export that to a text file (and create the text file if it didn't already exist). I could then easily append additional rows of data (records) to the text file. We want to build a questionnaire that will store the data locally on the computer in a text file. Each record may have a few hundred data points in a comma separated list.

View 8 Replies

Flex :: Flash - Using Sprite Objects In A MXML-based Application?

Oct 25, 2010

Canvas.addChild() insists any DisplayObject added implements IUIComponent. But I don't want my core graphics engine dependent on Flex. Is there an obvious/common way around this, to have simple graphical objects like Sprites & Shapes in a Flex application? The individual DisplayObject children I want to add as children represent objects in a game world, like a spaceship or a missile or a horse...

Not sure if Canvas is the most appropriate container, perhaps Group or another class is optimal for a game-engine... example MXML & AS3 code showing a skeleton setup is most welcome. I'm targeting Flex4 & Flash 10, but Flex3/Flash9 solutions are still of interest.

View 1 Replies

ActionScript 3.0 :: Sorting Vector Of Objects Based On Property (Numeric)

Jan 9, 2010

What I want is to sort a Vector array of objects(not primitive), based on a propery(Number). (think character.zDepth). Generally the same thing as the sortOn function of Arrays, except that we don't have that for Vectors.
like myArray.sortOn(x, Array.NUMERIC)
Dealing with Vector arrays of primitives not complex objects.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved