[Flashcoders] loading XML as string via parseXml: how to avoid undefined? (onParseComplete??!)

2006-03-17 Thread Ken Fine
I'm attempting to manually load an XML object via a string. I appear to be
successfully completing this process: my XML is well-formed, and
myxmlobject.toString() returns a result, as do attempts to traverse the
attributes and nodes. 

 

What isn't working is the XML object itself when I attempt to use it to
build a kirupa.com-style XML menu, or when I attempt to run the
.getBytesTotal() method on the object. My menuing and code works just fine
when I load the same XML from an external file and set up an onLoad event,
but it breaks when I use the XML as a string and attempt parseXml. The code
copied below returns undefined on the trace. 

 

What I think I may be running into is Flash attempting to use the object
before it is parsed and loaded into memory, and I need the equivalent of
onParseComplete. Or maybe it's something else. Can anyone help on this
puzzling problem?  

 

Thanks in advance for any assistance you can offer. 

 

menu_xml = new XML();

menu_xml.ignoreWhite = true;

mymenuxml = (?xml version=\1.0\? menu name=\links\ menu
name=\About the UW\ action=\gotoURL\
variables=\http://www.washington.edu/home/about.html\;
item name=\Missions, Stats, Facts\ action=\gotoURL\
variables=\http://www.washington.edu/home/about.html\/  item
name=\Office of the President\ action=\gotoURL\
variables=\http://www.uwnews.org/Uwnews/sites/OOP/index.asp?sm=38\/
item name=\Visit the UW\ action=\gotoURL\
variables=\http://www.washington.edu/home/about.html\/
item name=\Diversity\ action=\gotoURL\
variables=\http://www.washington.edu/diversity/\/
item name=\UW Events\ action=\gotoURL\
variables=\http://www.washington.edu/home/events.html\/
item name=\Museums and Exhibits\ action=\gotoURL\
variables=\http://www.washington.edu/home/about.html\/
item name=\Administration and Governance\ action=\gotoURL\
variables=\http://www.washington.edu/home/about.html\/  item
name=\Emergency Information\ action=\gotoURL\
variables=\http://www.washington.edu/admin/business/oem/\/
/menu menu name=\Academics and Research\
action=\gotoURL\
variables=\http://www.washington.edu/home/departments/\;
item name=\Colleges, Schools, Departments\ action=\gotoURL\
variables=\http://www.washington.edu/home/departments/departments.html\/
item name=\Office of Research\ action=\gotoURL\
variables=\http://www.washington.edu/research/\/  item
name=\Office of Technology Transfer\ action=\gotoURL\
variables=\http://depts.washington.edu/techtran/\/
item name=\Office of Libraries\ action=\gotoURL\
variables=\http://www.lib.washington.edu/\/   /menu
menu name=\Admissions\ action=\gotoURL\
variables=\http://www.washington.edu/students/admissions.html\; 
item name=\Admissions\ action=\gotoURL\
variables=\http://www.washington.edu/students/admissions.html\/
item name=\Campus Tours\ action=\gotoURL\
variables=\http://www.washington.edu/univrel/visitors/ctours.html\/
item name=\New Freshman Options\ action=\gotoURL\
variables=\http://www.tacoma.washington.edu/options/\/
item name=\Transfer Enrollment\ action=\gotoURL\
variables=\http://www.tacoma.washington.edu/transfer/\/
item name=\UW Bothell\ action=\gotoURL\
variables=\http://www.bothell.washington.edu/\/
item name=\UW Tacoma\ action=\gotoURL\
variables=\http://www.tacoma.washington.edu/\/item
name=\Continuing Education\ action=\gotoURL\
variables=\http://www.outreach.washington.edu/pc/uwhome/conted_fly/\/
/menu   menu name=\UW Medicine\ action=\gotoURL\
variables=\http://www.uwmedicine.org/\;   item
name=\Patient Care\ action=\gotoURL\
variables=\http://www.uwmedicine.org/PatientCare/PatientCareOverview/\/
item name=\Education\ action=\gotoURL\
variables=\http://www.uwmedicine.org/Education/EducationOverview/\/
item name=\Medical Research\ action=\gotoURL\
variables=\http://www.uwmedicine.org/Research/ResearchOverview/\/
item name=\Health Sciences Schools\ action=\gotoURL\
variables=\http://healthlinks.washington.edu/index.cfm?id=09769476-d91b-4f8
5-8e0b-2e1261cfe493\/ /menu
/menu)

menu_xml.parseXML (mymenuxml); 

myxmlsize = menu_xml.getBytesTotal();

trace (myXMLSize+ myxmlsize);

 

[code above returns undefined]

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] How to fork between F7/F8 loadMovie instances in actionscript?

2006-03-15 Thread Ken Fine
Adobe provides code to allow you to fork between F7 and F8 instances of your
movie. This works just fine.

So the issue I'm running into now is that I've done a nice job abstracting
my content into a bunch of separate .swfs that are reassembled into a
finished movie. What I need to know is how to fork for F7 and F8 versions
+in actionscript.+. In other words, an F8-equipped person hits my main
movie, and is fed the F8 version. I want to make is so that the submovies
that come in via loadMovie are also F8-specific. I want the right content to
also be provided to F7-folks. And I'd really like to do this with if/else in
one movie. Making two entirely separate movies would work, but it is a
sloppy and 
unmaintainable solution.



Any help out there?

Thanks,

-KF

 

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] storing embedded font data in local shared objects(LSOs)?

2006-03-11 Thread Ken Fine
Hi all, 

 

Can anyone tell me if there's a manageable way to embed font data in an LSO
(Flash local shared object) such that it can be stored on the user's machine
and used by a movie? 

 

Or, perhaps someone can propose an alternate scheme so that embedded font
data can be externalized and cached on the user's machine so that it doesn't
need to be re-sent with every visit? 

 

I'm noticing that F8 embedded fonts are quite a bit more heavy than their
F7 counterparts, and I'm trying to come up with ways to shave down the
download. The other thing that would be very helpful to know is how to embed
a subset of a font instance just once in the library, and have my movie draw
from this common pool of font information. In reviewing my F8 size report,
I notice that Flash is embedding the same characters of my Myriad Pro in the
same font weight multiple times. This sucks up bandwidth unnecessarily. 

 

Thanks in advance for any pointers. 

 

-KF 

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com