Autor Zpráva
krekoma
Profil
Pokusim se pouzit jazyk XPath pri zpracovani XML dokumentu v ActionScript. V dokumentaci jsem si nasel ze to mozne je.
Dle navodu mam postupovat takto:

import mx.xpath.XPathAPI;
....
mx.data.components.XMLConnector.selectNodeList(this.firstChild, path);
....

Pri validaci tohoto skriptu je vsak vypsana chybova hlaska:
**Warning** E:\Dokumenty\www_docs\flash_imap\classes\localizator.as: Line 21: There is no class or package with the name 'mx.xpath' found in package 'mx'.
mx.xpath.XPathAPI.selectNodeList(this.firstChild, path);

Podarilo se to nekomu rozchodit?
Boy
Profil
In order to use XPath searches within Flash, you first need to include the XPathAPI class into your Flash library by adding the DataBindingClass (if it hasn't been added already). If you've already set up bindings, this class may have been included automatically; otherwise, you need to select the class from the common libraries (Window > Common Libraries > Classes). From the Classes.fla library panel, you can simply drag a copy of the DataBindingClasses component into your current Flash document's library. Now, you can import the class by typing import mx.xpath.XPathAPI or by using the classes fully qualified name when accessing its methods by prefixing the class methods with mx.xpath.XPathAPI.method_name.

PS: Mám ti to přeložit?
krekoma
Profil
Díky přeložit to zvládnu:) Neuvedl jsem to do popisu problému, ale zmíněnou operaci jsem provedl. V knihovně projektu mám třídu DataBindingClass. Ty používáš XPath v AS? Pomohlo by kdybys mi poslal (amokerk@post.cz) nějakej jednoduchej projektík ve Flashi kde to funguje třebas se pohnu z místa.
Toto téma je uzamčeno. Odpověď nelze zaslat.

0