Re: [Flashcoders] Make your own multiuser flash apps

2007-02-16 Thread Yehia Shouman

Great work dude

On 2/16/07, Paul Venton [EMAIL PROTECTED] wrote:


Looks good - had a quick test with a dead cat but ran out of time ... plan
on making a proper visit soon :-)


___
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] RadioButton and CheckBox

2007-02-16 Thread Alfredo Laguia

hiez

Why don´t use a radio button?

- Original Message - 
From: Laurent CUCHET [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Friday, September 29, 2006 9:10 AM
Subject: [Flashcoders]  RadioButton and CheckBox



I need a way to uncheck checkbox in this case :

3 choice : appartements , house or garage
1. appartements  1 and or 2 and or 3 and or 4 and or 5 : CheckButton and
uncheck radio button
2. house  yes or no : radioButton and uncheck checkbox
3. garage  yes or no : radioButton and uncheck checkbox

How must I do to uncheck checkbox by  clicking garage or house ?

Thank you very much.


//as2 checkbox case
function checkbox1(evt1:Object) {
   if (evt1.target.selected) {
   piec = this.label;
   typ_txt.text = appartment with +piec+ room(s).;
   trace(piec);
   con_btn._visible=1;
   }
}
cb1.addEventListener(click, checkbox1);
cb2.addEventListener(click, checkbox1);
cb3.addEventListener(click, checkbox1);
cb4.addEventListener(click, checkbox1);
cb5.addEventListener(click, checkbox1);
cb6.addEventListener(click, checkbox1);

//as2 radiobutton case
flashistListener = new Object();
flashistListener.click = function (evt){
   typ_txt.text = evt.target.selection.data
}
radioGroup.addEventListener(click, flashistListener);
___
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] Flash IDE thinks standard #include .as file is a class file

2007-02-16 Thread Mike Mountain
I've been working on an as file for some time - it's used as an
#include, it isn't a class (although it's part of a project which has
classes), just a means for me to tidy away some pretty rudimentary
timeline code from designers. Everything was working fine but now the
IDE won't validate the code - even though there's nothing wrong with it
- it keeps spitting out errors:
ActionScript 2.0 class scripts may only define class or interface
constructs.
Blah
Copy the code into a brand new as file, click the tick, works fine -
save it out with a filename, click the tick, breaks.
I've deleted my ASO files and still no joy - even if I comment out all
the code it still bloody complains.
Anyhow, anyone shed any light on this? - Or how to fix it, I think it
start when I put some imports in the file by mistake.
Cheers
M





ECM Systems Ltd, Ellifoot Park, Burstwick, East Yorkshire HU12 9DZ
Tel: 01964 672000 
Fax: 01964 671102
Registered in England no. 01646471 
The information contained within this email expresses the views of the sender 
and not necessarily those of the company. It is private and confidential and 
may be legally privileged. It is intended solely for those authorised to 
receive it. If you are not the intended recipient you are hereby notified that 
any disclosure, copying, distribution or action taken in reliance on its 
contents is strictly prohibited and may be unlawful. If you have received this 
email in error, please telephone us immediately on 01964 672000 or email a 
reply to highlight the error and then delete it from your system. This email 
may contain links to web-sites, the contents of which ECM Systems Ltd have no 
control over and can accept no responsibility for. Any attachments have been 
virus-checked before transmission; however, recipients are strongly advised to 
carry out their own virus checking as ECM Systems Ltd do not warrant that such 
attachments are virus-free. Please note that this email has been created in the 
knowledge that Internet email is not a secure communications medium. We advise 
that you understand and observe this lack of security when emailing us.

ECM Systems Ltd, Ellifoot Park, Burstwick, East Yorkshire HU12 9DZ

Tel: 01964 672000   
Fax: 01964 671102

Registered in England no. 01646471 

The information contained within this email expresses the views of the sender 
and not necessarily those of the company. 
It is private and confidential and may be legally privileged. It is intended 
solely for those authorised to receive it. If you are 
not the intended recipient you are hereby notified that any disclosure, 
copying, distribution or action taken in reliance on its 
contents is strictly prohibited and may be unlawful. If you have received this 
email in error, please telephone us immediately 
on 01964 672000 or email a reply to highlight the error and then delete it from 
your system. This email may contain links to 
web-sites, the contents of which ECM Systems Ltd have no control over and can 
accept no responsibility for. Any 
attachments have been virus-checked before transmission; however, recipients 
are strongly advised to carry out their own 
virus checking as ECM Systems Ltd do not warrant that such attachments are 
virus-free. 
Please note that this email has been created in the knowledge that Internet 
email is not a secure communications medium. 
We advise that you understand and observe this lack of security when emailing 
us.



___
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 IDE thinks standard #include .as file is a class file

2007-02-16 Thread Andrei Thomaz

is there a class with the same name of the .AS file?


[]'s
andrei


On 2/16/07, Mike Mountain [EMAIL PROTECTED] wrote:


I've been working on an as file for some time - it's used as an
#include, it isn't a class (although it's part of a project which has
classes), just a means for me to tidy away some pretty rudimentary
timeline code from designers. Everything was working fine but now the
IDE won't validate the code - even though there's nothing wrong with it
- it keeps spitting out errors:
ActionScript 2.0 class scripts may only define class or interface
constructs.
Blah
Copy the code into a brand new as file, click the tick, works fine -
save it out with a filename, click the tick, breaks.
I've deleted my ASO files and still no joy - even if I comment out all
the code it still bloody complains.
Anyhow, anyone shed any light on this? - Or how to fix it, I think it
start when I put some imports in the file by mistake.
Cheers
M





ECM Systems Ltd, Ellifoot Park, Burstwick, East Yorkshire HU12 9DZ
Tel: 01964 672000
Fax: 01964 671102
Registered in England no. 01646471
The information contained within this email expresses the views of the
sender and not necessarily those of the company. It is private and
confidential and may be legally privileged. It is intended solely for those
authorised to receive it. If you are not the intended recipient you are
hereby notified that any disclosure, copying, distribution or action taken
in reliance on its contents is strictly prohibited and may be unlawful. If
you have received this email in error, please telephone us immediately on
01964 672000 or email a reply to highlight the error and then delete it from
your system. This email may contain links to web-sites, the contents of
which ECM Systems Ltd have no control over and can accept no responsibility
for. Any attachments have been virus-checked before transmission; however,
recipients are strongly advised to carry out their own virus checking as ECM
Systems Ltd do not warrant that such attachments are virus-free. Please note
that this email has been created in the knowledge that Internet email is not
a secure communications medium. We advise that you understand and observe
this lack of security when emailing us.

ECM Systems Ltd, Ellifoot Park, Burstwick, East Yorkshire HU12 9DZ

Tel: 01964 672000
Fax: 01964 671102

Registered in England no. 01646471

The information contained within this email expresses the views of the
sender and not necessarily those of the company.
It is private and confidential and may be legally privileged. It is
intended solely for those authorised to receive it. If you are
not the intended recipient you are hereby notified that any disclosure,
copying, distribution or action taken in reliance on its
contents is strictly prohibited and may be unlawful. If you have received
this email in error, please telephone us immediately
on 01964 672000 or email a reply to highlight the error and then delete it
from your system. This email may contain links to
web-sites, the contents of which ECM Systems Ltd have no control over and
can accept no responsibility for. Any
attachments have been virus-checked before transmission; however,
recipients are strongly advised to carry out their own
virus checking as ECM Systems Ltd do not warrant that such attachments are
virus-free.
Please note that this email has been created in the knowledge that
Internet email is not a secure communications medium.
We advise that you understand and observe this lack of security when
emailing us.



___
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 IDE thinks standard #include .as file is aclass file

2007-02-16 Thread Mike Mountain
Nope, that was my initial thoughtand there never has been - doesn't
matter what I save it as now, it still breaks. 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of Andrei Thomaz
 Sent: 16 February 2007 12:06
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] Flash IDE thinks standard #include 
 .as file is aclass file
 
 is there a class with the same name of the .AS file?
 
 
 []'s
 andrei
 
 
 On 2/16/07, Mike Mountain [EMAIL PROTECTED] wrote:
 
  I've been working on an as file for some time - it's used as an 
  #include, it isn't a class (although it's part of a project 
 which has 
  classes), just a means for me to tidy away some pretty rudimentary 
  timeline code from designers. Everything was working fine 
 but now the 
  IDE won't validate the code - even though there's nothing 
 wrong with 
  it
  - it keeps spitting out errors:
  ActionScript 2.0 class scripts may only define class or interface 
  constructs.
  Blah
  Copy the code into a brand new as file, click the tick, 
 works fine - 
  save it out with a filename, click the tick, breaks.
  I've deleted my ASO files and still no joy - even if I 
 comment out all 
  the code it still bloody complains.
  Anyhow, anyone shed any light on this? - Or how to fix it, 
 I think it 
  start when I put some imports in the file by mistake.
  Cheers
  M
 
 
 
 
 
  ECM Systems Ltd, Ellifoot Park, Burstwick, East Yorkshire HU12 9DZ
  Tel: 01964 672000
  Fax: 01964 671102
  Registered in England no. 01646471
  The information contained within this email expresses the 
 views of the 
  sender and not necessarily those of the company. It is private and 
  confidential and may be legally privileged. It is intended 
 solely for 
  those authorised to receive it. If you are not the intended 
 recipient 
  you are hereby notified that any disclosure, copying, 
 distribution or 
  action taken in reliance on its contents is strictly prohibited and 
  may be unlawful. If you have received this email in error, please 
  telephone us immediately on
  01964 672000 or email a reply to highlight the error and 
 then delete 
  it from your system. This email may contain links to web-sites, the 
  contents of which ECM Systems Ltd have no control over and 
 can accept 
  no responsibility for. Any attachments have been 
 virus-checked before 
  transmission; however, recipients are strongly advised to carry out 
  their own virus checking as ECM Systems Ltd do not warrant 
 that such 
  attachments are virus-free. Please note that this email has been 
  created in the knowledge that Internet email is not a secure 
  communications medium. We advise that you understand and 
 observe this lack of security when emailing us.
 
  ECM Systems Ltd, Ellifoot Park, Burstwick, East Yorkshire HU12 9DZ
 
  Tel: 01964 672000
  Fax: 01964 671102
 
  Registered in England no. 01646471
 
  The information contained within this email expresses the 
 views of the 
  sender and not necessarily those of the company.
  It is private and confidential and may be legally privileged. It is 
  intended solely for those authorised to receive it. If you 
 are not the 
  intended recipient you are hereby notified that any disclosure, 
  copying, distribution or action taken in reliance on its 
 contents is 
  strictly prohibited and may be unlawful. If you have received this 
  email in error, please telephone us immediately on 01964 672000 or 
  email a reply to highlight the error and then delete it from your 
  system. This email may contain links to web-sites, the contents of 
  which ECM Systems Ltd have no control over and can accept no 
  responsibility for. Any attachments have been virus-checked before 
  transmission; however, recipients are strongly advised to carry out 
  their own virus checking as ECM Systems Ltd do not warrant 
 that such 
  attachments are virus-free.
  Please note that this email has been created in the knowledge that 
  Internet email is not a secure communications medium.
  We advise that you understand and observe this lack of 
 security when 
  emailing us.
 
 
 
  ___
  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
 

ECM Systems Ltd, Ellifoot Park, Burstwick, East Yorkshire HU12 9DZ

Tel: 01964 672000   
Fax: 01964 671102

Registered in England no. 01646471  

Re: [Flashcoders] Flash IDE thinks standard #include .as file is aclass file

2007-02-16 Thread Muzak
I've seen this happen when the include .as file had the same name as the fla 
it's included in.
Just a thought..

regards,
Muzak

- Original Message - 
From: Mike Mountain [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Friday, February 16, 2007 12:58 PM
Subject: [Flashcoders] Flash IDE thinks standard #include .as file is aclass 
file


I've been working on an as file for some time - it's used as an
#include, it isn't a class (although it's part of a project which has
classes), just a means for me to tidy away some pretty rudimentary
timeline code from designers. Everything was working fine but now the
IDE won't validate the code - even though there's nothing wrong with it
- it keeps spitting out errors:
ActionScript 2.0 class scripts may only define class or interface
constructs.
Blah
Copy the code into a brand new as file, click the tick, works fine -
save it out with a filename, click the tick, breaks.
I've deleted my ASO files and still no joy - even if I comment out all
the code it still bloody complains.
Anyhow, anyone shed any light on this? - Or how to fix it, I think it
start when I put some imports in the file by mistake.
Cheers
M



___
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 IDE thinks standard #include .as file is aclass file

2007-02-16 Thread [EMAIL PROTECTED]

Are you working on a LAN?
I had the same issue here, the cause was that my computer clock were 
different from the network computer clock. When I moved the files to my 
HD it worked out.




Muzak wrote:

I've seen this happen when the include .as file had the same name as the fla 
it's included in.
Just a thought..

regards,
Muzak

- Original Message - 
From: Mike Mountain [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Friday, February 16, 2007 12:58 PM
Subject: [Flashcoders] Flash IDE thinks standard #include .as file is aclass 
file


I've been working on an as file for some time - it's used as an
#include, it isn't a class (although it's part of a project which has
classes), just a means for me to tidy away some pretty rudimentary
timeline code from designers. Everything was working fine but now the
IDE won't validate the code - even though there's nothing wrong with it
- it keeps spitting out errors:
ActionScript 2.0 class scripts may only define class or interface
constructs.
Blah
Copy the code into a brand new as file, click the tick, works fine -
save it out with a filename, click the tick, breaks.
I've deleted my ASO files and still no joy - even if I comment out all
the code it still bloody complains.
Anyhow, anyone shed any light on this? - Or how to fix it, I think it
start when I put some imports in the file by mistake.
Cheers
M



___
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 Player 7 Installer?

2007-02-16 Thread Martin Jonasson

If you're using Firefox on windows this can be very useful aswell:
http://www.sephiroth.it/weblog/archives/2006/10/flash_switcher_for_firefox.php

Glen Pike skrev:

http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14266


Thuy wrote:
Does anyone have an old Flash Player installer? Flash Player 7 or 
less would be great. (I accidentally upgraded the test PC at work to 
9, which does us no good).



___
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 IDE thinks standard #include .as file is aclass file

2007-02-16 Thread Jake Prime

I seem to recall that I had this issue a while back. Turned out that
when the .as file started with a capital letter, it treated it as a
class, but when it started with a lower case letter it was fine.

I just did a simple test and this doesn't appear to always be the
case, so there must have been other contributing factors. But if yours
starts with a capital, it's worth a pop.

Jake

On 16/02/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

Are you working on a LAN?
I had the same issue here, the cause was that my computer clock were
different from the network computer clock. When I moved the files to my
HD it worked out.



Muzak wrote:
 I've seen this happen when the include .as file had the same name as the fla 
it's included in.
 Just a thought..

 regards,
 Muzak

 - Original Message -
 From: Mike Mountain [EMAIL PROTECTED]
 To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
 Sent: Friday, February 16, 2007 12:58 PM
 Subject: [Flashcoders] Flash IDE thinks standard #include .as file is 
aclass file


 I've been working on an as file for some time - it's used as an
 #include, it isn't a class (although it's part of a project which has
 classes), just a means for me to tidy away some pretty rudimentary
 timeline code from designers. Everything was working fine but now the
 IDE won't validate the code - even though there's nothing wrong with it
 - it keeps spitting out errors:
 ActionScript 2.0 class scripts may only define class or interface
 constructs.
 Blah
 Copy the code into a brand new as file, click the tick, works fine -
 save it out with a filename, click the tick, breaks.
 I've deleted my ASO files and still no joy - even if I comment out all
 the code it still bloody complains.
 Anyhow, anyone shed any light on this? - Or how to fix it, I think it
 start when I put some imports in the file by mistake.
 Cheers
 M



 ___
 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] Flash Preview Font Sharing

2007-02-16 Thread Nick Kuh
Has anyone had success at implementing runtime font sharing between swfs
when publishing from Flash Preview using AS3? I know that Flex is capable of
this but I need the library, my project needs to be designer friendly.

I've spent all morning searching the net for some info on this but haven;t
found anything that helpful.

Cheers

Nick

___
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 9 standalone - no fullscreen on Linux

2007-02-16 Thread August Gresens

Good News. Thanks for your help! - Cheers A

On 2/16/07, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:



Ran a quick test this morning...

fscommand('fullscreen', true) works as expected in the Linux version of
the
standalone player (9.0.31.0). Though I did notice that switching to
another
window seemed to kick it out of full-screen...

Cheers,
A.





|-+-
| |   [EMAIL PROTECTED]|
| |   .com  |
| |   Sent by:  |
| |   [EMAIL PROTECTED]|
| |   figleaf.com   |
| | |
| | |
| |   2007-02-15 11:28 AM   |
| |   Please respond to Flashcoders |
| |   mailing list  |
| | |
|-+-

  
|

  | 
   |
  |   To:   Flashcoders mailing list 
flashcoders@chattyfig.figleaf.com   |
  |
cc: 
 |
  |   Subject:  Re: [Flashcoders] Flash 9 standalone - no fullscreen
on Linux  |

  
|





August,

I know the standalone player has the Full Screen menu option (I think it's
the View menu). And I know that it works in Ubuntu. (The browser plugin on
the other hand does not support full-screen).

Whether you can trigger full screen (in the standalone player) from AS I'm
not certain. If no one else can jump in to confirm I'll try to give it a
go
this evening...

Cheers,
A.



___
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





--
-


August Gresens
Technical Director
Black Hammer Productions, NYC
[EMAIL PROTECTED]

-

___
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 Player 7 Installer?

2007-02-16 Thread Andy Herrman

In general, if you're looking for old versions of something I find
this site to be useful:

http://oldversion.com/

Just for future reference.

  -Andy

On 2/16/07, Martin Jonasson [EMAIL PROTECTED] wrote:

If you're using Firefox on windows this can be very useful aswell:
http://www.sephiroth.it/weblog/archives/2006/10/flash_switcher_for_firefox.php

Glen Pike skrev:
 http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14266


 Thuy wrote:
 Does anyone have an old Flash Player installer? Flash Player 7 or
 less would be great. (I accidentally upgraded the test PC at work to
 9, which does us no good).

 ___
 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] Events for custom classes?

2007-02-16 Thread Merrill, Jason
OK, I'm pretty good at Actionscript 2.0, but something I never really
understood and now need to.

Core question:  How do I make an event in a custom class, and how do I
make a listener in another class listen for the event?  

EventBroadcaster in the help docs seems to only show how to use it with
Adobe classes and components. Docs on listener are the same.  I know how
to set up listeners for other events, like keypresses and mouse
rollovers.  Easy enough.  But my problem is this (see comments in code
below):

class com.boa.projects.iqrcgenerator.components.AdminData{

private var userData:Object;

public function wsUserDataByLOB(lobDbId:Number):Void{
var getUserListResult:Object = new Object();
getUserListResult =
generatorWebService.GetUserList(lobDbId);
getUserListResult.onResult = function(oUser){
//this works fine, 
//I can capture this event result here,
//but how do I notify another class?
//also what about scope here?
//how to set userData as oUser result?
//can I fire an event in my AdminData
//class from here?
}
}

public function getUserData():Object{
//can't let user get this data
//until Webserive event is done.
return userData;
}
}

Thanks,


Jason Merrill
Bank of America 
Learning  Organizational Effectiveness
 
 
___
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] Events for custom classes?

2007-02-16 Thread Helen Triolo

Use EventDispatcher:

How: 
http://chattyfig.figleaf.com/pipermail/flashcoders/2006-February/160302.html


Why: 
http://chattyfig.figleaf.com/pipermail/flashcoders/2004-June/114320.html


found with Muzak's archive search tool: http://muzakdeezign.com/flashcoders/

Helen

Merrill, Jason wrote:


Core question:  How do I make an event in a custom class, and how do I
make a listener in another class listen for the event?  

 




___
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] OnRollOver Scrolling Text Problem

2007-02-16 Thread JOR
Your example didn't include checking the X axis so I didn't include it. 
 I've posted a revised working example along with source code here: 
http://www.jamesor.com/examples/Scroller/


I've modified my previous example to enable scrolling only when the 
mouse is within the mask area.


-- james



James O'Reilly  —  Consultant
Adobe Certified Flash Expert
http://www.jamesor.com
Design • Code • Train



JOR wrote:
If you place your contents of the movieclip so that everything is 
registered with the top left corner to 0,0 of the clip the following 
should work:


var maxMouseY:Number = mask._height;
var maxListY:Number  = maxMouseY - list._height;
onEnterFrame = function ():Void {
  if ((_ymouse  maxMouseY)  (_ymouse  0)) {
list._y = maxListY * (mask._ymouse/maxMouseY);
  }
};

Basically, I'm getting the mouse coords as a range from 0 to 1 
(mask._ymouse/maxMouseY) where the _ymouse is located within the mask 
clip.  0 being the top most pixel and 1 being the bottom most.


Once I have that I multiply it by the maximum movement (maxListY) the 
list is allowed to move to get the scroll postion.  The maximum amount 
the list is able to move is 0 for starting position and a negative 
number if it's scrolled up.  The lowest negative number allowed is 
figured by taking the mask height and subtracting the height of the list 
(mask._height - list._height).



James O'Reilly  —  Consultant
Adobe Certified Flash Expert
http://www.jamesor.com
Design • Code • Train



Omar Fouad wrote:


Hey list this is my first problem i am posting here, i hope someone could
halp me!!!

i got a movie clip with inside four Key Frames... in each Key Frame i 
got a

mask called 'mask' (a rectangle) and a masked MC called 'list'.

than in the first layer of each keyframe (which i reserved it for
actionScript only) i put the following code:

maskY = mask._y;
maskY2 = maskY+mask._height
maskX = mask._x;
maskX2 = maskX + mask._width;
var ratio = Math.round(list._height / mask._height);

onEnterFrame = function () {
  if (_ymousemaskY2  _ymousemaskY) {
  list._y = (mask._ymouse-(mask._ymouse*2))*ratio+maskY;
 }
};

it works. But it seems that the 'list' MC overscrolls as it slides up 
more

than it should do.
can someone help me please in resolving this ???

Regards...



___
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] Events for custom classes?

2007-02-16 Thread John Grden

I'm not sure if you're asking for this level of explanation or not Jason,
but this might help:

I use a BaseClass.as to extend so that I can dispatch events via
GDispatcher:

import com.blitzagency.xray.logger.XrayLog;
import com.gskinner.events.GDispatcher;
/**
* @author John Grden
*/
class com.tomsnyder.util.BaseClass {
   // Public Properties:
   public var addEventListener:Function;
   public var removeEventListener:Function;
   public var removeAllEventListeners:Function;
// Private Properties:
   private var dispatchEvent:Function;
   private var log:XrayLog;

   function BaseClass()
   {
   GDispatcher.initialize(this);
   log = new XrayLog();
   }
}

So, with this, I just create a new class that extends BaseClass, and bingo,
I have eventDispatching capabilities:

import com.tomsnyder.util.BaseClass;
/**
* @author John Grden
*/
class BaseMain extends BaseClass
{
   public static var SOMETHING_COMPLETE:String = somethingComplete;

   function BaseMain()
   {
   super();
   }
}

Now, I can just as easily add my listener from another class that has access
to BaseMain:

BaseMain.addEventListener(BaseMain.SOMETHING_COMPLETE, Delegate.create(this,
somethingCompleteHandler));

private function somethingCompleteHandler(e:Object):Void
{
   trace(log.debug(somethingCompleteHandler called, e));
}

For scope, just use mx.utils.Delegate or Steve Websters delegate

Does that help or am I missing your question?

John

On 2/16/07, Merrill, Jason [EMAIL PROTECTED] wrote:


OK, I'm pretty good at Actionscript 2.0, but something I never really
understood and now need to.

Core question:  How do I make an event in a custom class, and how do I
make a listener in another class listen for the event?

EventBroadcaster in the help docs seems to only show how to use it with
Adobe classes and components. Docs on listener are the same.  I know how
to set up listeners for other events, like keypresses and mouse
rollovers.  Easy enough.  But my problem is this (see comments in code
below):

class com.boa.projects.iqrcgenerator.components.AdminData{

private var userData:Object;

public function wsUserDataByLOB(lobDbId:Number):Void{
var getUserListResult:Object = new Object();
getUserListResult =
generatorWebService.GetUserList(lobDbId);
getUserListResult.onResult = function(oUser){
//this works fine,
//I can capture this event result here,
//but how do I notify another class?
//also what about scope here?
//how to set userData as oUser result?
//can I fire an event in my AdminData
//class from here?
}
}

public function getUserData():Object{
//can't let user get this data
//until Webserive event is done.
return userData;
}
}

Thanks,


Jason Merrill
Bank of America
Learning  Organizational Effectiveness


___
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





--
[  JPG  ]
___
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] Events for custom classes?

2007-02-16 Thread Merrill, Jason

Helen,

Great, thank you.  However, I'm a little confused on how I apply that to
my code I posted.  All the MM docs on Event Dispatcher show using it
with Adove classes or components.  And how about the scope with my
Webservice event?  That scope is outside of my custom class, so how do I
fire the event in my custom class?  I can add a property to the listener
object which is the AdminData class instance, but that seems kludgy.

Jason Merrill
Bank of America 
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Helen Triolo
Sent: Friday, February 16, 2007 10:15 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Events for custom classes?

Use EventDispatcher:

How: 
http://chattyfig.figleaf.com/pipermail/flashcoders/2006-Februa
ry/160302.html

Why: 
http://chattyfig.figleaf.com/pipermail/flashcoders/2004-June/1
14320.html

found with Muzak's archive search tool: 
http://muzakdeezign.com/flashcoders/

Helen

Merrill, Jason wrote:

Core question:  How do I make an event in a custom class, 
and how do I 
make a listener in another class listen for the event?

  



___
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] Events for custom classes?

2007-02-16 Thread John Grden

Oh and the last part, dispatching the event:

from BaseMain.as:

dispatchEvent( { type:SOMETHING_COMPLETE } );

hth,


On 2/16/07, John Grden [EMAIL PROTECTED] wrote:


I'm not sure if you're asking for this level of explanation or not Jason,
but this might help:

I use a BaseClass.as to extend so that I can dispatch events via
GDispatcher:

import com.blitzagency.xray.logger.XrayLog;
import com.gskinner.events.GDispatcher;
/**
 * @author John Grden
 */
class com.tomsnyder.util.BaseClass {
// Public Properties:
public var addEventListener:Function;
public var removeEventListener:Function;
public var removeAllEventListeners:Function;
// Private Properties:
private var dispatchEvent:Function;
private var log:XrayLog;

function BaseClass()
{
GDispatcher.initialize(this);
log = new XrayLog();
}
}

So, with this, I just create a new class that extends BaseClass, and
bingo, I have eventDispatching capabilities:

import com.tomsnyder.util.BaseClass;
/**
 * @author John Grden
 */
class BaseMain extends BaseClass
{
public static var SOMETHING_COMPLETE:String = somethingComplete;

function BaseMain()
{
super();
}
}

Now, I can just as easily add my listener from another class that has
access to BaseMain:

BaseMain.addEventListener(BaseMain.SOMETHING_COMPLETE, Delegate.create(this,
somethingCompleteHandler));

private function somethingCompleteHandler(e:Object):Void
{
trace(log.debug(somethingCompleteHandler called, e));
}

For scope, just use mx.utils.Delegate or Steve Websters delegate

Does that help or am I missing your question?

John

On 2/16/07, Merrill, Jason [EMAIL PROTECTED] wrote:

 OK, I'm pretty good at Actionscript 2.0, but something I never really
 understood and now need to.

 Core question:  How do I make an event in a custom class, and how do I
 make a listener in another class listen for the event?

 EventBroadcaster in the help docs seems to only show how to use it with
 Adobe classes and components. Docs on listener are the same.  I know how

 to set up listeners for other events, like keypresses and mouse
 rollovers.  Easy enough.  But my problem is this (see comments in code
 below):

 class com.boa.projects.iqrcgenerator.components.AdminData{

 private var userData:Object;

 public function wsUserDataByLOB(lobDbId:Number):Void{
 var getUserListResult:Object = new Object();
 getUserListResult =
 generatorWebService.GetUserList (lobDbId);
 getUserListResult.onResult = function(oUser){
 //this works fine,
 //I can capture this event result here,
 //but how do I notify another class?
 //also what about scope here?
 //how to set userData as oUser result?
 //can I fire an event in my AdminData
 //class from here?
 }
 }

 public function getUserData():Object{
 //can't let user get this data
 //until Webserive event is done.
 return userData;
 }
 }

 Thanks,


 Jason Merrill
 Bank of America
 Learning  Organizational Effectiveness


 ___
 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




--
[  JPG  ]





--
[  JPG  ]
___
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] Events for custom classes?

2007-02-16 Thread Merrill, Jason
Cool John, I'll check into this.  Thanks

Jason Merrill
Bank of America 
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of John Grden
Sent: Friday, February 16, 2007 10:17 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Events for custom classes?

I'm not sure if you're asking for this level of explanation 
or not Jason, but this might help:

I use a BaseClass.as to extend so that I can dispatch events via
GDispatcher:

import com.blitzagency.xray.logger.XrayLog;
import com.gskinner.events.GDispatcher;
/**
 * @author John Grden
 */
class com.tomsnyder.util.BaseClass {
// Public Properties:
public var addEventListener:Function;
public var removeEventListener:Function;
public var removeAllEventListeners:Function; // Private 
Properties:
private var dispatchEvent:Function;
private var log:XrayLog;

function BaseClass()
{
GDispatcher.initialize(this);
log = new XrayLog();
}
}

So, with this, I just create a new class that extends 
BaseClass, and bingo, I have eventDispatching capabilities:

import com.tomsnyder.util.BaseClass;
/**
 * @author John Grden
 */
class BaseMain extends BaseClass
{
public static var SOMETHING_COMPLETE:String = somethingComplete;

function BaseMain()
{
super();
}
}

Now, I can just as easily add my listener from another class 
that has access to BaseMain:

BaseMain.addEventListener(BaseMain.SOMETHING_COMPLETE, 
Delegate.create(this, somethingCompleteHandler));

private function somethingCompleteHandler(e:Object):Void
{
trace(log.debug(somethingCompleteHandler called, e)); }

For scope, just use mx.utils.Delegate or Steve Websters delegate

Does that help or am I missing your question?

John

On 2/16/07, Merrill, Jason [EMAIL PROTECTED] wrote:

 OK, I'm pretty good at Actionscript 2.0, but something I 
never really 
 understood and now need to.

 Core question:  How do I make an event in a custom class, 
and how do I 
 make a listener in another class listen for the event?

 EventBroadcaster in the help docs seems to only show how to use it 
 with Adobe classes and components. Docs on listener are the 
same.  I 
 know how to set up listeners for other events, like keypresses and 
 mouse rollovers.  Easy enough.  But my problem is this (see 
comments 
 in code
 below):

 class com.boa.projects.iqrcgenerator.components.AdminData{

 private var userData:Object;

 public function wsUserDataByLOB(lobDbId:Number):Void{
 var getUserListResult:Object = new Object();
 getUserListResult =
 generatorWebService.GetUserList(lobDbId);
 getUserListResult.onResult = function(oUser){
 //this works fine,
 //I can capture this event result here,
 //but how do I notify another class?
 //also what about scope here?
 //how to set userData as oUser result?
 //can I fire an event in my AdminData
 //class from here?
 }
 }

 public function getUserData():Object{
 //can't let user get this data
 //until Webserive event is done.
 return userData;
 }
 }

 Thanks,


 Jason Merrill
 Bank of America
 Learning  Organizational Effectiveness


 ___
 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




-- 
[  JPG  ]
___
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] Events for custom classes?

2007-02-16 Thread Holth, Daniel C.

Here is your code modified to use the EventDispatcher:

import mx.events.EventDispatcher; // import the event dispatcher

class com.boa.projects.iqrcgenerator.components.AdminData{
public var addEventListener:Function; // Set the functions
public var removeEventListener:Function; // Set the functions
private var dispatchEvent:Function; // Set the functions

private var userData:Object;

// I'm sure you have a different constructor, but you need
// to add that line to it if you want to use the eventdispatcher
public function AdminData(){
mx.events.EventDispatcher.initialize(this); // add this
to constructor
}

public function wsUserDataByLOB(lobDbId:Number):Void{
var getUserListResult:Object = new Object();
getUserListResult =
generatorWebService.GetUserList(lobDbId);

var r = this;  // To get this in onResult
getUserListResult.onResult = function(oUser){

r.dispatchEvent({type:eventOnResult,
user:oUser}); // Dispatch the event

}
}

// I may just take this function out all together since the
event can
// autommatically send them the data.
public function getUserData():Object{
return userData;
}
}


Then in your other class you can do something like:

//myAdminData is an instance of the class above

var r = this;
r.eventOnResult= function(evtObj:Object){
trace(user:  + evtObj.user);  // Should return the oUser
object
}
// addEventListener takes the event name, and who you want to listen
myAdminData.addEventListener(eventOnResult, r);



Does that help?  I obviously can't test the code, but I think everything
is right...  I have trouble with scope, which is why I use a lot of 'r'
values instead of 'this'... Just easier for me... Probably not a good
coding standard :)

-Dan

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: Friday, February 16, 2007 9:03 AM
To: Flashcoders mailing list
Subject: [Flashcoders] Events for custom classes?

OK, I'm pretty good at Actionscript 2.0, but something I never really
understood and now need to.

Core question:  How do I make an event in a custom class, and how do I
make a listener in another class listen for the event? 

EventBroadcaster in the help docs seems to only show how to use it with
Adobe classes and components. Docs on listener are the same.  I know how
to set up listeners for other events, like keypresses and mouse
rollovers.  Easy enough.  But my problem is this (see comments in code
below):

class com.boa.projects.iqrcgenerator.components.AdminData{

private var userData:Object;

public function wsUserDataByLOB(lobDbId:Number):Void{
var getUserListResult:Object = new Object();
getUserListResult =
generatorWebService.GetUserList(lobDbId);
getUserListResult.onResult = function(oUser){
//this works fine,
//I can capture this event result here,
//but how do I notify another class?
//also what about scope here?
//how to set userData as oUser result?
//can I fire an event in my AdminData
//class from here?
}
}

public function getUserData():Object{
//can't let user get this data
//until Webserive event is done.
return userData;
}
}

Thanks,


Jason Merrill
Bank of America
Learning  Organizational Effectiveness


___
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

This e-mail and its attachments are intended only for the use of the 
addressee(s) and may contain privileged, confidential or proprietary 
information. If you are not the intended recipient, or the employee or agent 
responsible for delivering the message to the intended recipient, you are 
hereby notified that any dissemination, distribution, displaying, copying, or 
use of this information is strictly prohibited. If you have received this 
communication in error, please inform the sender immediately and delete and 
destroy any record of this message. Thank you.
___
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

Re: [Flashcoders] Events for custom classes?

2007-02-16 Thread Helen Triolo
If you use dispatchEvent from any class, any other class that's 
listening for it can respond.  No scope issues that I can see.  I have a 
simple example of two classes talking to each other using 
EventDispatcher at http://flash-creations.com/notes/sample_emailer.php 
if you want it -- click the free download on the right.


Helen

Merrill, Jason wrote:


Helen,

Great, thank you.  However, I'm a little confused on how I apply that to
my code I posted.  All the MM docs on Event Dispatcher show using it
with Adove classes or components.  And how about the scope with my
Webservice event?  That scope is outside of my custom class, so how do I
fire the event in my custom class?  I can add a property to the listener
object which is the AdminData class instance, but that seems kludgy.

Jason Merrill
Bank of America 
Learning  Organizational Effectiveness


 



___
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] Events for custom classes?

2007-02-16 Thread Merrill, Jason
Awesome Daniel, will try that out. Thank you!!!

Jason Merrill
Bank of America 
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Holth, Daniel C.
Sent: Friday, February 16, 2007 10:36 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?


Here is your code modified to use the EventDispatcher:

import mx.events.EventDispatcher; // import the event dispatcher

class com.boa.projects.iqrcgenerator.components.AdminData{
  public var addEventListener:Function; // Set the functions
  public var removeEventListener:Function; // Set the functions
  private var dispatchEvent:Function; // Set the functions

  private var userData:Object;

  // I'm sure you have a different constructor, but you need
  // to add that line to it if you want to use the eventdispatcher
  public function AdminData(){
  mx.events.EventDispatcher.initialize(this); // 
add this to constructor
  }

  public function wsUserDataByLOB(lobDbId:Number):Void{
  var getUserListResult:Object = new Object();
  getUserListResult =
generatorWebService.GetUserList(lobDbId);

  var r = this;  // To get this in onResult
  getUserListResult.onResult = function(oUser){

  r.dispatchEvent({type:eventOnResult,
user:oUser}); // Dispatch the event
  

  }
  }


  // I may just take this function out all together since 
the event can
  // autommatically send them the data.
  public function getUserData():Object{
  return userData;
  }
}


Then in your other class you can do something like:

//myAdminData is an instance of the class above

var r = this;
r.eventOnResult= function(evtObj:Object){
  trace(user:  + evtObj.user);  // Should return the 
oUser object } // addEventListener takes the event name, and 
who you want to listen 
myAdminData.addEventListener(eventOnResult, r);



Does that help?  I obviously can't test the code, but I think 
everything is right...  I have trouble with scope, which is 
why I use a lot of 'r'
values instead of 'this'... Just easier for me... Probably 
not a good coding standard :)

-Dan

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf 
Of Merrill, Jason
Sent: Friday, February 16, 2007 9:03 AM
To: Flashcoders mailing list
Subject: [Flashcoders] Events for custom classes?

OK, I'm pretty good at Actionscript 2.0, but something I 
never really understood and now need to.

Core question:  How do I make an event in a custom class, and 
how do I make a listener in another class listen for the event? 


EventBroadcaster in the help docs seems to only show how to 
use it with Adobe classes and components. Docs on listener 
are the same.  I know how to set up listeners for other 
events, like keypresses and mouse rollovers.  Easy enough.  
But my problem is this (see comments in code
below):

class com.boa.projects.iqrcgenerator.components.AdminData{


  private var userData:Object;

  public function wsUserDataByLOB(lobDbId:Number):Void{
  var getUserListResult:Object = new Object();
  getUserListResult =
generatorWebService.GetUserList(lobDbId);
  getUserListResult.onResult = function(oUser){
  //this works fine,

  //I can capture this event result here,
  //but how do I notify another class?
  //also what about scope here?
  //how to set userData as oUser result?
  //can I fire an event in my AdminData
  //class from here?
  }
  }


  public function getUserData():Object{
  //can't let user get this data
  //until Webserive event is done.
  return userData;
  }
}

Thanks,


Jason Merrill
Bank of America

Learning  Organizational Effectiveness




___
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

This e-mail and its attachments are intended only for the use 
of the addressee(s) and may contain privileged, confidential 
or proprietary information. If you are not the intended 
recipient, or the employee or agent responsible for 
delivering the message to the intended recipient, you are 
hereby notified that any dissemination, distribution, 
displaying, copying, or use of this information is strictly 
prohibited. If you have received this communication in error, 
please inform the sender immediately and delete and destroy 
any record of this message. Thank you.

[Flashcoders] problem with fl9 beta

2007-02-16 Thread Gustavo Duenas
Hi, Ive been doing some experiments (some dumb ones) with the beta of  
flash 9 from adobe labs and I just run this code, something happens,  
maybe its me, but is some basic code. it shouldn't happened that way.
and other issue with this is that the beta doesn't have the check  
code able, so I don't know if I writing this bad or not.



this is the code.:



stop();
this.onRollOver = function(){
this._rotation--;
}


and this is the message.


**Error** frame1 : Line 5, Column 1 : [Compiler] Error #1087: Syntax  
error: extra characters found after end of program.

}
ReferenceError: Error #1065: Variable  
Timeline1_3526e27cbdd211dbb7a6016cb38e89c is not defined.


ReferenceError: Error #1065: Variable  
Timeline0_3526c86ebdd211dbb7a6016cb38e89c is not defined.






Gustavo Duenas

___
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] Events for custom classes?

2007-02-16 Thread Alain Rousseau
Also if you want to create your own onResult Event (it's not a real event)
you can do this without EventDispatcher or listeners :

class com.boa.projects.iqrcgenerator.components.AdminData{

public var onResult:Function;
private var userData:Object;

public function wsUserDataByLOB(lobDbId:Number):Void{
var getUserListResult:Object = new Object();
getUserListResult =generatorWebService.GetUserList(lobDbId);
getUserListResult.onResult = Delegate.create(this,
resultHandler);
}

private function resultHandler(oUser:object) {
// handle the data however you want ..
// now trigger the onResult method
this.onResult(oUser);
}

//... the rest of your class below 
}

Now in another class where you import AdminData with say an instance called
admData :

var admData:AdminData = new AdminData();
admData.onResult = function(oUser) {
// your code handling here
}




As for a method with EventDispatcher, you'll find pretty much what you need
with what the others gave you ! :)

HTH !

Alain
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: 16 février 2007 10:03
To: Flashcoders mailing list
Subject: [Flashcoders] Events for custom classes?

OK, I'm pretty good at Actionscript 2.0, but something I never really
understood and now need to.

Core question:  How do I make an event in a custom class, and how do I make
a listener in another class listen for the event?  

EventBroadcaster in the help docs seems to only show how to use it with
Adobe classes and components. Docs on listener are the same.  I know how to
set up listeners for other events, like keypresses and mouse rollovers.
Easy enough.  But my problem is this (see comments in code
below):

class com.boa.projects.iqrcgenerator.components.AdminData{

private var userData:Object;

public function wsUserDataByLOB(lobDbId:Number):Void{
var getUserListResult:Object = new Object();
getUserListResult =
generatorWebService.GetUserList(lobDbId);
getUserListResult.onResult = function(oUser){
//this works fine, 
//I can capture this event result here,
//but how do I notify another class?
//also what about scope here?
//how to set userData as oUser result?
//can I fire an event in my AdminData
//class from here?
}
}

public function getUserData():Object{
//can't let user get this data
//until Webserive event is done.
return userData;
}
}

Thanks,


Jason Merrill
Bank of America
Learning  Organizational Effectiveness
 
 
___
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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.412 / Virus Database: 268.18.0/689 - Release Date: 2007-02-15
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.412 / Virus Database: 268.18.0/689 - Release Date: 2007-02-15
 

___
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 Player 7 Installer?

2007-02-16 Thread Thomas Fowler

There's another utility in the same vein as Sephiroth's extension:

http://www.pluginswitcher.de/download/index.html

I find this one to be a little richer in features...

- Original Message -
From: Martin Jonasson [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Friday, February 16, 2007 6:59 AM
Subject: Re: [Flashcoders] Flash Player 7 Installer?


If you're using Firefox on windows this can be very useful aswell:
http://www.sephiroth.it/weblog/archives/2006/10/flash_switcher_for_firefox.php

Glen Pike skrev:

http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14266


Thuy wrote:
Does anyone have an old Flash Player installer? Flash Player 7 or less 
would be great. (I accidentally upgraded the test PC at work to 9, which 
does us no good).



___
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] Re: Flash Player 7 Installer?

2007-02-16 Thread Thuy
Glen, Martin  Andy: Thanks for the links and tools. Testing won't be 
such a pain next time.


Thuy Nguyen
Web Designer
Angus Journal
816.383.5228

___
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] Events for custom classes?

2007-02-16 Thread Merrill, Jason
Very cool Alain, thank you.

Jason Merrill
Bank of America 
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Alain Rousseau
Sent: Friday, February 16, 2007 11:00 AM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Events for custom classes?

Also if you want to create your own onResult Event (it's 
not a real event) you can do this without EventDispatcher or 
listeners :

class com.boa.projects.iqrcgenerator.components.AdminData{

  public var onResult:Function;
  private var userData:Object;
  
  public function wsUserDataByLOB(lobDbId:Number):Void{
  var getUserListResult:Object = new Object();
  getUserListResult 
=generatorWebService.GetUserList(lobDbId);
  getUserListResult.onResult = 
Delegate.create(this, resultHandler);
  }

  private function resultHandler(oUser:object) {
  // handle the data however you want ..
  // now trigger the onResult method
  this.onResult(oUser);
  }

  //... the rest of your class below
}

Now in another class where you import AdminData with say an 
instance called admData :

var admData:AdminData = new AdminData(); admData.onResult = 
function(oUser) {
  // your code handling here
}




As for a method with EventDispatcher, you'll find pretty much 
what you need with what the others gave you ! :)

HTH !

Alain
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf 
Of Merrill, Jason
Sent: 16 février 2007 10:03
To: Flashcoders mailing list
Subject: [Flashcoders] Events for custom classes?

OK, I'm pretty good at Actionscript 2.0, but something I 
never really understood and now need to.

Core question:  How do I make an event in a custom class, and 
how do I make a listener in another class listen for the event?  

EventBroadcaster in the help docs seems to only show how to 
use it with Adobe classes and components. Docs on listener 
are the same.  I know how to set up listeners for other 
events, like keypresses and mouse rollovers.
Easy enough.  But my problem is this (see comments in code
below):

class com.boa.projects.iqrcgenerator.components.AdminData{
  
  private var userData:Object;

  public function wsUserDataByLOB(lobDbId:Number):Void{
  var getUserListResult:Object = new Object();
  getUserListResult =
generatorWebService.GetUserList(lobDbId);
  getUserListResult.onResult = function(oUser){
  //this works fine, 
  //I can capture this event result here,
  //but how do I notify another class?
  //also what about scope here?
  //how to set userData as oUser result?
  //can I fire an event in my AdminData
  //class from here?
  }
  }
  
  public function getUserData():Object{
  //can't let user get this data
  //until Webserive event is done.
  return userData;
  }
}

Thanks,


Jason Merrill
Bank of America
Learning  Organizational Effectiveness
 
 
___
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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.412 / Virus Database: 268.18.0/689 - Release 
Date: 2007-02-15
 

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.412 / Virus Database: 268.18.0/689 - Release 
Date: 2007-02-15
 

___
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 9 standalone - no fullscreen on Linux

2007-02-16 Thread Hairy Dog Digital
 fscommand('fullscreen', true) works as expected in the Linux version 
 of the standalone player (9.0.31.0). Though I did notice that switching 
 to another window seemed to kick it out of full-screen...

Out of curiousity, if you then switch back to the flash player, does it
return to full-screen mode?


___
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] AS3 and streaming timeline sounds

2007-02-16 Thread Andy Makely

We have an AS3 project, which requires a long sound to be strictly synced to
the animation.  We build the assets SWF using Flash 8, then embed the assets
via AS3 and do the usual MXMLC compile to build.

If there is a movieclip asset that has a sound on the timeline, and that
sound is set to STREAM, the movieclip does not display.  Switch that sound
to EVENT, and everything works, though the sound gets out of sync
eventually.

Does AS3 break timeline-streamed sounds?


--
andy makely
___
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] OnRollOver Scrolling Text Problem

2007-02-16 Thread Omar Fouad

thanks so much

On 2/16/07, JOR [EMAIL PROTECTED] wrote:


Your example didn't include checking the X axis so I didn't include it.
I've posted a revised working example along with source code here:
http://www.jamesor.com/examples/Scroller/

I've modified my previous example to enable scrolling only when the
mouse is within the mask area.

-- james



James O'Reilly  —  Consultant
Adobe Certified Flash Expert
http://www.jamesor.com
Design • Code • Train



JOR wrote:
 If you place your contents of the movieclip so that everything is
 registered with the top left corner to 0,0 of the clip the following
 should work:

 var maxMouseY:Number = mask._height;
 var maxListY:Number  = maxMouseY - list._height;
 onEnterFrame = function ():Void {
   if ((_ymouse  maxMouseY)  (_ymouse  0)) {
 list._y = maxListY * (mask._ymouse/maxMouseY);
   }
 };

 Basically, I'm getting the mouse coords as a range from 0 to 1
 (mask._ymouse/maxMouseY) where the _ymouse is located within the mask
 clip.  0 being the top most pixel and 1 being the bottom most.

 Once I have that I multiply it by the maximum movement (maxListY) the
 list is allowed to move to get the scroll postion.  The maximum amount
 the list is able to move is 0 for starting position and a negative
 number if it's scrolled up.  The lowest negative number allowed is
 figured by taking the mask height and subtracting the height of the list
 (mask._height - list._height).


 James O'Reilly  —  Consultant
 Adobe Certified Flash Expert
 http://www.jamesor.com
 Design • Code • Train



 Omar Fouad wrote:

 Hey list this is my first problem i am posting here, i hope someone
could
 halp me!!!

 i got a movie clip with inside four Key Frames... in each Key Frame i
 got a
 mask called 'mask' (a rectangle) and a masked MC called 'list'.

 than in the first layer of each keyframe (which i reserved it for
 actionScript only) i put the following code:

 maskY = mask._y;
 maskY2 = maskY+mask._height
 maskX = mask._x;
 maskX2 = maskX + mask._width;
 var ratio = Math.round(list._height / mask._height);

 onEnterFrame = function () {
   if (_ymousemaskY2  _ymousemaskY) {
   list._y = (mask._ymouse-(mask._ymouse*2))*ratio+maskY;
  }
 };

 it works. But it seems that the 'list' MC overscrolls as it slides up
 more
 than it should do.
 can someone help me please in resolving this ???

 Regards...


 ___
 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





--
Omar Fouad - Digital Emotions...

Love is always patient and kind. It is never jealous. Love is never boastful
nor conceited It is never rude or selfish. It does not take offense and is
not resentful. Love takes no pleasure in other people's sins...but delights
in the truth. It is always ready to excuse, to trust, to hope... and to
endure... whatever comes.
___
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] Full-time position in NYC for AS Developer

2007-02-16 Thread me myself

Hi. I'm the lead AS Developer at a company that is deeply hooked into the
music and entertainment industries. We're doing some cutting-edge stuff with
Flash and social networks, and we need another good AS person.

We offer a competitive salary, equity, an intellectually-stimulating and
creative environment -- with plenty of possibilities for employees to
innovate. We're also a laid-back group of guys who like to laugh while we
work.

Please send resumes an inquiries to...

Marcus Geduld
Senior Flash and UI Developer, Nabbr.biz
[EMAIL PROTECTED]
___
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] (no subject)

2007-02-16 Thread Gustavo Duenas
hi, I'm doing something pretty simple, I have a movie clipo which  
starts drag, I'd like to move this in the x axis, but I don't know  
how to program this to launch an event if the x axis is positive and  
other is the x axis is negative,
or simpler how can I trigger an event is the movie clip is moving  
right and trigger other event is the movieClip is moving left

any ideas?


so far I'm using this.


var xright = this._x+1;
var xleft = this._x-1;

if (this._x==xright){
launching
}
if(this._x==xleft){
launching2
}





Gustavo Duenas

___
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: for...in property access replacement in AS3?

2007-02-16 Thread Matt Garland

Thanks Mike, you are the man.

I didn't use setPropertyIsEnumerable, because adding that for every  
property would be as much typing as writing a custom conversion  
function.


But describeType, that's the trick. It converts class info into XML.  
Info is easily accessible with EX4 syntax, one of the many things  
that makes AS3 a joy.


Message: 17
Date: Thu, 15 Feb 2007 21:24:28 -0800
From: T. Michael Keesey [EMAIL PROTECTED]
Subject: Re: [Flashcoders] for...in property access replacement in
AS3?
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Message-ID:
[EMAIL PROTECTED]
Content-Type: text/plain; charset=UTF-8; format=flowed

You can use Object.setPropertyisEnumerable(propName).

flash.utils.describeType() might be another way.

--
Mike Keesey

On 2/15/07, Matt Garland [EMAIL PROTECTED] wrote:


Hi,

I'm converting some AS2 code to AS3. The code manipulates several
big, complicated data containers to produce an animation.

In AS2, the data container was a vanilla object. In AS3, for
performance gains, I turned these containers into several classes.

The problem is, at various points, I am transferring all the values
from one container to another. The variables have the same names, but
the data containers are different. For instance, in the first
container, there are points. In the second container,the
corresponding points are actually a subclass of points, one with more
properties.

Before, I could just lay the two containers side by side, then use
recursive for...in loops to transfer all the values. But for...in
loops don't work for class instances in AS3. Class info is baked into
the compiled class, and no longer stored in a memory- and cycle-
wasting object hash.

What to do?

Anyway I can access the compiled class info (looping through a
class's properties), or is that contra the entire point of AS3?

Save me from writing a long, convoluted one-off conversion function.

Thanks

Matt


___
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: for...in property access replacement in AS3?

2007-02-16 Thread eka

Hello :)

my article about the for..in enumeration in AS3 vs AS2 in french ...

http://www.ekameleon.net/blog/index.php?2007/01/30/60-as2-vs-as3-enumerations-avec-un-forin

but you can Bablefish or google translator to translate the article and the
ActionScript is ActionScript :)

You must use a dynamic class to enumerate the content with for..in and not
use public var declaration of the properties !

EKA+ :)

2007/2/16, Matt Garland [EMAIL PROTECTED]:


Thanks Mike, you are the man.

I didn't use setPropertyIsEnumerable, because adding that for every
property would be as much typing as writing a custom conversion
function.

But describeType, that's the trick. It converts class info into XML.
Info is easily accessible with EX4 syntax, one of the many things
that makes AS3 a joy.

Message: 17
Date: Thu, 15 Feb 2007 21:24:28 -0800
From: T. Michael Keesey [EMAIL PROTECTED]
Subject: Re: [Flashcoders] for...in property access replacement in
AS3?
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Message-ID:
[EMAIL PROTECTED]
Content-Type: text/plain; charset=UTF-8; format=flowed

You can use Object.setPropertyisEnumerable(propName).

flash.utils.describeType() might be another way.

--
Mike Keesey

On 2/15/07, Matt Garland [EMAIL PROTECTED] wrote:

 Hi,

 I'm converting some AS2 code to AS3. The code manipulates several
 big, complicated data containers to produce an animation.

 In AS2, the data container was a vanilla object. In AS3, for
 performance gains, I turned these containers into several classes.

 The problem is, at various points, I am transferring all the values
 from one container to another. The variables have the same names, but
 the data containers are different. For instance, in the first
 container, there are points. In the second container,the
 corresponding points are actually a subclass of points, one with more
 properties.

 Before, I could just lay the two containers side by side, then use
 recursive for...in loops to transfer all the values. But for...in
 loops don't work for class instances in AS3. Class info is baked into
 the compiled class, and no longer stored in a memory- and cycle-
 wasting object hash.

 What to do?

 Anyway I can access the compiled class info (looping through a
 class's properties), or is that contra the entire point of AS3?

 Save me from writing a long, convoluted one-off conversion function.

 Thanks

 Matt

___
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] Re: Flash Player 7 Installer?

2007-02-16 Thread Thuy
I must've missed your reply earlier - thanks for the link, I can't wait 
to try all this stuff out!


--
Thuy Nguyen
Web Designer
Angus Journal
816.383.5228

___
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 Player 7 Installer?

2007-02-16 Thread T. Michael Keesey

On 2/16/07, Thomas Fowler [EMAIL PROTECTED] wrote:

There's another utility in the same vein as Sephiroth's extension:

http://www.pluginswitcher.de/download/index.html

I find this one to be a little richer in features...


Wow, nice!!!

--
Mike Keesey
___
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] help

2007-02-16 Thread Gustavo Duenas
Hi, I need desperately some help...how can I detect if some dragged  
object is moving right or left.
Because I need to trigger some event when its moving right and other  
when it is moving left.


so far I'm trying to use this, but it appears to be useless.


this is the code inside the object which is dragged.


var xright = this._x+1;
var xleft = this._x-1;

if (this._x==xright){
launching
}
if(this._x==xleft){
launching2
}




regards



Gustavo Duenas

___
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] (no subject)

2007-02-16 Thread Holth, Daniel C.

You need to keep track of the previous x value and compare that to the
new x value. The simplest way to achieve this is an onEnterFrame
function (although note this is the least efficient way).

For example try putting a movie clip called ball_mc on your stage and
add this code to the first frame, run it and try dragging the movie clip
around.

var oldX:Number = ball_mc._x;

onEnterFrame = function(){
if(ball_mc._x  oldX){
trace(is moving right);
} else if (ball_mc._x  oldX){
trace(is moving left);
} else {
trace(not moving along x axis);
}
oldX = ball_mc._x;
}


ball_mc.onPress = startDrag;
ball_mc.onRelease = stopDrag;

Hope that helps!
-Dan

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gustavo
Duenas
Sent: Friday, February 16, 2007 11:42 AM
To: Flashcoders mailing list
Subject: [Flashcoders] (no subject)

hi, I'm doing something pretty simple, I have a movie clipo which 
starts drag, I'd like to move this in the x axis, but I don't know 
how to program this to launch an event if the x axis is positive and 
other is the x axis is negative,
or simpler how can I trigger an event is the movie clip is moving 
right and trigger other event is the movieClip is moving left
any ideas?


so far I'm using this.


var xright = this._x+1;
var xleft = this._x-1;

if (this._x==xright){
launching
}
if(this._x==xleft){
launching2
}





Gustavo Duenas

___
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

This e-mail and its attachments are intended only for the use of the 
addressee(s) and may contain privileged, confidential or proprietary 
information. If you are not the intended recipient, or the employee or agent 
responsible for delivering the message to the intended recipient, you are 
hereby notified that any dissemination, distribution, displaying, copying, or 
use of this information is strictly prohibited. If you have received this 
communication in error, please inform the sender immediately and delete and 
destroy any record of this message. Thank you.
___
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] help

2007-02-16 Thread LMSpam

it's usually a safer bet to use  or  rather than ==


On Feb 16, 2007, at 1:48 PM, Gustavo Duenas wrote:

Hi, I need desperately some help...how can I detect if some dragged  
object is moving right or left.
Because I need to trigger some event when its moving right and  
other when it is moving left.


so far I'm trying to use this, but it appears to be useless.


this is the code inside the object which is dragged.


var xright = this._x+1;
var xleft = this._x-1;

if (this._x==xright){
launching
}
if(this._x==xleft){
launching2
}




regards



Gustavo Duenas

___
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] help

2007-02-16 Thread Patrick Matte | BLITZ
function onEnterFrame(){
var delta:Number = mc._x - oldX;
if(delta0){
launching;
}
if(delta0){
launching2;
}
oldX = mc._x;
}

BLITZ | Patrick Matte - 310-551-0200 x214

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gustavo
Duenas
Sent: Friday, February 16, 2007 10:48 AM
To: Flashcoders mailing list
Subject: [Flashcoders] help

Hi, I need desperately some help...how can I detect if some dragged  
object is moving right or left.
Because I need to trigger some event when its moving right and other  
when it is moving left.

so far I'm trying to use this, but it appears to be useless.


this is the code inside the object which is dragged.


var xright = this._x+1;
var xleft = this._x-1;

if (this._x==xright){
launching
}
if(this._x==xleft){
launching2
}




regards



Gustavo Duenas

___
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] help

2007-02-16 Thread Gustavo Duenas

Thanks issue resolved...Thanks Man.

On Feb 16, 2007, at 1:55 PM, [EMAIL PROTECTED] wrote:


it's usually a safer bet to use  or  rather than ==


On Feb 16, 2007, at 1:48 PM, Gustavo Duenas wrote:

Hi, I need desperately some help...how can I detect if some  
dragged object is moving right or left.
Because I need to trigger some event when its moving right and  
other when it is moving left.


so far I'm trying to use this, but it appears to be useless.


this is the code inside the object which is dragged.


var xright = this._x+1;
var xleft = this._x-1;

if (this._x==xright){
launching
}
if(this._x==xleft){
launching2
}




regards



Gustavo Duenas

___
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



Gustavo Duenas
Creative Director
LEFT AND RIGHT SOLUTIONS LLC
1225 w. Beaver St. suite 119
Jacksonville, FL 32204
904 . 2650330
www.leftandrightsolutions.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] Events for custom classes?

2007-02-16 Thread Merrill, Jason
Daniel, try as I may, I can't get your code to work.  I have one class,
which has a combobox.  I can get the event to fire when the combobox
changes just fine, but I can't get it to hear the firing of the data
capture from the webservice in the other class.

So basically, in pseudocode, I need to do this:

class A{
make comboBox
make datagrid
when comboBox changes, use Class B
to get data from webservice
when webservice result received, 
update datagrid with new data

}

class B{
connect to webservice   
when requested, return data to requesting class
}

Reason I want these two classes to be separate is because I want other
classes to call Class B to get data as well.  So, I can do all of those
things just fine, they are all working, except for the last part, when
requested, return data to requesting class - I figure since the
webservice is asynchronous, I need to capture the received event, which
is fine, I can do, that works.  But I need to tell Class A to update the
datagrid with the new data when it gets it from Class B - so an event
model is required.  

in your code, you have a var r in both the Class A and Class B - I'm
confused about that.  Thanks for any help.


Jason Merrill
Bank of America 
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Holth, Daniel C.
Sent: Friday, February 16, 2007 10:36 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?


Here is your code modified to use the EventDispatcher:

import mx.events.EventDispatcher; // import the event dispatcher

class com.boa.projects.iqrcgenerator.components.AdminData{
  public var addEventListener:Function; // Set the functions
  public var removeEventListener:Function; // Set the functions
  private var dispatchEvent:Function; // Set the functions

  private var userData:Object;

  // I'm sure you have a different constructor, but you need
  // to add that line to it if you want to use the eventdispatcher
  public function AdminData(){
  mx.events.EventDispatcher.initialize(this); // 
add this to constructor
  }

  public function wsUserDataByLOB(lobDbId:Number):Void{
  var getUserListResult:Object = new Object();
  getUserListResult =
generatorWebService.GetUserList(lobDbId);

  var r = this;  // To get this in onResult
  getUserListResult.onResult = function(oUser){

  r.dispatchEvent({type:eventOnResult,
user:oUser}); // Dispatch the event
  

  }
  }


  // I may just take this function out all together since 
the event can
  // autommatically send them the data.
  public function getUserData():Object{
  return userData;
  }
}


Then in your other class you can do something like:

//myAdminData is an instance of the class above

var r = this;
r.eventOnResult= function(evtObj:Object){
  trace(user:  + evtObj.user);  // Should return the 
oUser object } // addEventListener takes the event name, and 
who you want to listen 
myAdminData.addEventListener(eventOnResult, r);



Does that help?  I obviously can't test the code, but I think 
everything is right...  I have trouble with scope, which is 
why I use a lot of 'r'
values instead of 'this'... Just easier for me... Probably 
not a good coding standard :)

-Dan

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf 
Of Merrill, Jason
Sent: Friday, February 16, 2007 9:03 AM
To: Flashcoders mailing list
Subject: [Flashcoders] Events for custom classes?

OK, I'm pretty good at Actionscript 2.0, but something I 
never really understood and now need to.

Core question:  How do I make an event in a custom class, and 
how do I make a listener in another class listen for the event? 


EventBroadcaster in the help docs seems to only show how to 
use it with Adobe classes and components. Docs on listener 
are the same.  I know how to set up listeners for other 
events, like keypresses and mouse rollovers.  Easy enough.  
But my problem is this (see comments in code
below):

class com.boa.projects.iqrcgenerator.components.AdminData{


  private var userData:Object;

  public function wsUserDataByLOB(lobDbId:Number):Void{
  var getUserListResult:Object = new Object();
  getUserListResult =
generatorWebService.GetUserList(lobDbId);
  getUserListResult.onResult = function(oUser){
  //this works fine,

  //I can capture this event result here,
  //but how do I notify another class?
  //also what about scope here?
  //how to set userData as oUser result?
  //can I fire an event in my AdminData
  //class from 

Re: [Flashcoders] Events for custom classes?

2007-02-16 Thread Matthew Ganz
do you have a reference to the class that is broadcasting the event in the 
class that's listening for the event?


meaning, when you write your addEventListener in your Receiving class, you 
should have:


referenceToBroadcastingClass.addEventListener(myEvent,myHandler);
- Original Message - 
From: Merrill, Jason [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Friday, February 16, 2007 2:35 PM
Subject: RE: [Flashcoders] Events for custom classes?



Daniel, try as I may, I can't get your code to work.  I have one class,
which has a combobox.  I can get the event to fire when the combobox
changes just fine, but I can't get it to hear the firing of the data
capture from the webservice in the other class.

So basically, in pseudocode, I need to do this:

class A{
make comboBox
make datagrid
when comboBox changes, use Class B
to get data from webservice
when webservice result received,
   update datagrid with new data

}

class B{
connect to webservice
when requested, return data to requesting class
}

Reason I want these two classes to be separate is because I want other
classes to call Class B to get data as well.  So, I can do all of those
things just fine, they are all working, except for the last part, when
requested, return data to requesting class - I figure since the
webservice is asynchronous, I need to capture the received event, which
is fine, I can do, that works.  But I need to tell Class A to update the
datagrid with the new data when it gets it from Class B - so an event
model is required.

in your code, you have a var r in both the Class A and Class B - I'm
confused about that.  Thanks for any help.


Jason Merrill
Bank of America
Learning  Organizational Effectiveness








-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Holth, Daniel C.
Sent: Friday, February 16, 2007 10:36 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?


Here is your code modified to use the EventDispatcher:

import mx.events.EventDispatcher; // import the event dispatcher

class com.boa.projects.iqrcgenerator.components.AdminData{
public var addEventListener:Function; // Set the functions
public var removeEventListener:Function; // Set the functions
private var dispatchEvent:Function; // Set the functions

private var userData:Object;

// I'm sure you have a different constructor, but you need
// to add that line to it if you want to use the eventdispatcher
public function AdminData(){
mx.events.EventDispatcher.initialize(this); //
add this to constructor
}

public function wsUserDataByLOB(lobDbId:Number):Void{
var getUserListResult:Object = new Object();
getUserListResult =
generatorWebService.GetUserList(lobDbId);

var r = this;  // To get this in onResult
getUserListResult.onResult = function(oUser){

r.dispatchEvent({type:eventOnResult,
user:oUser}); // Dispatch the event


}
}


// I may just take this function out all together since
the event can
// autommatically send them the data.
public function getUserData():Object{
return userData;
}
}


Then in your other class you can do something like:

//myAdminData is an instance of the class above

var r = this;
r.eventOnResult= function(evtObj:Object){
trace(user:  + evtObj.user);  // Should return the
oUser object } // addEventListener takes the event name, and
who you want to listen
myAdminData.addEventListener(eventOnResult, r);



Does that help?  I obviously can't test the code, but I think
everything is right...  I have trouble with scope, which is
why I use a lot of 'r'
values instead of 'this'... Just easier for me... Probably
not a good coding standard :)

-Dan

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Merrill, Jason
Sent: Friday, February 16, 2007 9:03 AM
To: Flashcoders mailing list
Subject: [Flashcoders] Events for custom classes?

OK, I'm pretty good at Actionscript 2.0, but something I
never really understood and now need to.

Core question:  How do I make an event in a custom class, and
how do I make a listener in another class listen for the event?


EventBroadcaster in the help docs seems to only show how to
use it with Adobe classes and components. Docs on listener
are the same.  I know how to set up listeners for other
events, like keypresses and mouse rollovers.  Easy enough.
But my problem is this (see comments in code
below):

class com.boa.projects.iqrcgenerator.components.AdminData{


private var userData:Object;

public function wsUserDataByLOB(lobDbId:Number):Void{
var getUserListResult:Object = new Object();
getUserListResult =
generatorWebService.GetUserList(lobDbId);
getUserListResult.onResult = function(oUser){
//this works fine,

//I can capture this event result here,
//but how do I notify another class?
//also what about scope here?
//how to set userData as oUser result?
//can I fire an event in my AdminData
//class from here?
}
}


public function 

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Alain Rousseau
Jason,

So if I understand clearly what you want to do is :

From Class A : (pseudo code following)

class ClassA {
private var instClassB:ClassB;
make comboBox
make datagrid
function ClassA() {
instClassB = new ClassB();
comboBox.onChange = Delegate.create(this, cbChangeHandler);
instClassB.addEventListener(webServiceResult, this);
}

function cbChangeHandler(e){
instClassB.getWSdata(e.value);
}

function webServiceResult(evtObj:Object) {
update datagrid with evtObj.newData
}

}

class ClassB {
Decorate with EventDispatcher methods
dispatchEvent, addEventListener, removeEventListener

function ClassB() {
EventDispatcher.initialize(this);
}

function getWSdata(val) {
get data from web service
wsInstance.onResult = Delegate.create(this,
wsResulthandler);
}

function wsResulthandler(data) {
this.dispatchEvent({type:webServiceResult, newData:data})
// add anything you want to pass in the object
}
}

Now you have them both communication the way you want

Have fun !

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: 16 février 2007 14:36
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?

Daniel, try as I may, I can't get your code to work.  I have one class,
which has a combobox.  I can get the event to fire when the combobox changes
just fine, but I can't get it to hear the firing of the data capture from
the webservice in the other class.

So basically, in pseudocode, I need to do this:

class A{
make comboBox
make datagrid
when comboBox changes, use Class B
to get data from webservice
when webservice result received, 
update datagrid with new data

}

class B{
connect to webservice   
when requested, return data to requesting class }

Reason I want these two classes to be separate is because I want other
classes to call Class B to get data as well.  So, I can do all of those
things just fine, they are all working, except for the last part, when
requested, return data to requesting class - I figure since the webservice
is asynchronous, I need to capture the received event, which is fine, I can
do, that works.  But I need to tell Class A to update the datagrid with the
new data when it gets it from Class B - so an event model is required.  

in your code, you have a var r in both the Class A and Class B - I'm
confused about that.  Thanks for any help.


Jason Merrill
Bank of America
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Holth, 
Daniel C.
Sent: Friday, February 16, 2007 10:36 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?


Here is your code modified to use the EventDispatcher:

import mx.events.EventDispatcher; // import the event dispatcher

class com.boa.projects.iqrcgenerator.components.AdminData{
  public var addEventListener:Function; // Set the functions
  public var removeEventListener:Function; // Set the functions
  private var dispatchEvent:Function; // Set the functions

  private var userData:Object;

  // I'm sure you have a different constructor, but you need
  // to add that line to it if you want to use the eventdispatcher
  public function AdminData(){
  mx.events.EventDispatcher.initialize(this); // add this to 
constructor
  }

  public function wsUserDataByLOB(lobDbId:Number):Void{
  var getUserListResult:Object = new Object();
  getUserListResult =
generatorWebService.GetUserList(lobDbId);

  var r = this;  // To get this in onResult
  getUserListResult.onResult = function(oUser){

  r.dispatchEvent({type:eventOnResult,
user:oUser}); // Dispatch the event
  

  }
  }


  // I may just take this function out all together since the event
can
  // autommatically send them the data.
  public function getUserData():Object{
  return userData;
  }
}


Then in your other class you can do something like:

//myAdminData is an instance of the class above

var r = this;
r.eventOnResult= function(evtObj:Object){
  trace(user:  + evtObj.user);  // Should return the 
oUser object } // addEventListener takes the event name, and 
who you want to listen 
myAdminData.addEventListener(eventOnResult, r);



Does that help?  I obviously can't test the code, but I think 
everything is right...  I have trouble with scope, which is 
why I use a lot of 'r'
values instead of 'this'... Just easier for me... Probably 
not a good coding 

Re: [Flashcoders] help

2007-02-16 Thread JOR
Additionally, you may opt to use else if so that the second expression 
isn't evaluated if the first one evaluates true.


...
}
else if(delta0){
...



James O'Reilly  —  Consultant
Adobe Certified Flash Expert
http://www.jamesor.com
Design • Code • Train



Patrick Matte | BLITZ wrote:

function onEnterFrame(){
var delta:Number = mc._x - oldX;
if(delta0){
launching;
}
if(delta0){
launching2;
}
oldX = mc._x;
}

BLITZ | Patrick Matte - 310-551-0200 x214

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gustavo
Duenas
Sent: Friday, February 16, 2007 10:48 AM
To: Flashcoders mailing list
Subject: [Flashcoders] help

Hi, I need desperately some help...how can I detect if some dragged  
object is moving right or left.
Because I need to trigger some event when its moving right and other  
when it is moving left.


so far I'm trying to use this, but it appears to be useless.


this is the code inside the object which is dragged.


var xright = this._x+1;
var xleft = this._x-1;

if (this._x==xright){
launching
}
if(this._x==xleft){
launching2
}




regards



Gustavo Duenas

___
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


RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Merrill, Jason
do you have a reference to the class that is broadcasting the 
event in the class that's listening for the event?

Yes, that's this part of his code:

myAdminData.addEventListener(eventOnResult, r);

Where he has r = this in his code

Jason Merrill
Bank of America 
Learning  Organizational Effectiveness
 
 
 
 
 
 
___
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] Events for custom classes?

2007-02-16 Thread Merrill, Jason
Thanks Alain, will revist it that way instead.

Jason Merrill
Bank of America 
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Alain Rousseau
Sent: Friday, February 16, 2007 3:01 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Events for custom classes?

Jason,

So if I understand clearly what you want to do is :

From Class A : (pseudo code following)

class ClassA {
  private var instClassB:ClassB;
  make comboBox
  make datagrid
  function ClassA() {
  instClassB = new ClassB();
  comboBox.onChange = Delegate.create(this, 
cbChangeHandler);
  instClassB.addEventListener(webServiceResult, this);
  }

  function cbChangeHandler(e){
  instClassB.getWSdata(e.value);
  }

  function webServiceResult(evtObj:Object) {
  update datagrid with evtObj.newData
  }

}

class ClassB {
  Decorate with EventDispatcher methods
  dispatchEvent, addEventListener, removeEventListener

  function ClassB() {
  EventDispatcher.initialize(this);
  }
  
  function getWSdata(val) {
  get data from web service
  wsInstance.onResult = Delegate.create(this, 
wsResulthandler);
  }
  
  function wsResulthandler(data) {
  this.dispatchEvent({type:webServiceResult, 
newData:data}) // add anything you want to pass in the object
  }
}

Now you have them both communication the way you want

Have fun !

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf 
Of Merrill, Jason
Sent: 16 février 2007 14:36
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?

Daniel, try as I may, I can't get your code to work.  I have 
one class, which has a combobox.  I can get the event to fire 
when the combobox changes just fine, but I can't get it to 
hear the firing of the data capture from the webservice in 
the other class.

So basically, in pseudocode, I need to do this:

class A{
  make comboBox
  make datagrid
  when comboBox changes, use Class B
  to get data from webservice
  when webservice result received, 
  update datagrid with new data

}

class B{
  connect to webservice   
  when requested, return data to requesting class }

Reason I want these two classes to be separate is because I 
want other classes to call Class B to get data as well.  So, 
I can do all of those things just fine, they are all working, 
except for the last part, when requested, return data to 
requesting class - I figure since the webservice is 
asynchronous, I need to capture the received event, which is 
fine, I can do, that works.  But I need to tell Class A to 
update the datagrid with the new data when it gets it from 
Class B - so an event model is required.  

in your code, you have a var r in both the Class A and 
Class B - I'm confused about that.  Thanks for any help.


Jason Merrill
Bank of America
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On 
Behalf Of Holth, 
Daniel C.
Sent: Friday, February 16, 2007 10:36 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?


Here is your code modified to use the EventDispatcher:

import mx.events.EventDispatcher; // import the event dispatcher

class com.boa.projects.iqrcgenerator.components.AdminData{
public var addEventListener:Function; // Set the functions
public var removeEventListener:Function; // Set the functions
private var dispatchEvent:Function; // Set the functions

private var userData:Object;

// I'm sure you have a different constructor, but you need
// to add that line to it if you want to use the eventdispatcher
public function AdminData(){
mx.events.EventDispatcher.initialize(this); // 
add this to 
constructor
}

public function wsUserDataByLOB(lobDbId:Number):Void{
var getUserListResult:Object = new Object();
getUserListResult =
generatorWebService.GetUserList(lobDbId);

var r = this;  // To get this in onResult
getUserListResult.onResult = function(oUser){

r.dispatchEvent({type:eventOnResult,
user:oUser}); // Dispatch the event


}
}


// I may just take this function out all together since 
the event
can
// autommatically send them the data.
public function getUserData():Object{
return userData;
}
}


Then in your other class you can do something like:

//myAdminData is an instance of the class above

var r = this;
r.eventOnResult= function(evtObj:Object){
trace(user:  + evtObj.user);  // Should return the 
oUser object } 
// addEventListener takes the event name, and who you want 
to listen 

Re: [Flashcoders] help

2007-02-16 Thread Gustavo Duenas

thanks men, I don't know what would I do without all of you ...thanks.

Regards.
On Feb 16, 2007, at 1:51 PM, Holth, Daniel C. wrote:



You need to keep track of the previous x value and compare that to the
new x value. The simplest way to achieve this is an onEnterFrame
function (although note this is the least efficient way).

For example try putting a movie clip called ball_mc on your stage  
and
add this code to the first frame, run it and try dragging the movie  
clip

around.

var oldX:Number = ball_mc._x;

onEnterFrame = function(){
if(ball_mc._x  oldX){
trace(is moving right);
} else if (ball_mc._x  oldX){
trace(is moving left);
} else {
trace(not moving along x axis);
}
oldX = ball_mc._x;
}


ball_mc.onPress = startDrag;
ball_mc.onRelease = stopDrag;

Hope that helps!
-Dan

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

Duenas
Sent: Friday, February 16, 2007 11:42 AM
To: Flashcoders mailing list
Subject: [Flashcoders] (no subject)

hi, I'm doing something pretty simple, I have a movie clipo which
starts drag, I'd like to move this in the x axis, but I don't know
how to program this to launch an event if the x axis is positive and
other is the x axis is negative,
or simpler how can I trigger an event is the movie clip is moving
right and trigger other event is the movieClip is moving left
any ideas?


so far I'm using this.


var xright = this._x+1;
var xleft = this._x-1;

if (this._x==xright){
launching
}
if(this._x==xleft){
launching2
}





Gustavo Duenas

___
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

This e-mail and its attachments are intended only for the use of  
the addressee(s) and may contain privileged, confidential or  
proprietary information. If you are not the intended recipient, or  
the employee or agent responsible for delivering the message to the  
intended recipient, you are hereby notified that any dissemination,  
distribution, displaying, copying, or use of this information is  
strictly prohibited. If you have received this communication in  
error, please inform the sender immediately and delete and destroy  
any record of this message. Thank you.

___
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



Gustavo Duenas
Creative Director
LEFT AND RIGHT SOLUTIONS LLC
1225 w. Beaver St. suite 119
Jacksonville, FL 32204
904 . 2650330
www.leftandrightsolutions.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] Events for custom classes?

2007-02-16 Thread Holth, Daniel C.

I think Matthew has what you are looking for.  Alain's solution should
do what you want too.

If you want to write two classes with lower cohesion so they aren't
referencing each other, you could write a third control class which
would have code similar to the following.  This way objA and objB don't
need to know about each other.  If another class needs to start
listening for results of the webservices, you add it in here, rather
than making changes to your other classes.

Class controller {
Var objA = new ClassA();
Var objB = new ClassB();

this.eventComboBoxChanged = function(){
// execute functions on B
}

this.eventWebserviceResultsRecieved = function(){
// execute fuctions on B
}

this.eventDataRequested = function(){
// execute functions on A
}

objA.addEventListener(eventComboBoxChanged, this);
objA.addEventListener(eventWebserviceResultsRecieved, this);

objB.addEventListener(eventDataRequested, this);
}

Again, I haven't tested this code, but the basic idea should work as
long as objA and objB are dispatching the events when the changes occur.

~Dan

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Matthew
Ganz
Sent: Friday, February 16, 2007 1:48 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Events for custom classes?

do you have a reference to the class that is broadcasting the event in
the
class that's listening for the event?

meaning, when you write your addEventListener in your Receiving class,
you
should have:

referenceToBroadcastingClass.addEventListener(myEvent,myHandler);
- Original Message -
From: Merrill, Jason [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Friday, February 16, 2007 2:35 PM
Subject: RE: [Flashcoders] Events for custom classes?


 Daniel, try as I may, I can't get your code to work.  I have one
class,
 which has a combobox.  I can get the event to fire when the combobox
 changes just fine, but I can't get it to hear the firing of the data
 capture from the webservice in the other class.

 So basically, in pseudocode, I need to do this:

 class A{
 make comboBox
 make datagrid
 when comboBox changes, use Class B
 to get data from webservice
 when webservice result received,
update datagrid with new data

 }

 class B{
 connect to webservice
 when requested, return data to requesting class
 }

 Reason I want these two classes to be separate is because I want other
 classes to call Class B to get data as well.  So, I can do all of
those
 things just fine, they are all working, except for the last part,
when
 requested, return data to requesting class - I figure since the
 webservice is asynchronous, I need to capture the received event,
which
 is fine, I can do, that works.  But I need to tell Class A to update
the
 datagrid with the new data when it gets it from Class B - so an event
 model is required.

 in your code, you have a var r in both the Class A and Class B -
I'm
 confused about that.  Thanks for any help.


 Jason Merrill
 Bank of America
 Learning  Organizational Effectiveness







-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Holth, Daniel C.
Sent: Friday, February 16, 2007 10:36 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?


Here is your code modified to use the EventDispatcher:

import mx.events.EventDispatcher; // import the event dispatcher

class com.boa.projects.iqrcgenerator.components.AdminData{
 public var addEventListener:Function; // Set the functions
 public var removeEventListener:Function; // Set the functions
 private var dispatchEvent:Function; // Set the functions

 private var userData:Object;

 // I'm sure you have a different constructor, but you need
 // to add that line to it if you want to use the eventdispatcher
 public function AdminData(){
 mx.events.EventDispatcher.initialize(this); //
add this to constructor
 }

 public function wsUserDataByLOB(lobDbId:Number):Void{
 var getUserListResult:Object = new Object();
 getUserListResult =
generatorWebService.GetUserList(lobDbId);

 var r = this;  // To get this in onResult
 getUserListResult.onResult = function(oUser){

 r.dispatchEvent({type:eventOnResult,
user:oUser}); // Dispatch the event


 }
 }


 // I may just take this function out all together since
the event can
 // autommatically send them the data.
 public function getUserData():Object{
 return userData;
 }
}


Then in your other class you can do something like:

//myAdminData is an instance of the class above

var r = this;
r.eventOnResult= function(evtObj:Object){
 trace(user:  + evtObj.user);  // Should return the
oUser object } // addEventListener takes the event name, and
who you want to listen
myAdminData.addEventListener(eventOnResult, r);



Does that help?  I obviously can't test the 

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Karina Steffens
Hi Jason,

I have my own implementation of AsBroadcaster/EventDispatcher (bundling both
in one class), which is very flexible and can be used with inheritance or
composition (But unlike the standard implementations, it's not a mix-in
class). If you'd like me to send you the class, just let me know.

Karina
 

 -Original Message-
 From: Merrill, Jason [mailto:[EMAIL PROTECTED] 
 Sent: 16 February 2007 20:16
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] Events for custom classes?
 
 Thanks Alain, will revist it that way instead.
 
 Jason Merrill
 Bank of America
 Learning  Organizational Effectiveness
  
  
  
  
  
  
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On 
 Behalf Of Alain 
 Rousseau
 Sent: Friday, February 16, 2007 3:01 PM
 To: 'Flashcoders mailing list'
 Subject: RE: [Flashcoders] Events for custom classes?
 
 Jason,
 
 So if I understand clearly what you want to do is :
 
 From Class A : (pseudo code following)
 
 class ClassA {
 private var instClassB:ClassB;
 make comboBox
 make datagrid
 function ClassA() {
 instClassB = new ClassB();
 comboBox.onChange = Delegate.create(this, 
 cbChangeHandler);
 instClassB.addEventListener(webServiceResult, this);
 }
 
 function cbChangeHandler(e){
 instClassB.getWSdata(e.value);
 }
 
 function webServiceResult(evtObj:Object) {
 update datagrid with evtObj.newData
 }
 
 }
 
 class ClassB {
 Decorate with EventDispatcher methods
 dispatchEvent, addEventListener, removeEventListener
 
 function ClassB() {
 EventDispatcher.initialize(this);
 }
 
 function getWSdata(val) {
 get data from web service
 wsInstance.onResult = Delegate.create(this, 
 wsResulthandler);
 }
 
 function wsResulthandler(data) {
 this.dispatchEvent({type:webServiceResult,
 newData:data}) // add anything you want to pass in the object
 }
 }
 
 Now you have them both communication the way you want
 
 Have fun !
 
 Alain
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Merrill, Jason
 Sent: 16 février 2007 14:36
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] Events for custom classes?
 
 Daniel, try as I may, I can't get your code to work.  I have one 
 class, which has a combobox.  I can get the event to fire when the 
 combobox changes just fine, but I can't get it to hear 
 the firing of 
 the data capture from the webservice in the other class.
 
 So basically, in pseudocode, I need to do this:
 
 class A{
 make comboBox
 make datagrid
 when comboBox changes, use Class B
 to get data from webservice
 when webservice result received, 
 update datagrid with new data
 
 }
 
 class B{
 connect to webservice   
 when requested, return data to requesting class }
 
 Reason I want these two classes to be separate is because I 
 want other 
 classes to call Class B to get data as well.  So, I can do all of 
 those things just fine, they are all working, except for the last 
 part, when requested, return data to requesting class - I figure 
 since the webservice is asynchronous, I need to capture the 
 received 
 event, which is fine, I can do, that works.  But I need to 
 tell Class 
 A to update the datagrid with the new data when it gets it 
 from Class 
 B - so an event model is required.
 
 in your code, you have a var r in both the Class A and 
 Class B - 
 I'm confused about that.  Thanks for any help.
 
 
 Jason Merrill
 Bank of America
 Learning  Organizational Effectiveness
  
  
  
  
  
  
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Holth,
 Daniel C.
 Sent: Friday, February 16, 2007 10:36 AM
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] Events for custom classes?
 
 
 Here is your code modified to use the EventDispatcher:
 
 import mx.events.EventDispatcher; // import the event dispatcher
 
 class com.boa.projects.iqrcgenerator.components.AdminData{
   public var addEventListener:Function; // Set the functions
   public var removeEventListener:Function; // Set the functions
   private var dispatchEvent:Function; // Set the functions
 
   private var userData:Object;
 
   // I'm sure you have a different constructor, but you need
   // to add that line to it if you want to use the eventdispatcher
   public function AdminData(){
   mx.events.EventDispatcher.initialize(this); //
 add this to
 constructor
   }
 
   public function wsUserDataByLOB(lobDbId:Number):Void{
   var getUserListResult:Object = new Object();
   getUserListResult =
 generatorWebService.GetUserList(lobDbId);
 
   var r = this;  // To get this in onResult
   getUserListResult.onResult = function(oUser){
 
   r.dispatchEvent({type:eventOnResult,
 

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Merrill, Jason
I think Matthew has what you are looking for.  Alain's 
solution should do what you want too.

Thanks Daniel - nice approach, I like it.  It's always the design
patterns stuff that kills me.  I've read a lot about them, but it's hard
to know how to apply to specific projects sometimes, so I do a lot of
tight-coupled composition type coding sometimes - not the best approach
though.  Trying to separate model and view here, but the event stuff is
stuff I just really need a handle on.  Thanks for the samples!

There was a Matthew that posted something?  ( I only see posts from you,
John, Helen, Alain) I must have missed it or deleted it already.  Can
you send his post offlist to me? Thanks

Jason Merrill
Bank of America 
Learning  Organizational Effectiveness
 
 
 
 
___
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] Events for custom classes?

2007-02-16 Thread Merrill, Jason
Sure, yes - please send offlist . Thanks!

Jason Merrill
Bank of America 
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Karina Steffens
Sent: Friday, February 16, 2007 3:30 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Events for custom classes?

Hi Jason,

I have my own implementation of AsBroadcaster/EventDispatcher 
(bundling both in one class), which is very flexible and can 
be used with inheritance or composition (But unlike the 
standard implementations, it's not a mix-in class). If you'd 
like me to send you the class, just let me know.

Karina
 

 -Original Message-
 From: Merrill, Jason [mailto:[EMAIL PROTECTED]
 Sent: 16 February 2007 20:16
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] Events for custom classes?
 
 Thanks Alain, will revist it that way instead.
 
 Jason Merrill
 Bank of America
 Learning  Organizational Effectiveness
  
  
  
  
  
  
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Alain
 Rousseau
 Sent: Friday, February 16, 2007 3:01 PM
 To: 'Flashcoders mailing list'
 Subject: RE: [Flashcoders] Events for custom classes?
 
 Jason,
 
 So if I understand clearly what you want to do is :
 
 From Class A : (pseudo code following)
 
 class ClassA {
   private var instClassB:ClassB;
   make comboBox
   make datagrid
   function ClassA() {
   instClassB = new ClassB();
   comboBox.onChange = Delegate.create(this,
 cbChangeHandler);
   instClassB.addEventListener(webServiceResult, this);
   }
 
   function cbChangeHandler(e){
   instClassB.getWSdata(e.value);
   }
 
   function webServiceResult(evtObj:Object) {
   update datagrid with evtObj.newData
   }
 
 }
 
 class ClassB {
   Decorate with EventDispatcher methods
   dispatchEvent, addEventListener, removeEventListener
 
   function ClassB() {
   EventDispatcher.initialize(this);
   }
   
   function getWSdata(val) {
   get data from web service
   wsInstance.onResult = Delegate.create(this,
 wsResulthandler);
   }
   
   function wsResulthandler(data) {
   this.dispatchEvent({type:webServiceResult,
 newData:data}) // add anything you want to pass in the object
   }
 }
 
 Now you have them both communication the way you want
 
 Have fun !
 
 Alain
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Merrill, Jason
 Sent: 16 février 2007 14:36
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] Events for custom classes?
 
 Daniel, try as I may, I can't get your code to work.  I have one 
 class, which has a combobox.  I can get the event to fire 
when the 
 combobox changes just fine, but I can't get it to hear
 the firing of
 the data capture from the webservice in the other class.
 
 So basically, in pseudocode, I need to do this:
 
 class A{
   make comboBox
   make datagrid
   when comboBox changes, use Class B
   to get data from webservice
   when webservice result received, 
   update datagrid with new data
 
 }
 
 class B{
   connect to webservice   
   when requested, return data to requesting class }
 
 Reason I want these two classes to be separate is because I
 want other
 classes to call Class B to get data as well.  So, I can do all of 
 those things just fine, they are all working, except for the last 
 part, when requested, return data to requesting class - 
I figure 
 since the webservice is asynchronous, I need to capture the
 received
 event, which is fine, I can do, that works.  But I need to
 tell Class
 A to update the datagrid with the new data when it gets it
 from Class
 B - so an event model is required.
 
 in your code, you have a var r in both the Class A and
 Class B -
 I'm confused about that.  Thanks for any help.
 
 
 Jason Merrill
 Bank of America
 Learning  Organizational Effectiveness
  
  
  
  
  
  
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Holth,
 Daniel C.
 Sent: Friday, February 16, 2007 10:36 AM
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] Events for custom classes?
 
 
 Here is your code modified to use the EventDispatcher:
 
 import mx.events.EventDispatcher; // import the event dispatcher
 
 class com.boa.projects.iqrcgenerator.components.AdminData{
 public var addEventListener:Function; // Set 
the functions
 public var removeEventListener:Function; // Set 
the functions
 private var dispatchEvent:Function; // Set the functions
 
 private var userData:Object;
 
 // I'm sure you have a different constructor, 
but you need
 // to add that line to it if you want to use 
the eventdispatcher
 public function AdminData(){
 mx.events.EventDispatcher.initialize(this); //
 add this to
 constructor
 }
 
 public function 

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Rost, Andrew
Can you please email your class to me as well [offlist]. I'm working on
almost the same thing as Jason.

Thanks much,
Andrew Rost
IDEXX Computer Systems

-Original Message-
From: Merrill, Jason [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 16, 2007 2:41 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?

Sure, yes - please send offlist . Thanks!

Jason Merrill
Bank of America 
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Karina Steffens
Sent: Friday, February 16, 2007 3:30 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Events for custom classes?

Hi Jason,

I have my own implementation of AsBroadcaster/EventDispatcher 
(bundling both in one class), which is very flexible and can 
be used with inheritance or composition (But unlike the 
standard implementations, it's not a mix-in class). If you'd 
like me to send you the class, just let me know.

Karina
 

 -Original Message-
 From: Merrill, Jason [mailto:[EMAIL PROTECTED]
 Sent: 16 February 2007 20:16
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] Events for custom classes?
 
 Thanks Alain, will revist it that way instead.
 
 Jason Merrill
 Bank of America
 Learning  Organizational Effectiveness
  
  
  
  
  
  
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Alain
 Rousseau
 Sent: Friday, February 16, 2007 3:01 PM
 To: 'Flashcoders mailing list'
 Subject: RE: [Flashcoders] Events for custom classes?
 
 Jason,
 
 So if I understand clearly what you want to do is :
 
 From Class A : (pseudo code following)
 
 class ClassA {
   private var instClassB:ClassB;
   make comboBox
   make datagrid
   function ClassA() {
   instClassB = new ClassB();
   comboBox.onChange = Delegate.create(this,
 cbChangeHandler);
   instClassB.addEventListener(webServiceResult, this);
   }
 
   function cbChangeHandler(e){
   instClassB.getWSdata(e.value);
   }
 
   function webServiceResult(evtObj:Object) {
   update datagrid with evtObj.newData
   }
 
 }
 
 class ClassB {
   Decorate with EventDispatcher methods
   dispatchEvent, addEventListener, removeEventListener
 
   function ClassB() {
   EventDispatcher.initialize(this);
   }
   
   function getWSdata(val) {
   get data from web service
   wsInstance.onResult = Delegate.create(this,
 wsResulthandler);
   }
   
   function wsResulthandler(data) {
   this.dispatchEvent({type:webServiceResult,
 newData:data}) // add anything you want to pass in the object
   }
 }
 
 Now you have them both communication the way you want
 
 Have fun !
 
 Alain
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Merrill, Jason
 Sent: 16 février 2007 14:36
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] Events for custom classes?
 
 Daniel, try as I may, I can't get your code to work.  I have one 
 class, which has a combobox.  I can get the event to fire 
when the 
 combobox changes just fine, but I can't get it to hear
 the firing of
 the data capture from the webservice in the other class.
 
 So basically, in pseudocode, I need to do this:
 
 class A{
   make comboBox
   make datagrid
   when comboBox changes, use Class B
   to get data from webservice
   when webservice result received, 
   update datagrid with new data
 
 }
 
 class B{
   connect to webservice   
   when requested, return data to requesting class }
 
 Reason I want these two classes to be separate is because I
 want other
 classes to call Class B to get data as well.  So, I can do all of 
 those things just fine, they are all working, except for the last 
 part, when requested, return data to requesting class - 
I figure 
 since the webservice is asynchronous, I need to capture the
 received
 event, which is fine, I can do, that works.  But I need to
 tell Class
 A to update the datagrid with the new data when it gets it
 from Class
 B - so an event model is required.
 
 in your code, you have a var r in both the Class A and
 Class B -
 I'm confused about that.  Thanks for any help.
 
 
 Jason Merrill
 Bank of America
 Learning  Organizational Effectiveness
  
  
  
  
  
  
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Holth,
 Daniel C.
 Sent: Friday, February 16, 2007 10:36 AM
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] Events for custom classes?
 
 
 Here is your code modified to use the EventDispatcher:
 
 import mx.events.EventDispatcher; // import the event dispatcher
 
 class com.boa.projects.iqrcgenerator.components.AdminData{
 public var addEventListener:Function; // Set 
the functions
 public var removeEventListener:Function; // Set 
the functions
 private var dispatchEvent:Function; // Set the functions
 

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Merrill, Jason
Alain, 

Been following your suggested method, it's great, and everything works as 
advertized, except can't get wsResulthandler to fire once the Webservice data 
is received.

Also, how do I send the data from the comboBox change event through to the 
getWsData function?  I need to know the data from the selected item in the 
combobox, as that is a parameter I sent to the webservice to get the data. I 
hard coded it a number for now, but it doesn't work because of the first 
problem.  

Here is a snippet of the code in Class B

function getWSdata(lobDbId:Number) {
var getUserListResult:Object = new Object();
getUserListResult = root_mc.generatorWS.GetUserList(1) 
//lobDbId);
getUserListResult.onResult = Delegate.create(this, 
wsResulthandler);
}

function wsResulthandler(data) {
_level0.traceMsg(WS Result recieved.)
this.dispatchEvent({type:webServiceResult, newData:data}) 
}

Did I set that up right?

Thanks,

Jason Merrill
Bank of America 
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Alain Rousseau
Sent: Friday, February 16, 2007 3:01 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Events for custom classes?

Jason,

So if I understand clearly what you want to do is :

From Class A : (pseudo code following)

class ClassA {
  private var instClassB:ClassB;
  make comboBox
  make datagrid
  function ClassA() {
  instClassB = new ClassB();
  comboBox.onChange = Delegate.create(this, 
cbChangeHandler);
  instClassB.addEventListener(webServiceResult, this);
  }

  function cbChangeHandler(e){
  instClassB.getWSdata(e.value);
  }

  function webServiceResult(evtObj:Object) {
  update datagrid with evtObj.newData
  }

}

class ClassB {
  Decorate with EventDispatcher methods
  dispatchEvent, addEventListener, removeEventListener

  function ClassB() {
  EventDispatcher.initialize(this);
  }
  
  function getWSdata(val) {
  get data from web service
  wsInstance.onResult = Delegate.create(this, 
wsResulthandler);
  }
  
  function wsResulthandler(data) {
  this.dispatchEvent({type:webServiceResult, 
newData:data}) // add anything you want to pass in the object
  }
}

Now you have them both communication the way you want

Have fun !

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf 
Of Merrill, Jason
Sent: 16 février 2007 14:36
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?

Daniel, try as I may, I can't get your code to work.  I have 
one class, which has a combobox.  I can get the event to fire 
when the combobox changes just fine, but I can't get it to 
hear the firing of the data capture from the webservice in 
the other class.

So basically, in pseudocode, I need to do this:

class A{
  make comboBox
  make datagrid
  when comboBox changes, use Class B
  to get data from webservice
  when webservice result received, 
  update datagrid with new data

}

class B{
  connect to webservice   
  when requested, return data to requesting class }

Reason I want these two classes to be separate is because I 
want other classes to call Class B to get data as well.  So, 
I can do all of those things just fine, they are all working, 
except for the last part, when requested, return data to 
requesting class - I figure since the webservice is 
asynchronous, I need to capture the received event, which is 
fine, I can do, that works.  But I need to tell Class A to 
update the datagrid with the new data when it gets it from 
Class B - so an event model is required.  

in your code, you have a var r in both the Class A and 
Class B - I'm confused about that.  Thanks for any help.


Jason Merrill
Bank of America
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On 
Behalf Of Holth, 
Daniel C.
Sent: Friday, February 16, 2007 10:36 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?


Here is your code modified to use the EventDispatcher:

import mx.events.EventDispatcher; // import the event dispatcher

class com.boa.projects.iqrcgenerator.components.AdminData{
public var addEventListener:Function; // Set the functions
public var removeEventListener:Function; // Set the functions
private var dispatchEvent:Function; // Set the functions

private var userData:Object;

// I'm sure you have a different constructor, but you need
// to add that line to it if you want to use the eventdispatcher
public function AdminData(){

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Merrill, Jason
Nevermind the second part of the question about passing the combobox data, I 
figured that out:

(in class A)
function cbChangeHandler(e){
var t_cb:ComboBox = e.target;
var thisData:Number = 
t_cb.dataProvider[t_cb.selectedIndex].data;
adminData.getWSdata(thisData);
}

But the first part of my question regarding getting wsResulthandler to fire 
once the Webservice data is received is still an issue.  Any ideas?

Jason Merrill
Bank of America 
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Merrill, Jason
Sent: Friday, February 16, 2007 4:37 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?

Alain, 

Been following your suggested method, it's great, and 
everything works as advertized, except can't get 
wsResulthandler to fire once the Webservice data is received.

Also, how do I send the data from the comboBox change event 
through to the getWsData function?  I need to know the data 
from the selected item in the combobox, as that is a 
parameter I sent to the webservice to get the data. I hard 
coded it a number for now, but it doesn't work because of the 
first problem.  

Here is a snippet of the code in Class B

  function getWSdata(lobDbId:Number) {
  var getUserListResult:Object = new Object();
  getUserListResult = 
root_mc.generatorWS.GetUserList(1) //lobDbId);
  getUserListResult.onResult = 
Delegate.create(this, wsResulthandler);
  }
  
  function wsResulthandler(data) {
  _level0.traceMsg(WS Result recieved.)
  this.dispatchEvent({type:webServiceResult, 
newData:data}) 
  }

Did I set that up right?

Thanks,

Jason Merrill
Bank of America
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On 
Behalf Of Alain 
Rousseau
Sent: Friday, February 16, 2007 3:01 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Events for custom classes?

Jason,

So if I understand clearly what you want to do is :

From Class A : (pseudo code following)

class ClassA {
private var instClassB:ClassB;
make comboBox
make datagrid
function ClassA() {
instClassB = new ClassB();
comboBox.onChange = Delegate.create(this, 
cbChangeHandler);
instClassB.addEventListener(webServiceResult, this);
}

function cbChangeHandler(e){
instClassB.getWSdata(e.value);
}

function webServiceResult(evtObj:Object) {
update datagrid with evtObj.newData
}

}

class ClassB {
Decorate with EventDispatcher methods
dispatchEvent, addEventListener, removeEventListener

function ClassB() {
EventDispatcher.initialize(this);
}

function getWSdata(val) {
get data from web service
wsInstance.onResult = Delegate.create(this, 
wsResulthandler);
}

function wsResulthandler(data) {
this.dispatchEvent({type:webServiceResult,
newData:data}) // add anything you want to pass in the object
}
}

Now you have them both communication the way you want

Have fun !

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of 
Merrill, Jason
Sent: 16 février 2007 14:36
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?

Daniel, try as I may, I can't get your code to work.  I have one 
class, which has a combobox.  I can get the event to fire when the 
combobox changes just fine, but I can't get it to hear 
the firing of 
the data capture from the webservice in the other class.

So basically, in pseudocode, I need to do this:

class A{
make comboBox
make datagrid
when comboBox changes, use Class B
to get data from webservice
when webservice result received, 
update datagrid with new data

}

class B{
connect to webservice   
when requested, return data to requesting class }

Reason I want these two classes to be separate is because I 
want other 
classes to call Class B to get data as well.  So, I can do all of 
those things just fine, they are all working, except for the last 
part, when requested, return data to requesting class - I figure 
since the webservice is asynchronous, I need to capture the 
received 
event, which is fine, I can do, that works.  But I need to 
tell Class 
A to update the datagrid with the new data when it gets it 
from Class 
B - so an event model is required.

in your code, you have a var r in both the Class A and 
Class B - 
I'm confused about that.  Thanks for any help.


Jason Merrill
Bank of America
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Holth,
Daniel C.
Sent: Friday, February 

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Alain Rousseau
 Jason,

By the look of it, you will never receive an onResult for your
getUserListResult ... it's a simple Object and no Method onResult exists for
that class that I know of ...

What are you using to make your webservice calls ?  are you using Flash
Remoting ?

if so you should use the responder to handle the result.


import mx.remoting.Service;
import mx.remoting.PendingCall;
import mx.rpc.RelayResponder;
import mx.rpc.FaultEvent;
import mx.rpc.ResultEvent;


var myService:Service = new Service( gatewayUrl , null , serviceName , null,
null );
var pc:Pendingcall = new PendingCall();

pc.relayResponder(myService, handleResult, handleError);

well I can't really remember from the top of my head, I'll need to look it
up from home, 
but this is somewhat how you can know when the data has arrived from the
webservice.

So your class be ends up beeing a Service caller, you can make it a
Singleton and use it to fetch different services from your gateway.

You should definitely look into the ARP framework (or other similar
projects) ... that's how I learned how to best use Design Paterns :) after 2
projets with it, you'll definitely understand :)

HTH !

Alain


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: 16 février 2007 16:37
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?

Alain, 

Been following your suggested method, it's great, and everything works as
advertized, except can't get wsResulthandler to fire once the Webservice
data is received.

Also, how do I send the data from the comboBox change event through to the
getWsData function?  I need to know the data from the selected item in the
combobox, as that is a parameter I sent to the webservice to get the data. I
hard coded it a number for now, but it doesn't work because of the first
problem.  

Here is a snippet of the code in Class B

function getWSdata(lobDbId:Number) {
var getUserListResult:Object = new Object();
getUserListResult = root_mc.generatorWS.GetUserList(1)
//lobDbId);
getUserListResult.onResult = Delegate.create(this,
wsResulthandler);
}

function wsResulthandler(data) {
_level0.traceMsg(WS Result recieved.)
this.dispatchEvent({type:webServiceResult, newData:data}) 
}

Did I set that up right?

Thanks,

Jason Merrill
Bank of America
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alain 
Rousseau
Sent: Friday, February 16, 2007 3:01 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Events for custom classes?

Jason,

So if I understand clearly what you want to do is :

From Class A : (pseudo code following)

class ClassA {
  private var instClassB:ClassB;
  make comboBox
  make datagrid
  function ClassA() {
  instClassB = new ClassB();
  comboBox.onChange = Delegate.create(this, cbChangeHandler);
  instClassB.addEventListener(webServiceResult, this);
  }

  function cbChangeHandler(e){
  instClassB.getWSdata(e.value);
  }

  function webServiceResult(evtObj:Object) {
  update datagrid with evtObj.newData
  }

}

class ClassB {
  Decorate with EventDispatcher methods
  dispatchEvent, addEventListener, removeEventListener

  function ClassB() {
  EventDispatcher.initialize(this);
  }
  
  function getWSdata(val) {
  get data from web service
  wsInstance.onResult = Delegate.create(this,
wsResulthandler);
  }
  
  function wsResulthandler(data) {
  this.dispatchEvent({type:webServiceResult,
newData:data}) // add anything you want to pass in the object
  }
}

Now you have them both communication the way you want

Have fun !

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of 
Merrill, Jason
Sent: 16 février 2007 14:36
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?

Daniel, try as I may, I can't get your code to work.  I have one 
class, which has a combobox.  I can get the event to fire when the 
combobox changes just fine, but I can't get it to hear the firing of 
the data capture from the webservice in the other class.

So basically, in pseudocode, I need to do this:

class A{
  make comboBox
  make datagrid
  when comboBox changes, use Class B
  to get data from webservice
  when webservice result received, 
  update datagrid with new data

}

class B{
  connect to webservice   
  when requested, return data to requesting class }

Reason I want these two classes to be separate is because I want other 
classes to call Class B to get data as well.  So, I can do all of 
those things just fine, they are all 

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Merrill, Jason
I am using the Webservice component.  It has a built-in onResult event, and 
works fine for me.  But can't get it to work with Delegate.  This works for me: 

var getUserResult = new Object();
getUserResult =alreadyLodedWwebserive.DoMethod(arg)
getUserResult.onResult = function(result){
//This works fine for me
//I see the data returned here fine.
}


Jason Merrill
Bank of America 
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Alain Rousseau
Sent: Friday, February 16, 2007 5:09 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Events for custom classes?

 Jason,

By the look of it, you will never receive an onResult for 
your getUserListResult ... it's a simple Object and no Method 
onResult exists for that class that I know of ...

What are you using to make your webservice calls ?  are you 
using Flash Remoting ?

if so you should use the responder to handle the result.


import mx.remoting.Service;
import mx.remoting.PendingCall;
import mx.rpc.RelayResponder;
import mx.rpc.FaultEvent;
import mx.rpc.ResultEvent;


var myService:Service = new Service( gatewayUrl , null , 
serviceName , null, null ); var pc:Pendingcall = new PendingCall();

pc.relayResponder(myService, handleResult, handleError);

well I can't really remember from the top of my head, I'll 
need to look it up from home, but this is somewhat how you 
can know when the data has arrived from the webservice.

So your class be ends up beeing a Service caller, you can 
make it a Singleton and use it to fetch different services 
from your gateway.

You should definitely look into the ARP framework (or other similar
projects) ... that's how I learned how to best use Design 
Paterns :) after 2 projets with it, you'll definitely understand :)

HTH !

Alain


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf 
Of Merrill, Jason
Sent: 16 février 2007 16:37
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?

Alain, 

Been following your suggested method, it's great, and 
everything works as advertized, except can't get 
wsResulthandler to fire once the Webservice data is received.

Also, how do I send the data from the comboBox change event 
through to the getWsData function?  I need to know the data 
from the selected item in the combobox, as that is a 
parameter I sent to the webservice to get the data. I hard 
coded it a number for now, but it doesn't work because of the 
first problem.  

Here is a snippet of the code in Class B

  function getWSdata(lobDbId:Number) {
  var getUserListResult:Object = new Object();
  getUserListResult = root_mc.generatorWS.GetUserList(1)
//lobDbId);
  getUserListResult.onResult = 
Delegate.create(this, wsResulthandler);
  }
  
  function wsResulthandler(data) {
  _level0.traceMsg(WS Result recieved.)
  this.dispatchEvent({type:webServiceResult, 
newData:data}) 
  }

Did I set that up right?

Thanks,

Jason Merrill
Bank of America
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On 
Behalf Of Alain 
Rousseau
Sent: Friday, February 16, 2007 3:01 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Events for custom classes?

Jason,

So if I understand clearly what you want to do is :

From Class A : (pseudo code following)

class ClassA {
private var instClassB:ClassB;
make comboBox
make datagrid
function ClassA() {
instClassB = new ClassB();
comboBox.onChange = Delegate.create(this, 
cbChangeHandler);
instClassB.addEventListener(webServiceResult, this);
}

function cbChangeHandler(e){
instClassB.getWSdata(e.value);
}

function webServiceResult(evtObj:Object) {
update datagrid with evtObj.newData
}

}

class ClassB {
Decorate with EventDispatcher methods
dispatchEvent, addEventListener, removeEventListener

function ClassB() {
EventDispatcher.initialize(this);
}

function getWSdata(val) {
get data from web service
wsInstance.onResult = Delegate.create(this,
wsResulthandler);
}

function wsResulthandler(data) {
this.dispatchEvent({type:webServiceResult,
newData:data}) // add anything you want to pass in the object
}
}

Now you have them both communication the way you want

Have fun !

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of 
Merrill, Jason
Sent: 16 février 2007 14:36
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?

Daniel, try as I may, I can't get your code to work.  I have one 
class, which has a combobox.  I can get the event to fire when the 

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Merrill, Jason
Ah - nevermind - figured out I had removed the scope to my webservice and 
forgot to put it back in. Delegate works fine for me now, sorry about the 
noise, and thanks so much everyone for the help!!

Jason Merrill
Bank of America 
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Merrill, Jason
Sent: Friday, February 16, 2007 5:18 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?

I am using the Webservice component.  It has a built-in 
onResult event, and works fine for me.  But can't get it to 
work with Delegate.  This works for me: 

  var getUserResult = new Object();
  getUserResult =alreadyLodedWwebserive.DoMethod(arg)
  getUserResult.onResult = function(result){
  //This works fine for me
  //I see the data returned here fine.
  }


Jason Merrill
Bank of America
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On 
Behalf Of Alain 
Rousseau
Sent: Friday, February 16, 2007 5:09 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Events for custom classes?

 Jason,

By the look of it, you will never receive an onResult for your 
getUserListResult ... it's a simple Object and no Method onResult 
exists for that class that I know of ...

What are you using to make your webservice calls ?  are you using 
Flash Remoting ?

if so you should use the responder to handle the result.


import mx.remoting.Service;
import mx.remoting.PendingCall;
import mx.rpc.RelayResponder;
import mx.rpc.FaultEvent;
import mx.rpc.ResultEvent;


var myService:Service = new Service( gatewayUrl , null , 
serviceName , 
null, null ); var pc:Pendingcall = new PendingCall();

pc.relayResponder(myService, handleResult, handleError);

well I can't really remember from the top of my head, I'll need to 
look it up from home, but this is somewhat how you can know 
when the 
data has arrived from the webservice.

So your class be ends up beeing a Service caller, you can make it a 
Singleton and use it to fetch different services from your gateway.

You should definitely look into the ARP framework (or other similar
projects) ... that's how I learned how to best use Design 
Paterns :) 
after 2 projets with it, you'll definitely understand :)

HTH !

Alain


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of 
Merrill, Jason
Sent: 16 février 2007 16:37
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?

Alain,

Been following your suggested method, it's great, and 
everything works 
as advertized, except can't get wsResulthandler to fire once the 
Webservice data is received.

Also, how do I send the data from the comboBox change event 
through to 
the getWsData function?  I need to know the data from the selected 
item in the combobox, as that is a parameter I sent to the 
webservice 
to get the data. I hard coded it a number for now, but it 
doesn't work 
because of the first problem.

Here is a snippet of the code in Class B

function getWSdata(lobDbId:Number) {
var getUserListResult:Object = new Object();
getUserListResult = root_mc.generatorWS.GetUserList(1)
//lobDbId);
getUserListResult.onResult =
Delegate.create(this, wsResulthandler);
}

function wsResulthandler(data) {
_level0.traceMsg(WS Result recieved.)
this.dispatchEvent({type:webServiceResult,
newData:data}) 
}

Did I set that up right?

Thanks,

Jason Merrill
Bank of America
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Alain
Rousseau
Sent: Friday, February 16, 2007 3:01 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Events for custom classes?

Jason,

So if I understand clearly what you want to do is :

From Class A : (pseudo code following)

class ClassA {
  private var instClassB:ClassB;
  make comboBox
  make datagrid
  function ClassA() {
  instClassB = new ClassB();
  comboBox.onChange = Delegate.create(this,
cbChangeHandler);
  instClassB.addEventListener(webServiceResult, this);
  }

  function cbChangeHandler(e){
  instClassB.getWSdata(e.value);
  }

  function webServiceResult(evtObj:Object) {
  update datagrid with evtObj.newData
  }

}

class ClassB {
  Decorate with EventDispatcher methods
  dispatchEvent, addEventListener, removeEventListener

  function ClassB() {
  EventDispatcher.initialize(this);
  }
  
  function getWSdata(val) {
  get data from web service
  wsInstance.onResult = Delegate.create(this,
wsResulthandler);
  }
  
  function wsResulthandler(data) {
  this.dispatchEvent({type:webServiceResult,
newData:data}) // add anything you want to pass in the object
  }
}


[Flashcoders] Erasing areas with the drawing API?

2007-02-16 Thread David Ham
Does anyone know how to erase part of an area that was created with  
the drawing API? I need to be able to draw a polygon, and then draw  
another polygon inside it and punch it out. For example, I need to  
draw a square and then punch a square hole in it. Anyone ever done  
this before?


OK
DAH
--
David Ham
http://davidham.com ::  [EMAIL PROTECTED]



___
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] Erasing areas with the drawing API?

2007-02-16 Thread Claus Wahlers

David Ham wrote:

Does anyone know how to erase part of an area that was created with the 
drawing API? I need to be able to draw a polygon, and then draw another 
polygon inside it and punch it out. For example, I need to draw a 
square and then punch a square hole in it. Anyone ever done this before?


graphics.lineStyle(1, 0x00);
graphics.beginFill(0xff);
graphics.moveTo(10, 10);
graphics.lineTo(90, 10);
graphics.lineTo(90, 90);
graphics.lineTo(10, 90);
graphics.lineTo(10, 10);
graphics.moveTo(30, 30);
graphics.lineTo(70, 30);
graphics.lineTo(70, 70);
graphics.lineTo(30, 70);
graphics.lineTo(30, 30);
graphics.endFill();

Cheers,
Claus.

--
claus wahlers
côdeazur brasil
http://codeazur.com.br/
http://wahlers.com.br/claus/blog/

--
READ CAREFULLY. By reading this email you agree, on behalf of your 
employer, to release me from all obligations and waivers arising from 
any and all NON-NEGOTIATED agreements, licenses, terms-of-service, 
shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, 
non-compete and acceptable use policies (BOGUS AGREEMENTS) that I have 
entered into with your employer, its partners, licensors, agents and 
assigns, in perpetuity, without prejudice to my ongoing rights and 
privileges. You further represent that you have the authority to release 
me from any BOGUS AGREEMENTS on behalf of your employer.

___
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] Events for custom classes?

2007-02-16 Thread Muzak
You should really look into something like ARP or Cairngorm.

http://osflash.org/arp
http://labs.adobe.com/wiki/index.php/Cairngorm

regards,
Muzak

- Original Message - 
From: Merrill, Jason [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Friday, February 16, 2007 9:40 PM
Subject: RE: [Flashcoders] Events for custom classes?


I think Matthew has what you are looking for.  Alain's
solution should do what you want too.

 Thanks Daniel - nice approach, I like it.  It's always the design
 patterns stuff that kills me.  I've read a lot about them, but it's hard
 to know how to apply to specific projects sometimes, so I do a lot of
 tight-coupled composition type coding sometimes - not the best approach
 though.  Trying to separate model and view here, but the event stuff is
 stuff I just really need a handle on.  Thanks for the samples!

 There was a Matthew that posted something?  ( I only see posts from you,
 John, Helen, Alain) I must have missed it or deleted it already.  Can
 you send his post offlist to me? Thanks

 Jason Merrill
 Bank of America
 Learning  Organizational Effectiveness


___
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] Erasing areas with the drawing API?

2007-02-16 Thread Helen Triolo
Yes -- draw the second (inner) shape before you do the endFill and it 
will be punched out.  If you need the final shape to be a mask, draw the 
inner shape in the reverse direction from how you drew the outer shape 
(ie, counter-clockwise if the original shape was drawn clockwise). 

http://flash-creations.com/notes/dynamic_drawingapi.php at the bottom of 
the page


Helen

--
http://flash-creations.com
http://i-technica.com


David Ham wrote:

Does anyone know how to erase part of an area that was created with  
the drawing API? I need to be able to draw a polygon, and then draw  
another polygon inside it and punch it out. For example, I need to  
draw a square and then punch a square hole in it. Anyone ever done  
this before?


OK
DAH







___
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] Erasing areas with the drawing API?

2007-02-16 Thread David Ham
Huh, that was easy. Turns out that if you don't call endFill(), you  
can just draw the polygon, moveTo() the hole, and lineTo() the  
outline of the hole, and it fills itself in.


I found an example of this in this article:

http://www.adobe.com/devnet/flash/articles/adv_draw_methods.html

Specifically in the drawGear() example.

OK
DAH


On Feb 16, 2007, at 4:54 PM, David Ham wrote:

Does anyone know how to erase part of an area that was created with  
the drawing API? I need to be able to draw a polygon, and then draw  
another polygon inside it and punch it out. For example, I need  
to draw a square and then punch a square hole in it. Anyone ever  
done this before?


OK
DAH
--
David Ham
http://davidham.com ::  [EMAIL PROTECTED]



___
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] Erasing areas with the drawing API?

2007-02-16 Thread David Ham


Thanks very much Helen and Claus for your responses!

OK
DAH

Huh, that was easy. Turns out that if you don't call endFill(), you  
can just draw the polygon, moveTo() the hole, and lineTo() the  
outline of the hole, and it fills itself in.


I found an example of this in this article:

http://www.adobe.com/devnet/flash/articles/adv_draw_methods.html

Specifically in the drawGear() example.

OK
DAH


On Feb 16, 2007, at 4:54 PM, David Ham wrote:

Does anyone know how to erase part of an area that was created  
with the drawing API? I need to be able to draw a polygon, and  
then draw another polygon inside it and punch it out. For  
example, I need to draw a square and then punch a square hole in  
it. Anyone ever done this before?


OK
DAH
--
David Ham
http://davidham.com ::  [EMAIL PROTECTED]



___
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] removeMovieclip actions on 1000 MCs

2007-02-16 Thread Mick G

I have 1000 movieclips on stage and want it so whichever one you click on
gets removed.

At the moment I have a for loop that is assigning:

for(var i=0; i1000; i++){
   this[mc+i].onPress = function(){
trace(this);
   this.removeMovieClip();
   }
}

it all works fine, I'm just wondering if anyone can think of anything more
efficient for such a large number of MCs. Like a listener or something?
___
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] removeMovieclip actions on 1000 MCs

2007-02-16 Thread T. Michael Keesey

How about having them all use a subclass of MovieClip?

class RemoveableClip extends MovieClip {
   public function onPress():Void {
   trace(this);
   this.removeMovieClip();
   }
}

(Then link that class to the symbol.)

On 2/16/07, Mick G [EMAIL PROTECTED] wrote:

I have 1000 movieclips on stage and want it so whichever one you click on
gets removed.

At the moment I have a for loop that is assigning:

for(var i=0; i1000; i++){
this[mc+i].onPress = function(){
 trace(this);
this.removeMovieClip();
}
}

it all works fine, I'm just wondering if anyone can think of anything more
efficient for such a large number of MCs. Like a listener or something?
___
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




--
T. Michael Keesey
Director of Technology
Exopolis, Inc.
2894 Rowena Avenue Ste. B
Los Angeles, California 90039
--
The Dinosauricon: http://dino.lm.com
Parry  Carney: http://parryandcarney.com
ISPN Forum: http://www.phylonames.org/forum/
___
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] Events for custom classes?

2007-02-16 Thread Karina Steffens
I sent the custom class off list to both of you. 

If anyone else is interested, I'll put it on my blog as soon as I get a
moment to spare, and will let the list know when it's there.

Karina 

 -Original Message-
 From: Rost, Andrew [mailto:[EMAIL PROTECTED] 
 Sent: 16 February 2007 20:55
 To: 'Flashcoders mailing list'
 Subject: RE: [Flashcoders] Events for custom classes?
 
 Can you please email your class to me as well [offlist]. I'm 
 working on almost the same thing as Jason.
 
 Thanks much,
 Andrew Rost
 IDEXX Computer Systems
 
 -Original Message-
 From: Merrill, Jason [mailto:[EMAIL PROTECTED]
 Sent: Friday, February 16, 2007 2:41 PM
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] Events for custom classes?
 
 Sure, yes - please send offlist . Thanks!
 
 Jason Merrill
 Bank of America
 Learning  Organizational Effectiveness
  
  
  
  
  
  
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On 
 Behalf Of Karina 
 Steffens
 Sent: Friday, February 16, 2007 3:30 PM
 To: 'Flashcoders mailing list'
 Subject: RE: [Flashcoders] Events for custom classes?
 
 Hi Jason,
 
 I have my own implementation of AsBroadcaster/EventDispatcher 
 (bundling both in one class), which is very flexible and 
 can be used 
 with inheritance or composition (But unlike the standard 
 implementations, it's not a mix-in class). If you'd like me to send 
 you the class, just let me know.
 
 Karina
  
 
  -Original Message-
  From: Merrill, Jason [mailto:[EMAIL PROTECTED]
  Sent: 16 February 2007 20:16
  To: Flashcoders mailing list
  Subject: RE: [Flashcoders] Events for custom classes?
  
  Thanks Alain, will revist it that way instead.
  
  Jason Merrill
  Bank of America
  Learning  Organizational Effectiveness
   
   
   
   
   
   
  
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On
  Behalf Of Alain
  Rousseau
  Sent: Friday, February 16, 2007 3:01 PM
  To: 'Flashcoders mailing list'
  Subject: RE: [Flashcoders] Events for custom classes?
  
  Jason,
  
  So if I understand clearly what you want to do is :
  
  From Class A : (pseudo code following)
  
  class ClassA {
  private var instClassB:ClassB;
  make comboBox
  make datagrid
  function ClassA() {
  instClassB = new ClassB();
  comboBox.onChange = Delegate.create(this,
  cbChangeHandler);
  
 instClassB.addEventListener(webServiceResult, this);
  }
  
  function cbChangeHandler(e){
  instClassB.getWSdata(e.value);
  }
  
  function webServiceResult(evtObj:Object) {
  update datagrid with evtObj.newData
  }
  
  }
  
  class ClassB {
  Decorate with EventDispatcher methods
  dispatchEvent, addEventListener, removeEventListener
  
  function ClassB() {
  EventDispatcher.initialize(this);
  }
  
  function getWSdata(val) {
  get data from web service
  wsInstance.onResult = Delegate.create(this,
  wsResulthandler);
  }
  
  function wsResulthandler(data) {
  this.dispatchEvent({type:webServiceResult,
  newData:data}) // add anything you want to pass in the object
  }
  }
  
  Now you have them both communication the way you want
  
  Have fun !
  
  Alain
  
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of 
  Merrill, Jason
  Sent: 16 février 2007 14:36
  To: Flashcoders mailing list
  Subject: RE: [Flashcoders] Events for custom classes?
  
  Daniel, try as I may, I can't get your code to work.  I 
 have one 
  class, which has a combobox.  I can get the event to fire
 when the
  combobox changes just fine, but I can't get it to hear
  the firing of
  the data capture from the webservice in the other class.
  
  So basically, in pseudocode, I need to do this:
  
  class A{
  make comboBox
  make datagrid
  when comboBox changes, use Class B
  to get data from webservice
  when webservice result received, 
  update datagrid with new data
  
  }
  
  class B{
  connect to webservice   
  when requested, return data to requesting class }
  
  Reason I want these two classes to be separate is because I
  want other
  classes to call Class B to get data as well.  So, I can 
 do all of 
  those things just fine, they are all working, except 
 for the last 
  part, when requested, return data to requesting class -
 I figure
  since the webservice is asynchronous, I need to capture the
  received
  event, which is fine, I can do, that works.  But I need to
  tell Class
  A to update the datagrid with the new data when it gets it
  from Class
  B - so an event model is required.
  
  in your code, you have a var r in both the Class A and
  Class B -
 

[Flashcoders] extends MovieClip

2007-02-16 Thread David Cohn

Hey all,

As per my earlier thread, I've been playing around with the  
Component Definition dialog box in order to create a class which  
extends MovieClip, where the class can be passed parameters (or,  
set in the Parameters tab as the case may be).  This seems to  
implement what I want, but I'm puzzled about the behavior of the  
Component Definition dialog box. What I do is:


-- Set Linkage...:

AS 2.0 Class:   MyPackage.myClass


-- Open Component Definition... and enter Parameters like:

Parameters:
TypesType   typeA   String
Degree  nDegree 37.5Number


-- Now, what puzzles me is the behavior of the AS 2.0 Class field  
in this dialog box:



AS 2.0 Class:   MyPackage.myClass(val)

		-- this seems to work; the parameters are set correctly for the  
instance.
			Puzzlement 1: val can be *anything*, as long as it's just one  
word (e.g. it can't be sType,nDegree) and the parameters are set  
correctly!



AS 2.0 Class:   MyPackage.myClass()

-- this gives me a syntax error


AS 2.0 Class:   MyPackage.myClass

		-- Puzzlement 2: this causes all the parameters to disappear next  
time the dialog box is open, and the parameters aren't set for the  
instance!



Am I using this thing right?  I can't make heads or tails of what's  
going on!


Thanks,
--Dave

___
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] removeMovieclip actions on 1000 MCs

2007-02-16 Thread Fumio Nonaka
If your movie's structure allows, create an empty MovieClip and put all 
instances to be removed into it.  Removing the parent MovieClip clears 
all included children.

_
Mick G wrote:

At the moment I have a for loop that is assigning:

for(var i=0; i1000; i++){
   this[mc+i].onPress = function(){
trace(this);
   this.removeMovieClip();
   }
}

it all works fine, I'm just wondering if anyone can think of anything more
efficient for such a large number of MCs. Like a listener or something?


Good luck,
--
Fumio Nonaka
mailto:[EMAIL PROTECTED]
http://www.FumioNonaka.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] Keyboard Shortcuts ?????? Help

2007-02-16 Thread Mark Wallis

I am having major trouble with implementing keyboard shortcuts for my
movie. Everything is fine in firefox if the movie has focus it takes
precedence over the browser shortcuts. IE7 is a different story. It
takes complete keyboard control. I found only 2/3 keys  i could use
which were not used by IE. My movie is quite a complex beast and
Keyboard shortcuts are an essential part of it. I need to make the
functionality of the movie available to those without a mouse. There
surely is a way around this  Anyone got any ideas this has been
driving me mad for 3 days now i cant seem to find any info on the
subject anywhere ...
___
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