[Flashcoders] Skitch invite left

2007-07-07 Thread Weyert de Boer

Hi I have one Skitch invite left. If you are interested please e-mail.
Skitch is a drawing app for use under MacOSX (at the moment)
___
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] Re: Seeking Experienced Developer for Connecting Flash to Databases with Java

2007-07-07 Thread gchen

Phil Dupré wrote:

Hi.

Thanks for the advice.  Would this socekt work for Java?  


Sure. Java has an easy to use Socket class:

http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html


My client doesn't use MySQL.  They reccommend Java and XML.

 Thanks.




This method is a general solution, it can be used on any
database. You just write a database operation layer in Java,
which listens to a socket, receives commands from Flash, and
performs query on Oracle.

This method is very suitable for Flash, because usually
Flash works on remote site (i.e. its users are away from
the database).


~Phil

On 7/6/07, gchen [EMAIL PROTECTED] wrote:


Phil Dupré wrote:
 Hello,

 I'm working on a really sweet project and need some help from a fellow
 freelaner.  If you are knowledgable in connecting Flash to databases
(esp.
 Oracle) with Java, please contact me.  Perhaps you can give me some
 pointers
 and or work with me as a consultant.  Thanks for your help.


I have used AS3's Socket class to connect Flash to a server (written in
C++), which perform operations on MySQL. I think you could connect Flash
to Oracle in this way.

Like this:

Flash(AS3) (socket)-- Java -- Oracle



___
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


RE: [Flashcoders] Flash CS3 - Strange Error: 5005: Unknown erroroptimizing byte code

2007-07-07 Thread Ashvin Savani
Anybody?

Best Regards,

Ashvin Savani - arckid
Founder  CTO - Avinashi.com
Adobe Community Expert 

We Never Give Up!


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ashvin
Savani
Sent: 06 July 2007 PM 7:35
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Flash CS3 - Strange Error: 5005: Unknown
erroroptimizing byte code

Hello flashcoders,

I am facing strange problem since long time. This error code even
doesn't exist in the list of error codes.

This is the exact error I am getting while I compile the FLA from flash
CS3.

Location : , Line 1
Description : 5005: Unknown error optimizing byte code.
Source : 

I don't know exact reason about its generation, But here are the some
possible reasons / hints:

Case 1) Overloading:

1.1) Size of .fla is 10.5 MB and its document class contains more than
60 classes to import and has more than 100 variables.

1.2) Even if I put In document class - only variable initialization and
class importing are there. Nothing in its constructor + no other
functions are defined. Still error is there.

1.3) If we import all classes and has all variables then it gives this
compile error. But if we remove some particular numbers of variable,
it's start working. In this we can remove any type of variables.

1.4) After reducing variables, application starts working till that it
won't.

Case 2)

2.1) Size of .fla is 1.75 MB and its document class is same as above
one.

2.2) All assumptions are same as above.

2.3) Now this class contains all functions and have initialization of
all variables + classes.

2.4) In this If we remove 3-5 variables, it will start functioning else
it won't.

Its a huge application so I am even confused that what is the cause of
error and this error stopped our working for a week now. Bit more
information about the project that may help the team to identify the
reason.

1. Project development started with flash public alpha 3. When we
started using Flash CS3, we had some design problem if we do open the
FLA in CS3, so we completely redesigned the Movieclips etc., in Flash
CS3 IDE.

2. Project contains approx 250 classes.

3. In main application, it imports 67 classes. (it works if I keep 63
classes in document class).

4. In the case 3 above, if that works with 63 classes and If I do add 3
frames in existing movieclip, it stops working.

5. In the case 3 above, if that works with 63 classes and If I do add /
declare few more variables, it stops working.

It would be humble appreciation if someone can come up with some light
in the dark tunnel.


Best Regards,

Ashvin Savani - arckid
Founder  CTO - Avinashi.com
Adobe Community Expert 

We Never Give Up!


___
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@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


Re: [Flashcoders] Re: Seeking Experienced Developer for Connecting Flash to Databases with Java

2007-07-07 Thread Phil Dupré

So if I'm making the flash application in AS3, how difficult would it be to
let it talk to the Oracle db?  Do you think you'd be available for this
integration?

~Phil

On 7/6/07, gchen [EMAIL PROTECTED] wrote:


Phil Dupré wrote:
 Hi.

 Thanks for the advice.  Would this socekt work for Java?

Sure. Java has an easy to use Socket class:

http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html

 My client doesn't use MySQL.  They reccommend Java and XML.
 Thanks.


This method is a general solution, it can be used on any
database. You just write a database operation layer in Java,
which listens to a socket, receives commands from Flash, and
performs query on Oracle.

This method is very suitable for Flash, because usually
Flash works on remote site (i.e. its users are away from
the database).

 ~Phil

 On 7/6/07, gchen [EMAIL PROTECTED] wrote:

 Phil Dupré wrote:
  Hello,
 
  I'm working on a really sweet project and need some help from a
fellow
  freelaner.  If you are knowledgable in connecting Flash to databases
 (esp.
  Oracle) with Java, please contact me.  Perhaps you can give me some
  pointers
  and or work with me as a consultant.  Thanks for your help.
 

 I have used AS3's Socket class to connect Flash to a server (written in
 C++), which perform operations on MySQL. I think you could connect
Flash
 to Oracle in this way.

 Like this:

 Flash(AS3) (socket)-- Java -- Oracle


___
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@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


RE: [Flashcoders] Flash CS3 - Strange Error: 5005:Unknownerroroptimizing byte code

2007-07-07 Thread Ashvin Savani
Muzak,

Thanks for your response :)

Actually I searched on google before that and 32K was the limit for AS2.
I was expecting atleast 64K limit with AS3. What do you suggest in this
case if say limit is the same? Because to satisfy business needs we
can't cut down the classes from import list :)

Best Regards,

Ashvin Savani - arckid
Founder  CTO - Avinashi.com
Adobe Community Expert 

We Never Give Up!


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Muzak
Sent: 07 July 2007 PM 12:22
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Flash CS3 - Strange Error:
5005:Unknownerroroptimizing byte code

Refactor.

Sounds like you need to completly rethink your application.
Importing 60 classes in your main application doesn't quite sound right.

There's a limit to how much code can be executed in 1 frame.
From what you describe it looks like you've reached that limit.
The limit used to be 32k, but has been increased in Flash Player 9 (if
i'm not mistaken).

Google: flash bytecode limit

regards,
Muzak


- Original Message - 
From: Ashvin Savani [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Saturday, July 07, 2007 8:19 AM
Subject: RE: [Flashcoders] Flash CS3 - Strange Error: 5005:
Unknownerroroptimizing byte code


Anybody?

Best Regards,

Ashvin Savani - arckid
Founder  CTO - Avinashi.com
Adobe Community Expert

We Never Give Up!


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ashvin
Savani
Sent: 06 July 2007 PM 7:35
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Flash CS3 - Strange Error: 5005: Unknown
erroroptimizing byte code

Hello flashcoders,

I am facing strange problem since long time. This error code even
doesn't exist in the list of error codes.

This is the exact error I am getting while I compile the FLA from flash
CS3.

Location : , Line 1
Description : 5005: Unknown error optimizing byte code.
Source :

I don't know exact reason about its generation, But here are the some
possible reasons / hints:

Case 1) Overloading:

1.1) Size of .fla is 10.5 MB and its document class contains more than
60 classes to import and has more than 100 variables.

1.2) Even if I put In document class - only variable initialization and
class importing are there. Nothing in its constructor + no other
functions are defined. Still error is there.

1.3) If we import all classes and has all variables then it gives this
compile error. But if we remove some particular numbers of variable,
it's start working. In this we can remove any type of variables.

1.4) After reducing variables, application starts working till that it
won't.

Case 2)

2.1) Size of .fla is 1.75 MB and its document class is same as above
one.

2.2) All assumptions are same as above.

2.3) Now this class contains all functions and have initialization of
all variables + classes.

2.4) In this If we remove 3-5 variables, it will start functioning else
it won't.

Its a huge application so I am even confused that what is the cause of
error and this error stopped our working for a week now. Bit more
information about the project that may help the team to identify the
reason.

1. Project development started with flash public alpha 3. When we
started using Flash CS3, we had some design problem if we do open the
FLA in CS3, so we completely redesigned the Movieclips etc., in Flash
CS3 IDE.

2. Project contains approx 250 classes.

3. In main application, it imports 67 classes. (it works if I keep 63
classes in document class).

4. In the case 3 above, if that works with 63 classes and If I do add 3
frames in existing movieclip, it stops working.

5. In the case 3 above, if that works with 63 classes and If I do add /
declare few more variables, it stops working.

It would be humble appreciation if someone can come up with some light
in the dark tunnel.


Best Regards,

Ashvin Savani - arckid
Founder  CTO - Avinashi.com
Adobe Community Expert

We Never Give Up!



___
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@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


Re: [Flashcoders] swap depths with mask

2007-07-07 Thread Pedro Kostelec

I think i have found sth useful

code

_root.createEmptyMovieClip(mascara, 3);

_root.createEmptyMovieClip(original, 2);
original.attachMovie(foto_original, foto_original, 1);

_root.createEmptyMovieClip(desenfoke, 1);
desenfoke.attachMovie(foto_desenfoke, foto_desenfoke, 1);

original.setMask(mascara);

mascara.onMouseMove = function() {
   if (dibujar) {
   datoX = mascara._xmouse;
   datoY = mascara._ymouse;
   mascara.lineStyle(0, 0x00, 100);
   mascara.beginFill(0x00);
   mascara.moveTo(datoX, datoY);
   mascara.lineTo(20+datoX, 0+datoY);
   mascara.lineTo(20+datoX, 20+datoY);
   mascara.lineTo(0+datoX, 20+datoY);
   mascara.lineTo(0+datoX, 0+datoY);
   }
};
mascara.onMouseDown = function() {
   dibujar = true;
   mascara.moveTo(mascara._xmouse, mascara._ymouse);
};
mascara.onMouseUp = function() {
   dibujar = false;
};

/code
Pedro

2007/7/6, elibol [EMAIL PROTECTED]:


Call something like this after you do the swap:

targetMC.setMask(maskMC);

This will reset the mask. Masking is tricky business. You cannot mask more
than one thing. I mention this in case you are using swapDepths to try and
cover more movieclips with your mask - it will not work... I don't think
the
depth of the mask has any impact on how it works.

You might want to consider operating the masking mechanism
programmatically
to begin with.

My summer is alright, thank you. Hope this helps.

H

On 7/5/07, Paul V. [EMAIL PROTECTED] wrote:

 Hey guys, how is the summer treating you guys?  Quick question,  I am
 running swapDepths() on a movClip and it's Mask layer. The mask doesn't
work
 after the swap and it is going to one level above the movClip.

 So if anyone can direct me to how to fix this problem specifically that
 would be great !!

 Thanks,

 Vdst.
 ___
 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@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@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] Cross Domain Policy Files

2007-07-07 Thread Paul Steven
I am trying to test calling a remote script from a flash CS3 movie and I am
getting the following error

Error opening URL
'https://dev01.maps-ict.com/services/upload/710665794/?key=keyvaluesession=
sessionvalue'
HTTPStatus: 0
IOError: Error #2032: Stream Error. URL:
https://dev01.maps-ict.com/services/upload/710665794/?key=keyvaluesession=s
essionvalue

I am testing from the flash IDE and doing a search for this error lead to me
to reading about the need for something called a cross domain policy file.

Can anyone confirm that this is indeed required for me to call a script on a
remote server from a test movie in the Flash IDE?

I had hoped to get this app up and running over the weekend and I have no
access to the remote server so I would really like to know if this is a show
stopper or not?

The script I am calling should return xml data.

Thanks in advance

Paul

___
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] SEO Question

2007-07-07 Thread Dave Mennenoh
We're developing a site in Flash - it's all Flash - one page, and I'm now 
tasked with doing some SEO work for it. I'm doing the 'standard' way of 
creating the HTML portion, for the spiders, with a div that is overwritten 
by SWFObject. Mostly all is well, ad much of my content is database driven. 
My question is in regards to the fact the Flash is all on one page - 
index.php. However, I need multiple pages in the HTML version... what's the 
best way to do this? Embed the Flash on all pages as well? Not care and just 
have multiple php/html pages? My feeling is I should have the Flash on all 
pages too, and just use a url var to bring up the correct content, if Flash 
is viewable... Just want to be sure the best route here.



Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/ 


___
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


RE: [Flashcoders] SEO Question

2007-07-07 Thread Jesse Graupmann
http://labs.blitzagency.com/?p=171 
http://labs.blitzagency.com/?p=51


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dave
Mennenoh
Sent: Saturday, July 07, 2007 10:11 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] SEO Question

We're developing a site in Flash - it's all Flash - one page, and I'm now 
tasked with doing some SEO work for it. I'm doing the 'standard' way of 
creating the HTML portion, for the spiders, with a div that is overwritten 
by SWFObject. Mostly all is well, ad much of my content is database driven. 
My question is in regards to the fact the Flash is all on one page - 
index.php. However, I need multiple pages in the HTML version... what's the 
best way to do this? Embed the Flash on all pages as well? Not care and just

have multiple php/html pages? My feeling is I should have the Flash on all 
pages too, and just use a url var to bring up the correct content, if Flash 
is viewable... Just want to be sure the best route here.


Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/ 

___
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@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] XML loading and parsing problem

2007-07-07 Thread Omar Fouad

hi,
i have the following xml lines

?xml version=1.0?
gal
   catgory
   pic link=1.jpg code=a1 /
   pic link=2.jpg code=a2/
   pic link=3.jpg code=a3/
   pic link=4.jpg code=a4/
   /catgory

/gal

and i fla i got

var mainNode:XMLNode = new XMLNode();
var gallery:XML = new XML();

gallery.onLoad = function(success) {
   if (success) {
   trace(loaded)
   fun()
   }
};
fun = function () {
   total = gallery.childNodes[0].childNodes[0].attributes.link
   trace(total)
}
gallery.load(gallery.xml);


the problem is that the trace(total) line gets me undefined... is there
something i am missing???


Best Regards..


--
Omar M. Fouad - Digital Emotions
http://www.omarfouad.net

+2010 - 2346633 - +2012 - 261
___
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] cursor question

2007-07-07 Thread Fruber Malcome
I'm not sure if anyone else responded to this, but I had a similar problem
and I thought the only workaround was setting the mouse picture for every
element that handled rollover etc.
(since if you set it for the parent, it removes all the mouse functions for
it's children) .

The easy way for me was that I created a cursor component, and then I
gotoAndPlay (actually just have external helper functions tied to it) the
frame that has the correct cursor.
One of those functions can just hide the cursor and show the mouse again -
to have a normal mouse.

I've also noticed that sometimes the rollout event is not always called
(fast mouse movement etc) -  And the window they rolled over doesn't handle
the custom mouse - so onRollOver isn't going to help.
I run the entire cursor icon through a interval hooked into mouse move, and
when the mouse doesn't move for a certain time, it just disappears. -
another way to perform this is by using a hittest every so often etc.

There are many ways to perform this task, but I've never found something
that could be self-contained.  The main problem I had was the ability to
control the mouse over a parent and still let the children receive mouse
events.
(without creating some elaborate event system)

Hope this helps..
Fruber

___
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


Re: [Flashcoders] XML loading and parsing problem

2007-07-07 Thread Muzak
coughmx.utils.Delegate/cough


- Original Message - 
From: Fruber Malcome [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Saturday, July 07, 2007 11:28 PM
Subject: [Flashcoders] XML loading and parsing problem


 The primary thing to remember is scope.
 The onLoad function is running within the xml's scope. The fun function is
 running with the scope of the parent class/object.

 The fact that fun worked and gallery didn't leads me to think that this is
 not the real code, but you are running it in a class of some sort.
 Tehnically in your code, the gallery would be global as well as fun and they
 should both work, but it sounds more likely that you created your XML object
 within the scope of a function - I'm not really sure, but here are my
 thoughts..


 I'm not sure what version of AS you are running, so there are slightly
 better ways to perform this task, but the easy way:

 Modify your onLoad to pass this on the fun function and modify the fun to
 have a xmlInfo:XML parameter:


 gallery.onLoad = function( bSuccess ) { if ( bSuccess ) fun( this ); };

 fun( xmlInfo:XML ):Void
 {
 // perform your XML stuff.
 }


 As a note, Personnaly to keep my onLoad functions short (since they are
 inline) - I like to pass the boolean to the function as well and check the
 status there (that way I could do some error handling etc. if necessary).

 Hope this helps..
 Fruber.


___
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


Re: [Flashcoders] XML loading and parsing problem

2007-07-07 Thread Omar Fouad

Fruber,
i am actually doing a simple gallery that loads pics from an XML file... in
as1 as in the project is not that complicated... that's right by the way i
found out the problem was the scope.. i'll try it and i'll tell you..

Muzak... why Delegate??

--
Omar M. Fouad - Digital Emotions
http://www.omarfouad.net

+2010 - 2346633 - +2012 - 261
___
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


Re: [Flashcoders] XML loading and parsing problem

2007-07-07 Thread Omar Fouad

Fruber this code is still not working.. :(

var xmlData:XML = new XML();

xmlData.onLoad = function (success) {
   if(success) {
   trace(xml Loaded);
   proceed(this);
   }else{
   trace(xml Not Loaded);
   }
}
xmlData.load(gallery.xml);

proceed = function (gallery:XML) {
   totalPics = gallery.childNodes[0].childNodes[0].length;
   trace(total);

}

total traces undefined

where gallery.xml is

?xml version=1.0?
gal
   catgory
   pic link=1.jpg code=a1 /
   pic link=2.jpg code=a2/
   pic link=3.jpg code=a3/
   pic link=4.jpg code=a4/
   /catgory

/gal

something else missing



--
Omar M. Fouad - Digital Emotions
http://www.omarfouad.net

+2010 - 2346633 - +2012 - 261





--
Omar M. Fouad - Digital Emotions
http://www.omarfouad.net

+2010 - 2346633 - +2012 - 261
___
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


Re: [Flashcoders] XML loading and parsing problem

2007-07-07 Thread Omar Fouad

i meant trace(totalPics); :P

--
Omar M. Fouad - Digital Emotions
http://www.omarfouad.net

+2010 - 2346633 - +2012 - 261
___
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


Re: [Flashcoders] XML loading and parsing problem

2007-07-07 Thread Claus Wahlers

import mx.utils.Delegate;

var xmlData:XML = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = Delegate.create(this, onLoadXML);
xmlData.load(gallery.xml);

function onLoadXML(success) {
   if(success) {
   trace(xml Loaded);
   proceed();
   } else {
   trace(xml Not Loaded);
   }
}

function proceed() {
   totalPics = xmlData.firstChild.firstChild.childNodes.length;
   trace(totalPics);
}

// xml Loaded
// 4

Cheers,
Claus.


Omar Fouad wrote:


Fruber this code is still not working.. :(

var xmlData:XML = new XML();

xmlData.onLoad = function (success) {
   if(success) {
   trace(xml Loaded);
   proceed(this);
   }else{
   trace(xml Not Loaded);
   }
}
xmlData.load(gallery.xml);

proceed = function (gallery:XML) {
   totalPics = gallery.childNodes[0].childNodes[0].length;
   trace(total);

}



___
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


RE: [Flashcoders] XML loading and parsing problem

2007-07-07 Thread Jesse Graupmann


Introduction to XML in Flash
http://www.kirupa.com/web/xml/index.htm



Textbook example...



xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = mx.utils.Delegate.create ( this, xml_onLoad );
xmlData.load ( gallery.xml );

function xml_onLoad  ( success:Boolean )
{
if ( success ) xml_loaded (); else trace( 'nada' );
}

function xml_loaded () 
{
var total = xmlData.firstChild.firstChild.childNodes.length;
trace ( xml_loaded :: total:  + total ); // 4
}




_

Jesse Graupmann
www.jessegraupmann.com 
www.justgooddesign.com/blog/ 
_



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Omar Fouad
Sent: Saturday, July 07, 2007 4:45 PM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] XML loading and parsing problem

something else missing

-- 
Omar M. Fouad - Digital Emotions
http://www.omarfouad.net

___
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


Re: [Flashcoders] XML loading and parsing problem

2007-07-07 Thread Omar Fouad

YESS! thanks DUDE actually it worked without delegate, when i added
ignore white...:D

On 7/8/07, Claus Wahlers [EMAIL PROTECTED] wrote:


import mx.utils.Delegate;

var xmlData:XML = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = Delegate.create(this, onLoadXML);
xmlData.load(gallery.xml);

function onLoadXML(success) {
if(success) {
trace(xml Loaded);
proceed();
} else {
trace(xml Not Loaded);
}
}

function proceed() {
totalPics = xmlData.firstChild.firstChild.childNodes.length;
trace(totalPics);
}

// xml Loaded
// 4

Cheers,
Claus.


Omar Fouad wrote:

 Fruber this code is still not working.. :(

 var xmlData:XML = new XML();

 xmlData.onLoad = function (success) {
if(success) {
trace(xml Loaded);
proceed(this);
}else{
trace(xml Not Loaded);
}
 }
 xmlData.load(gallery.xml);

 proceed = function (gallery:XML) {
totalPics = gallery.childNodes[0].childNodes[0].length;
trace(total);

 }


___
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





--
Omar M. Fouad - Digital Emotions
http://www.omarfouad.net

+2010 - 2346633 - +2012 - 261
___
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


Re: [Flashcoders] XML loading and parsing problem

2007-07-07 Thread Muzak
import mx.utils.Delegate;
var xmlData:XML;
function xmlLoadHandler(success:Boolean) {
trace(xmlLoadHandler: +success);
trace(xmlData);
if(success) {
var totalPics:Number = 
xmlData.firstChild.childNodes[0].childNodes.length;
trace(- totalPics: +totalPics);
}else{
trace(- failed to load xml data.);
}
}
xmlData= new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = Delegate.create(this, xmlLoadHandler);
xmlData.load(gallery.xml);

regards,
Muzak

- Original Message - 
From: Omar Fouad [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Sunday, July 08, 2007 1:44 AM
Subject: Re: [Flashcoders] XML loading and parsing problem


 Fruber this code is still not working.. :(

 var xmlData:XML = new XML();

 xmlData.onLoad = function (success) {
if(success) {
trace(xml Loaded);
proceed(this);
}else{
trace(xml Not Loaded);
}
 }
 xmlData.load(gallery.xml);

 proceed = function (gallery:XML) {
totalPics = gallery.childNodes[0].childNodes[0].length;
trace(total);

 }

 total traces undefined

 where gallery.xml is

 ?xml version=1.0?
 gal
catgory
pic link=1.jpg code=a1 /
pic link=2.jpg code=a2/
pic link=3.jpg code=a3/
pic link=4.jpg code=a4/
/catgory

 /gal

 something else missing


 --
 Omar M. Fouad - Digital Emotions
 http://www.omarfouad.net

 +2010 - 2346633 - +2012 - 261




 -- 
 Omar M. Fouad - Digital Emotions
 http://www.omarfouad.net

 +2010 - 2346633 - +2012 - 261
 ___
 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@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


Re: [Flashcoders] XML loading and parsing problem

2007-07-07 Thread Muzak
3 people posting similar (allmost identical) examples, all using Delegate 
should give you a clue ;-)


- Original Message - 
From: Omar Fouad [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Sunday, July 08, 2007 2:07 AM
Subject: Re: [Flashcoders] XML loading and parsing problem


 YESS! thanks DUDE actually it worked without delegate, when i added
 ignore white...:D



___
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


Re: [Flashcoders] XML loading and parsing problem

2007-07-07 Thread Omar Fouad

yeah :D

On 7/8/07, Muzak [EMAIL PROTECTED] wrote:


3 people posting similar (allmost identical) examples, all using Delegate
should give you a clue ;-)


- Original Message -
From: Omar Fouad [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Sunday, July 08, 2007 2:07 AM
Subject: Re: [Flashcoders] XML loading and parsing problem


 YESS! thanks DUDE actually it worked without delegate, when i
added
 ignore white...:D



___
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





--
Omar M. Fouad - Digital Emotions
http://www.omarfouad.net

+2010 - 2346633 - +2012 - 261
___
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


RE: [Flashcoders] XML loading and parsing problem

2007-07-07 Thread Fruber Malcome
Delegate is a better solution, Since you didn't specify nor show in the code
what version of AS you were compiling with, the first version was an AS1
soluction.

Delegate is much better, especially if you are using it within a class etc.
So if you are using AS2 or better, then that's a more clean solution.

Thanks - Fruber




-Original Message-
From: Muzak [mailto:[EMAIL PROTECTED] 
Sent: Saturday, July 07, 2007 2:53 PM
To: [EMAIL PROTECTED]; flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] XML loading and parsing problem

coughmx.utils.Delegate/cough


- Original Message -
From: Fruber Malcome [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Saturday, July 07, 2007 11:28 PM
Subject: [Flashcoders] XML loading and parsing problem


 The primary thing to remember is scope.
 The onLoad function is running within the xml's scope. The fun function is
 running with the scope of the parent class/object.

 The fact that fun worked and gallery didn't leads me to think that this is
 not the real code, but you are running it in a class of some sort.
 Tehnically in your code, the gallery would be global as well as fun and
they
 should both work, but it sounds more likely that you created your XML
object
 within the scope of a function - I'm not really sure, but here are my
 thoughts..


 I'm not sure what version of AS you are running, so there are slightly
 better ways to perform this task, but the easy way:

 Modify your onLoad to pass this on the fun function and modify the fun to
 have a xmlInfo:XML parameter:


 gallery.onLoad = function( bSuccess ) { if ( bSuccess ) fun( this ); };

 fun( xmlInfo:XML ):Void
 {
 // perform your XML stuff.
 }


 As a note, Personnaly to keep my onLoad functions short (since they are
 inline) - I like to pass the boolean to the function as well and check the
 status there (that way I could do some error handling etc. if necessary).

 Hope this helps..
 Fruber.



___
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


RE: [Flashcoders] XML loading and parsing problem

2007-07-07 Thread Fruber Malcome
Omar - also keep in mind all the solutions you are seeing make the
assumption that the xml object is global to the context, there are many
situations where you only want the xml instance to be around for a short
time and keeping it within function scope and then passing a node around or
the parsed version of it around - then you should pass the xml object to
your function, otherwise if you keep it as a class member (or global) - then
all is well.

While I'm not 100% sure, I don't think you can make the xml object within a
function scope and still use the delegate in this fashion.  In that case,
you'd need to assign the delegate.create the xml object as the context, with
the function being a class member function.  But of course the problem with
that would be you wouldn't have access to your other class members when the
function was called.

Unless someone knows of another way - only the AS1 version will allow you to
encapsulate the xml object (without having it as a class member or global).

Just a few more notes, hope all of it is helpful.

Thanks - Fruber
 

-Original Message-
From: Muzak [mailto:[EMAIL PROTECTED] 
Sent: Saturday, July 07, 2007 2:53 PM
To: [EMAIL PROTECTED]; flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] XML loading and parsing problem

coughmx.utils.Delegate/cough


- Original Message -
From: Fruber Malcome [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Saturday, July 07, 2007 11:28 PM
Subject: [Flashcoders] XML loading and parsing problem


 The primary thing to remember is scope.
 The onLoad function is running within the xml's scope. The fun function is
 running with the scope of the parent class/object.

 The fact that fun worked and gallery didn't leads me to think that this is
 not the real code, but you are running it in a class of some sort.
 Tehnically in your code, the gallery would be global as well as fun and
they
 should both work, but it sounds more likely that you created your XML
object
 within the scope of a function - I'm not really sure, but here are my
 thoughts..


 I'm not sure what version of AS you are running, so there are slightly
 better ways to perform this task, but the easy way:

 Modify your onLoad to pass this on the fun function and modify the fun to
 have a xmlInfo:XML parameter:


 gallery.onLoad = function( bSuccess ) { if ( bSuccess ) fun( this ); };

 fun( xmlInfo:XML ):Void
 {
 // perform your XML stuff.
 }


 As a note, Personnaly to keep my onLoad functions short (since they are
 inline) - I like to pass the boolean to the function as well and check the
 status there (that way I could do some error handling etc. if necessary).

 Hope this helps..
 Fruber.



___
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