Loop XML question
Here's the translation:Stop();
time = 10;
n = « » ;
menuxml = new XML();
menuxml. Load (toadd + "XML-Header - 1.xml");
menuxml.ignoreWhite = true;
menuxml.onLoad = {function (success)}
If (success) {}
XMLDATA = menuxml.firstChild.childNodes;
maxnum = xmldata.length;
for (n = 0; n < maxnum; n ++) {}
sheet = menuxml.firstChild.childNodes [n];
Set ("toptitle" + n, specs.attributes.toptitle);
Set ("maintitle' + n, specs.attributes.maintitle);
Set ('url' + n, specs.attributes.theurl);
Set ("caption" + n, specs.attributes.caption);
}
PEAK = random (maxnum);
Play();
}
};
How can I loop just once? There are a total of 9 images. Thanks to anyone who can help me.
Comment the following line:
Tags: Adobe Animate
Similar Questions
-
Hello
First post on the forums in a long time and the first here altogether. I hope it's okay jump in.
I have a little experience of FM not structured for several years ago and use Ventura (13 years) to my company's books (long directories - 3 000 + / volume). I made some scripts in Ventura have so little experience in programming.
We are looking to switch to XML rather than text files tagged Ventura can import because of its lack of support, problems, perhaps due to Win7, and the effort required to maintain files to import. I downloaded the trial FM 11 and have been experimenting a bit with XML back and forth and also import what we already have in XML. If a bit I'm sure very simple questions. and thanks in advance:
I was going through the tutorials from Adobe and everything I can find online. It seem not to be well reviewed books on Amazon that deal with structured FM 9-11. Some that look promising for XML are about 10 years old - I think not that our needs are sharp, so should I get something this old, or stay with most recent although we complain? Any recommendations? If I can get the hang of it with something that is not specific FM will be really difficult to adapt this knowledge to the FM band?
I find EDD, DTD and schema to be rather confusing. Someone explain the difference in simple terms or direct me to a video, etc.? Assuming that I start with an XML file that is created in one other purpose, not meant to be FM, need more than one of them? Do you do first?
Ventura if I want to have two separate data elements (off the coast of the database) on the same line, say a left-aligned with the other right aligned, programmers put both with a tab, and that is controlled by a tag paragraph in Ventura with a tab on the right. With XML, if I understand it correctly, you wouldn't do that in the XML file - I'm probably not ready to understand the method, I just want to know if this is possible without doing something like having paragraph of second properties point to have no line breaks. If so, where that would be appropriate, ESD, DTD, etc.?
XML in FM can include inline graphics? What about an Excel chart?
Thank you
Gary
Hi Gary,.
a lot of questions, he
But lets start with the first things first.
For your general understanding: XML separates basically content layout. You can add metadata to the content by adding attributes to some semantic purposes or to include information for your page layout process (or any information that you feel should be here).
XML is essentially made up of elements, attributes and entities. Those that are defined in a DTD or a schema. ESD does the same for the management of content structured in FM. To stuff FM back and forth into XML and vice versa, you will need both a DSP for handling in FM and the DTD or schema of XML processing. Basically the two similar at first, but ESD will be also some layout information included as well as routines to facilitate the production of structured content (so called context rules).
The translation between XML and FM requires also some reading/writing-rules governing the specific elements of the FM and values to create "correct" XML files
Your layout (-> master pages), styles of paragraph and character, etc. pre-set styles of paintings, graphics and so on, are stored in a template file, which is used when you import an XML file to the FM band.
These are the basics that you are handling.
Everything that affects page layout will be on the side of the FM of things (if you use it to publish stuff).
Everything that affects the structure is mainly done on the DTD and the reading/writing-rules side (but has an equivalent in ESD).
So, for your search:
XML books who have 10 years maybe not the best choice, because they will probably have a lot of references to SGML, which doesn't help much. But some who are about 5 years old will do just fine - not much changed on the side of XML (unless you decide to use the XML schema).
For FM11, it is preferable to use guides for FM9 (those are the most comprehensive) and use this forum.
If you insured the most, I would say to book some consultant for training on the creation of ESD. This will help avoid a lot of frustration later and pays really fast off the coast.
It can also provide answers to specific questions such as the ones you posted above (Yes, graphics work).
Once your done with that, you need to do a search, if one of the XML flavors already established already meet your needs in general (I'm talking about DITA, DocBook, S1000D and others) or if you want to develop your own structure (which needs a mayor of brainstorming, but could better meet your needs).
Soon Alex
-
I'm eventid parameter (if I'm passing eventid = 200) & after which is is a number when I show this event ID Message.
now, I try as below. but do not get the result... Cau u help me... ?
var eventID:String = this.loaderInfo.parameters.eventid; var myXML:XML; var myLoader:URLLoader = new URLLoader(); myLoader.load(new URLRequest("http://www.sitename.com/events/idlist.xml")); myLoader.addEventListener(Event.COMPLETE, processXML); function processXML(e:Event):void { myXML = new XML(e.target.data); trace(myXML.Message.EventId); if(myXML.Message.EventId == eventID) { trace("Yes this is 200"); mytxt.text = myXML.Message.MessageName; } }
trace
< EventId > 100 < / EventId >
< EventId > 200 < / EventId >
< EventId > 300 < / EventId >
My XML
<?xml version="1.0" standalone="yes"?> <Messages> <Message> <EventId>100</EventId> <MessageName>Sample1</MessageName> </Message> <Message> <EventId>200</EventId> <MessageName>Sample2</MessageName> </Message> <Message> <EventId>300</EventId> <MessageName>Sample3</MessageName> </Message> </Messages>
If you say "Yes well ' so I don't undersatand not what you're having a problem with. As I said already, you should check all the individual values, which means that you probably want to check in a loop.
for (var i: uint = 0; i
If (myXML.Message [i]. EventID == eventID) {}
myTxt.Text = myXML.Message [i]. MessageName;
}
}
-
Release of FrameMaker XML question
I have a problem with an attribute not be exported in XML format by FM8.
Here is the excerpt of the DTD:
<! ELEMENT std.table.header (+ std.table.row) >
<! ATTLIST std.table.header
CDATA #REQUIRED passes
rowsep CDATA '1 '.
>The first question I had was "collar" does not present as an attribute in the structured view. I solved it in question (with the help of MarttiP) by adding it to the EDD as shown below:
Element (container): std.table.header
General rule: std.table.row +.
List of attributes
Name: whole passes requiredNow I'll have is on the export of XML, the "collar" attribute is not exported and I get an error "required attribute"cols"unplanned". Any suggestions?
Mike
Add this rule to write:
element 'std.table.header '.
{
is part of fm;
"collar" attribute is the attribute of fm;
}This replaces the built-in handling for the cols attribute without affecting the CALS tables.
Ian
-
Simple as possible"nested loop"XML (XPATH)?
What is the best way to view the entries to an XML file with the following structure as a nested list (actually it must become a form where it is possible to control all entries).
I can out of each level (see the code), but it seems not to be possible to nest loops for.
Advice if it is directly possible with XPath or should I check the result of a loop to output in the other or it would even be better to make a query on the XML result?
Thank you, excellent!
I tried somwhere along this before, but it didn't work then. I have propably just forgot to bring the book of signs to the correct place or something ;-)
But yes, your solution is exactly what I was looking for!
Thank you
-
Hello
I have this XML code that is returned by a ColdFusion CFC. In Flex, so I have this code:
var treeXML:XML = new XML (event.result);
I am that assigning to the dataProvider of the tree. This works very well, but how do I get to each top-level node in the tree? Essentially I want to loop on the top level of the tree categories?
Thank you
-Westside"WestSide"
wrote in message
News:gigrbp$9dc$1@forums. Macromedia.com...
> Hi,.
>
> I have this XML code that is returned by a ColdFusion CFC. So I in Flex
> Copy the following code:
>
> var treeXML:XML = new XML (event.result);
>
> I am that assigning to the dataProvider of the tree. It works fine,
> but
> How can I get to each top-level node in the tree? I want to basically
> loop
> on the top level of the tree categories?treeXML.children)
http://dispatchEvent.org/Roger/AS3-E4X-rundown/ -
Hi all
I have the query in order to retrieve the xml values in the table using XMLTABLE. The XMLTABLE extract about 280 columns. It takes 30 seconds to give the output. How to tune this XML query? or what is the best way.
DB version:
Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production
PL/SQL Release 11.2.0.1.0 - Production
"CORE 11.2.0.1.0 Production."
AMT for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
Query:
SELECT OUTPUT.*
OF AM_CUST_WS_MB t
, XMLTABLE ('. t.CUSTXML PASSAGE des/ROOT/Types_of_Financials)
COLUMNS
PATH of VARCHAR2 (75) of Types_of_Financials '. / @VALUE',
PATH of VARCHAR2 (75) of FY_Ended_DD_MM_YY '. / FY_Ended_DD_MM_YY/@VALUE',
PATH of VARCHAR2 (75) of Operating_Months '. / FY_Ended_DD_MM_YY/Operating_Months/@VALUE',
..
..
.. / * more than 200 columns described here * /.
..
..) OUTPUT
Thank you
Fame
OK, this could be problematic:
XMLTYPE COLUMN CUSTXML STORE AS CLOB BASICFILE
You can recreate the table like this:
create table am_cust_ws_mb)
xmltype custxml
)
custxml XMLType column store as xml binary securefile;
and test again?
-
Hello
I use Photoshop CC 2015 and CC extensions Manager. I'm trying to install the Panel of editing beauty 3.0.1 but it does not work because of the error message that manifest.xml is not correct. Reinstall the new version of the extension manager does not help. Any idea?
Please see this thread: Add it will not install
-
I have 5 games of XMLs that are generated by a single package to places like CLOB diiferent...
On the 5th, the first is a straight select query and the rest are from the SYS_refcursors
I was wondering how I can I join all those who, under a start and end tagWell, if they are already in form CLOB, why not just create a new CLOB where you add on the required node start and end, such as
l_new_clob := '
' || l_clob_1 || l_clob_2 || ' ';or if they are in the format XMLType, you can use XMLElement and XMLConcat of them for putting it all together
SQL> SELECT XMLElement("root",XMLConcat(XMLType('
'),XMLType(' '))) 2 from dual; XMLELEMENT(ROOT,XMLCONCAT(XM -------------------------------------------------------------------------------- Note: All "XMLType ("
")" would be your XMLType. Lazy to create the complete example which is an XMLType variable. -
JS - Can XML Question - I add attributes using Javascript?
I want to add an attribute to an element tag, but I don't see how to do it programmatically. Is this possible? Also, is it possible to appoint a tag element dynamically? For example:
How to add a child element is to use the appendChild as follows:
XMLObject.appendChild(<childElement/>); XMLObject.childElement= "something";
or just add it like this:
XMLObject.childElement = "something";
Right? (Side Question: is there a difference between these two methods?).
What I want to do, is to add a dynamic attribute to a child named statically, or to create a child named dynamically.
I could not understand this. Any ideas?
Maybe take a look at Mozilla's E4X tutorial: https://developer.mozilla.org/en/E4X_Tutorial/
There is no need eval() here. (There are usually not.) Use:
XMLObject.appendChild(<{nameReference}/>);
To add an attribute, you can use:
XMLObject.@new_att = "the value";
Jeff
-
Motion menu - link to loop point question (Encore CS5)
I created a menu with buttons that appear after the loop point. All the attributes of the button are select only and requires no rendering "menu driven. The menu runs from the beginning and loops back to loop. I created a simple menu with a single button that connects the point on the line in the main menu using the link specify in the attributes of link button. In the link specify menu I selected the selected button in the main menu and the menu and the button appeared in the target. I checked the value point of loop and selected ok. The first menu ran to first and loop. When I chose the go-to-sub-menu button, he went to the submenu. When I chose the button to return to the main menu loop point he returned at the beginning of the main menu not the loop point. The only way I could get the SUP menu button to return to the point of loop in the main menu has been to add an attribute to the button in the main menu and make the menu. Is it a bug has the way it is supposed to work? Yet CS5
-ed
This is a bug with the preview only. The final disk will work as you wish and will return to the point on the line of the main menu instead of the beginning.
-
I am currently using two tables to load a sequence of videos in 2 areas of the Flash animation.
var zoneAarray:Array = new Array ("movie1.mp4", "movie2.mp4", "movie3.mp4");
var zoneBarray:Array = new Array ("movie4.mp4", "movie5.mp4", "movie6.mp4");
var clipA:String = zoneAarray [0];
var clipNumberA:int = 0;
var clipTotalA:int = zoneAarray.length-1;
var clipB:String = zoneBarray [0];
var clipNumberB:int = 0;
var clipTotalB:int = zoneBarray.length-1;
Everything works fine, but I would like to import the list of videos from an XML file instead of hard-coding it in Flash.TIA,-EricLarge. Please mark the thread as answered.
-
Hello
When you export to XML "File-Save as XML".
FM exports all the information. Following is the display of the Structure:
The XML output from this is:
< ref >
< Ref-installation-item id = "o00009-9-1230-783-00004" >
< local link = "m00003-9-1230-783-00001" id = "m00003-9-1230-783-00001" > < / Ref-installation-point >.
< Ref-installation-item id = 'o00009-9-1230-783-00007' >
< local link = 's00001-9-1230-783-00050' id = ' s00001-9-1230-783-00050 "> < / Ref-installation-point >.
< Ref-installation-item id = "o00009-9-1230-783-00010" >
< local link = "o00031-9-1230-783-00001" id = "o00031-9-1230-783-00001" > < / Ref-installation-item > < / Ref > ".As you can see the text of 'link' element is missing and is not closed... any ideas?
Of course - that would be my answer. You don't need to force it to a frame of link - it can be treated as any other XML structure assuming that you have code that knows how to convert a link in HTML from the original XML structure. Make a container and get rid of the rules R/W and it should come out just like the original DTD specification.
Jim
-
can we loop xml with dynamic values...
That's what I'm trying
< cfloop index "i" = from = '1' to = '13' step '1' = >
< cfxml variable = "data" >
< files >
account <>
< number > #i # < / NB >
< CODE > #Form ["sku_" & i] # < / SKU >
< quality > #Form ["qty_" & i] # < / quality >
< description > #Form ['product_' & i] # < / Description >
< / recording >
< / documents >
< / cfxml >
< cfset XMLText = ToString (data) >
< cffile action = "APPEND" line = "#ExpandPath ('order.xml')" # "output =" #XMLText #">"
< / cfloop >I can see only last varables Uploader in xml 13 not all its only 13...
I would try this:
#i# #Form["sku_" & i]# #Form["qty_" & i]# #Form["product_" & i]# -
XML question: How do I search for children without grandchildren
With an XML document:
var xml =
< root >
< name L1 = "First" >
< garbage / >
< / L1 >
< name L1 = "Second" >
< garbage / >
< / L1 >
< / root >
I need a XMLList tags < L1 > without their children, then the output should be:
< name L1 = "First" >
< name L2 = "Second" >
Can someone help me with the syntaxt actionscript to accomplish this XML query? I could not find an example that does not return the children of the < L1 > tags as well.
Thank you
David
Well, if you need exact release, you could use this line:
trace (xml.toXMLString (match) (/<\s*L1.*?>/g) .join ('\n'));
This approach much faster that doing redundant xmlfiltering + removal of garbage, hope this helps
\s*L1.*?>
Maybe you are looking for
-
A70: Unstable Wireless Connection to wireless D - link DI-784
Here's my dilemma, I have a brand new Satellite A70 and I love him muchly so but I can't seem to play well with my wireless router. Constantly, he falls in offline mode, and then reconnects. Here is an excerpt of my router tonite 1 Page 20 in the las
-
I would like to know if someone has worked with table Rotary testsystems and want to share an idea of how he dealt with follow-up of the results of each test result data in all the test station is in the table of rotation, so at the end of the cycle
-
DeskJet F4580 wireless light flashing. Laptop will not find printer.
I have the above printer connected via USB to my desktop (Win Vista 32-bit) and has previously been connected to my laptop HP Pavilion dm3 (Win 7 64 bit) wireless - everything was going well for 12 months. I recently had infinite BT (optical fiber) b
-
When I send emails, it shows my email from my friend as the sender, not mine
I can send emails Okay, but the sender that appears is my friend, not mine. How can this be?
-
How do I downgrade from Vista to XP?
Original title: Windows Vista and Windows XP update Questions Hello. I have Windows Vista Home Basic 32-bit on this computer, when I found my old Windows XP Upgrade disk. I wanted to downgrade so I could make it easier on my game (because my computer