Hello,
thanks for your response.
"omit trace actions" in flash publish settings is unchecked.
Trace commands from another methods working OK, only from handler
onLoadSite() not.
This method - onLoadSite() working OK for me, but there is no results
of trace command in output window.
Pavel
On Jun 12, 2008, at 9:31 AM, jonathan howe wrote:
Hello, Pavel,
Can you try to rephrase "is onLoadSite method out of action." Also,
what is
the state of the "omit trace actions" checkbox in your publish
settings
(perhaps it is checked but Flash maybe overwrites this setting when
running
the debugger?)
-jonathan
On Wed, Jun 11, 2008 at 5:36 PM, Pavel Krůšek <[EMAIL PROTECTED]>
wrote:
Hi
i have class for loading and parsing XML file. With test movie
(command +
enter) is onLoadSite method out of action.
With debug mode (command + shift + enter) is all OK and in output
window is
possible to see trace command (trace(siteData))
What is wrong please?
package app.euro {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class Model {
private var siteData:XML;
private var xmlLoader:URLLoader;
public function Model(){
loadSite();
}
private function loadSite():void
{
xmlLoader = new URLLoader();
xmlLoader.addEventListener(Event.COMPLETE,
onLoadSite, false, 0, true);
xmlLoader.addEventListener(IOErrorEvent.IO_ERROR,
onIOError, false, 0, true);
xmlLoader.load(new URLRequest("data/
site.xml"));
}
private function onLoadSite(evt:Event):void
{
try {
siteData = new XML(evt.target.data);
trace(siteData);
xmlLoader.removeEventListener(Event.COMPLETE,
onLoadSite);
xmlLoader.removeEventListener(IOErrorEvent.IO_ERROR,
onIOError);
} catch (err:Error) {
trace("Could not parse loaded content as XML:
\n" +
err.message);
}
}
private function onIOError(evt:IOErrorEvent):void
{
trace("An error occurred when attempting to
load the
XML.\n" + evt.text);
}
}
}
thanks
Pavel
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
--
-jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME
04101
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders