ActionScript 2.0 :: Reading Info Into 2d Array

Dec 6, 2004

ive got a page "news.php?search=" outputting this:

id1=1&titel1=owaaa&text1=content2222212&ort1=Tran� s&
id2=4&titel2=sadas&text2=test tesxt Aneby&ort2=Aneby&
id3=9&titel3=titasd&text3=ingassdssadsdset&ort3=An eby Tran�s �desh�G&

this is just an example of a possible output. The output varies with what search criteria was given , there could be anywere from 0 to 400 hits, were they are listed in this way. now im wondering how i would get this into a two dimensional array in flash
so that (array[row,column])

array[0,0]=variable id1, array[0,1]=contents of variable titel1 ... and so on..
so the 4 variables are listed in horizontal manner and array [1,0]= content of the variable id2 and array[2,2]=contents of titel2 ..a nd so on ..

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Reading Info Into 2d Array?

Dec 6, 2004

ve got a page "news.php?search=" outputting this: id1=1&titel1=owaaa&text1=content2222212&ort1=Tran s& id2=4&titel2=sadas&text2=test tesxt Aneby&ort2=Aneby& id3=9&titel3=titasd&text3=ingassdssadsdset&ort3=An eby Trans deshG&

this is just an example of a possible output. The output varies with what search criteria was given , there could be anywere from 0 to 400 hits, were they are listed in this way. now im wondering how i would get this into a two dimensional array in flash so that (array[row,column])

array[0,0]=variable id1, array[0,1]=contents of variable titel1 so the 4 variables are listed in horizontal manner and array [1,0]= content of the variable id2 and array[2,2]=contents of titel2 .

View 1 Replies

ActionScript 3.0 :: 2 Buttons In An Array Using The Same Array Info?

Oct 23, 2011

I am trying to use two buttons in an array that use the same information in that array, so I'm trying to lump them together so I don't have to write them separately. This is what I've come up with, which doesn't work. One of the buttons works, but the other one doesn't:
 
var arrNavigation:Array = [{button:(n1_mcButton, n2_mcButton), page:bucktown, popup:popUp1, imgNumber:9},

n1_McButton and n2_McButton are two different buttons, but all the other information is the same.Is it possible to write this more efficiently than listing the buttons out separately?]

View 4 Replies

ActionScript 3.0 :: Reading Value From Array As String?

Jul 19, 2009

I currently have an array that looks like this:

ActionScript Code:
var array:Array=new Array["p", "e", "t"];

What I want to do is use an if statement to make it something like this:

ActionScript Code:
if (array.something=="pet") {

Notice the 'something' after array. I'm not sure if there is a way to take the data from an array and compare it to a string.

View 2 Replies

ActionScript 2.0 :: Reading Object # In Array?

Apr 15, 2004

I've written some php (w/ help from hans and some others, thanks!) and loaded it into to flash to make a list of images to read into a photo gallery. Then I wrote the function in order to be able to change images:

Code:
function changeSlide(number) {
if (number>=0 && number<images.length-1) {
currentSlide = number;
loadMovie(images[number], "_root.placeholder");
}
}

The length-1 part has to do with an extra string once the php is split, so dont worry. The images change on clicking buttons, which have the following codes:

forward

Code:
on(release){
changeSlide(_root.currentSlide + 1);
}

[code]....

View 2 Replies

ActionScript 2.0 :: Loop Not Reading Array

Aug 11, 2006

I can't get my button's to trace out; it's not reading my rollovers. When I manually write it out (bottom) it works.[code]

View 2 Replies

ActionScript 2.0 :: Reading Object # In Array

Apr 15, 2004

I've written some php and loaded it into to flash to make a list of images to read into a photo gallery. Then I wrote the function in order to be able to change images:[code]The length-1 part has to do with an extra string once the php is split, so dont worry. The images change on clicking buttons, which have the following codes:[code]

View 2 Replies

ActionScript 2.0 :: [F8] Reading An Array From A Notepad File?

Feb 18, 2009

pulling both a variable and an array from a text file (.txt). In my case I have the following:A flash file (.fla)A text file (named MyTxtFile.txt)Now, I just need to be able to pull an array from the txt file. Is it possible to do this? On the main timeline of my flash file I have the following:

Code:

MyArray= new Array("Pizza", "Cheese", "Fish");
_root.NumberofItems= 3;

My goal is to have the "MyArray" array in the text file so that I can edit the values from the txt file.Then I have a button on the main timeline ("Item_txt" is just a dynamic textbox in the flash file):

Code:

on(release) {
_root.Item_txt = _root.MyArray[random(_root.NumberofItems)]; }

I want to be able to update this file often, so I thought it would be handy to just "store" an array and a variable in a text file. Let's say in MyTxtFile.txt I had the array "MyArray" and the variable "NumberofItems". I could just update the information in the txt file and it would update the Flash file.

Edit: Would it be possible to store a string in a text file, then have that string put into a blank array? For example: If I had "cheese", "stars", "playdoh" in a text file and then I pulled the string into flash using the LoadVars class could I have the code in my time line set up like this:

Code:

_root.variable1 = "";
var ARRAY:LoadVars = new LoadVars();
ARRAY.onData = function(thetext:String) {

[code]....

View 2 Replies

ActionScript 3.0 :: Reading Text File Into Array

May 1, 2010

How can I use my array, which is now filled with the data from a text file, outside of the function from the URLLoader? Here the code:

[Code]...

View 6 Replies

ActionScript 3.0 :: Reading The Index From An Array Object?

Sep 15, 2008

reading the index from an array object?

if I have done something like this:

Code:
var array:Array = new Array;
array.push "moose";
var arrayObject = array[1];

trace (arrayObject.index) //this is the part i am curious about. Cause i have written another function where i need that kind of information.

View 13 Replies

Access Child Movieclip Info Of An Object In An Array?

Nov 28, 2010

I've dynamically created a whole bunch of movieclips.

I've given each clip a name based on a variable number:

mc.name = "mc"+i;

I've also use addChild to add a couple of dynamic text fields to each movieClip, named myText1 and myText2.[code]...

View 3 Replies

ActionScript 2.0 :: Multidimensional Array - Product Info MovieClip

Mar 14, 2004

Here's my scenerio: in my product info MC, user can select from 4 categories which gotoAndStop a nested MC. Each of the 4 categories has 5 hit areas on an "imagemap". The problem that I'm running into is that on each of those hit areas (mc's), I have actionscript - so that's 5 x 4 of essentially the same actionscript. Only difference is text information and _x & _y co-ord's (code is for caption/images boxes) Could I store all that data in an array in the product info MC rather than having 20 blocks of actionscript??

View 5 Replies

ActionScript 2.0 :: Populate An Array With Info Loaded In From An Xml File?

Nov 27, 2006

I'm trying to populate an array with info loaded in from an xml file. I've got the xml loading fine and I can trace everything but cannot seem to access the info outside of the function...here's my code:

Code:
myXML.onLoad = function(success) {
if (success) {
populateNav(myXML);
} else {

[Code]...

My trace inside of the populateNav function works great...all the info is there and image_path returns all of my...image paths. So my XML is fine...what I can't seem to do is pass that info outside of the populateNav function. My imageholder trace returns undefined. I think it's got something to do with the fact that the imageholder trace is being performed before the xml is fully loaded...not sure what to do about that though.

View 2 Replies

ActionScript 2.0 :: Extract Info From String And Add Data To Array

Jun 6, 2008

I know
insideInput = String(xmlNode.childNodes[0].attributes.insider)
virusTarget = insideInput.indexOf("kz", [17]);
endTarget = insideInput.indexOf(".", [virusTarget+2]);
trace("VTTT"+virusTarget)
trace("ET"+ endTarget)
//endTarget = local.indexOf(".", ["vitesting"]);
clipTarget = virusTarget+3;
zebra = insideInput.substring(clipTarget, endTarget);
trace(zebra)
I'm trying extract info from a string, increment through it and add the data to an array. I can't get the startIndex thing to work.

View 2 Replies

Flex :: Adobe Alchemy Byte Array Reading?

Feb 3, 2011

I am trying to send a bytearray extracted from a file to the C code and return that bytearray again from the C code..I am printing the contents of the return value from C in a text view contents.text but all i can see is the byte array object "OggS". I can't see the contents of the byte array. Can anyone say where i am going wrong?.. I have posted the C code and the AS code.

AS Code:
private function copyByteArray(content:String):void{
try{

[code].....

View 1 Replies

ActionScript 2.0 :: Reading Ext XML Data Into Class Object Array?

Sep 21, 2009

Ok, I've written a simple class with some string/number variables and set/get functions (tested by creating static objects).

ActionScript Code:
import EventClass;
var aEvent = new EventClass();

[code].....

View 1 Replies

ActionScript 2.0 :: Reading Of Array Items Works Until Online?

Jan 4, 2007

I have a pre-loader code that loads all of my exteranl XML text files. When I click on a link several frames later, the appropriate file is pulled from the resulting Array and placed on the stage. It works perfectly offline, but as soon as I upload it I get random text files loaded instead of the correct one.

Code below:

//combine all the arrays into one and send it to the preloader
allText = new Array().concat(introText,textForCard1,textForCard2 ,textForCard3,
textForCard4,textForCard5,textForCard6);
textForContent = allText;

[code]....

View 1 Replies

ActionScript 2.0 :: Dynamic Slideshow - Loading Images Using XML Info From Array

May 25, 2009

I've constructed a dynamic slideshow using ActionScript 2.0 and PHP/MySQL. The reason for this, aside from update purposes, is that the slideshow will eventually display over 200 images. Thus, to save loading time and bandwidth, I decided to use PHP to pull ten images from an SQL database, formatting the output in XML. The slideshow itself works fine. Unfortunately, there are a couple of issues I need to address; my ActionScript is extremely rusty, so much of my work's patchy.

The code's displayed below:
import mx.transitions.Tween;
import mx.transitions.easing.*;
var myShowXML = new XML();
myShowXML.ignoreWhite = true;
myShowXML.load("getData.php");
[Code] .....

The code in red is my main focus. It's the loop which loads all images as movie clips using the XML information from an array. The loop loads all of the images, making them transparent before the presentation begins. What I would like to do instead, to save loading time, is to load the next image while the current one is displaying. The function "moveSlide" controls the transition of the images, so I'd imaging it'd be best to plade it in there.

There's already an incremental variable being used, with _root.target_mc, for removing transparency from the current slide. The code in blue is also nagging me quite severely. I retrieve the next chain of slides by simply contacting the PHP script again. The only way I could think of doing that was to refresh the slideshow (this is done COMPLETELY in ActionScript, with nothing on the stage). Unfortunately, I could only work out how to reload the whole video.

View 1 Replies

ActionScript 2.0 :: Multidimensional Array - Storing Data In Product Info MC

Mar 14, 2004

Here's my scenario: in my product info MC, user can select from 4 categories which gotoAndStop a nested MC. Each of the 4 categories has 5 hit areas on an "imagemap". The problem that I'm running into is that on each of those hit areas (mc's), I have actionscript - so that's 5 x 4 of essentially the same actionscript. Only difference is text information and _x & _y co-ord's (code is for caption/images boxes) Could I store all that data in an array in the product info MC rather than having 20 blocks of actionscript?

View 5 Replies

Actionscript 3 :: Reading A Byte Array Into An Object After Being Decoded From A String?

Jul 29, 2011

I'm trying to serialize and deserialize a byte array to a string using Base64 for as3.

Here is my code

public function Serialize(vector:Vector.<Action>):String
{
var bytes:ByteArray = new ByteArray();
var serialized:String = "";

[Code].....

is the error I get after calling deserializedObj = deserialized.readObject(); Should I be get that error if I'm just trying to put this into an object? I'm not trying to put it into an action class object yet, but if it is then the action it's getting doesn't have parameters that were originally inside.

View 2 Replies

ActionScript 3.0 :: Number Keypad - Reading Array To Call Function

Oct 22, 2010

1) Using the number keypad, the user pushes a series of numbers to an array.
2) Lookup() is called to identify which "code" has been entered.

Code:
myArray:Array= new Array(1,2,3,4);
lookup();
function lookup() {
switch (myArray) {
[Code] .....

View 10 Replies

Actionscript 3 :: Dynamically Insert Object / Array Info In A Dynamic Textfield?

Jan 25, 2012

I have a load of objects with arrays in them.

var tabData0: Object = new Object();
tabData0.tab1 = new Object();
tabData0.tab1.names = new Array();

[Code]....

I want to combine this output with a few more to refer to my object / array. The remoteHolder contains the value I need to know which object (tabData0, tabData1, etc) to retrieve the info from.

tabHolder['btn' + i].titleHolder.titleField.htmlText = all['tab' + tab].names[(i-1)];

But get this:

ReferenceError: Error #1069: Property tab1 not found on String and there is no default value.

View 1 Replies

ActionScript 2.0 :: Passing Info In Array To Dynamic Text Field On Rollover?

Aug 20, 2007

I am trying to pass information to a many dynamic text fields when rolling over various movieclips that are generated using a loop. I have tried everything I know but can not get pahting to work prpoerly. The rollover works in that the curser changes by does not execute the lines of code within the in line function.(see red, bolded text (towards bottom) for problem). the Attached zipped swf is what it looks like as is.

Code:
//how many floors are there in the building?
var floors:Number = 25;

[code].....

View 2 Replies

ActionScript 2.0 :: ScrollBar Dragger To Be Positioned In Relation To The Info._y As The User Scrolls Info?

Jun 24, 2010

I have some scrolling content (info). I've also made my own scroll bar.I want the scrollBar dragger to be positioned in relation to the info._y as the user scrolls info.I have created two vars: one that worsk out where info._y is as a percentage and the other that works out where the scroll._y dragger should be as a percentage...

Actionscript Code:
var scrollBarPercent = Math.round(scrollBar.dragger._y / [code]........

also onMouseWheel working too.I need a small bit of code that takes the % of info._y and moves the scrollBar dragger to the same % but in relation to the Stage.height...so if projectGalleryPercent = 50%, make dragger._y 50% of Stage.height using scrollBarPercent.

View 1 Replies

ActionScript 3.0 :: Reading LoaderInfo Flashvars Then Chaning Them And Reading Them Again Fails

Oct 24, 2011

I am changing the flashvars variables v1=value&v2=value ect then after the flash movie runs I am changing the variables externally by javascript, so far so good.when flash first loads it reads the vars correctly.when I try to read them ( after the change ) it keeps reading the old values.[code]everything works except I cannot seem to read the changed FlashVars.

View 1 Replies

ActionScript 2.0 :: "gallery" Reading From Array, Next And Previous Button Headache?

Apr 9, 2004

Alright, I'm doing this to make a catalogue better for people on dial-up.Theres two movie clips, one will be hidden at all times, the next image is loaded into the hidden movieclip.The next button is working fine, although the previous is not, the objIndex changes down although that array index is not called in loadMovie();

I plan to switch over to colin moocks' preloader later when I get this working, make it draw/attach a preloader into each movieclip incase the movie has not loaded before the user presses "next".

Code:
var objIndex = -1;
picPath = "";
pics = ['winterrangep1.jpg', 'winterrangep2.jpg', 'winterrangep3.jpg', 'winterrangep4.jpg', 'winterrangep5.jpg', 'winterrangep6.jpg'];
_root.createEmptyMovieClip("holder_mc", 1);

[code]....

View 4 Replies

ActionScript 2.0 :: "gallery" Reading From Array - Next And Previous Button Headache

Apr 9, 2004

Alright, I'm doing this to make a catalogue better for people on dial-up. Theres two movie clips, one will be hidden at all times, the next image is loaded into the hidden movieclip. The next button is working fine, although the previous is not, the objIndex changes down although that array index is not called in loadMovie(); I plan to switch over to colin moocks' preloader later when I get this working, make it draw/attach a preloader into each movieclip incase the movie has not loaded before the user presses "next". Anyway, code is below, looks fine to be but I've been looking at it too long.

[Code]...

View 3 Replies

Actionscript 3 :: Class - Reading All Classes Under A Package Or Reading Classes With Same Metadata

Jun 19, 2011

I am doing an Actionscript 3.0 project which involves introspection. I am wondering if there is a way to get all the classes within a given package structure.

[Code]....

View 3 Replies

ActionScript 2.0 :: Info From One Swf To Another Swf

Dec 20, 2006

I loaded a swf in another swf. Lets say in.swf is loaded in all.swf. But I need to pass some info from a movie clip inside of in.swf to another movie clip inside of all.swf.

View 10 Replies

Reading XML From URL Link?

Apr 19, 2010

The project will have a web based interface but the actual presentation will be in flash. So the premise is you create a presentation, flash then reads the XML data, creates a menu and presents the other XML data in a linear fashion and my first question is whether the XML is in the correct format. I am not the one programming the XML side of things we have a .NET programmer doing that and he has not worked with Flash too much and this is also something new for me as well.

Code: Select all<presentation>
<info>
<name>My First Presentation</name>

[code].....

View 3 Replies







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