Re: [Flashcoders] load many XML files problem

2008-08-24 Thread Pavel Krůšek
I am tracing this issue in flash authoring software, here is trace  
result (last file is 9.xml, cca 30 files mising):


TOTAL 90
=


data/pages/2.1.xml
data/pages/2.2.xml
data/pages/2.3.xml
data/pages/2.4.xml
data/pages/3.1.1.xml
data/pages/3.1.2.xml
data/pages/3.1.3.xml
data/pages/3.1.4.xml
data/pages/3.1.5.xml
data/pages/3.3.1.xml
data/pages/3.3.2.xml
data/pages/3.3.3.xml
data/pages/3.3.4.xml
data/pages/3.4.1.xml
data/pages/3.4.2.xml
data/pages/4.1.xml
data/pages/4.2.xml
data/pages/4.2.1.1.xml
data/pages/4.2.1.2.xml
data/pages/4.2.1.3.xml
data/pages/4.2.1.4.xml
data/pages/4.2.1.5.xml
data/pages/4.2.2.1.xml
data/pages/4.2.2.2.xml
data/pages/4.2.2.3.xml
data/pages/4.2.2.4.xml
data/pages/4.2.2.5.xml
data/pages/4.2.3.1.xml
data/pages/4.2.3.2.xml
data/pages/4.2.3.3.xml
data/pages/4.2.3.4.xml
data/pages/4.2.3.5.xml
data/pages/4.2.4.1.xml
data/pages/4.2.4.2.xml
data/pages/4.2.4.3.xml
data/pages/4.2.4.4.xml
data/pages/4.2.4.5.xml
data/pages/4.2.5.1.xml
data/pages/4.2.5.2.xml
data/pages/4.2.5.3.xml
data/pages/4.2.5.4.xml
data/pages/4.2.5.5.xml
data/pages/4.2.6.1.xml
data/pages/4.2.6.2.xml
data/pages/4.2.6.3.xml
data/pages/4.2.6.4.xml
data/pages/4.2.6.5.xml
data/pages/4.2.7.1.xml
data/pages/4.2.7.2.xml
data/pages/4.2.7.3.xml
data/pages/4.2.7.4.xml
data/pages/4.2.7.5.xml


On Aug 24, 2008, at 9:43 AM, Cor wrote:

Can you trace if you getting a server timeout or are you able to  
adjust this

timeout setting?

HTH

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of  
Pavel Krušek

Sent: zaterdag 23 augustus 2008 23:53
To: Flash Coders List
Subject: [Flashcoders] load many XML files problem

Hi List,

i am trying to load many XML files, all at once (altogether 90 files).
Class PreloadXML works "fine", because only cca 40 files are loaded.
I don't understand it No error message, loading simply ends...

thanks,

Pavel



package app.site
{
import flash.display.Sprite;
import flash.events.*;
import flash.net.*;

public class PreloadXML extends Sprite
{
private var _siteXML:XMLList;
private var _xmlLoader:URLLoader;
private var _loadCounter:Number;
private var _totalCounter:Number;

public function PreloadXML( data:XMLList )
{
_siteXML = data;
_loadCounter = 0;
_totalCounter = data.length();

_xmlLoader = new URLLoader();
_xmlLoader.addEventListener( Event.COMPLETE,
onLoadFile, false, 0,
true );
_xmlLoader.addEventListener( IOErrorEvent.IO_ERROR,
onIOError,
false, 0, true );

loadXML();
}

private function loadXML() : void
{   
_xmlLoader.load( new URLRequest( "data/pages/"+
_siteXML[_loadCounter] +".xml" ) );
trace("data/pages/"+ _siteXML[_loadCounter]
+".xml");
}


private function onLoadFile(e:Event) : void
{

try {
if( _loadCounter <  _totalCounter - 1)
{   
_loadCounter += 1;
loadXML();
}else{

_xmlLoader.removeEventListener(Event.COMPLETE, onLoadFile);

_xmlLoader.removeEventListener(IOErrorEvent.IO_ERROR,
onIOError);
trace("done");
}

} 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 );
}

}
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] load many XML files problem

2008-08-23 Thread Pavel Krůšek

Hi List,

i am trying to load many XML files, all at once (altogether 90 files).
Class PreloadXML works "fine", because only cca 40 files are loaded.
I don't understand it No error message, loading simply ends...

thanks,

Pavel



package app.site
{
import flash.display.Sprite;
import flash.events.*;
import flash.net.*;

public class PreloadXML extends Sprite
{
private var _siteXML:XMLList;
private var _xmlLoader:URLLoader;
private var _loadCounter:Number;
private var _totalCounter:Number;

public function PreloadXML( data:XMLList )
{
_siteXML = data;
_loadCounter = 0;
_totalCounter = data.length();

_xmlLoader = new URLLoader();
			_xmlLoader.addEventListener( Event.COMPLETE, onLoadFile, false, 0,  
true );
			_xmlLoader.addEventListener( IOErrorEvent.IO_ERROR, onIOError,  
false, 0, true );


loadXML();
}

private function loadXML() : void
{   
			_xmlLoader.load( new URLRequest( "data/pages/"+  
_siteXML[_loadCounter] +".xml" ) );

trace("data/pages/"+ _siteXML[_loadCounter] +".xml");
}


private function onLoadFile(e:Event) : void
{

try {
if( _loadCounter <  _totalCounter - 1)
{   
_loadCounter += 1;
loadXML();
}else{

_xmlLoader.removeEventListener(Event.COMPLETE, onLoadFile);
 			_xmlLoader.removeEventListener(IOErrorEvent.IO_ERROR,  
onIOError);

trace("done");
}

} 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 );

}

}
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] E4X case sensitivity

2008-08-23 Thread Pavel Krůšek

Thank you very much, Keith!

I have already solved this problem with the help of your blog- 
article"Case-insensitive E4X filtering" before an hour  :)


Thanks for awesome article

Pavel


On Aug 23, 2008, at 8:35 PM, Keith wrote:


You could use Regular Expressions in your filtering.
Here's my ramblings:
http://keith-hair.net/blog/2008/06/01/case-insensitive-e4x-filtering/

-- Keith H --
www.keith-hair.net




Pavel Krůšek wrote:

Hi List,

E4X is case sensitive, is possible to disable case sensitivity for  
searching?


thanks,

Pavel

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders





___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] E4X case sensitivity

2008-08-23 Thread Pavel Krůšek

Hi List,

E4X is case sensitive, is possible to disable case sensitivity for  
searching?


thanks,

Pavel

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] XML deep searching

2008-07-19 Thread Pavel Krůšek

var test:XMLList = _siteXML..*.( re["test"]( attribute("name")));


[ and ] keeps compiler from warning when using the RegExp test() method

Pavel


On Jul 19, 2008, at 4:40 AM, Merrill, Jason wrote:


OK, I tried this out, but I get a compile-time error

"Warning: test is not a recognized method of the dynamic class  
RegExp."


The code I have is:

var re:RegExp = new RegExp("^" + searchInput.text);
var xmlListSearch:XMLList = _model.help.helpData.xml..*.topic.*.(
re.test(attribute("title")));
trace("searchResult: " + xmlListSearch.toXMLString());

(note,  _model.help.helpData.xml is the location of the loaded XML)


Jason Merrill
Bank of America
Enterprise Technology & Global Risk L&LD
Instructional Technology & Media

Join the Bank of America Flash Platform Developer Community

Are you a Bank of America associate interested in innovative learning
ideas and technologies?
Check out our internal  GT&O Innovative Learning Blog & subscribe.




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Wagner Amaral
Sent: Friday, July 18, 2008 5:04 PM
To: Flash Coders List
Subject: Re: [Flashcoders] XML deep searching

Hi Jason,

The error you're getting is actually syntatical. Here's what
you wrote:
re.(attribute())
And what you should've done:
re.test(attribute())

Since re is an object of type RegExp, you want to call the
method test() on it, and I guess it will work then

Also, I believe this is more concise:
xml..*.topic.
instead of:
xml.topics..topic.*.

Still, I've got a bizarre behaviour when testing this out,
I'll post a new thread shortly describing the problem.

Wagner



On Fri, Jul 18, 2008 at 4:48 PM, Merrill, Jason <
[EMAIL PROTECTED]> wrote:


OK, so based on what I just picked out of the "E4X, regexp and user
input" thread, I tried to mix some XML and a regex to solve my
problem, but I didn't get too far, and again, really don't

know what

I'm doing with regular expressions, and I'm not quite a pro at E4X
yet.  I am getting this error when I try and search on [EMAIL PROTECTED]
attribute
values:

"Filter operator not supported on type RegExp."

based on this code:

var re:RegExp = new RegExp("^" + searchInput.text);  var
xmlListSearch:XMLList = xml.topics..topic.*.( re.(
attribute("title")));

Which is drawing from this XML:


  
  
  
  
  ...etc.

Any ideas?  Thanks.


Jason Merrill
Bank of America
Enterprise Technology & Global Risk L&LD Instructional Technology &
Media

Join the Bank of America Flash Platform Developer Community

Are you a Bank of America associate interested in

innovative learning

ideas and technologies?
Check out our internal  GT&O Innovative Learning Blog & subscribe.


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] E4X, regexp and user input

2008-07-18 Thread Pavel Krůšek

Hi List,

this code work fine for me, successfully return all records with  
attribute with first letter "N":


_siteXML..*.( /^[N].*/.test( attribute("name")));

but i don't know, how integrate this code with user input (from input  
textfield) - for example user entered string "New".


Please help :)

thanks


Pavel



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Error #1009 and gotoAndStop()

2008-07-12 Thread Pavel Krůšek

Hi List,

i have MovieClip with some keyframes, on each keyframe is dynamic  
TextField with different properties (font, color etc.).


In constructor - class NavigationItem.as I'm trying to jump to frame  
and fill TextField with some text:




gotoAndStop( _level );
_label.text = label;
_label.autoSize = TextFieldAutoSize.LEFT;



TypeError: Error #1009: Cannot access a property or method of a null  
object reference.


It is clear for me - the script runs before frame in the animation has  
been reached, but how it fix?


Thanks

Pavel
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] variable in e4x filtering

2008-07-09 Thread Pavel Krůšek

thanks to all for help.

_officesXML..*.(attribute("name") == "NJ")

works for all of us perfectly :)

Grant Skinners slides (as3 workshop) are pretty good...

On Jul 9, 2008, at 6:11 PM, Kenneth Kawamoto wrote:


It's attribute("name"), not attribute(@name)

Kenneth Kawamoto
http://www.materiaprima.co.uk/

Romuald Quantin wrote:

I've tried it yet.
But I guess you might need to write it like that?
_officesXML..*.(attribute(@name) == "NJ Agency")
Romu
www.soundstep.com
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of  
Kenneth

Kawamoto
Sent: 09 July 2008 16:42
To: 'Flash Coders List'
Subject: Re: [Flashcoders] variable in e4x filtering
Yes, I can verify that. Thanks.
_officesXML..*.(attribute("name") == "NJ Agency")
Kenneth Kawamoto
http://www.materiaprima.co.uk/
Romuald Quantin wrote:

Also, Grant Skinner explained that you can avoid:
hasOwnProperty("@name") By using :
(attribute(name) == "NJ")
It won't throw an error if the attribute doesn't exist, pretty  
handy.


http://gskinner.com/talks/as3workshop/
slide 91

Romu
www.soundstep.com



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of  
Kenneth

Kawamoto
Sent: 09 July 2008 16:17
Cc: Flash Coders List
Subject: Re: [Flashcoders] variable in e4x filtering

Slightly shorter:

_officesXML..*.(hasOwnProperty("@name") && @name == "NJ Agency")

Kenneth Kawamoto
http://www.materiaprima.co.uk/


On Jul 9, 2008, at 4:51 PM, Kenneth Kawamoto wrote:

You can do something like this as well - you don't need to know  
the node name at all:


_officesXML.descendants().(hasOwnProperty("@name") && @name ==  
"NJ Agency")


Kenneth Kawamoto
http://www.materiaprima.co.uk/

Pavel Kru*šek wrote:

Hi,
Unfortunately this solution is out of action: 1084: Syntax  
error: expecting identifier before leftbracket.

On Jul 9, 2008, at 3:50 PM, Christoffer Enedahl wrote:

Try this:

var nodeName:String = "agency";
_officesXML.[ nodeName ].(@name == "NJ Agency")

HTH
Christoffer

Pavel Kru*šek skrev:

Hi List,

please is possible to substitute node name in e4x with  
variable?


Anywhere in XML:

myAgency
123456


_officesXML..agency.(@name == "NJ Agency")

return:


myAgency
123456


But i don't know node name 'agency' in this time. I need some  
like:



_officesXML..here_is_my_variable_with_value_for_example"agency". 
(@name

== "NJ Agency")

thanks,

pavel

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] variable in e4x filtering

2008-07-09 Thread Pavel Krůšek

Hi,

your code can throws error (i try identical code before i sent my  
question to flashcoders forum), no every one node has necessarily  
property "name"



On Jul 9, 2008, at 5:15 PM, Romuald Quantin wrote:


This will search through everything if you need:

_officesXML..*.(@name == "NJ Agency")

Romu
www.soundstep.com


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of  
Christoffer

Enedahl
Sent: 09 July 2008 15:51
To: Flash Coders List
Subject: Re: [Flashcoders] variable in e4x filtering

oh sorry, email code. it got a dot too much, here this works:
_officesXML[ nodeName ].(@name == "NJ Agency")

Pavel Kru*šek skrev:

Hi,


Unfortunately this solution is out of action: 1084: Syntax error:
expecting identifier before leftbracket.


On Jul 9, 2008, at 3:50 PM, Christoffer Enedahl wrote:


Try this:

var nodeName:String = "agency";
_officesXML.[ nodeName ].(@name == "NJ Agency")

HTH
Christoffer

Pavel Kru*šek skrev:

Hi List,

please is possible to substitute node name in e4x with variable?

Anywhere in XML:

myAgency
123456


_officesXML..agency.(@name == "NJ Agency")

return:


myAgency
123456


But i don't know node name 'agency' in this time. I need some like:

_officesXML..here_is_my_variable_with_value_for_example"agency". 
(@name

== "NJ Agency")

thanks,

pavel

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] variable in e4x filtering

2008-07-09 Thread Pavel Krůšek

Work perfectly, thank you very much!


On Jul 9, 2008, at 4:51 PM, Kenneth Kawamoto wrote:

You can do something like this as well - you don't need to know the  
node name at all:


_officesXML.descendants().(hasOwnProperty("@name") && @name == "NJ  
Agency")


Kenneth Kawamoto
http://www.materiaprima.co.uk/

Pavel Kru*šek wrote:

Hi,
Unfortunately this solution is out of action: 1084: Syntax error:  
expecting identifier before leftbracket.

On Jul 9, 2008, at 3:50 PM, Christoffer Enedahl wrote:

Try this:

var nodeName:String = "agency";
_officesXML.[ nodeName ].(@name == "NJ Agency")

HTH
Christoffer

Pavel Kru*šek skrev:

Hi List,

please is possible to substitute node name in e4x with variable?

Anywhere in XML:

myAgency
123456


_officesXML..agency.(@name == "NJ Agency")

return:


myAgency
123456


But i don't know node name 'agency' in this time. I need some like:

_officesXML..here_is_my_variable_with_value_for_example"agency". 
(@name == "NJ Agency")


thanks,

pavel

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] variable in e4x filtering

2008-07-09 Thread Pavel Krůšek

Hi,


Unfortunately this solution is out of action: 1084: Syntax error:  
expecting identifier before leftbracket.



On Jul 9, 2008, at 3:50 PM, Christoffer Enedahl wrote:


Try this:

var nodeName:String = "agency";
_officesXML.[ nodeName ].(@name == "NJ Agency")

HTH
Christoffer

Pavel Kru*šek skrev:

Hi List,

please is possible to substitute node name in e4x with variable?

Anywhere in XML:

myAgency
123456


_officesXML..agency.(@name == "NJ Agency")

return:


myAgency
123456


But i don't know node name 'agency' in this time. I need some like:

_officesXML..here_is_my_variable_with_value_for_example"agency". 
(@name == "NJ Agency")


thanks,

pavel

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] variable in e4x filtering

2008-07-09 Thread Pavel Krůšek

Hi List,

please is possible to substitute node name in e4x with variable?

Anywhere in XML:

myAgency
123456


_officesXML..agency.(@name == "NJ Agency")

return:


  myAgency
  123456


But i don't know node name 'agency' in this time. I need some like:

_officesXML..here_is_my_variable_with_value_for_example"agency".(@name  
== "NJ Agency")


thanks,

pavel

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] preloader problem - browser cache

2008-07-05 Thread Pavel Krůšek

Hi List,

is there a way to determine in AS3 (or more precisely in preloader  
swf) if  "main" swf is already in the browser cache?


Pavel
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Warning: 3596: Duplicate variable definition.

2008-06-30 Thread Pavel Krůšek

Hi List,

I have written a script, here is piece of some method:

private function resetState( e:Event )
{
switch(e.target.buttonType)
{
 case 0 :
  var clip = e.target as MenuButtonMain;
  var buttons:Array = _menuButtons;
  break;
 case 1 :
  var clip = e.target as MenuButtonSub;
  var buttons:Array = _subMenuButtons;  
  break;
}

for (var i:uint = 0; i< buttons.length; i++)
{
if( buttons[i] != clip )
{
buttons[i].enable();
} else buttons[i].disable();
}



 The script works as want it to but I keep getting a 3596 - duplicate  
variable definition warning,  when I run the script. Should I be  
woried about this warning message? What is wrong in my code?


Thanks

Pavel


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] problem with loading and parsing XML

2008-06-12 Thread Pavel Krůšek

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
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders





--
-jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME  
04101

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] problem with loading and parsing XML

2008-06-11 Thread Pavel Krůšek

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
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] user friendly URL in flash site

2008-06-01 Thread Pavel Krůšek

Thanks, swfaddress looks good :)



On Jun 1, 2008, at 1:56 PM, [EMAIL PROTECTED] wrote:


http://www.asual.com/swfaddress/


On Jun 1, 2008, at 2:32 PM, Pavel Krůšek wrote:


Hi everybody,

can anyone tell me, how to make user friendly URLs in flash site,  
like it seems for example here: http://www.group94.com/#/website/ 
work/


thnaks,

Pavel
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] user friendly URL in flash site

2008-06-01 Thread Pavel Krůšek

Hi everybody,

can anyone tell me, how to make user friendly URLs in flash site, like  
it seems for example here: http://www.group94.com/#/website/work/


thnaks,

Pavel
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders