[Inspectable] Type=Array Default Values?
Hi --
I am working on a custom component in Flash 8 / ActionScript 2.0 and I have
an inspectable property that is of type Array. I would like to set the
default values for the array but I can not figure out how to do this. I have
tried:
[Inspectable(name="Month Names", defaultValue="January","February"
type=Array)]
[Inspectable(name="Month Names", defaultValue=["January","February"]
type=Array)]
[Inspectable(name="Month Names", defaultValue=("January","February")
type=Array)]
[Inspectable(name="Month Names", defaultValue="January,February"
type=Array)]
I either get a compiler error or a single value of January. Any thoughts?
Thanks
Rich
Adobe > ActionScript 1 and 2
Posted on: 08/22/2008 01:08:41 PM
View Complete Forum Thread with Replies
Sponsored Links:
Xml - Loading Default Values
I have an XML script which loads the default values based from when a button is clicked. The button is dynamically generated from the XML script.
I want to remove the button completely. And I want the first Section by default without the need to click a button.
http://www.ultimadg.com/clients/ppag/testimonials.html
Please send me an email and I will Send All files needed to help me through this one .
View Replies !
View Related
Default Argument Values?
in AS2.0 you had to do this annoying thing...
Code:
function actCool(itsWorking:Boolean):Void
{
if (itsWorking == undefined) itsWorking = false;
trace(itsWorking);
}
please tell me they fixed this... can you do something like this now?
Code:
function actCool(itsWorking:Boolean=false):void
{
trace(itsWorking);
}
ty in advance!
View Replies !
View Related
Default Values For Parameters
Morning,
Little confused why this is giving me a compiler error.
I have class Colors which is all constants:
ActionScript Code:
package{
public class Colors{
public static const grey:uint = 0xCCCCCC;
public static const blue:uint = 0x2238FF;
public static const darkGrey:uint =0xA2A2A2;
public static const darkBlue:uint = 0x0C0077;
public static const red:uint = 0xFF0000;
Then I have this method in another class and package. (both in the same folder. )
ActionScript Code:
public function drawLine(color:uint=Colors.grey):void{ //line the error is on
connectingLine.graphics.clear();
connectingLine.graphics.lineStyle(1,color);
connectingLine.graphics.moveTo(parrent.comment.xMidpoint(), parrent.post.bottomEdge());
connectingLine.graphics.lineTo(this.comment.xMidpoint(),comment.y-heightOfBar*2);
}
it does not like when I set the default value for the parameter color to Colors.grey. I can set it to zero or 0xCCCCCC (grey) but NOT to Colors.grey. I can use Colors.grey in the body of the method so I know the file is accessable...
Seems strange.
Error:
Code:
1047: Parameter initializer unknown or is not a compile-time constant.
View Replies !
View Related
Default Values In A Class
Hi guys
my question is simple, if I have a create a class I can either
a. Have some values set by the class itself as default or
b. Pass values to the class object at creation
what I want to be able to do is say only specify one, two, any or none of the values/properties at creation and then have the rest which weren't passed set to a default value
Is this possible an if so how?
Zen
View Replies !
View Related
AS Default Values In Constructor
Hi,
I have a class:
Code:
class elem{
var name:Number;
var date:Number;
function elem(name:Number, date:Number = 20) {
this.name = name;
this.date= date;
}
}
What I am trying to do is give a default value for date.
Example:
Code:
var obj1:elem = new elem(10);
var obj2:elem = new elem(10, 50);
trace(obj1.date); //would be 20
trace(obj2.date); //would be 50
would be possible in AS?
View Replies !
View Related
Changing Default Component Values
I'm attaching the radio button using createClassObject(), and I want a few of the default values to be different right off the bat.
myRadio.tfList.labelPath.wordWrap = true;
myRadio.tfList.labelPath.autoSize = "left";
myRadio.tfList.labelPath._width = 550;
Is there another way to do this, other than creating a new class that extends mx.controls.RadioButton and sets those values in the init() or constructor?
View Replies !
View Related
Setting Default Values In Ctor
Ran into a curious problem/bug. Mostly just curious about why this is happening because I can obviously make a work around.
I have a date object and I want to keep the default value so that I can check to see if it is the default later. Unfortunately this does not work:
ActionScript Code:
package{
public class MyDate{
public var date:String; //Date in the form 2008-01-23
private var defaultStr:String = "UNKNOWN";
public function MyDate(date:String=defaultStr){
this.date=date;
}
//....
}
}
I am inclined to think it is b/c of the program flow. It does not create defaultStr until after it runs the constructor.
This code does work:
ActionScript Code:
package{
public class MyDate{
public var date:String; //Date in the form 2008-01-23
private var defaultStr:String = "UNKNOWN";
public function MyDate(date:String="UNKNOWN"){ //<-Change from defaultStr to "UNKNOWN"
this.date=date;
}
//....
}
}
But it seems like bad practice because a maintenance programmer would have to change the default in two places and could easily forget.
Just curious why i cannot set date:String=defaultStr
View Replies !
View Related
Custom Functions: Default Values?
Dear diary,
okay- so I was really just wondering, if there is something like setting default values for a "tailor made" function that accepts variables? I mean- PHP offers the
PHP Code:
function mycoolphpfunction ($myvar = "my default value") { return $myvar;}
...in case you're not familiar with PHP: if no value is given to "mycoolphpfunction", it just returns (in this case) "my default value".
Does Actionscript have something similar? I didn't find any reference to it so I'm just using...
ActionScript Code:
function mycoolasfunction (myvar) { if ((myvar == undefined) || (myvar == "")) { myvar = "my default value"; }}
...to achieve the same effect.
Any way how I could save myself some time in any way? I guess instead of the "((myvar == undefined) || (myvar == ""))"-check, I could just write another function that checks a value / variable- if it is filled, it returns the value it's filled with, if it isn't filled, it returns the second value. I'll experiemnt on that ^_^
Thanks in advance- and for your time reading this!
~Me
View Replies !
View Related
Change Default Graphic Symbol Type?
i've been playing with an animating knot tying strategy; that has reuseable 'pieces', that can be used in other knots. Presently just have a clove hitch animated.
i use mostly mc's, but on the 'top layer' (with mc's loaded internally in the graphic symbols) have chosen to use graphic symbols instead. Is there a way to get them to default to play once, rather than loop forever when placed on timeline? Just an annoyance really, but figured i'd ask..
Thanx!
View Replies !
View Related
How To Set Default Values For Input Text Fields
Let's say I have 10 input text fields on the _root. I know you can set the default text for those fields by just entering that text in flash before publlishing the file, but what if I want users to be able to set the defaults and save them for future use.
The other issue is that this will not be a web-based tool. I plan on publishing this to a self contained exe file. It's probably not very feasible because of this.
View Replies !
View Related
Extending Flash: How Do I Set Default Values For Filenames
Hi,
I am trying to set default values for filenames <choosefile> and <popupslider>s that will show up when my XMLpanel first loads in my jsfl extension file. It seems that I can only set default values for textbox items.
How do I do this for filenames and popups?
As a workaround, I also tried using a flash object dialog box to look like a <choosefile>, or any jsfl command, but then how do I return those values back to the XMLpanel that calls them. and pass the data back to my jsfl script.
lemme know if you know a way,
View Replies !
View Related
Assigning Default Values For Class Properties
I am wondering about assigning default values for class properties. Is it as symbol as declaring the property and assigning a value:
public var my_property:type = value;
or is it better to declare a private property with the defualt value and then a public property with set to the default value:
private var defaultMy_property:type = value;
public var my_property:type = defaultMy_property;
Any thoughts would be great and thanks in advance.
View Replies !
View Related
[MX] Weirdness With Values Used By Array Populated Clip Values.
Hi,
I have used invisible buttons on top of some text, as part of a volume control interface.
The text buttons are set out as 0 – 25 – 50- 75 -100 referring to the % that a music tracks volume will change to once a button is pressed – so far so good.
Now to give values to the text buttons in order for them to make the text clip that they are on top of go to & stop & the right frame I have used arrays to give a reference the location of the text clip:
numbs_array = [_root.volHold_mc.vol0, _root.volHold_mc.vol25, _root.volHold_mc.vol50, _root.volHold_mc.vol75, _root.volHold_mc.vol100];
I then reference that in a home made “release” function as “this.monica.gotoAndStop(2);” “monica” being the reference to the address of the clip.
It all works fine except the code seems to make the movie play clips in an order that they have not been designated in the array – Like a button on top of the “25”% value will play the animation for the “75”% clip?
The whole problem is probably much better seen through the movie – the problem section of which i have attached below.
View Replies !
View Related
Showing Default Values For Child Added To A Container That Has Been Modified
What I'm trying to is use 1 background for a bunch of different areas on my stage.
Each background has a different width and height.
What I'm trying to do is add a child that should appear to be the same on all of the areas regardless of width or height.
Example square is 20x20 and I have a circle that's 10x10.
If I put that circle on the 20x20 square it's fine, BUT if I reuse that symbol and stretch it to 38x15 for example, the circle is distorted.
I realize this is by design and is a good thing, but I'm trying to have my circle be a part of that area's children but maintain it's original aspect ratio and scale.
Is this something that Matrix would help out with or is there some sort of flag I'm missing somewhere.
Thanks.
View Replies !
View Related
Database Values To Array Values
Hi all,
I've created a movie which uses a number of arrays to construct the elements of a flash-based gallery.
What I need is a practical method of getting values from a database into an array via an ASP page.
The plan was to load the variables into these arrays using the an asp page and a loadvars object to create a string (basically the array values in quotes separated by commas) which was then to be inserted into the parameters for the creation of the array. Needless to say this hasn't worked- the create array object seems to interpret the whole string as the first value in the array, i can't find a way of populating the array from just a single asp page.
I've given up with this method and really need a few pointers.
Thanks
View Replies !
View Related
Setting Array Values To Variables In Another Array
I have some variables created on the main timeline and a mc called options which will be where those variables can be manipulated.
A way I've tried to this is by creating a first array(array1) and populating it will all the variable names found on the main timeline, and another array(array2) containing the values of the variables the user has changed(which are displayed on some dynamic text fields). To make these changes, an "apply" button is pressed which will set the values found in array2 to the variables in array1.
So...
Code:
PHP Code:
//variables on the main or root timelinevar1 = 1; var2 = 2; //... //within options mc timelinearray1 = [var1, var2]; array2 = [var1Display, var2Display]; apply.onRelease = function() { //set values in array2 to variables in array1 and update the main timeline's variables//... }
How would you do this so that var1, var2... are updated properly according to the values found in array2?
And because array2 contains strings(read from dynamic textfields), how do you deal with that since var1 and var2 are numbers?
hope this all makes sense to everyone
View Replies !
View Related
Changing Default "new Site" Values In Dreamweaver
Do you know if there is a way to change the defaults for a "New Site" in Dreamweaver? For example, right now I want to turn off "Design Notes" by default because I don't like the _notes folder showing up in all of my folders by default. I don't use that feature and almost certainly won't in the future (More robust to organize workflow around a combination of subversion, bugzilla, good commenting, phpdoc, etc.). There are some other defaults that I think it would be convenient to change as well.
Any ideas?
BTW, I like the new DevShed forums color scheme.
View Replies !
View Related
Populate An Array Values From An Array
ok i have this xml file
Code:
<artworkinfo>
<movieinfo>
<artLocation>cover1.jpg</artLocation>
<movie>Live Free or Die Hard</movie>
<plot>John McClane takes on </plot>
</movieinfo>
<movieinfo>
<artLocation>cover2.jpg</artLocation>
<movie>Meet the Robinsons</movie>
<plot>Lewis is a brilliant inventor </plot>
</movieinfo>
</artworkinfo>
the xml will tell where the cover art is the movie title and plot.
i want to populate my movie with this info what is the best approach to create empty movieclips using actionscript or create individuals MC , i try the second one and create 4 movieclips (cause the xml have 4 elements just post 2) and make an array of mc but i can find how to match the xml array to the mc array , this is the code for better explaining,
Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
movie = [];
plot = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
movie[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
plot[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
}
placeholder=new Array(loader1,loader2,loader3,loader4);
placeholder_total = placeholder.length;
for (e=0; e<placeholder_total; e++){
placeholder[e].contentPath=this.image[i];
}
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("movieinfo.xml");
the stage have 4 movieclips name loader1,loader2,ect... each mc have 2 dynamic text field one for title and one for the plot.
View Replies !
View Related
Fancy Box Type Moving Graphic Type Cool Efect But Im To Dumb Type Thingy
i am tring to make a box thinky simaler to the one on www.starvingeyes.com but cant even work out how to start it. is there anyone who can point me in the right direction or to a tutorial ?
the box has a graphic inside a grided box the sections of the graphic fade in and out as the mouse goes over them and displays random sections when the user is not moving the mouse over the box
i did find java tutorials for this effect but would much preffer it to come from flash as java is a bugger to get working on some machines
Any way thanks in advance for any help
Steven Green one_mad_punk@yahoo.co.uk
View Replies !
View Related
Type Of Array?
link to view:
http://208.106.158.167/stuff/stuff_001.html
i would like the main image that appears to be different every-time a user comes to the site, it does not matter if this is random or ordered. Simple is good.
currently the image loads as a jpg using a auto load setting with a loader component, and is on the bottom level layer in the fla. this is mostly for demonstration purposes, as is the content on top of the image.
the images could load from a folder of images, or be an keyframe image in a swf file,or a single image swf file or other format, or linked from the library.
I expect 5-10 different images as candidates , and they are pretty big 1200x800pixels.
What would be my best approach, simple is good.
thanks
link to fla:
http://208.106.158.167/stuff/sfolder.zip
link to view:
http://208.106.158.167/stuff/stuff_001.html
View Replies !
View Related
Type Checking For Array?
I know you can use the following in AS3...
ActionScript Code:
var myVar1:Array = new Array('text1','text2');
var myVar2:String = 'text3';
if(myVar1 is Array){
trace('myVar1 is an array');
}else{
trace('myVar1 is not an array');
}
// myVar1 is an array
if(myVar2 is Array){
trace('myVar2 is an array');
}else{
trace('myVar2 is not an array');
}
//myVar2 is not an array
I thought is saw how to do this in AS2 in moock's AS2 book but I cant find it now. Is there a way to check type in AS2?
View Replies !
View Related
Add Up All Values In An Array
Hi there
I need a bit of help I am have loads of trouble adding all the variables
In an array together. I just not sure how to go about doing it.
I have try using a for loop but the out put does match up with the
To the total of all the values.
Code:
for (k=0; k<totalprice.length; k++) {
allprice = parseInt(totalprice[k-1])+parseInt(totalprice[k]);
}
I know there is some thing wrong with this code but I am not sure what
Think I’ve been looking at it for to long.
Hope you can help
Thanks
Mac-10
View Replies !
View Related
Array Values..HELP
I want to create a memory game, but i got stuck here:
on (release) {
bricka=new Array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18 ,19,20,21,22,23,24);
for (i=1; i<13; i++) {
arrayPos=random(bricka.length);
frameNum=myArray[arrayPos];
_root[bricka(i)]=frameNum;
myArray.splice(bricka,1);
}
}
the _root[bricka(i)]=frameNum; is wrong somehow.
it set bricka[1]=2,bricka[2]=3,bricka[3]=4 and so on, instead of
the random numbers that comes out from arrayPos.
what am i doing wrong ?
View Replies !
View Related
Array Values Into A For()
I'm trying to use the following values in a for so I don't have to type them out all the time.
But it ain't working [obvioulsy]!
Also I'd like to put it into a function so that I only have to type out the array values then call the function rather than repeating the for code all the time.
Any clues?
squares = Array("s2","s11","s19","s27","s30");
opacity = Array("15","22","40","17","12");
for (x = 0; x < squares.length; x++) {
_root.Grid[squares[x]].gotoAndStop(1);
setProperty(_root.Grid[squares[x]], _alpha, opacity[x]);
}
View Replies !
View Related
Array Values?
Hi,
I have two arrays which attach random movie clips to the stage. One array contains pictures and the other contains words. So for example the word array contains the words "apple" "dog" "cat" and the picture array contains pictures of an apple, dog and a cat. Ive got the movie clips to display randomly when you click a button, so a picture and a word displays at the same time.
Is it possible to assign a number to each item in the array, so for example the dogword = 1 and the dogpicture = 1
appleword = 2 and the applepicture = 2
catword = 3 and the catpicture = 3
so if the dogword and dogpicture are on the stage at the same time it is possible press a button to say that they match and then to add a point to the score?
Could anyone tell me if this is possible?
this is the code i am using to display my movie clips randomly
on (press) {
_root.blankpicture.attachMovie(_root.pic[random(3)], pic1, 0);
_root.blankword.attachMovie(_root.word[random(3)], word1, 0);
}
and then my arrays are:
pic = new Array ("applepic", "dogpic", "catpic");
word = new Array ("appleword", "dogword", catword");
I am using flash mx
thanks
View Replies !
View Related
Array Values
I am Using Flash MX 2004........
Ok i have an array with 4 elements wich are coordinates that i will be using for another function in my application.... they are as such
test[0]=12;
test[1]= 205;
test[2]=167;
test[3]=355;
now i have a function that will take the the array element values and do what they do with them.... for right now that function looks like this
function makeButton(x1,y1,x2,y2) {
trace(x1 + ", " + y1 + ", " + x2 + ", " + y2);
}
Now i know i can access the aray element values independently but i dont want to do that, what i want to do is concatenate the array and use its resulting string as the parameter values for the function when i call it....the Problem is it is not working and im not sure if can be done when ...I tried using test.join() and i also tried using test.toString() both of these output
12,205,167,355 which is exactly what i need to pass to my Function but even after setting a variable equal to these the output of the function is....
12,205,167,355, undefined, undefined, undefined.............. which means that the entire array.join() value is only being passed as the x1 value......Is there away around this? Help if you can...Thanks
Suzy
View Replies !
View Related
[F8] _x And _y Values From MC's In Array
Hi
I have created an Array with 5 duplicated movieclips. I am now trying to use the _x and _y values of these movie clips, but this value comes out as UNDEFINED. What am I doing wrong?!
Code:
for (var i:Number = 0; i < 5 ; i++) {
duplicateMovieClip(dot_mc, "dot_mc_" + i, this.getNextHighestDepth());
_root.dot_mc._x = Math.floor(Math.random() * Stage.width);
_root.dot_mc._y = Math.floor(Math.random() * Stage.height);
aDotArray.push("dot_mc_" + i);
trace(aDotArray[i]._x);
}
View Replies !
View Related
Array Values
Hi,
I have two arrays which attach random movie clips to the stage. One array contains pictures and the other contains words. So for example the word array contains the words "apple" "dog" "cat" and the picture array contains pictures of an apple, dog and a cat. Ive got the movie clips to display randomly when you click a button, so a picture and a word displays at the same time.
Is it possible to assign a number to each item in the array, so for example the dogword = 1 and the dogpicture = 1
appleword = 2 and the applepicture = 2
catword = 3 and the catpicture = 3
so if the dogword and dogpicture are on the stage at the same time it is possible press a button to say that they match and then to add a point to the score?
Could anyone tell me if this is possible?
this is the code i am using to display my movie clips randomly
on (press) {
_root.blankpicture.attachMovie(_root.pic[random(3)], pic1, 0);
_root.blankword.attachMovie(_root.word[random(3)], word1, 0);
}
and then my arrays are:
pic = new Array ("applepic", "dogpic", "catpic");
word = new Array ("appleword", "dogword", catword");
thank you.
View Replies !
View Related
Using Values From Array
ActionScript Code:
function setButtonDefaults(){
buttonPropertiesArr=["buttonOne``150", "buttonTwo``110", "buttonThree``128];
for(i=0; i<buttonPropertiesArr.length; i++){
var tempArr:Array = buttonPropertiesArr[i].split("``");
_root.tempArr[0].button_tpl_ins.outer._x=0;
_root.tempArr[0].button_tpl_ins.outer_orange._x=0;
_root.tempArr[0].button_tpl_ins.inner._x=0;
trace("arr length: "+buttonPropertiesArr.length+", arr: "+_root.tempArr[0]+", "+_root.tempArr[1]+", orange x: "+_root.tempArr[0].button_tpl_ins.outer_orange._x+", button: "+_root.tempArr[0]+", orange x buttonOne: "+_root.buttonOne.button_tpl_ins.outer_orange._x);
}
}
Ok, inside the function, for example:
tempArr[0] - traces as something valid
_root.buttonOne.button_tpl_ins.outer_orange._x - traces as something valid
_root.buttonOne.button_tpl_ins - traces as something valid
yet as soon as I replace a static value with an array value it becomes undefined:
_root.tempArr[0].button_tpl_ins.outer_orange._x - traces as undefined
_root.tempArr[0].button_tpl_ins - traces as undefined
I don't understand, and I don't know what to search for to find the answer...
View Replies !
View Related
Array Values
Hi everyone! I'm trying to assign values to my array. Here is what I have so far.
Code:
_root.createEmptyMovieClip("Placement", 2);
var shapes:Array = new Array("square", "circle", "triangle");
function selectshape():String {
//get the index for the letter
var index:Number = random(shapes.length);
//assign the letter to a var
var s:String = shapes[index];
//display letter
return s;
}
trace(selectshape());
//calls the function that will place the shapes on the stage
pulltogether(shapes);
function pulltogether(test:Array) {
for (var i = 0; i < test.length; i++) {
Placement.attachMovie(shapes[i], shapes[i], i+10, {_x:random(200), _y:random(200)});
}
}
What I want to do is say if "circle" is selected than I want to assign a value of "yellow circle".
Code:
if ("circle" ){
storedvalue="yellow circle"
]
else if ("square"){
storedvalue="blue square"
}
else if ("triangle") {
storedvalue="green triangle"
}
Hope this makes sense???
View Replies !
View Related
Array Values
I'm trying to load a random .swf into a holder .swf, basically a random ad on the screen. I'm attempting to do this by calling a random item from an array. I'm wondering if my new array is referencing the external .swfs (which are in the same directory) or if that is just some empty data that I created myself in flash. I'm pretty confussed on how all of this works and how to actually reference external assets like movies and images, in an array.
ActionScript Code:
productClip = new Array("catClip.swf", "QCClip.swf", "OPOSClip.swf");
productClip[0] = "catClip.swf";
productClip[1] = "QCClip.swf";
productClip[2] = "OPOSClip.swf";
function loadOne() {
loadMovie(productClip[random(2)+1], "_root.loadMC");
}
I'm not even sure if this is how I should go about doing this or if there's an easier way.
shagPun
View Replies !
View Related
Add Up All Values In An Array
Hi there
I need a bit of help I am have loads of trouble adding all the variables
In an array together. I just not sure how to go about doing it.
I have try using a for loop but the out put does match up with the
To the total of all the values.
Code:
for (k=0; k<totalprice.length; k++) {
allprice = parseInt(totalprice[k-1])+parseInt(totalprice[k]);
}
I know there is some thing wrong with this code but I am not sure what
Think I’ve been looking at it for to long.
Hope you can help
Thanks
Mac-10
View Replies !
View Related
Filling Specific Type Of Array
Hi all,
I am quite a rookie with arrays, and I have recently discovered that an Array could take this form :
ActionScript Code:
var my_array:Array = new Array({word:"word1", link:"link1"}, {word:"word2", link:"link2"})
which is very handy indeed. Now my problem is that I can't figure out how to fill it dynamically, I tried various ways such as:
ActionScript Code:
var my_array:Array = new Array()
my_array[0].word = "word1"
and it doesn't work...
Could someone help me on this one?
Thanks a lot dudes,
David
View Replies !
View Related
An Array Type Thing Wiht MC's
i am trying to make a game where, you shoot, teh gun can shoot pirtty constantly, and all the bullets looks the same (obivously), is there any way i can use 1 movieclip and duplicate it? in an array or somthing??
thanks
View Replies !
View Related
[AS 2.0] Type Checking Data In Array
Hi everyone,
I'm trying to do something such as:
ActionScript Code:
var n:Node = openList.shift();
I know that all of the data contained inside openList is a type of Node object, but Flash returns an error. I don't know how to typecast such as placing (in another language)...
Code:
(Node) openList.shift();
...to tell Flash that the data returned will be a Node object.
Better yet, is there a way to specify, while declaring the array, the type of the data that will be placed in it?
I could just take the :Node tag out from my variable declaration, but this might be in a tutorial, so I should at least act like I believe half the stuff about proper coding I write about
Thanks,
Kirupa
View Replies !
View Related
Dispaly All Values Of An Array?
i am storing all the characters entered by users into a textbox,into an array.Now i manuplate some of these(e.g changing case etc.) and again store these into new array ,how can i display all the values of this array(in a new dynamic text box) on click of a button?
View Replies !
View Related
Values Disappearing From Array
Hi,
i'm filling an array from a xml-file somehow like this:
Code:
[i]
_root.bild[i][j][2] = menuItem[i].attributes.name+"/"+subItem[j].attributes.url;
trace("Fotograf "+i+", Bild "+j+" = "+_root.bild[j][2]);
The trace-command at this stage shows the value alright, but some values seem to disappear from the array if I try to use it later.
The code is rather long, I posted the files here:
http://files.ueberland.net/array.zip
The relevant lines are from 134 to 224 - I'm traceing the actual problem there.
You can see in the output-window after the "where are they gone" that some values seem to have vanished.
Any help would be greatly appreciated.
PS: Isn't it a bit... odd to use []-brackets to format the forum-posts since it's the way you handle arrays in actionscript?
View Replies !
View Related
Assign Array Values
FLASH MX
hi, i have a problem about arrays...
i want to assign values to array elements through a .txt file, then load the .txt from the movie..
so it's like, i have created an array in the movie, then i would load the .txt using loadVariables
how should i assign values in text file??
can i assign it by using:
arrayA[0] = 0123;
arrayA[1] = 4567;
please help...
View Replies !
View Related
Array Values Into Variables
OK, so i have an array defined by a query to the database.
myEntry[][]
What i'm looking to do is define variables from the array using part of the array as the variable name.
ie:
myEntry[0][0] = myEntry[0][1]
The value stored in [0][0] should be the variable name and the [1] value needs to be set as the value of that variable.
Obviosly the above example would simply just redefine the array myEntry[0][0] - but how would I do what I'm trying to do?
Any clues?
many thanks!
View Replies !
View Related
Adding Values Box For Array
I'm looking for a way to add a "values" list box where users can enter values into an array.
What I'm looking for is the "values" list box that you get when you click on the magnifying glass in the components properties panel.
Any ideas as to how I can add this would be most appreciated.
Thanks.
View Replies !
View Related
Remove Values In A 3D Array?
Hey,
I'm not sure if 3D array is the right word... but whatever
Ok, I've got this array for my ISO-RPG-Game wich stores the tile-data:
Code:
map = [
[[6], [2], [2], [2], [2] ],
[[2,1,5],[2], [2], [3], [2] ],
[[2], [2], [2], [2], [2,1,4]],
[[2], [2], [5], [2], [2] ],
[[2], [3], [2], [2], [2], ]];
If a cell only consists of: [number], there's nothing special. It will just add a tile...
But if a cell says [number,number,number] there's something special going on. I shall explain the most left one: [2,1,5]
The first number (2) is just the tile, 2 stands for grass so it'll add a grass tile.
The 1 means an item should be placed on that tile.
The 5 means it's item number 5 that should be placed there.
Now when the hero picks up the item I want: [2,1,5], to be replaced with [2]...
I'm now using:
Code:
map[1][0][1] = null;
map[1][0][2] = null;
But when I then trace that part of the array it says: 2,null,null so the data is not realy removed...
So the question... how can I remove it?
View Replies !
View Related
|