ActionScript 2.0 :: Removing Selective Data From A Variable?
Sep 4, 2003
I have created a user interactive colour sample system that sends accumulative preferences from an external swf to the _root timeline when different colour sample buttons are clicked.The code looks as follows:
on (press) {
_root._root.myvariable += "
colour1";
I want to show in data grid only few dataProvider rows. For example my arrayCollection has 30 rows and I want to show in dataGrid only rows from 15 to 30. Is there a way to do this on dataGrid class or should I filter the arrayCollection?
I have a flex UI which communicates with server using spring blazeds. I have a very typical requirement of Live data streaming on a panel in UI. Requirement is like this, We have an object say, Person and server keeps pushing its data on blazeds message destination where UI panel consumer has subscribed and hence user can see this live data in a panel. User can open multiple panels in same browser to view data for different Persons at the same time (e.g id=1,2,3 respectively). There can be multiple UI users who may be viewing the same data for person id=1 at a given time, lets say.
Basically I want to separate data between UI panels. UI panel opened for person id=1 must not display data of that for person id=2. I am doing this using headers-selectors, but apparently I found out that the differentiation to select and display what data happens on UI which is causing performance issues. I learned that using subtopics may improve performance. But, before proceeding for it, I want to know, will UI browser end up in receiving data irrespective of subtopic assigned to data and then consumer will decide to accept it or not?
I've got a quirk here I'm having a difficult time hammering out.I've got a control object with a sound object as a child. This global sound object has another sound object as a child:
Code: Master = {}; Master.soundManager = new Sound(); Master.soundManager.BGM = new Sound(); \ In the main loop of my program, I have a function (VNELineReader()) with a switch looking for particular cues, one of which is loading a sound into BGM:
Now, when I run this in the Flash 8 IDE, no problems. The script waits for the sound to load, resumes, and later on plays BGM with a case "bgm_play". However, if I compile the program and play it with the external flash player, the loadSound call causes the player to freeze, eat up about 600MB of memory in task manager, and then crash. It also does this if I open the .swf in Internet Explorer. However, it works fine in Firefox.
I have several layers all of which I have applied a "stop();" to, however I want one of the layers which is simply just text that spins around using a default preset motion, to carry on spinning whilst the rest of the layers have stopped.
How can I do this? It as though I want to remove one of the layers from the "stop();" code.
I setup this conditional statement. My intention was that if the object foot_mc was on point0_mc then it will go to frame 5 OR if foot_mc was on point1_mc it will go to frame 10....
function Oncheck(evt:MouseEvent):void{ if(foot_mc == point0_mc) return;{ gotoAndStop(5); } if(foot_mc == point1_mc) return; { gotoAndStop(10); } if(foot_mc == point2_mc) return; { gotoAndStop(15); }} I get no errors but it will always go to frame 15. Instead I want it to go to the selective frames depending on where foot_mc is...
I have tried using counters but didn't work.What i'm trying to accomplish here is to remove var b when a user choose another item on myComboBox subsequently, so that the selection before will not appear on stage...
Error received: TypeError: Error #2007: Parameter child must be non-null. at flash.display:isplayObjectContainer/removeChild() at main_fla::MainTimeline/changeHandler()
I'm trying to create s simple website by using flash. My idea was to have a series of buttons that when i click will add a child to my stage. Now my problem is that i can only figure how to remove that child again by clicking the same button, i would like that the child could be removed by clicking any given button.
Below you see the code for two of my buttons. It is basically made up of the snippets from Flash CS5. I've restricted the amount of children thath can be added, so that no two subpages (children) can be added at the same time. When i add the child by pressing a button the child will be the seventh child on the stage. Is it possible to then make a piece of code for the button so that given a child number seven is already at the stage this will be removed?
ActionScript Code: infobtn.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_info); var fl_Loader:InfoPage = new InfoPage(); var fl_ToLoad:Boolean = true;
So basically I've got a MovieClip called Jug and when the egg is clicked and dragged to the Jug I want it to disappear and then re-add itself in the place it first started. Aswell as this I want a variable to be added by 1 in value. I have tried fiddling around with this for a while now and I can't figure it out since when I remove child it gets errors. Here's the code:
On my stage I have 5 items labeled item1_mc, item2_mc, item3_mc and so forth...they all have two keyframes on their respective timelines, one labeled "active" and the other "inactive". My code contains 2 arrays, inactiveArray and activeArray and a variable known as energy that regularly goes to and from 0 - 100.What I am looking to achieve is basically the function of...if energy >= "insert given items 'active threshold' 20, 40, 60, etc..." then add it to the activeArray, if it is not, remove it and add it to the inactive array.
all objects in activeArray gotoAndStop("active"); all objects in inactiveArray gotoAndStop("inactive");
I have tried many different ways of achieving this effect but I always end up with duplicates and extras or something doesn't move when it's supposed to, where it's supposed to, it just ends up into a giant cluttered mess and I start from scratch.
The portal in my game is suppose to be unlocked after you collect all the coins. The portal is locked but when I go over a coin it neither adds to the variable or removes the movie clip by instance name of coin1 coin2 and coin 3.also if the remove movie clip doesnt need _root I've already tried it without it I know that is not the problem.
var openportal = 0; function moveStuff() { //-Very long code that is working. [code]..........
So a small example of my situation...On my stage I have 5 items labeled item1_mc, item2_mc, item3_mc and so forth...they all have two keyframes on their respective timelines, one labeled "active" and the other "inactive". My code contains 2 arrays, inactiveArray and activeArray and a variable known as energy that regularly goes to and from 0 - 100.
What I am looking to achieve is basically the function of...
if energy >= "insert given items 'active threshold' 20, 40, 60, etc..." then add it to the activeArray, if it is not, remove it and add it to the inactive array.
all objects in activeArray gotoAndStop("active");
all objects in inactiveArray gotoAndStop("inactive");
I have tried many different ways of achieving this effect but I always end up with duplicates and extras or something doesn't move when it's supposed to, where it's supposed to, it just ends up into a giant cluttered mess and I start from scratch.
i found an example online where bombs falling from the sky remove circles from a grass field, and a moving character can interact with the newly made circles(go into them). i dissected the code to the point where the only thing that happens now is that you click on the field and remove a circle:
I have a transparent video playing on my front page, with a small semi-transparent controller. After the movie plays and fades out, the controller remains. How can I remove the controller display after the movie finishes playing?
How do I remove an items from a data bound array? My code follows. for(var i = 0; i < listBox.selectedIndices.length; i++) { var toRemove = listFiles.selectedIndices[i]; dataArray.splice(toRemove, 1);
Here is my swf. The Add Photos works except when you remove items. [URL] Add 3 photos different. Remove 2nd photo. Add a different photo. SWF adds the 2nd photo to the end.
Here is my code private function OnSelectFileRefList(e:Event):void { Alert.show('addstart:' + arrayQueue.length); for each (var f:FileReference in fileRefList.fileList) { var lid:ListItemData = new ListItemData(); lid.fileRef = f; arrayQueue[arrayQueue.length]=lid; [Code] .....
Im trying to use dynamic SQL tables on my PHP server so I need to pass the table name to the PHP script. I don't understand why the Data Management system that sets up CRUD won't allow this extra parameter. It says it can only have one input: item. I can get all records, but when I try to create, update, or delete I get an error.
Or is there another way I can pass the tablename variable to the php file before I call any functions?
I have three dynamic text boxes. variables respectively (caption0,caption1,caption2). My xml file is structured as: <?xml version="1.0" encoding="iso-8859-1"?> <captions> <caption>Roll over this</caption> <caption>This is the first Caption.</caption> <caption>This is the second Caption.</caption> </captions>
I am trying to create a rollover where when you rollover caption0; caption1 and caption2 are displayed in sequence. Everything works except though only the first caption is ever displayed. For the other two I get "level0.caption1" and "level0.caption2" instead of the text in the xml file above. How do I parse the data so that each of the variables are assigned the text in the xml file?
I have a datagrid in a flash app. The intial use works fine. The flash has the ability to recalculate the needed data which I then use to repopulate the existing datagrid. What is the best way to clear out a datagrid and repopulate it?I tried:ifxGrid.dataProvider.removeAll();but it does not clear out the previous dataifxGrid.removeAllColumns();this worked a little but not entirely.So what's currently happening is that the new data is appended to the old data. So if I had 50 rows in the 1st calculation and then I have 70 rows in the 2nd calculation I end up with 120 rows of data in my datagrid.
Would removing the (Variable definitions / Spaces / Have everything on one line) make the project run faster.Testing my projects most beefy loop without variable definitions seems to make it run slightly faster.
I am trying to create a simple form using Actionscript 3 that will collect data from a form, then pass that data to an asp file. I have attached the following code to the submit button,but this is not working.I'm not sure if I have to add anything else and I don't understand why this is not working. I'm trying to load all the variable info into one variable called email form.
submit_btn.onRelease = function() { var emailform:text; emailform.email_txt = email_txt.text;[code]......
There is a combo-box by the name "cbJobs" and it gets its value from the XML file named "data.xml".. I want to store the value transferred from this XML file into a variable.. so basically someone told me to use the code
on (change) { _root.subject = this.getValue(); }
the only problem with this code is that it gets activated only after I "change" the value in combobox by pulling it down.. I want to use this value obtained from _root.subject as a subject in the script
I'm trying to access RootNode in the code from anywhere inthe timeline. I assigned a value in the loadFile function but whenI try to access it from outside this function I get "undefined".How can I have this easily accessible from anywhere in the code? Iknow _global.RootNode will not work for XMLnode types.