Extracting An Attribute's Name (not It's Value)
Is there a way to extract an attribute's name (not value) from an XML doc? For example, I'd like to assign the attribute name "extra" to the variable "myAttribute":
var theXML:XML = <tag extra="Middle name = Christopher">He's a little monster</tag>;
var myAttribute:String = ???
Thank you.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Extracting Var Not Value From .txt
how can I just extract the variable names not the value of the variables.
Code:
loadArr("arr.txt");
function LoadArr(file) {
arr_obj = new LoadVars();
arr_obj.load(file);
arr_obj.onLoad = function(success) {
if (success) {
variables = arr_obj;
trace("variables :"+variables);
} else {
trace("not loaded");
}
};
}
The txt file has
Code:
allDresses=dominique,larissa,francesca,octavia,simone,adriana,adriana2
&larissa_ds=pic0,pic1,pic2,pic3,pic4,pic5
&dominique_ds=pic0,pic1,pic2
The output windon gives me this but I just want to extract the variable names
Code:
variables :dominique%5Fds=pic0%2Cpic1%2Cpic2&larissa%5Fds=pic0%2Cpic1%2Cpic2%2Cpic3%2Cpic4%2Cpic5%0D%0A%0D%0A&allDresses=dominique%2Clarissa%2Cfrancesca%2Coctavia%2Csimone%2Cadriana%2Cadriana2%0D%0A%0D%0A&onLoad=%5Btype%20Function%5D
Thanks in advance
Extracting From A MC
Hello to all,
I have a this MR Potato head thing like this
But instead of having the bits and peace’s sitting around like that,
I want them to be in a scroll bar type thing like this
But the thing is, is that if I replace the items in the scroll bar with the move’ able objects they still move
But not out of the MC scroll bar, and I need them to be exported into to face area
Is this possible or do I need to explain it more????
Thanks
Extracting The URL
_url extracts the url of the .swf file, but how can I extract the URL of the page tht is calling the .swf I am loading?
Extracting A SWF From An EXE
Is there a way to extract a swf from an exe? I overwrote my original FLA , and the only trace I have of my old work is in an EXE file. I want to convert it to swf then import is to flash. Is there anyway at all to get an swf from an exe? I know that vice versa is possible.
Thanks!
Extracting Text
Let's say I have 2 dynamic text fields with html formatting which have text loaded into them from the same text file. Is it possible to pull out the "title" which is only part of the text file for 1 of the text boxes? How can I go about doing this?
Example text file:
info=(font color="#FFFFFF")The title i want in 1 text box(/font)
This is the information which must only get displayed in one of the other dynamic text boxes. I need the title to display in another dynamic text box aswell without this.
[Edited by Wancieho on 08-20-2002 at 03:56 AM]
Extracting Frames (mpg, Avi)
I would like to add some sort of video to my fla file. What I would like to do is extracting about 15 frames of a mpg or avi video. I'm working on Flash 5, does anyone have an idea which program I should use to extract the bitmaps from the video?
Please give me a recommendation!
Extracting Audio...?
using flash mx, is there a way i can extract the audio from a .swf file? all i want is the background audio, in whatever format i can get it. if not with flash mx, is there different program i can use?
Extracting Images
If there is a .fla file that I have....Is it possible to extract just the images out of it. I am trying to make a sister site for an all flash movie site but I need the images out of it and unfortunatly I do not have the .swf file. Anyone know a technique?
Extracting From A String
I need to extract the end of one string and add on a new end name.that will help me call then names mc.
Code:
function menuLauncher(mc) {
//mc will be something like eg. _level0.about_btn or _level0.home_btn
// so I need to remove the "_btn" and repleace it with "_menu"
// but this should function as a path to a movieclip called eg.
// about_menu or home_menu ect.
var mc, path;
path = mc+"_menu";
path.gotoAndPlay(1);
}
How can I do this please help. Thanks
Extracting Sound From An .swf?
Hi all.
I have an swf with a voiceover that I need to incorporate into an animation. I don't have the original .fla, but all that the voice over movie has is sound.
I've tried importing the mentioned swf as a movie clip into the animation .fla, but when I do this all I get is a series of empty key frames for the length of the sound track but...no sound appears.
The final swf needs to be a self contained file, so importing the sound ,swf into the animation using loadMovie is not an option.
Any suggestions?
Thanks.
Help With Extracting Something From .fla File
I want to extract the flame from this file in which it is used as a cursor:
http://www.flashkit.com/movies/Effec...8817/index.php
I want to extract it so i can use it as a flame for behind a car of a different flash file, where it loops its flamey motion over and over again while following the car is this possible?
can someone help plz
Extracting Scenes From An Fla ?
hi i hav an fla with six or seven scenes and i need to send one to a buddy to be trouble shooted but i put the whole thing together as one fla is there a way for me to extract a scene? and save it to its own fla?
Extracting First Four Characters
in my fla i m making a calculationa from 3 variable
suppose
a = 50
b = 60
c = 0.6666666666666
d = a*b*c
i want d to calculate a*b*only first four characters of c i.e 0.66
how to do this
Extracting Bitmaps From A SWF
** See comments below
I got a bit of a problem. Every month I put together a presentation in flash. It's composed of many elements (text, vector, raster, video, etc...)
Well, in my attempt to free up hard drive space by deleting alot of unnecessary files, I deleted the fla's. Those 12 month of file's just become necessary. Luckily I still have the swf's (their living on my web server, thank God), I need a way to extract the bitmap images from them. They are protected swfs. Does anyone know of a tool to do that.
Much thanks.
- Ben
I'm leaving this post up in case someone else runs into this. "File Juicer" Is doing exactly what I need, just grabbing the jpg's. If anyone knows of something else, please don't hesitate to let me know. Thanks again.
Extracting Text From An SWF
i am working on a new site for a client and they want to use some content from there old flash site. i have the old site but not the fla's and what i like to do to save people time is to extract the text from the swf.
is it possible? how you u do it?
Extracting Numbers.
I have a variable with numbers like this
population=200400800
this number counts down but I need to every time have it add comas to it like this
200,400,800
so as it counts down it should look like
100,242,560
until it gets to
000,000,000
Anyone know how I can do this.
Extracting A URL From A Txt File? [F8]
Hi,
I have some code as follows:
Code:
lv.load("studioData.txt");
Would it be possible for me to have a text file with a URL inside it and somehow extract that URL and drop it into the code above to replace studioData.txt.
So for example my text file may contain the text "file:///U:/TRANSFER/2BedData.txt" and then with some code i can get the quoted code above to look like:
Code:
lv.load("file:///U:/TRANSFER/2BedData.txt");
I am pretty sure this can be done but I don't really know where to start.
If anyone has any ideas it would be great to here from you.
Cheers,
James
Extracting Xml Data
Hi,
I have the following XML structure:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<page>
<component>
<bespoke>
<text-block id="varTitle">
<p>Products</p>
</text-block>
<text-block id="var0">
<p>Welcome to My Products.</p>
<p>Another paragraph</p>
<p>Yet Another paragraph</p>
</text-block>
<text-block id="var1">
<p/>
</text-block>
<text-block id="var2">
<p>In this section you'll find out:<br></p>
<ul>
<li>
<p>Which Products are sold globally</p>
</li>
<li>
<p>Which product options are available </p>
</li>
<li>
<p>Why the product is the ultimate in technology</p>
</li>
<li>
<p>How our excellence has been rewarded</p>
</li>
</ul>
</text-block>
</bespoke>
</component>
</page>
When I extract the data I need to preserve the html tags <p>, <ul> and <li>. I also need to ensure that each <text-block> element is stored as a single value as each <text-block> has an associated textfield in flash.
This is what I have at the moment:
Code:
function parseContent(content_xml) {
var items = content_xml.firstChild.firstChild.firstChild.childNodes;
for (var i = 0; i<items.length; i++) {
var strText = "";
if (items[i].nodeName == "text-block") {
//This is a sub loop that concatenates all the <p> nodes within the <text-block> node
//a <text-block> node is made up of at least one <p> childNode
var p_items = items[i].childNodes;
for (var p = 0; p<p_items.length; p++) {
strText = strText+items[i].childNodes[p];
trace(strText);
}
myXML[i] = strText;
//trace(myXML[i]);
}
}
}
This will parse child elements of the <text-block> but will not work with <ul> as it has its own child elements <li>. I guess this could be accomplished with yet another loop but I wanted to check to see if there was another simpler way.
Thanks in advance for any input.
T.
Extracting The URL Of An FLV From Youtube
hey everyone. i have another crazy question that i'm sure no one will have an answer for.
http://h108design.com/sites/video/x.php?x=4
i have that working, to a point. i have one thing holding me back from continuing on to everything else i want that site to do.
when you go to youtube and search for a video, some are flagged. you have to be logged in to be able to view those. but the way my thing works is that it needs to parse the page that the youtube player resides. it can't get to that point if something is flagged.
if anyone has used keepvid, you might have noticed that it gives you back the exact URL of the flv, which is not what mine is doing. it's just pointing the correct variables to youtube to get that URL back.
any help would be appreciated. thanks!
PS.. feel free to add a video to see how it does its thing.
Extracting Code From Swf
What is the name of the application that extracts the code from a swf in cases where you don't have the source file? And does anyone know where I can find it?
Thanks
Extracting Strings....
What I would like to do is name some jpegs in a folder and then dynamically have the name (minus the jpeg) load into a menu. I just can't quite get my head around extracting the string of the file that I'm loading. Can anyone point me in the right direction....thank you....
Extracting XML Data
Hi,
I have the following XML structure:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<page>
<component>
<bespoke>
<text-block id="varTitle">
<p>Products</p>
</text-block>
<text-block id="var0">
<p>Welcome to My Products.</p>
<p>Another paragraph</p>
<p>Yet Another paragraph</p>
</text-block>
<text-block id="var1">
<p/>
</text-block>
<text-block id="var2">
<p>In this section you'll find out:<br></p>
<ul>
<li>
<p>Which Products are sold globally</p>
</li>
<li>
<p>Which product options are available </p>
</li>
<li>
<p>Why the product is the ultimate in technology</p>
</li>
<li>
<p>How our excellence has been rewarded</p>
</li>
</ul>
</text-block>
</bespoke>
</component>
</page>
When I extract the data I need to preserve the html tags <p>, <ul> and <li>. I also need to ensure that each <text-block> element is stored as a single value as each <text-block> has an associated textfield in flash.
This is what I have at the moment:
Code:
function parseContent(content_xml) {
var items = content_xml.firstChild.firstChild.firstChild.childNodes;
for (var i = 0; i<items.length; i++) {
var strText = "";
if (items[i].nodeName == "text-block") {
//This is a sub loop that concatenates all the <p> nodes within the <text-block> node
//a <text-block> node is made up of at least one <p> childNode
var p_items = items[i].childNodes;
for (var p = 0; p<p_items.length; p++) {
strText = strText+items[i].childNodes[p];
trace(strText);
}
myXML[i] = strText;
//trace(myXML[i]);
}
}
}
This will parse child elements of the <text-block> but will not work with <ul> as it has its own child elements <li>. I guess this could be accomplished with yet another loop but I wanted to check to see if there was another simpler way.
Thanks in advance for any input.
T.
Extracting ActionScript From SWF
Has anyone come across a good tool for extracting ActionScript from an SWF.
I am working on a project and lost 2 AS files. I've tried extracting all of the AS code from the project using Flare (http://www.nowrap.de/flare.html), but the code that Flare generates is pretty useless for me in terms of trying to recreate the lost files.
In particular I'm interested in SoThink's decompiler (http://www.sothink.com/product/flash...iler/index.htm) and Trillix (http://www.eltima.com/products/flashdecompiler/).
Anyone had any luck with these?
Extracting Strings....
What I would like to do is name some jpegs in a folder and then dynamically have the name (minus the jpeg) load into a menu. I just can't quite get my head around extracting the string of the file that I'm loading. Can anyone point me in the right direction....thank you....
Extracting Audio?
Is there a way to extract a WAV file from an .fla? I'm wondering because I've been asked to customize a Flash template obtained from Template Monster, but the original template developer did not include any of the source files used for the Flash presentation, (they are only accessible through the Library), but I need to be able to work with the audio file as a standalone in order to provide full customization. Any help would be MUCH appreciated!
Extracting XML Data
Hi,
I have the following XML structure:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<page>
<component>
<bespoke>
<text-block id="varTitle">
<p>Products</p>
</text-block>
<text-block id="var0">
<p>Welcome to My Products.</p>
<p>Another paragraph</p>
<p>Yet Another paragraph</p>
</text-block>
<text-block id="var1">
<p/>
</text-block>
<text-block id="var2">
<p>In this section you'll find out:<br></p>
<ul>
<li>
<p>Which Products are sold globally</p>
</li>
<li>
<p>Which product options are available </p>
</li>
<li>
<p>Why the product is the ultimate in technology</p>
</li>
<li>
<p>How our excellence has been rewarded</p>
</li>
</ul>
</text-block>
</bespoke>
</component>
</page>
When I extract the data I need to preserve the html tags <p>, <ul> and <li>. I also need to ensure that each <text-block> element is stored as a single value as each <text-block> has an associated textfield in flash.
This is what I have at the moment:
Code:
function parseContent(content_xml) {
var items = content_xml.firstChild.firstChild.firstChild.childNodes;
for (var i = 0; i<items.length; i++) {
var strText = "";
if (items[i].nodeName == "text-block") {
//This is a sub loop that concatenates all the <p> nodes within the <text-block> node
//a <text-block> node is made up of at least one <p> childNode
var p_items = items[i].childNodes;
for (var p = 0; p<p_items.length; p++) {
strText = strText+items[i].childNodes[p];
trace(strText);
}
myXML[i] = strText;
//trace(myXML[i]);
}
}
}
This will parse child elements of the <text-block> but will not work with <ul> as it has its own child elements <li>. I guess this could be accomplished with yet another loop but I wanted to check to see if there was another simpler way.
Thanks in advance for any input.
T.
Extracting Var Value For Re-use In Function
In the following code I want to extract the value of "i" for each attached movie clip to re-use in the last line of code for loading corresponding .jpgs. The attached clips do have individually numbered names assigned to them as confirmed by the trace action. Should the mc.onRelease function be where it is, within the buildList function -- where it appears to work -- or should it be outside of it?
Code:
// build list function
function buildList () {
var spacing:Number = 66;
for (var i = 0; i < 9; ++i) {
var name:String = "infoBar" + i + "_mc";
var y:Number = i * spacing;
display_mc.list_mc.attachMovie("infoBar", name, i);
display_mc.list_mc[name]._y = y;
display_mc.list_mc[name].createEmptyMovieClip("container_mc", 0);
display_mc.list_mc[name].container_mc.loadMovie("tmb/tmb" + i + ".jpg", 0);
display_mc.list_mc[name].onRelease = function () {
trace (this._name)
myMCL.loadClip("big/big" + /*NUMBER HERE*/ + ".jpg", bigMC);
}
}
}
Help With Extracting Image From XML
Thanks for the great "ActionScript 3 XML Basics" tutorial. I have modified it a bit and looking at how I can get it to extract the IMG SRC URL out of the RSS Description field. I know I need to use a trace, but whatever I have tried, brings up a undefined message. Here is my (well mostly GotoAndLearn's code).
Code:
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoaded);
lb.addEventListener(Event.CHANGE, itemChange);
function itemChange(e:Event):void
{
ta.htmlText = "<a href="" + lb.selectedItem.link + "">" + lb.selectedItem.label + "</a>";
}
var xml:XML;
function onLoaded(e:Event):void
{
xml = new XML(e.target.data);
var il:XMLList = xml.channel.item;
for(var i:uint=0; i<il.length(); i++)
{
lb.addItem({data:il.description.text()[i],link:il.link.text()[i],
label:il.title.text()[i]});
}
}
loader.load(new URLRequest("http://www.gamingdealz.com/index2.php?option=ds-syndicate&version=1&feed_id=1"));
As mentioned the IMG SRC code is in the <description> tag, and what I believe it is:
trace(il.description.img.@src[i]);
But whatever I tried, I can't get it to work.
Thanks,
Corey
Another Way Of Extracting Amplitude.
If someone is asking for another way of extracting amp from mp3 file on the audio driven animation toturial and don't have after effects 7.0 pro to contact me at http://i6amokk.freehostia.com/! There i wrote a way of doing it with 2 simple tools. 8)
Extracting From Array
I have an application that uses the external data from a text file and draw them out in an array. The questions, question statements and answers are stored in an individual array.
The code below is part of the actionscript, as you can see, the question, answer, statements are stored in a different individual array.
Code:
import flash.external.*;
var hihi:Boolean = false;
var resStop:Boolean = false;
var myText = "";
var lineNumber = 0;
var lineNumber_SAVED = 0;
var lineNumber_MAX = 0;
var res:String = "";
var ln:String = "";
var currentQns:Number;
var currentAnswer:String;
var questionCounter = 0;
var totalQuestion = 0;
var numOfQns = 0;
var statementCheck = new Array();
var mcRight:MovieClip;
var mcWrong:MovieClip;
var mcTick:String;
var mcCross:String;
var res:String;
var finalString:String = "";
function InitialiseServerSide()
{
currentQns = 0;
/*topic = new Array("PERCENTAGE", "FRACTION", "RATIO",
"WHOLE NUMBER", "LAST");*/
topic = new Array()
topic = toParseTopic.split("@");
//qns = new Array("1", "2", "3", "4", "5");
qns = new Array();
qns = toParseQns.split("@");
/*statement1 = new Array("She has", "There are",
"They have" , "Joe has $",
"Unit A is");*/
statement1 = new Array();
statement1 = toParseStatement1.split("@");
/*statement2 = new Array("apples left. ", "cakes altogether.",
"althogether." , "more than Jane.",
"cm longer than Unit B.");*/
statement2 = new Array();
statement2 = toParseStatement2.split("@");
//answer = new Array("10", "11", "12", "13", "14");
answer = new Array();
answer = toParseAns.split("@");
numOfQns = (isNumber(answer.length)) ? answer.length -1 : 5;
UpdateQuestion();
mcAnswerStatement.textFeedback.autoSize = "left";
}
So I would like to know how do I extract and display the data from the Array? For example, the data in the answer Array is, [5, 70, 30, 67, 23...] And if I want to display the answer 67, how can I do that?
I have attached the .fla and the external text file. You may try it out and let me know. Please help me out here because I had racked my brain for the past few days. Thank you very very much.
Extracting Text From Fla Or Swf
Hi Everyone,
I work for a translations company (in between stints as a web developer) as a software engineer and a large part of my job recently involves getting text out of flash files to translate them before placing them back again.
...So a tool that could do this would be really helpful as some of the files i have to work with can be several thousand frames long and have hundreds of layers and stupidly big (often unorganised) libraries. Does anyone know of a product that can do this?
Thanks in advance for any help you can give on this...
Dan.
Extracting Data From A Variable
OK, here's the idea. A human figure sits in the middle of the screen. The user drags and drops selected action icons onto the figure in an area of their choice.
The chosen action icon, and location of placement onto the figure is saved as a series of numbers seperated by commas, into a single variable (eg, 1,245,292, - action, drop_x, drop_y,).
This completes one cycle, and the user can drop as many action icons as they wish. The final variable may look as follows: 1,245,292,5,282,283,6,45,184 etc. This variable is then emailed to the user's chosen recipient as the body of an email.
The recipient copies the email body and pastes it into a selectable 'global' variable field, then clicks a 'replay' button, and the actions and placement onto the figure are replayed automatically.
My problem is that I do not know how to extract the data from the 'global' variable into seperate variables to replay the 'actions'. Is there a way of creating a function that copies the 'global' variable only until it reaches a comma, thereby extracting each single number?
Extracting A Variable From Txtfile
I'd like to know if it is posible to extract a variable from a textfile without knowing it's key!
I tried a array, but that was too slow.
I'm using keys like this.
&DATE12082002=12082002 and then some more information
But in flash I don't want to use the static key DATE12082002
I want to know wich date each variable in the txt file contains by asking something like
DATE=substring(VariableFromTxtFile,1,8)
But how do I get VariableFromTxtFile filled?
Extracting Number From String
Ok I have created a bunch of buttons dynamically and I want to extract the number at the end of the instance name. I have done this before but all the names in the array were the same length with a number at the end.
This time all the instance names are different lengths but they all have at the end of them _mc0,_mc1,_mc2 etc.
I need to get that number so I can call a picture to load from another array called picMax.
Code:
btn.onRelease = function() {
_root.select = _root.picMax[Number((this._name).substring(bla))];
};
btn is a variable with the path to all the dynamic clips.
The problem with this is I don't know what bla would be in the substring().
I need a way to extract the number at the end of the instance.
Example of instance names
Code:
Adele_mc0
Adriana_mc1
Antonina_mc2
Agnes_mc3
Etc
Self Extracting / Remove Menus
is it possible to burn a flash .exe file on to a cd and have it self extract upon being inserted into the drive. Also is it possible to remove the flash title bar or its menu options from the flash projector (exe published format) any help would be greatly appreciated
Extracting Sound From Swf File
Is there any way that we can extract sound from any .swf file. I have heard that sound can be extracted by using some software. If so can you please tell me the name of the software and can I get any demo version of the software in the net.
Salim
Extracting Protected .swf Back To Fla?
Hey!
i know there is some kind of swf extractor program you can buy.But does anyone know of another method before i go and buy it.
I lost months of work due to some viruses that screwed up my computer realy bad..anyhow the swfs i have are protected so importing them into flash wont work...
if anyone has any tips would be good.Would help at least to be able to get the images and jpgs out of these swfs...
cheers!
Extracting Shape Coordinates?
Does anyone know if there's a way to extract the points and curves to a shape I've drawn so I can draw it dynamically?
What I want to do is control fills on the shape. It doesn't seem like I can dynamically control the fills on a shape I've drawn.
Is this question just too off the wall?
Thanks for reading,
Lee
Extracting Information From Flash
Hi pple, can anyone teach me how to extract information from a flash form?
Example, i have a form for pple to fill up the quantities and products. Upon clicking submit, the program will generate a reply to me (or my email) telling me the orders: quantities and products.
Can anyone advise me?
Regards,
Wat^up>doc
Extracting DataGrid Data
Ok, now I'm losing my head.
I've got my array from my database, I've rebuilt the array as label:data pairs, and I've put that into a dataGrid component with no problem.
Now, after the user edits the data I would like to grab that data back out of the grid.
As a test, I've tried things like this:
Quote:
_root.testString = this.reportGrid.getItemAt(3).data;
and
_root.testString = this.reportGrid.getItemAt(3, Pretest).data;
and
_root.testString = this.reportGrid.getItemAt(3, "Pretest").data;
I must be missing something obvious....I've also tried snagging the dataProvider array data with no luck.
Anyone have a clue about this? I've looked everywhere online without any success.
Thanks,
Hollow Planet
Extracting Variables From A String
I searched for this method, but I'm not sure what keywords to use. I realize this is probably a simple question, but I don't know where to start.
If I had a variable
RGB = 223,134,52;
and from this I wanted to create the numeric variable values
R = 222;
G = 134;
B = 52;
Can anyone tell me a simple way to extract these numbers from the original string?
Thank you in advance
Extracting Parts Of A String
Does anyone know how to extract part of a string?
I am building a baby search engine in flash... so I have an array of words. what I want to be able to do is view the first letter of the string entered by a user in a text field then compare each letter in turn with the letters of the strings in the array.
i.e. word typed = john
so get first letter J and compare this with the first letter of each string in the array... then do the same for the second letter.
I know how to do efverything apart from ask for the first, or second etc letter of each string...
anyone know?
cheers
Craig
Extracting Movie From Another Site...
Can anyone tell me how I might take a movie clip from this site: http://www.mynetworktv.com/fh.html (Prequel #6 from the list on the right) so I can put it on another site? I don't see anything I could use from the source code. Any help would be greatly appreciated! Thanks, Mark
Extracting Similar Items
I have a list array that has similar items that should be grouped together.
Here is how it traces in my for loop.
Quote:
SECTION = section_0 ::: item = mcButton_0
SECTION = section_1 ::: item = mcButton_1
SECTION = section_2 ::: item = mcButton_2
SECTION = section_3 ::: item = mcButton_3
SECTION = section_4 ::: item = mcButton_4
SECTION = section_4 ::: item = mcButton_5
SECTION = section_4 ::: item = mcButton_6
SECTION = section_4 ::: item = mcButton_7
SECTION = section_4 ::: item = mcButton_8
SECTION = section_4 ::: item = mcButton_9
SECTION = section_4 ::: item = mcButton_10
SECTION = section_4 ::: item = mcButton_11
SECTION = section_4 ::: item = mcButton_12
SECTION = section_5 ::: item = mcButton_13
SECTION = section_5 ::: item = mcButton_14
SECTION = section_5 ::: item = mcButton_15
SECTION = section_5 ::: item = mcButton_16
SECTION = section_6 ::: item = mcButton_17
SECTION = section_6 ::: item = mcButton_18
SECTION = section_6 ::: item = mcButton_19
SECTION = section_6 ::: item = mcButton_20
SECTION = section_7 ::: item = mcButton_21
SECTION = section_8 ::: item = mcButton_22
What I'm trying to do is come up with a loop that creates a multidimensional array like this.
Code:
var myArray = [ [ mcButton_0 ], [ mcButton_1 ], [ mcButton_2 ], [ mcButton_3 ], [ mcButton_4, mcButton_5, mcButton_6, mcButton_7, mcButton_8, mcButton_9, mcButton_10, mcButton_11, mcButton_12 ], [ mcButton_13, mcButton_14, mcButton_15, mcButton_16] , [ mcButton_17, mcButton_18, mcButton_19, mcButton_20 ], [ mcButton_21 ], [ mcButton_22 ] ];
Anyone have any ideas how I can do this. The list is dynamic from an xml file so this is why I need to come up with a loop that sorts anything the same into a group.
Extracting MinValue From An Array
Hey guys,
I have a 2 dimensional Array in my project. I would like to extract the Minimum Value from that array but don't really know how. If anyone have any idea, please help, i greatly appreciate it. Here is the array and the code to extract Min value from 1 dimensional array:
Code:
AIOption = new Array (
new Array (20, 20, 20, 20, 20, 20, 20, 20, 20, 20),//row0
new Array (20, 20, 20, 20, 20, 20, 20, 20, 20, 20),//row1
new Array (20, 20, 20, 20, 20, 20, 20, 20, 20, 20),//row2
new Array (20, 20, 20, 20, 20, 20, 20, 20, 20, 20),//row3
new Array (20, 20, 20, 20, 20, 20, 20, 20, 20, 20),//row4
new Array (20, 20, 20, 20, 20, 1, 20, 20, 20, 20),//row5
new Array (20, 20, 20, 20, 20, 20, 20, 20, 20, 20),//row6
new Array (20, 20, 20, 20, 20, 20, 20, 20, 20, 20),//row7
new Array (20, 20, 20, 20, 20, 20, 20, 20, 20, 20),//row8
new Array (20, 20, 20, 20, 20, 20, 20, 20, 20, 20)//row9
<-- The sample array. I put 1 in one of the cell to test but most of the number will be changed.
This is the Function to extract min value from a normal array:
Code:
minValue = function (array) {
mn = array[0];
for (i=0; i<array.length; i++) {
if (array[i]<mn) {
mn = array[i];
}
}
return mn;
};
Extracting Data From Array
Hi,
I am using the loadVars class (Flash 8) to load key/value pairs from a mySQL database through php (example &pic1=pic1.jpg&pic2=pic2.jpg&...).
The ultimate goal is to create a dynamic slideshow with a variable length, depending on how many pics were submitted by the user. Since the associative array object returned by loadVars does not share the "length" property of indexed arrays, my guess is that the values need to be converted into a new indexed array before being able to use them in the slideshow. If this is correct, what would be the most efficient method? If this assumption is not correct, any other suggestions?
Thanks,
MPLeeds
Extracting Data From A Txt File
I'm working on a project for a real estate agent and currently, he has a subdivision, for lack of a better term, up for sale.
What he wants is a map of all the parts of it, which I have done by tracing the blueprints in flash. Now comes the tricky part. For each slot, he wants there to be a rollover. On this rollover, he wants it to display somewhere else on the page, 3 pieces of data. 1. available (sold, open, etc), 2. price. 3. something else. Also, there should be a slight tint on the rollover. however, it would take forever to make 400+ buttons to fit each slot. the slots are already in movie clips though if that helps. The data that needs to be displayed hopefully should come from a Text document, or something easy for him to edit himself, no having flash 8 or anything. i'v heard you can probably do this with xml too, but a .txt file would be more pleasant. never the less, which ever is more doable, i will do.
If anyone could help me out on this, I would really appreciate it.
Thanks,
Gianni
|