300,000+ XML Nodes

FLASH

    Next

  • 1. Stopping a Movie Clip from continuing to Play
    Hi Apologies if this has already been asked. I have two movie clips in my FLA. The main timeline consists of 250 frames with a stop action to end the movie on the last frame. I've noticed that my two MCs continue playing after the main movie has stopped and am looking for help in stopping these when the main movie stops. I am using Flash CS3. Any help much appreciated. George
  • 2. Hit Test Issue
    Hi, sorry to bother you again, but I'm working on a new project for school, a history game. However, i am starting with simple scoring. I'm experimenting with hit tests and I keep running accross the asame problem, I try to get the score to rise when the circle passes the square, but it doesnt seem to respond, it works with drag and drop, but not keyboard controls. Here's teh action script, don't be surprised if it looks familiar since it's a tweaked code I got from a maze tutorial: onClipEvent (enterFrame) { with (_root.circle_mc) { // Controls circle_mc Speed mySpeed = 5; // keyboard controls if (Key.isDown(Key.DOWN)) { _y += mySpeed; } if (Key.isDown(Key.UP)) { _y -= mySpeed; } if (Key.isDown(Key.LEFT)) { _x -= mySpeed; } if (Key.isDown(Key.RIGHT)) { _x += mySpeed; } } // detect if Maze is finished if (_root.square_mc.hitTest(_x, getBounds(_root).yMax, true)) { score = score+1; } else { score = score; } } circle_mc is the circle controlled byt the keyboard square_mc is the square it's supposed to pass and score is the variable for the scoring dynamic text Let me know if there's any more info you need!
  • 3. Bug or feature?
    If I have a class class A { public function foo() ... } And create two instances of it var a1 = new A(); var a2 = new A(); Why these comparisons are all true? trace(a1.foo == a2.foo); // true trace(a1.foo === a2.foo); // true The problem is I made an Event Listener model and I must identify the correct function to remove.. Any solutions? Thanks, Ian Liu.

300,000+ XML Nodes

Postby ChrisFlynn » Sat, 07 Jul 2007 00:24:23 GMT

Hi all

 // begin sarcasm
 So I have this little XML file, with 300,000+ nodes (318,006 lines in this XML 
code to be exact).
 // end sarcasm

 Right now, I'm loading this monster in. When I finish loading, I want to take 
all these nodes and save them to an Object, so I can easily reference them 
later.

 The way I'm doing this now is with a for-loop, which in the end, gathers about 
5000 nodes, each with anywhere between 10-30 children.

 As best as I can tell, I have gotten this working successfully to this point. 
The problem I'm having now is that with this much data, Flash chokes on it a 
bit. So after my load sequence, there's about 5 or 6 seconds where nothing 
happens, then everything suddenly works.

 Now granted, this test XML I'm using is a worse-case-scenario. And I think 5 
or 6 seconds isn't bad. But I'm on a fairly fast and new machine and I'm 
worried about a lesser machine's performance. 

 So is there a better way to do this? Should I not use a for-loop? Should I not 
save this data much data to an Object?

 Any suggestions are welcome.

 Thanks
 Chris 


Re: 300,000+ XML Nodes

Postby GWD » Sat, 07 Jul 2007 01:48:08 GMT

<genuineQuestion>
 Shouldn't that be ?
   <sarcasm>
   So I have this little XML file, with 300,000+ nodes (318,006 lines in this 
XML code to be exact).
   </sarcasm>
 </genuineQuestion>

 Its certainly a hefty load. I've never tried working with data that large 
before. 
 I'd run through a few things for testing...
 Isolate timings with getTimer to understand how long the whole process is 
taking.
 load time: difference between load command issued and onData 
 parsing time: difference between onData (see the livedocs) and (you need to 
call it explicitly) onLoad
 processing time: your looping and extraction of portions. You're right this is 
likely to be the part that takes a long time if you're looping through and 
possibly recursively down the xml structure to pick out data.

 Questions I would ask myself: 
 -would it make sense (if possible) to have the source xml provided in 
bite-size chunks?
 -does XPathAPI or xfactorstudios xpath offer any improvement for the search 
and extraction part of what you're doing? This way you may be able to separate 
the node location logic and the new object representation. In saying that, its 
also possible (and is much easier with an XPath implementation) to make use of 
the data directly in its XML object representation.

 Nothing concrete there I'm afraid... but you said that all suggestions were 
welcome...and I really wanted to put the bit about the sarcasm tags at the 
beginning.



Re: 300,000+ XML Nodes

Postby ChrisFlynn » Sat, 07 Jul 2007 02:06:08 GMT

Ive seen sarcasm tags both ways.

 I'm actually working on an attempt with onEnterFrame instead of for-loops. My 
hope is with the onEnterFrame, I'd be able to incorporate some sort of Process 
Bar that will at least let the user know something is going on. The for-loop 
won't really let you do that.

 One of my thoughts was to do try and get this XML data into smaller bits. But 
since I'm not actually developing the XML end of things, that's nothing I have 
the final say so in. The XML we're using is dynamically created from a 
database, and apparently is fairly complex to get it the way we have it now. 
That might have to wait till version 2.0. 

 Thanks again GWD
 Chris


Re: 300,000+ XML Nodes

Postby Rothrock » Sat, 07 Jul 2007 02:36:20 GMT

I would definitely recommend trying it on an older slower computer. You can 
certainly break up the part where you are searching through like you have 
suggested, but the initial parse by Flash is not something you can break up and 
I've seen folks post here about getting the "slow script" error during that 
part.

 If the file is dynamically created from a database it should be fairly easy to 
break it into chunks which could be loaded, parsed, and then appended together 
in Flash. It would break up some of that initial parse.


Re: 300,000+ XML Nodes

Postby GWD » Sat, 07 Jul 2007 06:25:59 GMT

I've never tried anything like this...  but if the internal parsing by flash is 
a major factor and you are not able to get the source split into smaller 
chunks.....

 Perhaps its possible to break up the parsing of the raw xml string from inside 
your onData handler... e.g. it would presumably work best with well spaced, 
infrequent closing tags from a child of the root node (that does not occur any 
lower in the hierachy, anywhere) to use for a String.split and would also 
require tweaking each subsequent string element to add back the closing tag 
used for the split and closing/opening root tags - either or both, depending on 
its index in the array of strings-  before parsing each bit...
 I don't know if its practical or makes sense  but its something else to 
explore as an idea/option. Its a definite second to breaking it down at the 
source, but it may be another option. 



Re: 300,000+ XML Nodes

Postby ChrisFlynn » Sat, 07 Jul 2007 08:12:51 GMT

You know, the onEnterFrame method seems to have worked for me, but its much 
much slower. I think its slower, because I'm actually displaying what node is 
being processed, as its being processed. So it looks like:

 0 of 5000 processed
 1 of 5000 processed
 2 of 5000 processed

 ...

 5000 of 5000 processed.

 Of course with that many, it took a full 2 minutes, but it didn't freeze up. 

 My hope is that with using setInterval, and not displaying each one as they're 
processed, this will go much faster and it won't lock up.

 Thanks again
 Chris


Re: 300,000+ XML Nodes

Postby Rothrock » Sat, 07 Jul 2007 08:17:33 GMT

I wouldn't necessarily do one node on each frame. You will probably be wasting 
time then. Certainly there is some chunk size that can be handled quickly in a 
frame or a setInterval. I would probably try and process them in chunks of 1000 
or 5000 on each frame and see how that went.


Re: 300,000+ XML Nodes

Postby Newton » Sat, 07 Jul 2007 12:51:41 GMT



i would rather suggest to break up your xml file, and load the needed
part, as because if you are loading  much data then in some cases the
IE or Firefox may crash due to lack of memory.

Pradyumna


Similar Threads:

1.How to turn 1000000 into 1.000.000?

Im creating a swf where users enter some numbers to be processed in a formula, 
but the results always show huge numbers like 168460123184, making them hard to 
read, so I want to find a way to add a "." (a dot) every 3 numbers, so they 
would be easier to read...
 and I dont have a clue of how that can be done :(

 thanks!

 PS: I chose to use dots instead of commas cos here in Brazil we use dots to 
separate hundreds from thousands and so on....

2.SQL XML 3.0 uses 300 Meg of Memory with semi-large XML Schema

Hello,

I have a rather large XML Schema file that contains about 40 tables
and relations.  When running an xpath-query using this schema the
resulting XML is about 600 lines.

The disappointing part is that it takes about 1.5 minutes to run the
query and SQL Server eats up around 300 Megabytes of memory (YES!  300
Meg not taking into account swapped memory) and 100% CPU.

I've written a conceptually similar "technology" (Schema In XML out)
and it runs in about 1 to 2 seconds.

Am I using SQL XML 3.0 SP2 xpath-queries incorrectly or did Microsoft
actually write the xpath-query system in such a manner as to be so
inefficient.

Any input on this would be very helpful.

Eric

3.Turn ? into ?0,000

Turn  into 0,000 in 90 days, GUARANTEED Fast
Postal lottery: Turn  into 0,000 in 90 days, GUARANTEED
I found this in a news group and decided to try it. A little while back,
I was browsing through news groups, just like you are now and came
across a message just like this, that said you could make thousands of
dollars within weeks with only an initial investment of .00!!!
So I thought yeah right, this must be a scam!!! But like most of us, I
was curious, so I kept reading. Anyway, it said that you send .00 to
each of the 6 names and addresses stated in the message. You then place
your own name and address at the bottom of the list at #6 and post the
message in at least 200 news groups. (There are thousands). No catch,
that was it.
So after thinking it over, and talking to a few people first. I thought
about trying it. I figured, what have I got to lose except 6 stamps and
.00, rightSo I invested the measly .00!!! Guess whatWithin 7
days I started getting money in the mail!!! I was shocked!!! I figured
it would end soon, but the money just kept coming in!!! In my first
week, I had made about 5.00. By the end of the second week, I had made
a total of over ,000.00!!! In the third week, I had over 0,000.00
and it is still growing!!! This is now my fourth week and I have made a
total of just over 2,000.00 and it is still coming in rapidly!!! It's
certainly worth .00 and 6 stamps!!! I have spent more than that on the
Lottery!!!
Let me tell you how this works and most importantly, why it works!!!
Also, make sure you print a copy of this message now. So you can get the
information off ofit as you need it. I promise you that if you follow
the directions exactly, that you will start making more money than you
thought possible by doing something so easy!!!
Suggestion: Read this entire message carefully!!! (Print it out or
download it.) Follow the simple directions and watch the money come
in!!! It's easy!!! It's legal!!! Your investment is only .00 (plus
postage).
IMPORTANT: This is not a rip-off!!! It is not illegal!!! It is
almost entirely risk free and it really works!!! If all of the following
instructions are adhered to, you will receive extraordinary dividends!!!
Please note: Follow these directions EXACTLY, and 0,000.00 or more can
be yours in 20 to 90 days!!! This program remains successful because of
the honesty and the integrity of the participants!!! Please continue its
success by carefully adhering to the instructions.
You will now become part of the mail order business. In this business
your product is not solid or tangible, it is a service. You are in the
business of developing mailing lists. Many large corporations are happy
to pay big bucks for quality lists. However, the money made from a
mailing list is secondary to the income which is made from people like
you and me asking to be included on your mailing list!!!
Here are the 4 easy steps to success:
Step 1: Get 6 separate pieces of paper and write the following on each
piece of paper.
PLEASE PUT ME ON YOUR MAILING LIST
Now get 6 U.S. dollar bills and place ONE inside each of the 6 pieces of
paper so the bills will not be seen through the envelopes (to prevent
mail theft). Next, place one paper in each of the 6 envelopes and seal
them, you should now have 6 sealed envelopes. Each with a piece of paper
stating the above phrase, your name and address, and a .00 bill. THIS
IS ABSOLUTELY LEGAL!!! YOU ARE REQUESTING A LEGITIMATE SERVICE AND YOU
ARE PAYING FOR IT!!!
Like most of us, I was a little skeptical and a little worried about the
legal aspect of it all. So I checked it out with the U.S. Postal Service
and they confirmed that it is indeed legal!!!
Mail the 6 envelopes to the following addresses:

#1.) Schyler Grimes
6231 Barrington Dr. apt. H
Charlotte, NC 28215

#2.) K. Costello
20812 135 Ave SE
Kent, WA 98042 USA

#3.) B. Brown
1208 Steeple Ridge Ct
McKinney, Tx 75069 USA

#4.) L Baginski
13820 S 44th st #1044
Phoenix, AZ 85044 USA

#5.) Patricia Beyer
3233 Holmes Ave So
Minneapolis, Mn 55408

#6.) C. Buckley
55 Goldsmiths Grays
Essex RM17 6PX UK

Step 2: Now take the #1 name off the list that you see above, move the
other names up (6 becomes 5, 5 becomes 4, etc.) and add your name as
number 6 on the list.
Step 3: Change anything you need to, but try to keep this message as
close to what you see as possible. Now, post your amended message to at
least 200 news groups. I think there are close to 24,000 groups!!! All
you need is 200, but remember, the more you post, the more money you
make!!! This is perfectly legal!! If you have any doubts, refer to
Title18 sec. 1302 & 1341 of the postal lottery laws. Keep a copy of
these steps for yourself and whenever you need money, you can use it
again.
Please remember that this program remains successful because of the
honesty and the integrity of the participants and by their carefully
adhering to the directions!!!
Look at it this way. If you are of integrity, the program will continue
and the money that so many others have received will come your way!!!
Note: You may want to retain every name and address sent to you,
either on your computer or hard copy and keep the notes people send you.
This verifies that you are truly providing a service. Also, it might be
a good Idea to wrap the  bills in dark paper to reduce the risk of
mail theft.
So, as each post is downloaded and the directions carefully followed,
six members will be reimbursed for their participation as a list
developer with one dollar each. Your name will move up the list
geometrically so that when your name reaches the #1 position, you will
be receiving thousands of dollars in cash!!! What an opportunity for
only .00!!! (.00 for each of the first six people listed above).
Send it now, add your own name to the list and your in business!!!
DIRECTIONS FOR HOW TO POST TO A NEWS GROUP!!!
Step 1: You do not need to re-type this entire message to do your own
posting. Simply put your cursor at the beginning of this message and
drag your cursor to the bottom of this message and select copy from the
edit menu. This will copy the entire message into the computer memory.
Step 2: Open a blank note pad file and place your cursor at the top of
the blank page. From the edit menu select paste. This will paste a copy
of the message into notepad so that you can add your name to the list.
Step 3: Save your new notepad file as a txt file. If you want to do your
posting in a different setting, you'll always have this file to go back
to.
Step 4: Use Netscape or Internet Explorer and try searching for various
news groups (on-line forums, message boards, chat sites, discussions,
etc.)
Step 5: Visit these message boards and post this message as a new
message by highlighting the text of this message from your notepad and
selecting paste from the edit menu. Fill in the subject, this will be
the header that everybody sees as they scroll through the list of
postings in a particular group. Click the post message button. You've
done your first one! Congratulations!!! All You have to do is jump to
different news groups and post away, after you get the hang of it, it
will take about 30 seconds for each news group!
REMEMBER, THE MORE NEWS GROUPS YOU POST IN, THE MORE MONEY YOU WILL
MAKE!!!!
(But you have to post a minimum of 200).
That's it!!! You will begin receiving money from around the world
within
days!!! You may eventually want to rent a P.O. Box due to the large
amount of mail you will receive. If you wish to stay anonymous, you can
invent a name to use, as long as the postman will deliver it.
JUST MAKE SURE ALL THE ADDRESSES ARE CORRECT!!!
Now the why part. Out of 200 postings, say you receive only 5 replies (a
very low example). So then you made .00 with your name at #6 on the
letter. Now, each of the 5 persons who sent you .00 make the minimum
200 postings, each with your name at #5 and only 5 persons respond to
each of the original 5, that is another 5.00 for you. Now those 25
each make 200 MINIMUM posts with your name at #4 and only 5 replies
each, you will bring in an additional 25.00!!!! Now, those 125 persons
turn around and post the minimum 200 with your name at #3 and only
receive 5 replies each, you will make an additional 25.00!!! OK, now
here is the fun part, each of those 625 persons post a minimum 200
messages with your name at #2 and they each only receive 5 replies, that
just made you ,125.00!!! Those 3,125 persons will all deliver this
message to 200 news groups, If just 5 more reply you will receive
5,625.00!!! All with an original investment of only .00!!! Amazing
isn't it!!!! When your name is no longer on the list, you just take the
latest posting in the news groups and send out another .00 to the
names on the list, putting your name at number 6 again.
You must realize that thousands of people all over the world are joining
the internet and reading these messages every day!!! Just like you are
now!!! So, can you afford .00 and see if it really worksI'm glad I
did!!! People have said, "what if the plan is played out and no one
sends you the money So what!!! What are the chances of that happening,
when there are tons of new honest users and new honest people who are
joining the internet and news groups everyday and are willing to give it
a tryEstimates are at 20,000 to 50,000 new users, every day!!!
REMEMBER PLAY HONESTLY AND FAIRLY AND THIS WILL REALLY WORK!!!
--comments/feedback(please post your feedback/experiences here)---
Not bad for 1 hr's work....made me around 320 in roughly 35 days
Anthony M Texas
Hello, I rcvd 269 bucks in the post in 2 weeks. Dan Miami, FL
I had to wait around 10 days before I had any results - 3,450 as of
3rd
Jan 2003 to date(14th Feb 2003).Am going to re-post it again for more
money!!
Del from Alberta - Canada
Only received around 88 in the post the last 2 months since I started
The program but I'd posted to approx. 100 newsgroups. James P Manchester
UK
cool....didn't expect much out of this "scam" initially but I have pay
my
credit card bill
Mustafa , Jordan
I have received money from people all over the world...here in China it
is very good money and I buy new computer last month Zhong Wen
...Guangxi CHina
For ,I made 46 in 2 weeks --ROMEO2326 little rock,AR US of A
Hey, just dropping a line to say that after posting to well over 820
newsgroups on google and my ISP newsgroup server over a period of 4 1/2
months ,I've raked in 4280 . Mucho dinero baby!!!! Peace, Drew
Dallas TX
I hope whom ever receives my envelopes enjoys the crispy new dollar
bills. Great program, I just started receiving cash. S.C.B.






4.10.000+ rows

I'm a VB6 / VB.Net developer, looking into flash as an interface
engine.
I figured skinning is all very nice, but why not take it a step
further.

My main concern, before venturing any further, is how to display
datagrids (listviews) with 10.000+ rows (listitems), complete with up
to 10 columns (subitems).
Usually displaying datasets this big would just be bad design, but
this app is used for bulk data manipulation. So there you go.

I doubt flash can deal with these kinds of numbers directly, so I'm
wondering if there are any work-arounds like virtual datagrids
(virtual listviews) to get the job done.

Any ideas?

5.Creating 30,000+ flash files

I need to create a large amount of flash files, based on one template - each new file would involve changing out the font for another before exporting as SWF. Is there an easy way to batch process this group of files? I originally had looked into Applescript (I'm on Mac OS X) but didn't see much Applescript support in the Flash MX (pre-2004) application.

Any help would be greatly appreciated.



6. Given "2008-06-01 13:02:10.000"

7. can FMS support 1, 000 users at same time

8. Given "2008-06-01 13:02:10.000"



Return to FLASH

 

Who is online

Users browsing this forum: No registered users and 71 guest