ActionScript 2.0 :: Get _root Array Data From Inside A Deep MC Hierarchy?

Aug 8, 2002

I have some global Arrays defined and loaded with data at the _root level. Data is OK cause I checked it with the List Variables option. I cannot address any of my arrays from within my MC hierarchy (not from MC2, MC1 or Component MC), BUT I can address variables defined at the root level correctly?

MC Hierarchy: ComponentMC-->MC1-->MC2-->Various MCs

I placed trace(_root.MyArray[0]); at MC2 level, then at MC1 level and finally at ComponentMC level but the sentence still reads "undefined". Is there a way to actually get my Arrays data from _root ?

View 3 Replies


Similar Posts:


ActionScript 2.0 :: Change The _root.broj And _root.logo Variables Inside The Function?

Jan 14, 2010

In the code below i want to change the _root.broj and _root.logo variables inside the function which returns values from .php file. Inside the function everything works fine and all values are correct but when i trace var broj outside the function it's still 0.

var result_lv:LoadVars = new LoadVars();
var send_lv:LoadVars = new LoadVars();
var broj:Number=0;
var logo = new Array();

[Code].....

View 1 Replies

ActionScript 3.0 :: Hierarchy (nested Functions Inside Movie Clip)

Aug 21, 2010

I'm having problems with the scope of nested functions. I have a movie clip: "MC_clip" inside that movie clip there is a button: "inside_button". when users press "inside_button", I want the movie will jump to play frame 5 (main time line). how do i refer the stage from inside a movie clip?? another question is about the other way: how can I call to a function that is declared inside a movie clip?? is that movie clip have to be an instance on the stage??

View 8 Replies

ActionScript 2.0 :: Way To Organize Data Into A Hierarchy Within A Listbox?

Jan 16, 2007

Is there a way to organize data into a hierarchy within a listbox?I would like to have a parent-child list with the parent always being bold.I'm not asking someone to do it for me, I would just like to know if it can be done and maybe some direction.

View 1 Replies

ActionScript 3.0 :: Include Array Data Inside SWF?

Aug 28, 2009

At the beginning of my Flash game, I do some fairly heavy-duty calculations to figure out path-finding and visibility and that sort of thing. The result of the calculations are a few large Arrays and a Tree datastructure. It takes about 10 seconds on my computer. Is there a way I can do this calculation once and for all, and then just package up the final datastructures right in the the SWF, so that no one ever has to do the calculations again?

View 14 Replies

Actionscript 3 :: Reordering An Array Collection Based On Another Array Collection Hierarchy?

Sep 16, 2011

I have an array, crewPositionsAC that contains a list of position abreviatations - EP, PR, DR, WR, and so on. These positions are read in through an XML file each time my flex application loads. Also being populated from an XML is a project. Within a project, there are positions (a student assigned to a type of position listed within crewPositionsAC). These positions are not necessarily in the correct hierarchy order dictated by crewPositionsAC. I have all the positions within an ArrayCollection (positionsAC) with the following structure:

positionsAC (arrayCollection)
[0] = Array
[0] = startOffset
[1] = numDays

[code].....

Then, the user can click a button to add another position. When the "Add Crew Member" button is pressed, the user is presented with a list of possible positions to add. Currently, I simply add another array to positionsAC. This results in the recently added crew member to placed on the bottom of the list. I need to take positionsAC and reorder it based on it's [2] item (role) based on the hierarchy defined in the crewPositionsAC. crewPositionsAC has the following structure:

crewPositionsAC:
[0] = EP
[1] = PR
[2] = DR
[3] = WR

* continue until all possible position types are listed

View 2 Replies

Actionscript 3.0 :: Parsing Multi Node Deep Xml Into An Array?

Jun 22, 2009

Anyhow, I am attempting to parse the following xml example into an array for accessing later in my flash file:

Code: Select all <root>
<books>
<book>

[code]......

View 3 Replies

ActionScript 2.0 :: _root Inside Target?

Apr 29, 2003

ive loaded a movie into another and postitioned it..

_root.abc._x="400";
_root.abc._y="200";
_root.abc.loadMovie("trig_sub.swf");

but once it is loaded where ever i have used _root in the loaded movie (trig_sub.swf) it nolonger works eg..

on a button i have

on(rollOver){
_root.menu.stop();
}[/AS]

bnut this dosent work when it has been loaded into instance "abc" in the main movie...wat do i have to use instead of root to point at an instance?

View 14 Replies

ActionScript 2.0 :: 1MC Inside Another 2MC - Trace _root._x Of MC1?

Jan 24, 2007

I have a MC1 insede MC2. I have to get the _x coordinate of MC1 but relative of _root. instead of the _x valeu of MC2.

View 3 Replies

ActionScript 2.0 :: Is _level1 The Timeline Inside A Movieclip On The _root?

Jan 21, 2004

is _root same as _level0? or is _level1 the timeline inside a movieclip on the _root?

View 5 Replies

ActionScript 2.0 :: Target A _root Frame Label From Inside MC?

May 28, 2007

Just wondering how this is done within an "if then" statement. I need a code like

if (_root.frame = "home") then {
this.quickHome.onPress = function () {
_root.gotoAndPlay ("homeToContact");
}
}

I know the first line isn't going to work, but just wondering if someone knew of a code that would?

View 2 Replies

ActionScript 2.0 :: Copy/Move A Movieclip From _root To Inside A MC?

Jan 18, 2008

If I have a movieclip on the main timeline, is there a way to put this movieclip inside another movieclip on stage (ofcourse during runtime) ? I know that one of the methods of doing this is using bitmapdata class to capture an image of the movieclip (draw method), then attaching the object it to another movieclip that can be anywhere, but this will make the movieclip lose it's interactivity behaviour, and vector quality.

View 5 Replies

ActionScript 2.0 :: CS3 Get Array Value From _root?

May 29, 2009

in my root I have this code:

Code:
//score node selection
var i:Number;
var scoresUserName = new Array() ;
var scoresFbid = new Array();

[Code]....

View 1 Replies

ActionScript 2.0 :: Access The Variables Inside The Class Without Using _root.myComponentName.variableName?

Dec 11, 2006

i am creating my own component. the problem is how can i access the variables inside the Class without using _root.myComponentName.variableName.

[Code]....

View 1 Replies

ActionScript 2.0 :: OnClipEvent (data) { _root.goin.gotoAndPlay}?

Dec 12, 2005

The probem is I have an external swf file that loads a mailer. everything works fine apart from the fact that when the data is sent to the php file this command wont respond. It works on my local but once on the server it dont go.I think that the problem might be that MC (goin) is the MC that this code is located in?

onClipEvent (data) {
_root.goin.gotoAndPlay(12);
}

View 1 Replies

ActionScript 2.0 :: Mc Moved From _root - Loads Xml Data Into A Scroller

Apr 16, 2008

I am moving a mc that loads xml data into a scroller. The scripting that loads it is looking for it in _root, and I am getting:

Target not found: Target="_root.btn_projectsundefined" Base="_level0"
Target not found: Target="undefined" Base="_level0"

View 3 Replies

ActionScript 2.0 :: _root.cargo Are Multipled By 10 And Added To _root.totalscore?

Feb 27, 2003

im lookin to make this so that the points taken from the _root.cargo are multipled by 10 and added to _root.totalscore

[Code]...

View 2 Replies

ActionScript 2.0 :: _root._root[eelmine].nextFrame()?

Sep 14, 2004

if a condition is true, then:_root.(MC with instance name that is the value of "_root.eelmine").nextFrame(); is this correct?_root._root[eelmine].nextFrame();

View 16 Replies

ActionScript 1/2 :: Referencing _root.Button  From A Movie Loaded Inside Another Movie?

Oct 18, 2009

MainMove.swf is doing a loadmovie of SecondMovie.swfThe Button that loads SecondMovie.swf also disables other buttons in MainMovie.swfon (release) {  _root.intro_btn.enabled = flase;  loadMovieNum("SecondMovie.swf", 2);How do I Re enabled the Buttons in MainMovie.swf from a Button within SecondMovie.swf???

View 4 Replies

ActionScript 3.0 :: No Longer Move The "_root" By Changing The _x And _y Positions Of The _root?

Jan 26, 2009

I just recently began migrating from AS2 to AS3, and I have of course realized that I can no longer move the "_root" by changing the _x and _y positions of the _root (which no longer exists in AS3). How can I do this in AS3 (specifying _x, _y, _z possibly of the "_root")?

View 2 Replies

ActionScript 2.0 :: Create Array Inside An Array Dynamically From An Unknown XML Tree?

Dec 28, 2010

Actionscript Code:
<root><node><child><grandChild></grandChild></child></node></root>

Actionscript Code:
Arr[0]=rootArr[0][0]=nodeArr[0][0][0]=childArr[0][0][0][0]=grandChild

Help needed to create Multidimensional Array from Recursive XML.

All I need create Array inside an Array dynamically from an unknown XML tree.

View 3 Replies

ActionScript 3.0 :: Access Array Inside Of An Array?

Aug 5, 2009

how I can access array data inside of an mc from the main timeline.. I am hoping to get into an array called children, which is inside of an mc, which itself is inside of an array called mcs.

Here is what I am trying to get to: mcs[m].children[0];

View 1 Replies

Xml :: (Flex 3) Get Data From A File Using HTTPservice And Save The Return Data As An Array?

Oct 15, 2009

I have an xml file (externally saved) that is similar to the following:

[root]
[main]
[title]...[/title]

[Code]....

What I like to do is to get what's in [title] tag using HTTPservice, import it into Flex, and save it as array objects, and do the same thing for [content]. This way I can later refer the array object saying title[0] or content[2].

View 1 Replies

ActionScript 3.0 :: Sample Data Event Not Firing - Record Data From A Microphone To A Byte Array?

Dec 13, 2010

I have bought Learning AS 3.0 (O'Reilly) but I have been having difficulty getting one of the tutorials to run. The tutorial shows how to record data from a microphone to a byte array, playback the saved data and save as a WAV file. For some reason, I can't get this working. When the swf runs, the Flash Settings screen doesn't pop up to request permission to access the microphone but I can still trace properties such as gain.

I've uploaded a zip containing all the classes and an FLA - just use RecordMicrophone_Example.as file as the document class. Here is the problematic area of the code:

[Code]....

View 0 Replies

Data Integration :: Instead Of The Vertical List , Get An Unparsed Data Array?

Jul 20, 2006

I have No problems inserting data from flash to PHP into MySQL,it's sendind them back properlly.All I'd like to see happen is for one row of data to be inserted into a dynamic text field. here's what i've got if i access this php file, it prints out a vertical list from
a single MySQL row,I was happy.

$query = "select row from table";
$result = mysql_query($query, $db);

while($row = mysql_fetch_row($result))[code]...

and Instead of the vertical list (which i would love to see)i get an unparsed data array.

View 2 Replies

Flex :: Data Grid Not Displaying Data In Array Collection?

Oct 7, 2010

My data grid is displaying stale data, rather than the real time data available in it's data provider (array collection). I've tried refeshing the data in the collection, but that has no effect. Below is my code, does anyone see what could be the problem?

<mx:Accordion/>
<fx:Script>
<![CDATA[[code].....

View 4 Replies

ActionScript 2.0 :: Converting Internal Array Data Into External XML Data?

Nov 9, 2006

I have this code inside my flash to name my navigation menu. Now I want to put this outside flash and load it via XML. How do save my different arrays into a variable for later use in my code?

In my nav fla (what i want to load from XML):

Code:
// MAIN MENU ARRAY
var mm_array:Array = ["MAIN1", "MAIN2", "MAIN3", "MAIN4"];
// SUB MENU ARRAY

[Code]...

View 9 Replies

Html :: Flex - Export Array (array Collection) Data Into A Table Or Text File?

Oct 9, 2010

I have an array collection of strings and integers (which I have displayed in a data grid) and I am wondering if it is possible to export the array collection into an html table? or even a text file for the user to download

I found some pages that had an export to .xls files but I want to stray away from that for now.

View 1 Replies

Data Integration :: Get Rid Of The Xml Tags With Assigning The Data To An Array?

Feb 5, 2007

Let's say you have the following xml document. Now how do I access the name thumb here is my loop. Also I want to store the value in an array but I don't want the xml tags to be stored in there as well. How do I get rid of the xml tags with assigning the data to an array.

View 1 Replies

Actionscript 2.0 :: Converting Array Data Into Numeric Data?

Mar 25, 2009

I feel like this should be really easy, but I don't get what I need to do.I have a value bgW[j] stored in "j" equaling a number.But I can't seem to get it to register as a number.What commonly needs to happen to convert this value into a numeric datatype?I've tried a bunch of stuff: eval, parseInt, multiplying it by 1.

View 2 Replies







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