Re: [Flashcoders] How do you manage your classes?

2006-09-26 Thread Ray Chuan

Hi,

On 9/26/06, greg h [EMAIL PROTECTED] wrote:

Dan,

I can not answer your specifc questions, so I hope that others will jump in
and add their voices along with details about how they manage the problems
you described.

I just want to comment generally that Subversion is the successor to CVS.
You can find full documentation here:
http://svnbook.red-bean.com/

If you are going to use open source version control, I will hazard to say
that Subversion can not be beat.

For automation, I believe that Subversion integrates well with Ant.


It does not. There are no built in svn tasks.

http://ant.apache.org/manual/tasksoverview.html#scm

But you can of course write commands to do it.


hth,

g

On 9/25/06, Dan Rogers [EMAIL PROTECTED] wrote:

 I'm not very familiar with subversion-  can it handle shared modules
 (or recursive modules I guess)?
 I am curious how one would handle utility classes that get included
 in multiple projects...


 On Sep 25, 2006, at 5:03 PM, eric dolecki wrote:

  Using SVN, etc. make a repository on a shared server somewhere.
  Include
  classes from there in your projects. Just make sure you update 
  you're all
  good to go.
 
  On 9/25/06, Dan Rogers [EMAIL PROTECTED] wrote:
 
  Flashcoders,
 
  I've been wondering how other flash developers deal with AS2/AS3
  class management on both a project-based and common library level,
  while addressing the need to package up source code for a given
  project to deliver to a team member or client.
 
  I've used version control before, as well as doing the common
  classpath thing for shared classes... but when it's time to deliver
  the source code to someone, I would have to go in and hunt for all
  the classes I used on a project and copy them to the FLA directory
  (and recreate the com.package... structure as well).  Sometimes it
  seems faster to simply create the AS files along with the FLA (in a
  single package), and copy over utility files as needed.  But then you
  get into duplicate classes scattered over multiple projects.
 
  Can anyone provide any insight to a system that works well for them?
  For example, does anyone run custom shell scripts (such as rsync)
  that sync the current project with the main classpath directory?
 
  Thanks,
  -Danro

___
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




--
Cheers,
Ray Chuan
___
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] How do you manage your classes?

2006-09-26 Thread mario

Hi,

the current setup we use in our company is that we have a core library  
that holds all of our core-code we reuse all the time, this core is  
stored and maintained in SVN. This library is imported as a linked  
library in Eclipse (e.g. its more like an alias/shortcut to the core).  
Other project specific code gets developed on project level on their  
respective package level.


If for some reason we need to enhance some of the core-code we do this  
on the project level (your settings should _ALWAYS_ first look in your  
local project before looking in the core). This way you can test the  
enhancements against other older projects or unittests you might have  
written before committing them back into the core.


The last important step we take is to make a copy of the core into the  
project folder when we complete developement, this is to make sure  
that when the core gets updated later on we have a working copy of the  
core just in case (backward compatibility breaking in an upgrade).


Hope this helps.

cheers,
mario











Quoting Dan Rogers [EMAIL PROTECTED]:


Flashcoders,

I've been wondering how other flash developers deal with AS2/AS3 class
management on both a project-based and common library level, while
addressing the need to package up source code for a given project to
deliver to a team member or client.

I've used version control before, as well as doing the common classpath
thing for shared classes... but when it's time to deliver the source
code to someone, I would have to go in and hunt for all the classes I
used on a project and copy them to the FLA directory (and recreate the
com.package... structure as well).  Sometimes it seems faster to simply
create the AS files along with the FLA (in a single package), and copy
over utility files as needed.  But then you get into duplicate classes
scattered over multiple projects.

Can anyone provide any insight to a system that works well for them?
For example, does anyone run custom shell scripts (such as rsync) that
sync the current project with the main classpath directory?

Thanks,
-Danro
___
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] Garbage collection for AS2 classes

2006-09-26 Thread chris daubney

Thanks Nicolas,
I've been trying to find an elegant solution to this to keep any loaded 
swfs encapsulated so that they are 'fully' destroyed (movieclips, 
objects, singletons etc.) when the swf is unloaded. I'm sure many 
developers have investigated this. How do you manage to prevent your 
classes in external swfs from loading into the _global namespace? Have 
you managed to discover a way to prevent the Flash Player from 
inheritently performing this at runtime?



Nicolas Cannasse:

Hi,
I found this thread in Flashcoders that discusses a similar problem I 
have regarding garbage collection of AS2 classes/components when 
unloading swfs from the Flash Player...


garbage collection troubles (Dated: Feb 2005)
http://chattyfig.figleaf.com/mailman/htdig/flashcoders/2005-February/130253.html 



Has anybody come up with other solutions for this as it seems an 
important issue for developers working on large applications? To date, I 
have not as yet explored AS3, Flex 2 or FP9 so I don't know if this has 
been addressed - i'm developing in Flash 8/AS2.



Classes are stored in _global and are not overwritten if already
defined. This has the following side effects :

- if you have already a global named MyClass defined, then the class
is not correctly registered
- you cannot have two versions of the same class at the same time
- classes and all their statics are kept even after removal

One solution is to set the values of _global to null after removing the
loaded clip, but you need to be able to discrimate between your
framework classes and the loaded ones.

That's why for example in haXe (http://haxe.org) classes are stored in
the loaded MovieClip instead of _global.

Nicolas
___
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] Trying to create an emptyMovieClip and then loadanimage into it

2006-09-26 Thread vic
sorry again, here is non-revered code:

class ImageViewerMain extends MovieClip {
// Constants:
public static var CLASS_REF = ImageViewerMain;
// Public Properties:
// Private Properties:
// var to pass from constructor func to loadImage func
private var newlyCreatedImgHolder_mc:MovieClip;
// Initialization:
// set constructor func
public function ImageViewerMain(targetImg_mc:MovieClip, 
targetThumb_mc:MovieClip, depth) {
// create the empty movie holder with a unique instnace name 
and depth
for (var i = 0; i_level0.numOfItems; i++) {
// use the array previously created to set the 
imageToLoad var
var newImageToLoad = _level0.imageArray[i];
var newThumbToLoad = _level0.thumbArray[i];
// create as many empty movieClips as there are images 
in the XML with unique instance names
makeImageMovieClips(i, newImageToLoad, targetImg_mc);
}
}
// Public Methods:
// Semi-Private Methods:
// Private Methods:
private function makeImageMovieClips(i, newImageToLoad, targetImg_mc) {
// create movieClip name
var imgMovieClip = [img_+i];
trace('creating empty movie clip called '+imgMovieClip);
_level0.createEmptyMovieClip(imgMovieClip,i);
// run the loadMovie func
loadImage(newImageToLoad, imgMovieClip);
}
// func to load image into newly created movieClip
private function loadImage(newImageToLoad:String, imgMovieClip):Void {
trace('trying to load '+newImageToLoad+' into '+imgMovieClip)
imgMovieClip.loadMovie(newImageToLoad)
}
}


But it does not work and I feel that it is a scope issue but I am not sure why. 
 Thanks, V


-- Original Message --
From: vic  [EMAIL PROTECTED]
Reply-To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Date:  Tue, 26 Sep 2006 00:30:08 -0700

Shoot, that is reverted code...hold a tick and I will reprise it the way it 
was when it was looking tight and NOT working.  Sorry, V


-- Original Message --
From: vic  [EMAIL PROTECTED]
Reply-To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Date:  Tue, 26 Sep 2006 00:24:56 -0700

I have a Class, I am trying to create an empty movieClip on the stage, that 
is going well because I see this when i hit ctl+alt+v:

Variable _level0.imgViewer = [object #8] {}
Movie Clip: Target=_level0.emptyViewerContainer_mc
Movie Clip: Target=_level0.emptyThumbContainer_mc
Movie Clip: Target=_level0.img_0
Movie Clip: Target=_level0.img_1
Movie Clip: Target=_level0.img_2
Movie Clip: Target=_level0.img_3
Movie Clip: Target=_level0.img_4
Movie Clip: Target=_level0.img_5

So I know I am doing that right, but then I want to loadMovie ( a JPG) into 
it.  that is where I am falling short.  Anyone see the problem?  Below is the 
Class code...thanks in advace, Victor
//
class ImageViewerMain extends MovieClip {
  // Constants:
  public static var CLASS_REF = ImageViewerMain;
  // Public Properties:
  // Private Properties:
  // var to pass from constructor func to loadImage func
  private var newlyCreatedImgHolder_mc:MovieClip;
  // Initialization:
  // set constructor func
  public function ImageViewerMain(targetImg_mc:MovieClip, 
 targetThumb_mc:MovieClip, depth) {
  // create the empty movie holder with a unique instnace name 
 and depth
  for (var i = 0; i_level0.numOfItems; i++) {
  // use the array previously created to set the 
 imageToLoad var
  var newImageToLoad = _level0.imageArray[i];
  var newThumbToLoad = _level0.thumbArray[i];
  // create as many empty movieClips as there are images 
 in the XML with unique instance names
  makeImageMovieClips(i, newImageToLoad, targetImg_mc);
  }
  }
  // Public Methods:
  // Semi-Private Methods:
  // Private Methods:
  private function makeImageMovieClips(i, newImageToLoad, targetImg_mc) {
  // create movieClip name
  var imgMovieClip = [img_+i];
  trace('creating empty movie clip called '+imgMovieClip);
  _level0.createEmptyMovieClip(imgMovieClip,i);
  // run the loadMovie func
  loadImage(newImageToLoad, imgMovieClip,i);
  }
  // func to load image into newly created movieClip
  private function loadImage(img:String, imgMovieClip:MovieClip,i):Void {
  trace(img)
  }
}

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:

[Flashcoders] Function and Conditions

2006-09-26 Thread Laurent CUCHET
There a clip  with two clip inside : parent1 and child 1 and child2 inside.

If I clic parent1 it _enabled child1 and child2

How can I do to suppres parent 1 function after ? I mean get child function
but not parent1 function

parent1.onPress =function () {
child1._xscale=200;
child1._enabled=true;
child2._enabled=true;
};
parent1.child1.onPress =function () {
parent1.child1._x= parent1.child1._x+25;
};

thanks
___
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] Label -- null

2006-09-26 Thread Lieven Cardoen
I can be wrong, but I think this is bullshit.

I'm compiling with MTASC and label is 'null'. Also compiled with Flash,
still Label is 'null' when casted...

Really annoying. The V2 components from Flash really suck. I've also
looked into the code from the V2 components and it's a jungle. I've had
nothing but problems with these components.

Lieven

import mx.controls.Label;
 
 
 
 
 
 public function createLabel(owner:MovieClip, instanceName:String,
 depth:Number, initObj:Object):Label{
 
   var label = owner.attachMovie(Label.symbolName, instanceName,
 depth, initObj);
 
   logger.debug(label :  + label);
 
   label.autoSize = left;
 
   applyStyle(label);
 
   return label;
 
 }
 
 
 
 -- logs a Label ...view0.view1.component12
 
 
 
 
 
 
 
 If I type the label :
 
 
 
 public function createLabel(owner:MovieClip, instanceName:String,
 depth:Number, initObj:Object):Label{
 
   var label:Label = Label(owner.attachMovie(Label.symbolName,
 instanceName, depth, initObj));
 
   logger.debug(label :  + label);
 
   label.autoSize = left;
 
   applyStyle(label);
 
   return label;
 
 }



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Pete
Miller
Sent: maandag 25 september 2006 16:52
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Label -- null

I think you probably want parenthesis around your typecast, as

var label:Label = (Label)(owner.attachMovie(Label.symbolName,
instanceName, depth, initObj));

P.


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of Lieven Cardoen
 Sent: Monday, September 25, 2006 8:53 AM
 To: Flashcoders mailing list
 Cc: Bert Vandamme; Christophe Herreman
 Subject: [Flashcoders] Label -- null
 
 import mx.controls.Label;
 
 
 
 
 
 public function createLabel(owner:MovieClip, instanceName:String,
 depth:Number, initObj:Object):Label{
 
   var label = owner.attachMovie(Label.symbolName, instanceName,
 depth, initObj);
 
   logger.debug(label :  + label);
 
   label.autoSize = left;
 
   applyStyle(label);
 
   return label;
 
 }
 
 
 
 -- logs a Label ...view0.view1.component12
 
 
 
 
 
 
 
 If I type the label :
 
 
 
 public function createLabel(owner:MovieClip, instanceName:String,
 depth:Number, initObj:Object):Label{
 
   var label:Label = Label(owner.attachMovie(Label.symbolName,
 instanceName, depth, initObj));
 
   logger.debug(label :  + label);
 
   label.autoSize = left;
 
   applyStyle(label);
 
   return label;
 
 }
 
 
 
 -- logs 'null'
 
 
 
 
 
 Why the f**k is this???
 
 ___
 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] Implicit Setters: Is validation considered a good orbad OOP practice ?

2006-09-26 Thread Rui Duarte Silva
Hi,

In my opinion (which is a very modest one compared to some of the geniuses
that roam around in this list) you should validate and automatically convert
the value if it's of the expected type but out of range (less than 0 gets
converted to 0 and more than 100 gets converted to 100). Nevertheless, you
should throw some kind of warning back to the user of your component, a
simple trace might do the trick.

If the value if of a different type that cannot be cast into to expected
type (non-numeric string, null, NaN, etc.) you should throw an error and
stop your component from working.

I normally do this, because sometimes calculated values that I pass into my
components are naturally out of range and, sometimes, the effort of putting
them into range might be overkill. Yet, I like to be reminded that this has
happened just in case something is wrong.

This is, again, just my opinion and I don't have any pretension of being an
OOP expert. I've just been doing it for a reasonable amount of time and it
has worked well for me and my development team.

Rui Duarte Silva
Senior Flash Developer / Senior Product Manager
 
MNI - Médicos Na Internet, Saúde na Internet, SA
Alert Life Sciences Computing
 
www.alert-online.com

-Mensagem original-
De: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Em nome de David
Bellerive
Enviada: segunda-feira, 25 de Setembro de 2006 15:19
Para: flashcoders@chattyfig.figleaf.com
Assunto: [Flashcoders] Implicit Setters: Is validation considered a good
orbad OOP practice ?

I've been reading and learning about OO design 
analysis for the past few months and I've just
recently started applying what I've learned in my
Flash projects ?

Learning a new language (like AS3) is no biggie but
learning how to code differently (from procedural to
OOP) is the real challenge for me !

So here's my first OOP question :

When using implicit setter methods (using the set
modifier), is it considered a good or bad practice to
validate the value passed to the implicit setter
method ?

For exemple, let's say I'm building a Flash Video
Player component and I decide that, amongst others, it
must have a volume component parameter which is a
Number.

In the implicit setter method for the volume, should I
validate the value that is passed to this method and
make sure it isn't null or undefined, it isn't NaN and
that it isn't lower than 0 or higher than 100 ?

Which of the following options is best :

1) Do not validate the value and let the user of my
component set the volume to undesired values like
null, undefined, NaN, -20, 973, etc. Here, the
assignment will work as expected whatever the value is
(unless it's of another datatype) but the component
might fail at runtime since a volume obviously can
never be NaN or null for exemple.

2) Validate the value and, if it is null, undefined or
NaN, do nothing. If it is lower than 0, set it to 0.
If it is higher than 100, set it to 100 ? Here, the
assignment might not work as expected if the valus is
undesired (like null or NaN for exemple) so this will
prevent the component from failing at runtime but the
user won't know that his assignment wasn't succesfull.

3) Validate the value and it it's an undesired value,
throw an error ? Here, the component prevents the user
from assigning and undesired value like NaN or
undefined and the user is alerted of the failure at
runtime provided that he used a try catch statement.

What do you guys think ?

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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] Trying to create an emptyMovieClip and then load animage into it

2006-09-26 Thread vic
Shoot, that is reverted code...hold a tick and I will reprise it the way it was 
when it was looking tight and NOT working.  Sorry, V


-- Original Message --
From: vic  [EMAIL PROTECTED]
Reply-To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Date:  Tue, 26 Sep 2006 00:24:56 -0700

I have a Class, I am trying to create an empty movieClip on the stage, that is 
going well because I see this when i hit ctl+alt+v:

Variable _level0.imgViewer = [object #8] {}
Movie Clip: Target=_level0.emptyViewerContainer_mc
Movie Clip: Target=_level0.emptyThumbContainer_mc
Movie Clip: Target=_level0.img_0
Movie Clip: Target=_level0.img_1
Movie Clip: Target=_level0.img_2
Movie Clip: Target=_level0.img_3
Movie Clip: Target=_level0.img_4
Movie Clip: Target=_level0.img_5

So I know I am doing that right, but then I want to loadMovie ( a JPG) into 
it.  that is where I am falling short.  Anyone see the problem?  Below is the 
Class code...thanks in advace, Victor
//
class ImageViewerMain extends MovieClip {
   // Constants:
   public static var CLASS_REF = ImageViewerMain;
   // Public Properties:
   // Private Properties:
   // var to pass from constructor func to loadImage func
   private var newlyCreatedImgHolder_mc:MovieClip;
   // Initialization:
   // set constructor func
   public function ImageViewerMain(targetImg_mc:MovieClip, 
 targetThumb_mc:MovieClip, depth) {
   // create the empty movie holder with a unique instnace name 
 and depth
   for (var i = 0; i_level0.numOfItems; i++) {
   // use the array previously created to set the 
 imageToLoad var
   var newImageToLoad = _level0.imageArray[i];
   var newThumbToLoad = _level0.thumbArray[i];
   // create as many empty movieClips as there are images 
 in the XML with unique instance names
   makeImageMovieClips(i, newImageToLoad, targetImg_mc);
   }
   }
   // Public Methods:
   // Semi-Private Methods:
   // Private Methods:
   private function makeImageMovieClips(i, newImageToLoad, targetImg_mc) {
   // create movieClip name
   var imgMovieClip = [img_+i];
   trace('creating empty movie clip called '+imgMovieClip);
   _level0.createEmptyMovieClip(imgMovieClip,i);
   // run the loadMovie func
   loadImage(newImageToLoad, imgMovieClip,i);
   }
   // func to load image into newly created movieClip
   private function loadImage(img:String, imgMovieClip:MovieClip,i):Void {
   trace(img)
   }
}

___
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] JSFL - Finding all textfields in movieclips in the library

2006-09-26 Thread Remco Hoff

Hi all,

To be able to easily add characters to all the textfields in my fla (not
only those allready on stage), I want to find all the textfields in all
movieclips in the library.

To find all the library items I use this script:

var result = ;
var myItem;
for (var i = 0; i  fl.getDocumentDOM ().library.items.length; i ++)
{
   myItem = fl.getDocumentDOM ().library.items [i];
   result += myItem.itemType +  - ;
   result += myItem.name + \n;
   for (var j in myItem)
   {
   fl.trace ( *  + j + :  + myItem [j]);
   }
fl.trace (result)
}

When 'itemType == movie clip' I want to check if there is a textfield in
that movieclip. Does anyone know how to do that?

Thanks,
Remco Hoff
[Fabrique, Delft, Netherlands]
___
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


SV: [Flashcoders] Movieclip To BitmapData won't work with .flv

2006-09-26 Thread Martin Baltzer Hennelund
Ok thanks a lot I guess I saw this one coming :(

/Martin

-Oprindelig meddelelse-
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På vegne af John Grden
Sendt: 26. september 2006 06:44
Til: Flashcoders mailing list
Emne: Re: [Flashcoders] Movieclip To BitmapData won't work with .flv

it won't work at all with an flv streaming over RTMP - you can't use
bitmapData with it at all.

Yeah I know, it sucks.

On 9/26/06, John VanHorn [EMAIL PROTECTED] wrote:

 first thing that comes to mind is a cross domain issue. are you loading
 the
 flv from another domain? if so, bitmapdata.draw will not work.

 On 9/25/06, Martin Baltzer Hennelund [EMAIL PROTECTED] wrote:
 
  Hi all,
 
  I'm using the BitmapData Object to take a snapshot of the pages in my
  flash app and it works fine on movieclips without a flv video player
 inside.
  But on of the pages has an movieclip inside it which is playing
  (streaming) a flv file and when I try to take a snapshot of this page
  movieclip the bitmap objects returns empty (It is created but is blank).
  When I remove the movieplayer mc the bitmapdata is created correctly!
 
  What am I doing wrong or is this flash bug?
 
  Cheers Martin
 
  Heres my code
 
  //--
  public function toBitmapData(mContent:MovieClip):BitmapData{
 
var width:Number  = Math.min( Math.ceil(mContent._width), 2880);
var height:Number = Math.min(Math.ceil(mContent._height), 2880);
 
var oBmp:BitmapData = new BitmapData(width,height, true, 0x55ff);
 
oBmp.draw( mContent );
 
//debugging
var m:MovieClip = _level0.createEmptyMovieClip(mcTest, 9);
m.attachBitmap(oBmp, 1);
 
return oBmp;
  }
  //--
 
  -Oprindelig meddelelse-
  Fra: [EMAIL PROTECTED] [mailto:
  [EMAIL PROTECTED] På vegne af Josh Santangelo
  Sendt: 25. september 2006 11:09
  Til: Flashcoders mailing list
  Emne: Re: [Flashcoders] Mute Flash Application, mac.
 
  There is a bug which you could potentially exploit for this.
 
  http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?
  catid=184threadid=1000550enterthread=y
 
  Note the last post. If MIDI is not set to 44.1, Flash can't output
  any audio.
 
  -josh
 
  On Sep 22, 2006, at 10:27a, aaron smith wrote:
 
   Does anyone know of an application that can mute flash or browsers
   for a
   mac?
  
   or maybe a way to do it through the terminal?
  
   thanks.
   ___
   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
 



 --
 John Van Horn
 [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




-- 
[  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] Garbage collection for AS2 classes

2006-09-26 Thread Nicolas Cannasse
 Hi,
 I found this thread in Flashcoders that discusses a similar problem I 
 have regarding garbage collection of AS2 classes/components when 
 unloading swfs from the Flash Player...
 
 garbage collection troubles (Dated: Feb 2005)
 http://chattyfig.figleaf.com/mailman/htdig/flashcoders/2005-February/130253.html
  
 
 
 Has anybody come up with other solutions for this as it seems an 
 important issue for developers working on large applications? To date, I 
 have not as yet explored AS3, Flex 2 or FP9 so I don't know if this has 
 been addressed - i'm developing in Flash 8/AS2.

Classes are stored in _global and are not overwritten if already
defined. This has the following side effects :

- if you have already a global named MyClass defined, then the class
is not correctly registered
- you cannot have two versions of the same class at the same time
- classes and all their statics are kept even after removal

One solution is to set the values of _global to null after removing the
loaded clip, but you need to be able to discrimate between your
framework classes and the loaded ones.

That's why for example in haXe (http://haxe.org) classes are stored in
the loaded MovieClip instead of _global.

Nicolas
___
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] JSFL - Finding all textfields in movieclips in thelibrary

2006-09-26 Thread Danny Kodicek
 Hi all,

 To be able to easily add characters to all the textfields in my fla (not
 only those allready on stage), I want to find all the textfields in all
 movieclips in the library.

 To find all the library items I use this script:

 var result = ;
 var myItem;
 for (var i = 0; i  fl.getDocumentDOM ().library.items.length; i ++)
 {
 myItem = fl.getDocumentDOM ().library.items [i];
 result += myItem.itemType +  - ;
 result += myItem.name + \n;
 for (var j in myItem)
 {
 fl.trace ( *  + j + :  + myItem [j]);
 }
 fl.trace (result)
 }

 When 'itemType == movie clip' I want to check if there is a textfield in
 that movieclip. Does anyone know how to do that?

Yes - you can look through the timeline of the library item just as you
would through the main timeline, searching for text elements.

Danny

___
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] Garbage collection for AS2 classes

2006-09-26 Thread chris daubney

Hi,
I found this thread in Flashcoders that discusses a similar problem I 
have regarding garbage collection of AS2 classes/components when 
unloading swfs from the Flash Player...


garbage collection troubles (Dated: Feb 2005)
http://chattyfig.figleaf.com/mailman/htdig/flashcoders/2005-February/130253.html 



Has anybody come up with other solutions for this as it seems an 
important issue for developers working on large applications? To date, I 
have not as yet explored AS3, Flex 2 or FP9 so I don't know if this has 
been addressed - i'm developing in Flash 8/AS2.


Thanks

Chris
___
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] tabIndex stops working, when combo-box component used in movie

2006-09-26 Thread Glen Pike
I think this only happens in the IDE, try the published movie in a 
browser.  Also Control-Disable Keyboard Shortcuts in the Standalone 
Player may help.


Glen

GS Resource wrote:

Hi Martyn

did u ever solve the tabindex problem you were having.  i also have a
similar problem with a textbox component - once it is on the stage tab 
order

doesn't work - you press tab and it goes straight to the component and
ignores the other normal text boxes

Gary E.


On 01/06/06, Green, Martyn [EMAIL PROTECTED] wrote:



I'm trying to set up a custom tab order.

I have a test movie that just contains two clips. All works ok until I
place a combo-box component on the stage. Then tabbing stops working
completely. I've tried setting the tab order for each element using the
accessibility panel and also using actionscript, and see the same 
thing each
time. I'm publishing the movie as Actionscript 2.0, and viewing with 
flash

player 8 (tested in Flash and also in a browser).

I just found that I have the problem even if I delete the combo-box from
the stage (but leave it in the library).

Any suggestions / links appreciated.

Thanks
Martyn





 



Global Search - find millions of archive records

http://www.nationalarchives.gov.uk/search/quick_search.aspx


--- 



National Archives Disclaimer


This email message (and attachments) may contain information that is
confidential  to The National Archives.  If you are not the intended
recipient you cannot use, distribute or copy the message or 
attachments.  In
such a case, please notify the sender by return email immediately and 
erase
all copies of the message and attachments.  Opinions, conclusions and 
other

information in this message and attachments that do not relate to the
official business of The National Archives are neither given nor 
endorsed by

it.


 



___
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] tabIndex stops working, when combo-box component used in movie

2006-09-26 Thread GS Resource

Hi Martyn

did u ever solve the tabindex problem you were having.  i also have a
similar problem with a textbox component - once it is on the stage tab order
doesn't work - you press tab and it goes straight to the component and
ignores the other normal text boxes

Gary E.


On 01/06/06, Green, Martyn [EMAIL PROTECTED] wrote:



I'm trying to set up a custom tab order.

I have a test movie that just contains two clips. All works ok until I
place a combo-box component on the stage. Then tabbing stops working
completely. I've tried setting the tab order for each element using the
accessibility panel and also using actionscript, and see the same thing each
time. I'm publishing the movie as Actionscript 2.0, and viewing with flash
player 8 (tested in Flash and also in a browser).

I just found that I have the problem even if I delete the combo-box from
the stage (but leave it in the library).

Any suggestions / links appreciated.

Thanks
Martyn







Global Search - find millions of archive records

http://www.nationalarchives.gov.uk/search/quick_search.aspx


---

National Archives Disclaimer


This email message (and attachments) may contain information that is
confidential  to The National Archives.  If you are not the intended
recipient you cannot use, distribute or copy the message or attachments.  In
such a case, please notify the sender by return email immediately and erase
all copies of the message and attachments.  Opinions, conclusions and other
information in this message and attachments that do not relate to the
official business of The National Archives are neither given nor endorsed by
it.




___
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] Trying to create an emptyMovieClip and then load an image into it

2006-09-26 Thread vic
I have a Class, I am trying to create an empty movieClip on the stage, that is 
going well because I see this when i hit ctl+alt+v:

Variable _level0.imgViewer = [object #8] {}
Movie Clip: Target=_level0.emptyViewerContainer_mc
Movie Clip: Target=_level0.emptyThumbContainer_mc
Movie Clip: Target=_level0.img_0
Movie Clip: Target=_level0.img_1
Movie Clip: Target=_level0.img_2
Movie Clip: Target=_level0.img_3
Movie Clip: Target=_level0.img_4
Movie Clip: Target=_level0.img_5

So I know I am doing that right, but then I want to loadMovie ( a JPG) into it. 
 that is where I am falling short.  Anyone see the problem?  Below is the Class 
code...thanks in advace, Victor
//
class ImageViewerMain extends MovieClip {
// Constants:
public static var CLASS_REF = ImageViewerMain;
// Public Properties:
// Private Properties:
// var to pass from constructor func to loadImage func
private var newlyCreatedImgHolder_mc:MovieClip;
// Initialization:
// set constructor func
public function ImageViewerMain(targetImg_mc:MovieClip, 
targetThumb_mc:MovieClip, depth) {
// create the empty movie holder with a unique instnace name 
and depth
for (var i = 0; i_level0.numOfItems; i++) {
// use the array previously created to set the 
imageToLoad var
var newImageToLoad = _level0.imageArray[i];
var newThumbToLoad = _level0.thumbArray[i];
// create as many empty movieClips as there are images 
in the XML with unique instance names
makeImageMovieClips(i, newImageToLoad, targetImg_mc);
}
}
// Public Methods:
// Semi-Private Methods:
// Private Methods:
private function makeImageMovieClips(i, newImageToLoad, targetImg_mc) {
// create movieClip name
var imgMovieClip = [img_+i];
trace('creating empty movie clip called '+imgMovieClip);
_level0.createEmptyMovieClip(imgMovieClip,i);
// run the loadMovie func
loadImage(newImageToLoad, imgMovieClip,i);
}
// func to load image into newly created movieClip
private function loadImage(img:String, imgMovieClip:MovieClip,i):Void {
trace(img)
}
}

___
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] Garbage collection for AS2 classes

2006-09-26 Thread Nicolas Cannasse
 Thanks Nicolas,
 I've been trying to find an elegant solution to this to keep any loaded 
 swfs encapsulated so that they are 'fully' destroyed (movieclips, 
 objects, singletons etc.) when the swf is unloaded. I'm sure many 
 developers have investigated this. How do you manage to prevent your 
 classes in external swfs from loading into the _global namespace? Have 
 you managed to discover a way to prevent the Flash Player from 
 inheritently performing this at runtime?

This is not the Player that fixe this behavior but the compiler, which
assigns classes explicitely in _global. A different compiler such as
haXe can then generate different bytecode.

Nicolas
___
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: SPAM-LOW: Re: [Flashcoders] embedded font not displaying

2006-09-26 Thread slangeberg

tried turning auto-kern off?


Unchecking 'auto-kern' did fix it for me! Many thanks. I noticed my other
fields did not have it checked, so not sure why this one did!

Scott

On 9/25/06, Nick Gerig [EMAIL PROTECTED] wrote:


tried turning auto-kern off?


eric dolecki wrote:

 Hmm - weird. All other fonts are working for me at the moment except for
 basic Arial. This indeed seems quite random.

 - e.

 On 9/25/06, slangeberg [EMAIL PROTECTED] wrote:


 Just happened to me, with Arial bold. Totally random so far (I've
 embedded
 arial successfully before), and no idea what.

 -Scott

 On 9/25/06, eric dolecki [EMAIL PROTECTED] wrote:
 
  Has anyone had a dynamic text field with text set to embedded not
 display?
  the field is nested within some mcs, but there is no masking, no
bold,
 no
  italic, etc. And its simple Arial. When embedded (even if I set the
 string
  in the IDE) - nothing displays. Is this a bug with FP8?
 
  - e.
  ___
  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
 



 --

 : : ) Scott
 ___
 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





--

: : ) Scott
___
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] Garbage collection for AS2 classes

2006-09-26 Thread chris daubney
Sorry I wasn't aware of the nature of haXe. I've just read some of the 
documentation (http://haxe.org/tutos/haxe_as2) and now see that it 
addresses this problem perfectly. Great stuff! Thanks.


Chris


Nicolas Cannasse:

Thanks Nicolas,
I've been trying to find an elegant solution to this to keep any loaded 
swfs encapsulated so that they are 'fully' destroyed (movieclips, 
objects, singletons etc.) when the swf is unloaded. I'm sure many 
developers have investigated this. How do you manage to prevent your 
classes in external swfs from loading into the _global namespace? Have 
you managed to discover a way to prevent the Flash Player from 
inheritently performing this at runtime?



This is not the Player that fixe this behavior but the compiler, which
assigns classes explicitely in _global. A different compiler such as
haXe can then generate different bytecode.

Nicolas
___
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] ::dk:: issues with external data and external swf

2006-09-26 Thread DNK

Bjorn Schultheiss wrote:
 
What error is it throwing?


Regards,
 
Bjorn Schultheiss

Senior Flash Developer
QDC Technologies

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of dnk
Sent: Tuesday, 26 September 2006 1:53 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] ::dk:: issues with external data and external swf

Bjorn Schultheiss wrote:

Dk,

Is your swf loaded from within the same domain?
Are the required remoting classes compiled into your swf?


Regards,
 
Bjorn Schultheiss

Senior Flash Developer
QDC Technologies



No errors!

Just missing data. Like I said the data is making it into Flash (as 
determined with service capture), but just not displaying. It displays 
fine when not loaded into another movie.


d

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Function and Conditions

2006-09-26 Thread Kenneth Kawamoto

Hi Laurent,

You can do something like this:
//
parent1.onPress = function() {
   this.child1._xscale = 200;
   this.child1.onPress = function() {
   this._x += 25;
   };
   delete this.onPress;
};
//

// Kenneth Kawamoto (on the road)
// materia prima limited
// [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
// www.materiaprima.co.uk http://www.materiaprima.co.uk

quote
There a clip with two clip inside : parent1 and child 1 and child2 inside.

If I clic parent1 it _enabled child1 and child2

How can I do to suppres parent 1 function after ? I mean get child function
but not parent1 function

   parent1.onPress =function () {
   child1._xscale=200;
   child1._enabled=true;
   child2._enabled=true;
   };
   parent1.child1.onPress =function () {
   parent1.child1._x= parent1.child1._x+25;
   };

thanks
/quote


___
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] embedded font not displaying

2006-09-26 Thread Nick Gerig

slangeberg wrote:


tried turning auto-kern off?



Unchecking 'auto-kern' did fix it for me! Many thanks. I noticed my other
fields did not have it checked, so not sure why this one did!

Scott


glad it saved you - I'll always remember the auto-kern feature for the 
amount of hours I lost trying to figure it out



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] Q:Change publish path dynamically

2006-09-26 Thread Doug Coning
I use a config.xml file to store URLs in so that I can change them on
the fly.  Just load the config file first.

Doug Coning

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, September 25, 2006 4:29 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Q:Change publish path dynamically

Hi
Does anyone know if there is a way to change the publish path
dynamically?

This would be really useful if working with the same FLA in different
test environments instead of manually having to change the publish
settings...time consuming with projects involving lots of fla's.

Thanks
Jim Bachalo 


[e] jbach at bitstream.ca
[c] 416.668.0034
[w] www.bitstream.ca

...all improvisation is life in search of a style.
 - Bruce Mau,'LifeStyle'
___
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 any attachment(s) are intended for the specified recipient(s) 
only and are legally protected.  If you have received this communication in 
error, please reply to sender's e-mail address with notification of the error 
and then destroy this message in all electronic and physical forms.
___
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] How do you manage your classes?

2006-09-26 Thread Mike Keesey
Lately I actually copy all packages to a folder within my project's
folder. Why? Suppose you have a package and you use it on project A.
Later, you use it on project B, and realize there are some issues, so
you change some of the code. Project B finishes. Then, later on, you
find you have to go back to project A with some tweaks and republish it.
Because of changes in the package, there may be problems--at best you
will still have to spend time regression testing.

Copying your packages to a project-local folder means that you have a
secure snapshot of the package.
―
Mike Keesey

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of Dan Rogers
 Sent: Monday, September 25, 2006 4:36 PM
 To: Flashcoders mailing list
 Subject: [Flashcoders] How do you manage your classes?
 
 Flashcoders,
 
 I've been wondering how other flash developers deal with AS2/AS3
 class management on both a project-based and common library level,
 while addressing the need to package up source code for a given
 project to deliver to a team member or client.
 
 I've used version control before, as well as doing the common
 classpath thing for shared classes... but when it's time to deliver
 the source code to someone, I would have to go in and hunt for all
 the classes I used on a project and copy them to the FLA directory
 (and recreate the com.package... structure as well).  Sometimes it
 seems faster to simply create the AS files along with the FLA (in a
 single package), and copy over utility files as needed.  But then you
 get into duplicate classes scattered over multiple projects.
 
 Can anyone provide any insight to a system that works well for them?
 For example, does anyone run custom shell scripts (such as rsync)
 that sync the current project with the main classpath directory?
 
 Thanks,
 -Danro
 ___
 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] ::dk:: issues with external data and external swf

2006-09-26 Thread DNK

Alain Rousseau wrote:
This may be a scope issue. 

Do you make use _root to reference the lower level of your loaded swf ? 
And are you loading the swf in a movieclip or a Level ? 


Either way _root will reference back to _level0 wich isn't the same scope as
your loaded swf. 
Try replacing _root with this or a relative path to the movieClip or

textfield you want to target (ex : this._parent.myTextField).

HTH
Alain



In my original posting I had mentioned that there was no use or _root. I 
always use a relative path as opposed to an absolute to avoid scope 
issues. Even if there is no swf to be loaded, etc. I always use this


The movie is being loaded into an empty movie clip.

Dustin
___
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] Q:Change publish path dynamically

2006-09-26 Thread Steven Sacks | BLITZ
The answer is JSFL.

I wrote an article about how to change publish paths using JSFL on my
blog.

http://www.stevensacks.net/2006/08/06/using/

You can use this technique (see lines 10-13) with a panel (or just a
script) which loads in XML and publishes the SWF.  My entire script
actually saves the file with the new publish path but you don't need to
go that far.

HTH,
Steven
___
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] Label -- null

2006-09-26 Thread Steven Sacks | BLITZ
Are you using -keep?

Have you tried FLASC?  http://osflash.org/flasc
___
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] Delegating Events and AS2

2006-09-26 Thread Sean Scott

Hi All!,

wondering if someone can point me in the right direction.  I am trying
to find a ASBoradcast / Event Dispatcher light model for my app.

Basically i have a number of MCs that will have to either react to
events being broadcast or broadcast their own.

I have Essential AS2 by Colin Moock.  Trying to find something i can
import and maybe pass scope to it, vs have my main class extend it.

I've googled, searched the archived and exausted my more talented
flash developer friends.

Thanks,
Sean
___
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] duplicating an object easily...

2006-09-26 Thread grimmwerks

Is there a simple way of duplicating an object that has many subobjects?

In director it's as simple as obj.duplicate()  -- but there's nothing
in Flash...

I'm trying to create a list of 'saveable' objects that have many
branching children, and of course I'm really just creating all these
pointers to one object...

--
---[ http://www.grimmwerks.com
---[ [EMAIL PROTECTED]
---[ [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] duplicating an object easily...

2006-09-26 Thread eric dolecki

This may get you started:

http://chattyfig.figleaf.com/mailman/htdig/flashcoders/2004-December/127967.html

- e.

On 9/26/06, grimmwerks [EMAIL PROTECTED] wrote:


Is there a simple way of duplicating an object that has many subobjects?

In director it's as simple as obj.duplicate()  -- but there's nothing
in Flash...

I'm trying to create a list of 'saveable' objects that have many
branching children, and of course I'm really just creating all these
pointers to one object...

--
---[ http://www.grimmwerks.com
---[ [EMAIL PROTECTED]
---[ [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] How do you manage your classes?

2006-09-26 Thread Dan Rogers
This is generally what I have been doing for my projects as well.  I  
am guessing that SVN users are doing something similar but instead of  
copying files manually, they are checking out a set of files and  
using that as their local snapshot.  During project A development,  
they would update, check-in, etc...  Then once it's time to move on  
to Project B, they would create a new module in subversion for the  
Project B files.


The problem I am trying to getting my head around is how to work with  
common shared classes throughout multiple projects...  BUT still keep  
copies of these classes in the local snapshot for archiving.  I am  
wondering if the SVN externals functionality would be the right  
solution?  Has anyone successfully used it for this purpose?


-Danro


On Sep 26, 2006, at 10:18 AM, Mike Keesey wrote:


Lately I actually copy all packages to a folder within my project's
folder. Why? Suppose you have a package and you use it on project A.
Later, you use it on project B, and realize there are some issues, so
you change some of the code. Project B finishes. Then, later on, you
find you have to go back to project A with some tweaks and  
republish it.

Because of changes in the package, there may be problems--at best you
will still have to spend time regression testing.

Copying your packages to a project-local folder means that you have a
secure snapshot of the package.
―
Mike Keesey


-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Dan Rogers
Sent: Monday, September 25, 2006 4:36 PM
To: Flashcoders mailing list
Subject: [Flashcoders] How do you manage your classes?

Flashcoders,

I've been wondering how other flash developers deal with AS2/AS3
class management on both a project-based and common library level,
while addressing the need to package up source code for a given
project to deliver to a team member or client.

I've used version control before, as well as doing the common
classpath thing for shared classes... but when it's time to deliver
the source code to someone, I would have to go in and hunt for all
the classes I used on a project and copy them to the FLA directory
(and recreate the com.package... structure as well).  Sometimes it
seems faster to simply create the AS files along with the FLA (in a
single package), and copy over utility files as needed.  But then you
get into duplicate classes scattered over multiple projects.

Can anyone provide any insight to a system that works well for them?
For example, does anyone run custom shell scripts (such as rsync)
that sync the current project with the main classpath directory?

Thanks,
-Danro
___
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] Q:LoadVars send WITHOUT refreshing the browser

2006-09-26 Thread bitstreams
Hi
Currently working on a simple flash form using LoadVars object.

However, I have an unusual request in that I'm not supposed to refresh the 
browser window at all after the send command.
I currently have:

this.myloadvars.send(myFilepath, _self, GET);

but this causes the browser window to refresh. I don't want to target a blank 
window either.

How do I change the above to NOT target any browser window?

Thanks in advance
Jim Bachalo
[e] jbach at bitstream.ca
[c] 416.668.0034
[w] www.bitstream.ca

...all improvisation is life in search of a style.
 - Bruce Mau,'LifeStyle'
___
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] Delegating Events and AS2

2006-09-26 Thread Steve Polk

I have been using this class for all my event needs. Simply import the
class, then to use:



EventManager.getInstance().addListener(eventDoThis, this); //adds the
listener to the class ('this' is the scope)

EventManager.getInstance().removeListener(eventDoThis, this); //removes
the listener

EventManager.getInstance().dispatch({type: eventDoThis, param:true,
param2:false, param3:etc}); //sends the event with params



private function eventDoThis(eventObj:Object):Void

{

 trace(eventDoThis called);

 var p1:Boolean = eventObj.param;

 var p2:Boolean = eventObj.param2;

 var p3:String = eventObj.param3;

}



For me, this setup is nice and clean to use. Just be sure to keep it as a
Singleton to prevent additional EventManagers from overriding this one.



***CODE*

//EventManager.as



import com.core.events.*;



class com.core.events.EventManager {



 private var eventListeners:Object = new Object();

 private static var _instance:EventManager;



 private function EventManager(Void){}



 public static function getInstance(Void):EventManager

 {

   if(_instance === undefined){

 _instance = new EventManager();

   }

   return _instance;

 }



 //dispatch broadcasts the event to all who are setup as listeners

 public function dispatch(eventObject) {

   var tmpA:Array = eventListeners[eventObject.type];

   // Loop through this way to avoid problems with adding/removing
listeners during the dispatch

   for (var i in tmpA) {

 tmpA[i][eventObject.type](eventObject);

   }

 }



 //add a listener to the queue, this will get called once a dispatch
event happens that matches

 public function addListener(event:String, listener:Object) {

   if (eventListeners[event] == undefined) {

 eventListeners[event] = new Array();

   }

   removeListener(event, listener);

   // a listener should only listen to an event once

   eventListeners[event].push(listener);

 }



 //remove the listener from the queue, this prevents additional
rebroadcasting.

 public function removeListener(event:String, listener:Object) {

   var tmpA:Array = eventListeners[event];

   var len:Number = tmpA.length;

   for (var i:Number = 0; ilen; i++) {

 if (tmpA[i] == listener) {

   tmpA.splice(i, 1);

   return;

 }

   }

 }
}

***END CODE*

I hope this helps you out, let me know if you have any problems with it or
have any additional questions.

Steve


-Original Message-
From: [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] On Behalf Of Sean Scott
Sent: Tuesday, September 26, 2006 2:09 PM
To: Flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Delegating Events and AS2



Hi All!,



wondering if someone can point me in the right direction.  I am trying

to find a ASBoradcast / Event Dispatcher light model for my app.



Basically i have a number of MCs that will have to either react to

events being broadcast or broadcast their own.



I have Essential AS2 by Colin Moock.  Trying to find something i can

import and maybe pass scope to it, vs have my main class extend it.



I've googled, searched the archived and exausted my more talented

flash developer friends.



Thanks,

Sean

___

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] Q:LoadVars send WITHOUT refreshing the browser

2006-09-26 Thread slangeberg

I think you can pull that off with:

this.myloadvars.sendAndLoad( myFilepath, GET );

You'll want to check syntax with that... but I know it's possible!

Scott


On 9/26/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


Hi
Currently working on a simple flash form using LoadVars object.

However, I have an unusual request in that I'm not supposed to refresh the
browser window at all after the send command.
I currently have:

this.myloadvars.send(myFilepath, _self, GET);

but this causes the browser window to refresh. I don't want to target a
blank window either.

How do I change the above to NOT target any browser window?

Thanks in advance
Jim Bachalo
[e] jbach at bitstream.ca
[c] 416.668.0034
[w] www.bitstream.ca

...all improvisation is life in search of a style.
 - Bruce Mau,'LifeStyle'
___
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





--

: : ) Scott
___
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] OT?: E-commerce solutions

2006-09-26 Thread slangeberg

[Sorry for the OT post, but I recognize a vast wealth of knowlege and
experience with our groups!]

We have a retail client that's looking at expanding their online store.
Currently, they've outsourced their store so that you're re-directed to a
branded third-party site.

Does anyone have any suggestions for e-commerce engines out there to bring
this in-house? We want to add functionality where you'll be given tailored
product suggestions a'la Amazon.

Our goal would be to make use of as many current commercial products as
possible. One area of interest would be to query an Amazon type service, for
search results. I was looking at Amazon itself for programs, but they have a
dizzying array of products and not sure if they have one that's a really
good fit. These two seemed to sort of fit:

- 
WebStorehttp://www.amazon.com/Instant-Website-Program-Overview/b/ref=sc_fe_c_2_3309511_3/102-7359335-6892927?ie=UTF8node=16269941no=3309511me=A36L942TSJ2AJA%2Fref%3Diws%5Fmain%5F%2F%24%7B0%7D

- Pro Merchant Program http://www.amazonservices.com/promerchant/


I'm wondering if people out there have previously or are currently
developing these kinds of systems and what strategies worked well.

Any advice appreciated!

OT penance:
Extending clips in your library through the 'linkage' window using built-in
classes such as:
mx.core.UIObject
Grants you additional functionality (in my case, wanted to quickly add event
broadcasting capabilities), very quickly.

However, use at your own risk of function and file size! I extended
UIEventDispatcher (and EventDispatcher) this way, and it broke MM's
Alert.show() !

: : ) Scott
___
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: Re: [Flashcoders] duplicating an object easily...

2006-09-26 Thread grimmwerks

Started and finished! Thanks Eric.
___
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: [flashmn] OT?: E-commerce solutions

2006-09-26 Thread slangeberg

Anyone out there with any Miva experiences?

Scott

On 9/26/06, Steve Killingbeck, MMCP, ACE [EMAIL PROTECTED] wrote:


   You could try miva merchant ?





--

Flash4Hire

http://www.flash4hire.com





Steve Killingbeck, MMCP, ACE

Owner  Technical Director

Certified Flash Developer  Designer



[EMAIL PROTECTED]

612.709.6515

--






  --

*From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On
Behalf Of *slangeberg
*Sent:* Tuesday, September 26, 2006 4:25 PM
*To:* Flashcoders mailing list; [EMAIL PROTECTED]
*Subject:* [flashmn] OT?: E-commerce solutions



[Sorry for the OT post, but I recognize a vast wealth of knowlege and
experience with our groups!]

We have a retail client that's looking at expanding their online store.
Currently, they've outsourced their store so that you're re-directed to a
branded third-party site.

Does anyone have any suggestions for e-commerce engines out there to bring
this in-house? We want to add functionality where you'll be given tailored
product suggestions a'la Amazon.

Our goal would be to make use of as many current commercial products as
possible. One area of interest would be to query an Amazon type service, for
search results. I was looking at Amazon itself for programs, but they have a
dizzying array of products and not sure if they have one that's a really
good fit. These two seemed to sort of fit:

- 
WebStorehttp://www.amazon.com/Instant-Website-Program-Overview/b/ref=sc_fe_c_2_3309511_3/102-7359335-6892927?ie=UTF8node=16269941no=3309511me=A36L942TSJ2AJA%2Fref%3Diws%5Fmain%5F%2F%24%7B0%7D

- Pro Merchant Program http://www.amazonservices.com/promerchant/


I'm wondering if people out there have previously or are currently
developing these kinds of systems and what strategies worked well.

Any advice appreciated!

*OT penance: *
Extending clips in your library through the 'linkage' window using
built-in classes such as:
mx.core.UIObject
Grants you additional functionality (in my case, wanted to quickly add
event broadcasting capabilities), very quickly.

However, use at your own risk of function and file size! I extended
UIEventDispatcher (and EventDispatcher) this way, and it broke MM's
Alert.show() !

: : ) Scott

 __._,_.___  Messages in this topic
http://groups.yahoo.com/group/flashmn/message/2761;_ylc=X3oDMTM0N25jZzByBF9TAzk3MzU5NzE0BGdycElkAzc2Mjc1MDYEZ3Jwc3BJZAMxNjAwMDA1NzAzBG1zZ0lkAzI3NjIEc2VjA2Z0cgRzbGsDdnRwYwRzdGltZQMxMTU5MzA5MzMyBHRwY0lkAzI3NjE-(
2)  Reply (via web post)
http://groups.yahoo.com/group/flashmn/post;_ylc=X3oDMTJwODI4a3BwBF9TAzk3MzU5NzE0BGdycElkAzc2Mjc1MDYEZ3Jwc3BJZAMxNjAwMDA1NzAzBG1zZ0lkAzI3NjIEc2VjA2Z0cgRzbGsDcnBseQRzdGltZQMxMTU5MzA5MzMy?act=replymessageNum=2762|
 Start
a new topic
http://groups.yahoo.com/group/flashmn/post;_ylc=X3oDMTJlc2F0bnNjBF9TAzk3MzU5NzE0BGdycElkAzc2Mjc1MDYEZ3Jwc3BJZAMxNjAwMDA1NzAzBHNlYwNmdHIEc2xrA250cGMEc3RpbWUDMTE1OTMwOTMzMg--
 
Messageshttp://groups.yahoo.com/group/flashmn/messages;_ylc=X3oDMTJlN2hxM3RzBF9TAzk3MzU5NzE0BGdycElkAzc2Mjc1MDYEZ3Jwc3BJZAMxNjAwMDA1NzAzBHNlYwNmdHIEc2xrA21zZ3MEc3RpbWUDMTE1OTMwOTMzMg--|
Fileshttp://groups.yahoo.com/group/flashmn/files;_ylc=X3oDMTJmNXUzZHIwBF9TAzk3MzU5NzE0BGdycElkAzc2Mjc1MDYEZ3Jwc3BJZAMxNjAwMDA1NzAzBHNlYwNmdHIEc2xrA2ZpbGVzBHN0aW1lAzExNTkzMDkzMzI-|
Photoshttp://groups.yahoo.com/group/flashmn/photos;_ylc=X3oDMTJlcGdkcjdoBF9TAzk3MzU5NzE0BGdycElkAzc2Mjc1MDYEZ3Jwc3BJZAMxNjAwMDA1NzAzBHNlYwNmdHIEc2xrA3Bob3QEc3RpbWUDMTE1OTMwOTMzMg--|
Linkshttp://groups.yahoo.com/group/flashmn/links;_ylc=X3oDMTJmMTV2YWlyBF9TAzk3MzU5NzE0BGdycElkAzc2Mjc1MDYEZ3Jwc3BJZAMxNjAwMDA1NzAzBHNlYwNmdHIEc2xrA2xpbmtzBHN0aW1lAzExNTkzMDkzMzI-|
Databasehttp://groups.yahoo.com/group/flashmn/database;_ylc=X3oDMTJjdXI0N2J0BF9TAzk3MzU5NzE0BGdycElkAzc2Mjc1MDYEZ3Jwc3BJZAMxNjAwMDA1NzAzBHNlYwNmdHIEc2xrA2RiBHN0aW1lAzExNTkzMDkzMzI-|
Pollshttp://groups.yahoo.com/group/flashmn/polls;_ylc=X3oDMTJmMDA0NjYzBF9TAzk3MzU5NzE0BGdycElkAzc2Mjc1MDYEZ3Jwc3BJZAMxNjAwMDA1NzAzBHNlYwNmdHIEc2xrA3BvbGxzBHN0aW1lAzExNTkzMDkzMzI-|
Membershttp://groups.yahoo.com/group/flashmn/members;_ylc=X3oDMTJla2dibTJxBF9TAzk3MzU5NzE0BGdycElkAzc2Mjc1MDYEZ3Jwc3BJZAMxNjAwMDA1NzAzBHNlYwNmdHIEc2xrA21icnMEc3RpbWUDMTE1OTMwOTMzMg--|
Calendarhttp://groups.yahoo.com/group/flashmn/calendar;_ylc=X3oDMTJkaGRoc3J1BF9TAzk3MzU5NzE0BGdycElkAzc2Mjc1MDYEZ3Jwc3BJZAMxNjAwMDA1NzAzBHNlYwNmdHIEc2xrA2NhbARzdGltZQMxMTU5MzA5MzMy
  [image: Yahoo! 
Groups]http://groups.yahoo.com/;_ylc=X3oDMTJkcjBobmNyBF9TAzk3MzU5NzE0BGdycElkAzc2Mjc1MDYEZ3Jwc3BJZAMxNjAwMDA1NzAzBHNlYwNmdHIEc2xrA2dmcARzdGltZQMxMTU5MzA5MzMy
Change settings via the 
Webhttp://groups.yahoo.com/group/flashmn/join;_ylc=X3oDMTJmaWNuOTZoBF9TAzk3MzU5NzE0BGdycElkAzc2Mjc1MDYEZ3Jwc3BJZAMxNjAwMDA1NzAzBHNlYwNmdHIEc2xrA3N0bmdzBHN0aW1lAzExNTkzMDkzMzI-(Yahoo!
 ID required)
Change settings via email: Switch delivery to Daily Digest[EMAIL 
PROTECTED]:+Digest| Switch
format to Traditional[EMAIL PROTECTED]:+Traditional
 Visit Your Group

RE: [Flashcoders] Delegating Events and AS2

2006-09-26 Thread Mike Keesey
Whoops!

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of Mike Keesey
 Sent: Tuesday, September 26, 2006 2:23 PM
 To: 'Flashcoders mailing list'
 Subject: RE: [Flashcoders] Delegating Events and AS2

[...]
 
 Or, if using AS3.0, I think you can wrap a
flash.events.EventDispatcher
 object (Decorator Design Pattern):
 

[...]

   private function _dispatcher:EventDispatcher;
 }

Obviously, that should be:

private var _dispatcher:EventDispatcher;

―
Mike Keesey

 
 (Note: I haven't actually tried AS3.0, so someone let me know if I
 messed anything up.)
 ―
 Mike Keesey
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:flashcoders-
  [EMAIL PROTECTED] On Behalf Of Sean Scott
  Sent: Tuesday, September 26, 2006 12:09 PM
  To: Flashcoders@chattyfig.figleaf.com
  Subject: [Flashcoders] Delegating Events and AS2
 
  Hi All!,
 
  wondering if someone can point me in the right direction.  I am
trying
  to find a ASBoradcast / Event Dispatcher light model for my app.
 
  Basically i have a number of MCs that will have to either react to
  events being broadcast or broadcast their own.
 
  I have Essential AS2 by Colin Moock.  Trying to find something i can
  import and maybe pass scope to it, vs have my main class extend it.
 
  I've googled, searched the archived and exausted my more talented
  flash developer friends.
 
  Thanks,
  Sean
  ___
  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] JSFL - Finding all textfields in movieclips in the library

2006-09-26 Thread Arse @ Snepo

Remco,

I recently posted some jsfl on my blog that shows how to recursively 
find all textfields and adjust font usage at a character level:


http://blog.snepo.com/articles/2006/09/04/flash-jsfl-swap-font

should be an easy step to modify it to your needs.

Arse
http://www.snepo.com
http://depot.snepo.com
http://www.arseiam.com


Remco Hoff wrote:

Hi all,

To be able to easily add characters to all the textfields in my fla (not
only those allready on stage), I want to find all the textfields in all
movieclips in the library.

To find all the library items I use this script:

var result = ;
var myItem;
for (var i = 0; i  fl.getDocumentDOM ().library.items.length; i ++)
{
   myItem = fl.getDocumentDOM ().library.items [i];
   result += myItem.itemType +  - ;
   result += myItem.name + \n;
   for (var j in myItem)
   {
   fl.trace ( *  + j + :  + myItem [j]);
   }
fl.trace (result)
}

When 'itemType == movie clip' I want to check if there is a textfield in
that movieclip. Does anyone know how to do that?

Thanks,
Remco Hoff
[Fabrique, Delft, Netherlands]
___
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




--
*Anthony Eden*: Inventor at Snepo http://www.snepo.com/
contact | [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] | 0411 5622 02


___
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] Querystring prevents FLV playback

2006-09-26 Thread Brian Williams

If you're using the Flash classes for playback (like the FLVPlayback class),
it actually looks at the suffix of the loaded url to determine whether it's
an FLV or xml (playlist?).  You can hack it to work by loading

video1.flv?id=26-09-2006type=.flv

I haven't actually dug through the classes to see where this braindead code
is (it should look at the suffix before the query string).   I think you
also get a trace statement when the class realizes it has loaded something
that's not valid xml (or it may be a status callback).

--Brian


On 9/26/06, Jake Prime [EMAIL PROTECTED] wrote:


Hi

I have been working on a Flash website which is going through several
series of updates. To prevent caching, whenever the site is updated I
push the new date into the main flash file, and this is passed on to
all other files loaded via the querystring.

e.g:
home.swf?id=26-09-2006
data.xml?id=26-09-2006
video1.flv?id=26-09-2006

However I have just realised that if I do this to the FLV files in the
site, it prevents them from playing. Is this a bug or is this
something that you would expect to happen? Or is there in fact some
FLV feature that allows you to use the querystring for some purpose?

I had always been under the impression that any static web file would
be completely unnaffected by the presence of a querystring. At this
point my problem has been fixed, but I'm still curious as to your
thoughts.

Thanks
Jake
___
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] Q:LoadVars send WITHOUT refreshing the browser

2006-09-26 Thread Muzak
Tried the docs?

quote
A successful send() method call will always open a new browser window or 
replace content in an existing window or frame. If you 
would rather send information to a server and continue playing your SWF file 
without opening a new window or replacing content in a 
window or frame, then you should use LoadVars.sendAndLoad().
/quote



- Original Message - 
From: [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Tuesday, September 26, 2006 10:55 PM
Subject: [Flashcoders] Q:LoadVars send WITHOUT refreshing the browser


 Hi
 Currently working on a simple flash form using LoadVars object.

 However, I have an unusual request in that I'm not supposed to refresh the 
 browser window at all after the send command.
 I currently have:

 this.myloadvars.send(myFilepath, _self, GET);

 but this causes the browser window to refresh. I don't want to target a blank 
 window either.

 How do I change the above to NOT target any browser window?

 Thanks in advance


___
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] Delegating Events and AS2

2006-09-26 Thread Dan Rogers
I personally use an extremely simplified way of dealing with events.   
I've used EventDispatcher before, but it feels like overkill most of  
the time.  I realize my method has no ability to multicast events,  
but it's quick, easy to read and gets the job done.


Here's an example:

___
// WidgetManager.as

import mx.utils.Delegate;

class WidgetManager {
private var _widget1:Widget;
private var _widget2:Widget;

public function WidgetManager (timeline:MovieClip) {
_widget1 = new Widget(1, timeline.widget1_mc);
_widget1.clickEvent = Delegate.create(this, widgetClick); // 
add event

_widget2 = new Widget(2, timeline.widget2_mc);
_widget2.clickEvent = Delegate.create(this, widgetClick); // 
add event
}

private function widgetClick (eventObj:Object):Void {
trace(widget  + eventObj.id +  was clicked);
eventObj.target.clickEvent = null; // remove event
}
}

___
// Widget.as

import mx.utils.Delegate;

class Widget {
public var clickEvent:Function; // event method
private var _id:Number;
private var _buttonMC:MovieClip;

public function Widget (id:Number, mc:MovieClip) {
_id = id;
_buttonMC = mc;
_buttonMC.onPress = Delegate.create(this, buttonPress);
}

public function buttonPress ():Void {
clickEvent({target:this, id: _id});
}
}




On Sep 26, 2006, at 12:09 PM, Sean Scott wrote:


Hi All!,

wondering if someone can point me in the right direction.  I am trying
to find a ASBoradcast / Event Dispatcher light model for my app.

Basically i have a number of MCs that will have to either react to
events being broadcast or broadcast their own.

I have Essential AS2 by Colin Moock.  Trying to find something i can
import and maybe pass scope to it, vs have my main class extend it.

I've googled, searched the archived and exausted my more talented
flash developer friends.

Thanks,
Sean
___
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] Q:LoadVars send WITHOUT refreshing the browser

2006-09-26 Thread Rich Rodecker

don't worry, that's not an unusual request, that's pretty much always been a
feature of flash.  Like muzak said, use sendAndLoad().  You don't absolutely
have to catch any return values from the server if you don't want to, but
most people would at least like to check to make sure that everything went
ok.

On 9/26/06, Muzak [EMAIL PROTECTED] wrote:


Tried the docs?

quote
A successful send() method call will always open a new browser window or
replace content in an existing window or frame. If you
would rather send information to a server and continue playing your SWF
file without opening a new window or replacing content in a
window or frame, then you should use LoadVars.sendAndLoad().
/quote



- Original Message -
From: [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Tuesday, September 26, 2006 10:55 PM
Subject: [Flashcoders] Q:LoadVars send WITHOUT refreshing the browser


 Hi
 Currently working on a simple flash form using LoadVars object.

 However, I have an unusual request in that I'm not supposed to refresh
the browser window at all after the send command.
 I currently have:

 this.myloadvars.send(myFilepath, _self, GET);

 but this causes the browser window to refresh. I don't want to target a
blank window either.

 How do I change the above to NOT target any browser window?

 Thanks in advance


___
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] Delegating Events and AS2

2006-09-26 Thread vic
Hey Dan, I like the way you do it, its pretty simple.  But here is, what 
probably will be an incredibly stupid question: 

How do I capture the event?  Thanks, V

I personally use an extremely simplified way of dealing with events.   
I've used EventDispatcher before, but it feels like overkill most of  
the time.  I realize my method has no ability to multicast events,  
but it's quick, easy to read and gets the job done.

Here's an example:

___
// WidgetManager.as

import mx.utils.Delegate;

class WidgetManager {
private var _widget1:Widget;
private var _widget2:Widget;

public function WidgetManager (timeline:MovieClip) {
_widget1 = new Widget(1, timeline.widget1_mc);
_widget1.clickEvent = Delegate.create(this, widgetClick); // add event

_widget2 = new Widget(2, timeline.widget2_mc);
_widget2.clickEvent = Delegate.create(this, widgetClick); // add event
}

private function widgetClick (eventObj:Object):Void {
trace(widget  + eventObj.id +  was clicked);
eventObj.target.clickEvent = null; // remove event
}
}

___
// Widget.as

import mx.utils.Delegate;

class Widget {
public var clickEvent:Function; // event method
private var _id:Number;
private var _buttonMC:MovieClip;

public function Widget (id:Number, mc:MovieClip) {
_id = id;
_buttonMC = mc;
_buttonMC.onPress = Delegate.create(this, buttonPress);
}

public function buttonPress ():Void {
clickEvent({target:this, id: _id});
}
}




On Sep 26, 2006, at 12:09 PM, Sean Scott wrote:

 Hi All!,

 wondering if someone can point me in the right direction.  I am trying
 to find a ASBoradcast / Event Dispatcher light model for my app.

 Basically i have a number of MCs that will have to either react to
 events being broadcast or broadcast their own.

 I have Essential AS2 by Colin Moock.  Trying to find something i can
 import and maybe pass scope to it, vs have my main class extend it.

 I've googled, searched the archived and exausted my more talented
 flash developer friends.

 Thanks,
 Sean
 ___
 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] f9 ide crashing

2006-09-26 Thread eric dolecki

http://www.ericd.net/2006/09/flash-9-beta-ide-crashing-ideas.inc

has anyone seen a crash like this when trying to produce a as3 f9 SWF? i am
running another Java application when this has been happening. running on a
MacPro.

- e.
___
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] How do you manage your classes?

2006-09-26 Thread Ray Chuan

Hi,
you can have two repositories: one for your core classes that you
reuse, and another to hold the code for the project that you're
working on.

So your working directory looks like this:

ProjectFoo
|- core classes (not part of project repo)
|- core-rev.txt (contains revision of core repo you are using)
|- src (in)
|- deploy (in)
...

Just leave a textfile containing the revision of the core classes that
you are using at that time, so you don't have to add the core classes
to your project repository.

On 9/27/06, Dan Rogers [EMAIL PROTECTED] wrote:

This is generally what I have been doing for my projects as well.  I
am guessing that SVN users are doing something similar but instead of
copying files manually, they are checking out a set of files and
using that as their local snapshot.  During project A development,
they would update, check-in, etc...  Then once it's time to move on
to Project B, they would create a new module in subversion for the
Project B files.

The problem I am trying to getting my head around is how to work with
common shared classes throughout multiple projects...  BUT still keep
copies of these classes in the local snapshot for archiving.  I am
wondering if the SVN externals functionality would be the right
solution?  Has anyone successfully used it for this purpose?

-Danro


On Sep 26, 2006, at 10:18 AM, Mike Keesey wrote:

 Lately I actually copy all packages to a folder within my project's
 folder. Why? Suppose you have a package and you use it on project A.
 Later, you use it on project B, and realize there are some issues, so
 you change some of the code. Project B finishes. Then, later on, you
 find you have to go back to project A with some tweaks and
 republish it.
 Because of changes in the package, there may be problems--at best you
 will still have to spend time regression testing.

 Copying your packages to a project-local folder means that you have a
 secure snapshot of the package.
 ―
 Mike Keesey

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of Dan Rogers
 Sent: Monday, September 25, 2006 4:36 PM
 To: Flashcoders mailing list
 Subject: [Flashcoders] How do you manage your classes?

 Flashcoders,

 I've been wondering how other flash developers deal with AS2/AS3
 class management on both a project-based and common library level,
 while addressing the need to package up source code for a given
 project to deliver to a team member or client.

 I've used version control before, as well as doing the common
 classpath thing for shared classes... but when it's time to deliver
 the source code to someone, I would have to go in and hunt for all
 the classes I used on a project and copy them to the FLA directory
 (and recreate the com.package... structure as well).  Sometimes it
 seems faster to simply create the AS files along with the FLA (in a
 single package), and copy over utility files as needed.  But then you
 get into duplicate classes scattered over multiple projects.

 Can anyone provide any insight to a system that works well for them?
 For example, does anyone run custom shell scripts (such as rsync)
 that sync the current project with the main classpath directory?

 Thanks,
 -Danro
 ___
 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




--
Cheers,
Ray Chuan
___
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] Delegating Events and AS2

2006-09-26 Thread Dan Rogers
Vic, if you've ever used the XML or NetStream classes... it mimics  
those types of event updates.  For example...


var xmlData = new XML();
xmlData.onLoad = function () {
// gets invoked by the XML instance
}

So if you delegate the onLoad method, you get something like this:

xmlData.onLoad = Delegate.create(this, xmlDataLoad);

... which is essentially what I am trying to do with my own classes.   
Another reason I like delegating events this way, is that the  
compiler will catch typos in the names of the event functions, so I  
am not searching around trying to figure out why a certain event is  
not firing.


-Danro


On Sep 26, 2006, at 7:06 PM, vic wrote:

Hey Dan, I like the way you do it, its pretty simple.  But here is,  
what probably will be an incredibly stupid question:


How do I capture the event?  Thanks, V

I personally use an extremely simplified way of dealing with events.
I've used EventDispatcher before, but it feels like overkill most of
the time.  I realize my method has no ability to multicast events,
but it's quick, easy to read and gets the job done.

Here's an example:

___
// WidgetManager.as

import mx.utils.Delegate;

class WidgetManager {
private var _widget1:Widget;
private var _widget2:Widget;

public function WidgetManager (timeline:MovieClip) {
_widget1 = new Widget(1, timeline.widget1_mc);
_widget1.clickEvent = Delegate.create(this, widgetClick); // add event

_widget2 = new Widget(2, timeline.widget2_mc);
_widget2.clickEvent = Delegate.create(this, widgetClick); // add event
}

private function widgetClick (eventObj:Object):Void {
trace(widget  + eventObj.id +  was clicked);
eventObj.target.clickEvent = null; // remove event
}
}

___
// Widget.as

import mx.utils.Delegate;

class Widget {
public var clickEvent:Function; // event method
private var _id:Number;
private var _buttonMC:MovieClip;

public function Widget (id:Number, mc:MovieClip) {
_id = id;
_buttonMC = mc;
_buttonMC.onPress = Delegate.create(this, buttonPress);
}

public function buttonPress ():Void {
clickEvent({target:this, id: _id});
}
}




On Sep 26, 2006, at 12:09 PM, Sean Scott wrote:


Hi All!,

wondering if someone can point me in the right direction.  I am  
trying

to find a ASBoradcast / Event Dispatcher light model for my app.

Basically i have a number of MCs that will have to either react to
events being broadcast or broadcast their own.

I have Essential AS2 by Colin Moock.  Trying to find something i can
import and maybe pass scope to it, vs have my main class extend it.

I've googled, searched the archived and exausted my more talented
flash developer friends.

Thanks,
Sean
___
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@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] How do you manage your classes?

2006-09-26 Thread JOR
Not to say I don't do the same thing on occasion but this might fall 
under the Copy-and-Paste Programming antipattern.


http://en.wikipedia.org/wiki/Copy_and_paste_programming
http://c2.com/cgi/wiki?CopyAndPasteProgramming

Copy-and-Paste Programming isn't necessarily wrong when used in the 
correct context.  Sometimes your copy will mutate into something so 
different that it makes sense to have two separate versions.  However, 
if used poorly or abused it could lead to a headache.


One commenter on the second linked site put it nicely:
If the original code has flaws, not only do you have to hunt down all 
the clones, but what if you miss some? It's like a re-occurring rash - 
Damn, I thought I got rid of that! - it keeps coming back when you think 
its gone for good. -- ToddCoram


I have been specifically looking into software like subversion which 
seems to be the standard.



James O'Reilly
http://www.jamesor.com



Mike Keesey wrote:

Lately I actually copy all packages to a folder within my project's
folder. Why? Suppose you have a package and you use it on project A.
Later, you use it on project B, and realize there are some issues, so
you change some of the code. Project B finishes. Then, later on, you
find you have to go back to project A with some tweaks and republish it.
Because of changes in the package, there may be problems--at best you
will still have to spend time regression testing.

Copying your packages to a project-local folder means that you have a
secure snapshot of the package.
―
Mike Keesey



-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Dan Rogers
Sent: Monday, September 25, 2006 4:36 PM
To: Flashcoders mailing list
Subject: [Flashcoders] How do you manage your classes?

Flashcoders,

I've been wondering how other flash developers deal with AS2/AS3
class management on both a project-based and common library level,
while addressing the need to package up source code for a given
project to deliver to a team member or client.

I've used version control before, as well as doing the common
classpath thing for shared classes... but when it's time to deliver
the source code to someone, I would have to go in and hunt for all
the classes I used on a project and copy them to the FLA directory
(and recreate the com.package... structure as well).  Sometimes it
seems faster to simply create the AS files along with the FLA (in a
single package), and copy over utility files as needed.  But then you
get into duplicate classes scattered over multiple projects.

Can anyone provide any insight to a system that works well for them?
For example, does anyone run custom shell scripts (such as rsync)
that sync the current project with the main classpath directory?

Thanks,
-Danro

___
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] Delegating Events and AS2

2006-09-26 Thread vic
Danno, that is really cool, I will try that but I have done it, I made a site 
template that, when a button is clicked it dispatches an Event...but I had the 
hardest time doing it.  I am looking for a simple way to do it that works in a 
Class. without worrying about scope.  Mine relies heavily upon scope.  Anyone 
have any example?  Thanks, V


-- Original Message --
From: Dan Rogers [EMAIL PROTECTED]
Reply-To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Date:  Tue, 26 Sep 2006 20:55:32 -0700

Vic, if you've ever used the XML or NetStream classes... it mimics  
those types of event updates.  For example...

var xmlData = new XML();
xmlData.onLoad = function () {
   // gets invoked by the XML instance
}

So if you delegate the onLoad method, you get something like this:

xmlData.onLoad = Delegate.create(this, xmlDataLoad);

... which is essentially what I am trying to do with my own classes.   
Another reason I like delegating events this way, is that the  
compiler will catch typos in the names of the event functions, so I  
am not searching around trying to figure out why a certain event is  
not firing.

-Danro


On Sep 26, 2006, at 7:06 PM, vic wrote:

 Hey Dan, I like the way you do it, its pretty simple.  But here is,  
 what probably will be an incredibly stupid question:

 How do I capture the event?  Thanks, V

 I personally use an extremely simplified way of dealing with events.
 I've used EventDispatcher before, but it feels like overkill most of
 the time.  I realize my method has no ability to multicast events,
 but it's quick, easy to read and gets the job done.

 Here's an example:

 ___
 // WidgetManager.as

 import mx.utils.Delegate;

 class WidgetManager {
 private var _widget1:Widget;
 private var _widget2:Widget;

 public function WidgetManager (timeline:MovieClip) {
 _widget1 = new Widget(1, timeline.widget1_mc);
 _widget1.clickEvent = Delegate.create(this, widgetClick); // add event

 _widget2 = new Widget(2, timeline.widget2_mc);
 _widget2.clickEvent = Delegate.create(this, widgetClick); // add event
 }

 private function widgetClick (eventObj:Object):Void {
 trace(widget  + eventObj.id +  was clicked);
 eventObj.target.clickEvent = null; // remove event
 }
 }

 ___
 // Widget.as

 import mx.utils.Delegate;

 class Widget {
 public var clickEvent:Function; // event method
 private var _id:Number;
 private var _buttonMC:MovieClip;

 public function Widget (id:Number, mc:MovieClip) {
 _id = id;
 _buttonMC = mc;
 _buttonMC.onPress = Delegate.create(this, buttonPress);
 }

 public function buttonPress ():Void {
 clickEvent({target:this, id: _id});
 }
 }




 On Sep 26, 2006, at 12:09 PM, Sean Scott wrote:

 Hi All!,

 wondering if someone can point me in the right direction.  I am  
 trying
 to find a ASBoradcast / Event Dispatcher light model for my app.

 Basically i have a number of MCs that will have to either react to
 events being broadcast or broadcast their own.

 I have Essential AS2 by Colin Moock.  Trying to find something i can
 import and maybe pass scope to it, vs have my main class extend it.

 I've googled, searched the archived and exausted my more talented
 flash developer friends.

 Thanks,
 Sean
 ___
 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@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