Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Can't Set XML Values



i've loaded an XML doc into a new object and created a new element ("xloc"), setting its value at the xposition of a movieClip ("star") put on the stage where the user clicks. when i put a trace on the element itself it comes back as an empty element, but when i ask for the node value, it works. To wit:

objXML.childNodes[2].firstChild.childNodes[j].childNodes[n].nodeValue = _root.star._x;
trace(objXML.childNodes[2].firstChild.childNodes[j].childNodes[n].nodeValue);

returns:
212 (or wherever I clicked),

while
objXML.childNodes[2].firstChild.childNodes[j].childNodes[n].nodeValue = _root.star._x;
trace(objXML.childNodes[2].firstChild.childNodes[j].childNodes[n]);

returns:
<xloc />

and decidedly not
<xloc>212</xloc>

any ideas?
thanks,
dave
brooklyn, ny



FlashKit > Flash Help > Flash ActionScript
Posted on: 12-07-2003, 03:15 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Generating Random Values For A Variable While Excluding The Already Generated Values
Hey Flashers:

Here's my question this time around. I want to generate random values between 1and 50 for a variable but I want every time I generate the new value to exclude the already generated values from the pool of options. Something like playing the lottery where no two drawn numbers can be the same. Any hints or references to open code will be greatly appreciated.
As always, thanks a lot!

Function Populated By Node Values Returning Undefined Values
I have been working on some code which extracts the information from an xml document, styles it with css and then loads the various node values into a text field and arrays. The user click on a link in the text field which calls myFunction using asfunction and that in turn should enter the array values relating to that link into text fields.

Everything in general seems to work OK except the value that is returned to the two text fields on pressing the link in the CCTextField "which in turn calls myFunction" returns undefined for those values of the arrays. I check the agency[2] value in the function that populates the arrays and the value is returned as it shoiuld be so it appears there must be something amiss with myFunction, or at least it would seem so.

Any takers as to what this problem might be?

I have supplied some shortened code below.


PHP Code:



CCTextField.styleSheet = myStyle;
// NOTE: CCTextField styleSheet has been created beforehand
my_xml = new XML();
// NOTE: my_xml has been created beforehand


my_xml.onLoad = function(sucess) {
    if (sucess) {
        processXML(my_xml);
    }
};
// Load up the XML file into Flash
my_xml.load('TEST.xml');
// This is the function that will be called when
// the XML document is loaded succesfully
function processXML(xmlDoc_xml) {
    
    var listText_comm = ""; // List text variable
    var entryNum = 0; // Entry number variable
    var agency = new Array(); // Agency array
    var production = new Array(); // Production array
    
    for (var n = 0; n<xmlDoc_xml.firstChild.firstChild.childNodes.length; n++) {
    
        categoryNodeName = xmlDoc_xml.firstChild.firstChild.childNodes[n].nodeName;
        
        if (categoryNodeName == "client") {
            listText_comm += "<a href='asfunction:_root.myFunction," + entryNum + "'>" + xmlDoc_xml.firstChild.firstChild.childNodes[n];
            trace("client " + xmlDoc_xml.firstChild.firstChild.childNodes[n]);
        } else {
            if (categoryNodeName == "title") {
                listText_comm += " - " + xmlDoc_xml.firstChild.firstChild.childNodes[n] + "</a>";
                trace("title " +xmlDoc_xml.firstChild.firstChild.childNodes[n]);
            } else {
                if (categoryNodeName == "agency") {
                    agency[entryNum] = xmlDoc_xml.firstChild.firstChild.childNodes[n].firstChild.nodeValue;
                    trace("agency " +xmlDoc_xml.firstChild.firstChild.childNodes[n].firstChild.nodeValue);
                } else {
                    if (categoryNodeName == "production") {
                        agency[entryNum] = xmlDoc_xml.firstChild.firstChild.childNodes[n].firstChild.nodeValue;
                        trace("production " +xmlDoc_xml.firstChild.firstChild.childNodes[n].firstChild.nodeValue);
                        entryNum++; // click over the entry number by 1
                    }
                }
            }
        }
    }
    
    trace("AGENCY 2 = " + agency[2]); // this returns agency number 2 OK
    
    _root.CCTextField.text = listText_comm; // CCTextField shows this text OK
}

function myFunction(listItem) {
    clientF = agency[listItem]; // THIS RETURNS undefined ON PRESSING THE LINKS IN CCTextField
productionF = production[listItem]; // THIS ALSO RETURNS undefined ON PRESSING THE LINKS IN CCTextField

    trace(listItem); // this trace = the list item passed by asfunction OK


[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.

Passing Values From ASP To Change Alpha Values Etc
Is this possible? I currently have a log in system, logging each page a user visits, these visits amount to a value and have this value passed to flash to control alpha values, tints etc to reflect look and feel. is this possible?

Passing Values From ASP To Change Alpha Values Etc
I have posted this before, but wondering if anyone can help?

Is there anyway of having external values controlling alpha values, tints etc of a movieclip?

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

How Do You Change Rgb Values Hexadecimal RGB Values?
how do you change rgb values hexadecimal RGB values in action script?

Writing Values To A Text File And Reading Values From The Same File
Hi, I want to create a page counter in Flash and I was wondering how to write a value (the next number for the visitor) to the text file and read the current value from that file. In a simplified form I would just read the number currently in the file, add 1, and rewrite the number to the file. Eventually when I get that worked out I will adapt it to only add 1 for each different user session instead of each page hit, but I'll start with the easy stuff first.

Thanks

// Are These If Than Values?//
For this site, http://www.williamcarpenter.com/, when you click a section (for portfolio) where ever that verticle line is, it always rises then moves over. How do you do that so it it will play out that animation during any section

n

Values?
I want to enter a value by clicking a button.

then, later on in the movie on a certian frame,
check for the value.

IF the value is present = gotoandplay "here"
IF it isn't = gotoandplay "there"

anyone know how to do this?
please help, I'm going crazy!

Low Values
Ok, here's the problem:
Ive got decimal color values converting to hexadecimal color values. It all works fine BUT if your decimal value is below 16 then it becomes a value of either 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E, or F without the 0 in front. When I tell an object to convert to the color:

setRGB("0x"+redHEX+greenHEX+blueHEX);

and when the values are below 16 in decimal it becomes a color value of something like 0x000 instead of 0x000000 making it completely useless as flash will not understand the true color you want.

What kind of a script would I use to make it add a "0" to the beggining of a hexadecimal string if the decimal number is below 16?

I tried things like:


Code:
if (decimalValue < 16) {
hexvalue = "0"+hexvalue;
}


This also did not work properly.

How can I fix this problem?

_x Values
i hav a picture which is masked so just part of it is visible, and 4 arrow buttons (top, bottom, left, right) i want the image to move when you click the buttons. so when you click the right button, the image moves to the left so you can see whats to the right of where you were. no i can do this by simply

on (release) {
setProperty ("_root.wholesky.skyimage", _x, "-200");
}

but then it will only ever show the outside parts of the image as all 4 buttons are taking you to a specific place. so then i tried
on (release) {

if ("_root.wholesky.skyimage", _x= "-325.5") {
setProperty ("_root.wholesky.skyimage", _x= "-325.5") {skyimage", _x, "-200");
}

if ("_root.wholesky.skyimage", _x= "200") {
setProperty ("_root.wholesky.skyimage", _x= "-325.5") {skyimage", _x, "-325.5");
}
}

but that makes the whole movie clip jump to the left of the screen n still dunt show the middle sections.

i was thinking mayb make each button move it so far like 30 pixels each time it is clicked so i tried

on (release) {
setProperty ("_root.wholesky.skyimage", _x, "_root.wholesky.skyimage._x+30")
}


duz anyone get me? basically i just want to make the pic move without the border its in moving, any way will do!

Andi

X And Y Values?
i followed this tutorial to learn how to make smooth transitions between pages
http://www.actionscript.org/tutorial...em/index.shtml
i have got everything working except that a full color block is supposed to come into view each time a button is pressed, and at the moment none of the colors are lining up properly, as you can see. i tried playing around with the x and y values in the action script but that didnt seem to do anything (even though im pretty sure thats how to fix it).
heres is my file so you can see what i mean.
cheers.

Two Values
I have a movieclip, when u click it it makes thrust=true. Then if you click it again I want it to make thrust=false

I can make it make thrust=true, thats easy, but if you click it again it'll turn thrust=false, and then if you click it again it makes thrust=true and so on...

Please can someone help me, it's driving me crazy, I can't think.

I hope I explained my problem good enough.

How To Get The X, Y, Values Of A Mc
I have a slider volume controle. When i go to the next scene it sets to 100%. How would i get the x y values of the piece within the slider and apply it to that peice in the slider of the next scene?

Thanks guys.

Getting Values From XML?
I have an XML table set up for a tile-based game with the following structure (with more columns though):


Code:
<map>
<tilecol>
<tilerow>0</tilerow>
<tilerow>0</tilerow>
<tilerow>0</tilerow>
<tilerow>0</tilerow>
<tilerow>0</tilerow>
<tilerow>0</tilerow>
<tilerow>0</tilerow>
<tilerow>0</tilerow>
<tilerow>0</tilerow>
<tilerow>1</tilerow>
<tilerow>0</tilerow>
<tilerow>0</tilerow>
<tilerow>0</tilerow>
<tilerow>0</tilerow>
<tilerow>0</tilerow>
<tilerow>0</tilerow>
<tilerow>0</tilerow>
<tilerow>0</tilerow>
<tilerow>0</tilerow>
<tilerow>0</tilerow>
</tilecol>
</map>
I'm trying to grab the numbers for each tile and put them into an array but I can't seem to get it to work. Here's the code so far:


ActionScript Code:
private function loadLevel():void {
            xmlLoader = new URLLoader();
            xmlLoader.addEventListener(Event.COMPLETE,loadComplete);
            var request:URLRequest = new URLRequest("level1.xml");
            xmlLoader.load(request);
           
        }

        private function loadComplete(e:Event):void {
            tileData = new XML(xmlLoader.data);
            trace(tileData)
            var cCol:int = 0;
            trace(tileData.tilecol[1].tileRow[1]);

        }

At the moment, the tileData trace contains the entire XML data as it should, but the second trace comes up as undefined.. I think I'm trying to access it incorrectly but I don't know the right way to do it! Please help!

X Y Values
Ok, can someone please help me get started as i struggle with basic math?

All i need to do is figure out the formula to take lattitude and longitude and turn them into X,Y values on a map. So i can have an XML document with lat and lon points and it will plot it's own dots.

I wanted to do it for the whole world and be able to zoom in/out. Right now i just need to figure out the math to plot the points!

THANKS!

Between Two Values
This is part of a game I am building that a value can only be assigned if "example" falls between "150" and "300".

if (example._y > 150 and < 300) {
trace("Value is between 150 and 300");
}

Can someone help adjust my syntax?

Xml Values
I have this XML document:
http://murdercup.publicsize.com/incl...?id=1&eType=ns

my ActionScript successfully loads all the XML Data:


ActionScript Code:
var info:Array = new Array();
var xmlData:URLLoader = new URLLoader();
xmlData.addEventListener(Event.COMPLETE, loadXML);
xmlData.load(new URLRequest("http://murdercup.publicsize.com/incl/graphStats.php?id=1&eType=ns"));
function loadXML(e:Event):void{
      var xDoc:XMLDocument = new XMLDocument();
      xDoc.ignoreWhite = true;
      var mXML:XML = XML(xmlData.data);
      xDoc.parseXML(mXML.toXMLString());
      for(var i = 1;i<xDoc.firstChild.childNodes.length;i++){
          trace(xDoc.firstChild.childNodes[i].firstChild.childNodes[0]);
      }
}

Using my XML sheet provided, I am able to get <wl></wl> using:
xDoc.firstChild.childNodes[i].firstChild.childNodes[0]

When I want to get <rank></rank> using:
xDoc.firstChild.childNodes[i].firstChild.childNodes[1]

It doesn't return anything, why?

Get URL Values
I have this in my embed tag:

src="http://murdercup.publicsize.com/flash/graph.swf?id=1&eType=ns"

in AS2, I could just do

use: id and it would equal 1
OR: eType and it would equal ns

does this no longer work?

_x Values
Why are the values for x and y different on the Properties toolbar vs. getProperty(object, _x)?

I'm using AS to get the position of a tweened movie clip, and when I compare the values at the start and end of the tween with the values from the Property Toolbar, the numbers are different.

Get Values From URL
Hi,

I am trying to develop a flash map where i need to show a value from the current url into the text field in flash. The problem is I need only some values from the url to be displayed in different text boxes.

Say the url is http://ayushjain.in/staticDefault.aspx?northamerica=168&southamerica=1&europe=10&africa=0

I want to display the value of "northamerica", "eurpoe" & "africa" in the text boxes.

This should be done as soon as the swf loads in the html page.

Looking forward for help.

Thanks,
Ayush

Between Values
I am trying to find out if an objects _x location is between 2 values. How do I do this?

In other words:

if (window._x is > 10 but <20) do something...

have not been able to find a good example of this, any thoughts.

Help~ Adjustable Bar's With Values~
Hi, I don't know whats wrong, but every time I try to make a slide bar that adjusts a value, it doesn't work. For instance, adjusting volume and or panning for my pages audio doesn't seem to work. The actionscript is giving me a hard time... even though I thought I did it right. Can someone help me out? my email is phaseshifter_zero@yahoo.com. Any help would be really appriciated! thx!

Refreshing Values From An Asp
I have this asp page that pulls data from a DB and sends it to flash. Now this needs to be updated continually but I found that the script onlly runs about 6 loops then it stops reading the asp. Here is what happens....

FRAME1:
loadVariablesNum (addy + "asp/read.asp", 0, "GET");


FRAME6:
if (server ne "") {
gotoAndPlay (7);
} else {
gotoAndPlay (1);
trace ("still loading..........");
}


FRAME7:
balkheight = "40";
trace ("Database Reads: " + server);
var mrg;
mrg = windowtext;
windowtext = mrg + chr(13) + server;
server = "";


FRAME15:
trace ("jump to read");
gotoAndPlay (1);



Now for some reason the values dont clearout so it can reread the ASP again. Do I need another asp to clear it out or something? Any Ideas will be helpfull because I am stuck.
Thanks

Currency Values ?
This is something I need help with for to projects I'm currently working on. One is a game that counts your score in .01 increments (dollars & cents) and the other is an e-commerce thing. I need to preserve the ending 0 when a total equals .10 or whatever. I also was wonderring (even though I think I know how and will be attempting it right after this post) how can I truncate a decimal value to 2 decimal places, and round up to the nearest .01, like for sales tax.

Thanks for any help.

Calculating Values
I know very little about flash as I have not had it for long, but I am experimenting with action scripts: I have a flash creation with three movie clip symbols in it. I want to multiply together the values of the current frame for each mini movie and place the new value as text that can be read, but I haven't really got an idea of how to do this.

Thanx for any help

Absolute # Values
Does anyone know how to get the absolute value of a #???

nauhs

Snapping Values
How do I snap a value to a multiple of another value?

Example, here I have a value ( 5 ), and I want it to snap to a multiple of 2 ( 2, 4, 6, 8 ). So it should either return 4 or 6 depending if I wanted to snap it up or down.

Variable Values
How do I pass the value of a variable from the main time line into a movie clip?? Please Help.

Scrolling Values From PHP
Ok, I am basically a newbie to flash and action scripting, but I'm pretty comfortable with PHP.

I wrote a script that pulls a bunch of names out from my database and prints them with a while loop.

http://www.nsf-clancentral.com/intro.php

By going there you can see the output of the script, its separated by & just like the tutorials I read said to do.

Here is where I run into problems....I have no idea what to do with that script in flash.

Here is how I'm thinking...I can play the opening clip of my movie which just shows National Strike Force and then does this fade effect and at the same time intro.php can be executed. Then I can scroll the names or something.

I understand how to load the variables, but I'm clueless as to how to print them out.

P.S. I posted this here because its not really a newbie question.

Getting Values In A MC From 'loadvariables'
Hello there,
I am loading several variables from a text file, call it data.txt On the first frame of the timeline I have the following script:

loadVariablesNum ("linedata.txt", 0);

I also have a movieclip on the main timeline, which is where I am trying to read the variables.
If I place a dynamic text box in the movie clip and label the variable ‘_root.jan1’ When I test the movie I can see the value of ‘jan1’ which is ‘20’ ( in tthe text box). But if I place the following code on the first frame of the movieclip and rename the variable of the text box to ‘contents’ nothing seems to work:

contents = _root.jan1;

I have tried all sorts of different ways and can’t it working.
All I basically want is to load in some variable from a text file and be able to pick up the values in a movie clip using Action Script.

Can anyone help??


Kaan

Adding Values [or Something]
hullo peeps i'm new here, and new to action scripting, sort of. i've put a clock on my site, using this tutorial:

http://www.flashkit.com/tutorials/Ac...21/more5.shtml

just now, i've adapted it to show the date as well, but i've noticed that it takes january as month number 0, and so may becomes month number 4.

how can i rectify this? it should be pretty simple, right?

thanks in advance

Adding 2 Values
Hi Guys, man I feel like a real idiot asking this..

I was wondering if you could tell me why I can't add two values from 2 textfields? I'm using this code!

on(release){
resultbox=box1+box2;}

It works fine with minus or multiply! but it just adds the numbers together literally!! like 5+5 is 55.

Can you please help me?

Thanks!

Function To Set Values
I want to assign a value to a variable with an alternate to be assigned if the value is not valid.

In perl, I would say:

Code:
myVariable = something || something_else;


What is the easiest way to do this in ActionScript?

I tried:

Code:
function setValue(which,val,alt) {
if (val == null || val == undefined)
which = alt
else
which = val
}

var myVariable = "test"
setValue(myVariable,"Value","Alternate")
trace(myVariable)


...but that doesn't work. I tried looking in the Flash manual for how to pass variable pointers, but as usual, the Flash manuals have proven to be no help.

Checkbox Values....HELP
I am using a checkbox component in MX.

I am wondering if:
Change Handler is comparable to the 'VALUE' in html

Instance Name is comparable to the 'NAME' in html

I don't have a label on it because I am using a special font and the component does not allow me to customize it that far.

Thanks so much!

Add Values In A Loop..?
Code:
for (i=0; i<=total.length; i++) {
_root["y"+i] = total.charAt(i);
firstStep = Number(y0)+Number(y1)+Number(y2)+Number(y3)+Number(y4)+Number(y5)+Number(y6)+Number(y7);
}
It's got to be an easier way to do that.
I tryed

Code:
firstStep += _root["y"+i];
but that don´t worked at all.
Any suggestion?

EDIT
I forgot, total is a string with numbers, 12345678.
/EDIT

Help With SLIDING VALUES
okay i'm a newbie so here is my questions

alright ... okay ... I have a slide bar that changes numbers when slideeast ... question is ... this thought. I have a color wheel that generates text feilds and uses the values typed into two of them to preform some math and make an RGB ... I want to make a slider like the one in the SWF on the left control the value in one of those boxes, namely min, instead of having too type it in ... but ... sadly I'm an idiot and have had a lot of help on this and can't really seem to put these two pieces together ...

here is links ... the stuff in blue probably won't appear on the actual page ... paint button is just calling PHP that pulls the values and uses it to change a color maks to that color ... anyhow ...

you may have to right click and save.
or you can go into the account and pull em if you wish ... post changes if you wish too ...

http://www.brinkster.com
user: dephrase
pass: asdfg

http://www30.brinkster.com/dephrase/Movie1.html
http://www30.brinkster.com/dephrase/Movie1.fla
http://www30.brinkster.com/dephrase/Movie1.swf

Scrolling Values
i think i may get better help here...

In Flash MX, how do I scroll 2 boxes dynamically?
I want the 2 boxes to add up to 100. and the scroll bar would change the values. ex. of box values would be 1 and 99 or 90 and 10.

also how do you do the same only using a pie chart.

i think maybe using init but i don't know how.

thanks so much

Values Of SetVolume
Hi!

I'm using SetVariable() but I don't know the way the values works.
What's the minimum and the maximum number? Form max. to min. or from min. to max.?

Thanks

www.motardzone.com

Why These Different Values When Using GET Instead Of POST
Hi,
Currently I am buildig a multi-lingual flashsite in PHP/Mysql and Flash MX.

Currently I use loadVariablesNum to send variables to the server and receive a new date into my movie. e.g.:
myname="Skåne Läns";
loadVariablesNum("newcontacts.php?name="+myname, 0);

When I submit a regular form(using either POST or GET)I have to use a function in my PHP script to convert special characters (like ä or å)before inserting in the Mysql database to make them readable again. e.g.:
$value=$_POST['myvalue'];
$myvalue=utf8_decode($myvalue);

If I use the loadVariablesNum however, and also converting the special character in PHP, the words become scrambled. e.g.:
'Skåne Läns' becomes 'Sk?_..??'. If I ignore the utf8_decode function in PHP it seems to be ok.

So my question is:
Why does LoadVariablesNum not have to use the UTF8 decoding as opposed to a regular form submission?. What does it do actually, since FLASH MX claims it's fully UTF8 based?


cheers
Patrck

Textfield Values
i have 2 sets of dynamically created texfields.

1) on frame 5 gfs1-gfs5 and i delete them on frame 6. (type=input)
2) on frame 20 gfchild1-gfchild5. (type=dynamic)

sounds easy but i cant get the value of gfs1 into gfchild1 and so on...
how do i do that... keeping in mind that GFS texfields gets destroyed on frame 6..
thnx
aLi

Comboboxes Values Sent To ASP
Hi there again! I'm trying to send the values that are select to ASP, but it always sends the first label(even if other is selected)

Here is the code for combo boxes:

boxState = new Array("Conneticut", "New Jersey", "New York");
for(s = 0; s <=2; s++)
{
state.addItem(boxState[s]);
}
// So far this works it shows the 3 states in combo box, now to assign the selected item to a variable to be sent to ASP//

var fstate = state.getValue();

ok this is it, I used this script and tested it by sending fstate to a dynamic text in flash(which showed fine). But when sent to ASP it stays at Conneticut. What's missing?

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

Getting The MAX Value Of Values In An Array
myarray has "1,42,564,12,455,11,22" etc. and dynamically created. how do get the maximum number of it ? any ideas ?

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 ?

Values And Variables
I've got a login on my movie, what I want to happen when you sign in, is you get assigned a security clearance level ($clearance), and then the menu looks at your clearance level, and goes to the appropriate frame to give you more options. Lets say 1 is for normal guests, 2 is for members, and 3 is for admins.

I've gotten this far, the submit button does this:

on (release, keyPress "<Enter>") {
if (username eq "reco" & password eq "guy") {
level = 3;
}
}

But how do I tell another movie clip to go to and stop on the appropriate frame from a movie clip (not the parent area).

The sad thing is I know how to do all these things, just not how to write it in actionscript! I'll buy a book some day.

Thanks!

Evaluating Values
I'm trying to figure out the best way to evaluate a set of values. I have variables fv1 - fv12. Each of these variables has a value from 0 to 5. I want to evaluate the values, and depending on which two have the highest value, play a movie clip to an associated keyframe. Does anyone know the best way to go about this. I thought of a nested if then statement, but it seemed like it would be extemely long and inefficient. Any ideas? Thanks in advance,

Shawn

String Values
--------------------
name=_name;
trace(name);

myString=eval("name");
trace(myString);

suffix=myString.substr( myString.indexOf( "text", 0 ), myString.length );
trace(suffix);

Temp=myString.substr( 0, myString.indexOf( "text", 0 ) );
trace(Temp);

Copyright © 2005-08 www.BigResource.com, All rights reserved