Re: [Flashcoders] Loading library movie clips sequentially?

2006-12-01 Thread Micky Hulse

Jack Doyle wrote:

http://www.greensock.com/actionscript/tweenlite/
http://www.greensock.com/actionscript/PreloadAssetManager/

Good luck.


Jack, you da' man!

This is great, so many helpful people on this list! Many thanks Jack and 
all...


I may be back with more questions... I love learning new things. :)

Cheers,
Micky


--
 Wishlist: 
   Switch: 
 BCC?: 
   My: 
___
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] Attach sub class to swf which is loaded via attachMovie()?

2006-12-01 Thread Micky Hulse
Just curious if it is possible to extend/apply a sub class to a swf 
which is loaded via attachMovie()?


TIA,
Cheers,
M

--
 Wishlist: 
   Switch: 
 BCC?: 
   My: 
___
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] __DATE__ or similar in AS2 ?

2006-12-01 Thread Stefan Thurnherr

Hi flashcoders,

I am looking for an easy way to indicate an SWF's version on the stage
(i.e. via a textfield). I guess the easiest way would be if there was
a compiler literal like __DATE__ (indicating the time/date of
compilation) available within ActionScript. But I couldn't find any
such thing neither in the livedocs, nor with the help of the almighty
G.

I'd prefer a solution that also works offline (i.e., not involving a
call to a server-side script that gives the SWF access to its own
time/date of creation).

How do other flashcoders solve this problem?

Thanks,
stefan.
___
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] __DATE__ or similar in AS2 ?

2006-12-01 Thread Ian Thomas

We haven't found an easy way to do it - we've done it two ways:

i) Use Ant to update a textfile as part of the build process, and read
that textfile in at runtime. A good way to get a version number / date
for an entire _deployment_, rather than just for one .swf.

or

ii) Use Ant to update a textfile again, then use token-replacement to
update a value in a swfmill input file, then use swfmill to create the
final .swf. That way the .swf itself has a version / date embedded in
it. But, obviously, it ties you to using swfmill for that file.

If you were using MTASC, you could do something similar to ii) very
easily. (We're not.)

Ant is your friend. :-)

HTH,
  Ian

On 12/1/06, Stefan Thurnherr <[EMAIL PROTECTED]> wrote:

Hi flashcoders,

I am looking for an easy way to indicate an SWF's version on the stage
(i.e. via a textfield). I guess the easiest way would be if there was
a compiler literal like __DATE__ (indicating the time/date of
compilation) available within ActionScript. But I couldn't find any
such thing neither in the livedocs, nor with the help of the almighty
G.

I'd prefer a solution that also works offline (i.e., not involving a
call to a server-side script that gives the SWF access to its own
time/date of creation).

How do other flashcoders solve this problem?

Thanks,
 stefan.

___
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] __DATE__ or similar in AS2 ?

2006-12-01 Thread Michael Stuhr

Stefan Thurnherr schrieb:

Hi flashcoders,

I am looking for an easy way to indicate an SWF's version on the stage
(i.e. via a textfield). I guess the easiest way would be if there was
a compiler literal like __DATE__ (indicating the time/date of
compilation) available within ActionScript. But I couldn't find any
such thing neither in the livedocs, nor with the help of the almighty
G.

I'd prefer a solution that also works offline (i.e., not involving a
call to a server-side script that gives the SWF access to its own
time/date of creation).

How do other flashcoders solve this problem?



i've created a not-even-near-perfect serial-builder with jsfl.

i'd always wanted to make this an os-version, but haven't had the time to do 
this.

but before offering you my crappy code, i'd like to hear what others do have.


micha

___
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] [OT] SCM/Project management tool

2006-12-01 Thread Marcelo de Moraes Serpa

Hi Josh,

Thanks for the tips, but I already chose trac. Actually, I'm using it
already and I must say it's a great piece of software! The only downside is
the installation process which can be a pain if you're not used to *nix
systems.

Thank you all for the suggestions guys!

Marcelo.

On 11/30/06, Josh Santangelo <[EMAIL PROTECTED]> wrote:


...and has the most unusable UI/workflow of any bug-tracking software
I've ever used. Got no love for Mantis.

TestTrack Pro is great if you're Windows-centric and willing to spend
some money.

http://www.seapine.com/ttpro.html

In addition to web access, there's a Windows desktop client, and a
simplified version you can give to clients to report bugs/etc.

ActiveCollab looks cool too, but is still very early in development.

http://www.activecollab.com/

-josh

On Nov 28, 2006, at 4:32p, Steven Sacks | BLITZ wrote:

> If you're looking for bug/feature tracking for your clients, check out
> Mantis.  It's easy to set up, customize (if you know php), and best of
> all, it's free.
>
> 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
>

___
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: Re[4]: [Flashcoders] onChange or onResize or onX event - howto?

2006-12-01 Thread Matthias Dittgen

Hello,

I learned a lot now about broadcasting events, but still haven't
achieve my initial intention, which was as follows:

I want to have a class (kind of black-box), I call MyUIObject.
Then I want to create instances of MyUIObject:

var uio:MyUIObject = new MyUIObject();

I want to have a classical on event mechanism:
uio.onSomething = function()
{
   trace(this._something);
}

And I want to change the value of a "property" in an implicit way:
uio._something = "hello";


1. --> uio._something might be a property of MyUIObject, which was set
up using the set/get keywords. But this way it would be private and
code-completion in ASDT for example would not work. I want it to be
public, because it should "feel" and behave like _x,_y,_alpha,
_visible, etc. known from the intrinsic MovieClip class.

2. --> I want that the trace command above would output the new value
I assigned to _something, not the former one (undefined).

So perhaps I missed something, but I still don't get this right. :-(
Can you help me out with this?

Thanks,
Matthias
___
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[4]: [Flashcoders] onChange or onResize or onX event - howto?

2006-12-01 Thread Matthias Dittgen

The set/get (former addProperty) methodology seemed to offer the
solution, but now I see, that I can implicit (not writing
uio.setSomething, but uio._something) set a value, but _something is
private and thus code completion etc. will not work.

Matthias
___
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] getting 5 random numbers out of 0-16 no dups

2006-12-01 Thread Merrill, Jason
>>Quick question. Whats the fastest way to get 5 random numbers out of a
list
>>of X number of numbers without having any duplicates?

I like this:

function rndNumArray(max:Number, noZero:Boolean):Array{
var a:Array = new Array();
var n:Array = new Array(max+1);
var zeroVal:Number = 0;
if (noZero==true){zeroVal=1};
for(var i; a.length < max;) {
if(n[i=Math.floor(Math.random()*max)+noZero])
continue;
a.push(i); n[i] = 1;
}
if(!noZero){
var rndPlace:Number = rndNum(0,max);
a.push(a[rndPlace]);
a[rndPlace]= max
a.pop();
};
return a;
}

Jason Merrill
Bank of America 
Learning & Organizational Effectiveness
 
 
 
 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: Re[4]: [Flashcoders] onChange or onResize or onX event - howto?

2006-12-01 Thread eka

Hello :)

the _ notation is used to do the difference between private and public ...

if you create a virtual property with get/set used in private the _ notation
:


class Test
{

   function Test()
   {

   }

   /**
* Internal private value.
*/
   private var _value:Number ;

   public function get value():Number
   {
return _value ;
   }

   public function set value( n:Number ):Void
   {
_value  = n ;
   // do something here , notify an event, update the class etc...
else don't use a getter/setter property if you want just used the value of
this property.
   }


}

And in your code :

var t:Test = new Test() ;
t.value = 2 ;
trace(t) ;

EKA+ :)

2006/12/1, Matthias Dittgen <[EMAIL PROTECTED]>:


The set/get (former addProperty) methodology seemed to offer the
solution, but now I see, that I can implicit (not writing
uio.setSomething, but uio._something) set a value, but _something is
private and thus code completion etc. will not work.

Matthias
___
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] __DATE__ or similar in AS2 ?

2006-12-01 Thread Yehia Shouman

I think the JSFL offers a great solution if you can have a command to
publish which will alter a variable __DATE__ (perhaps a counter) on the root
of the swf before calling publish document. Not sure if this is possible,
but thats how I'd think of it theoritically

Y Shouman

On 12/1/06, Michael Stuhr <[EMAIL PROTECTED]> wrote:


Stefan Thurnherr schrieb:
> Hi flashcoders,
>
> I am looking for an easy way to indicate an SWF's version on the stage
> (i.e. via a textfield). I guess the easiest way would be if there was
> a compiler literal like __DATE__ (indicating the time/date of
> compilation) available within ActionScript. But I couldn't find any
> such thing neither in the livedocs, nor with the help of the almighty
> G.
>
> I'd prefer a solution that also works offline (i.e., not involving a
> call to a server-side script that gives the SWF access to its own
> time/date of creation).
>
> How do other flashcoders solve this problem?
>

i've created a not-even-near-perfect serial-builder with jsfl.

i'd always wanted to make this an os-version, but haven't had the time to
do this.

but before offering you my crappy code, i'd like to hear what others do
have.


micha

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

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


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

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


RE: [Flashcoders] xml thumbnail gallery reverse order problem

2006-12-01 Thread Merrill, Jason
>>i'm kind of a noob, so there is probably a really simple solution i'm
>>overlooking.  i was thinking: how would one reverse the order in which
>>flash is processing/placing the thumbs?  or maybe instead of using my
>>script, there's some kind of for loop that might work?  

Note that a loop like this:

for(var i=0; i>for some reason flash does things in reverse order 

Flash only does what you tell it to do. :)  

Hope that's useful to you.

Jason Merrill
Bank of America 
Learning & Organizational Effectiveness
 
 
 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: [Flashcoders] Attach sub class to swf which is loaded via attachMovie()?

2006-12-01 Thread Yehia Shouman

function Square(){}
Square.prototype=new MovieClip();
Square.prototype.changeColorTo=function (clr:Number)
{
   var tempClr:Color=new Color(this);
   tempClr.setRGB(clr);
   delete tempClr;
}
var linkageID_str:String="exportedClip";
//associate the linked clip with sub class
Object.registerClass(linkageID_str,Square);
//attach
var mc:MovieClip= attachMovie(linkageID_str,"mc",1);
//then prohibit further association of linked clip to class
Object.registerClass(linkageID_str,null);
//when you call the method it should work
mc.changeColorTo(0xFF);

Same idea if you're working with Actionscript 2.0

Y Shouman




On 12/1/06, Micky Hulse <[EMAIL PROTECTED]> wrote:


Just curious if it is possible to extend/apply a sub class to a swf
which is loaded via attachMovie()?

TIA,
Cheers,
M

--
  Wishlist: 
Switch: 
  BCC?: 
My: 
___
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] Attach sub class to swf which is loaded via attachMovie()?

2006-12-01 Thread eka

Hello :)

the __proto__ solution is a good solution :

/**
* Constructor of the class
*/
function Square()
{
   this.draw() ;
}

/**
* Square extends MovieClip
*/
Square.prototype.__proto__ = MovieClip.prototype ;

/**
* Draw the square shape.
*/
Square.prototype.draw = function()
{
   this.beginFill(0xFF, 100) ;
   this.lineTo(100,0) ;
   this.lineTo(100,100) ;
   this.lineTo(0,0) ;
   this.lineTo(0,0) ;
   this.endFill() ;
}

/**
* Sets the color of the movieclip.
*/
Square.prototype.setRGB = function ( color:Number )
{
   (new Color(this)).setRGB(color) ;
}

// test attachMovie

var mc1:MovieClip = attachMovie("myID", "myClip", 1) ;
mc1.__proto__ = Square.prototype ; // change the prototype reference
Square.call(mc2) ; // launch the constructor of the Square class
mc1.setRGB(0xFF) ; // ok

// test with createEmptyMovieClip

var mc2:MovieClip = createEmptyMovieClip("myClip2", 2) ;
mc2.__proto__ = Square.prototype ; // change the prototype reference
Square.call(mc2) ; // launch the constructor of the Square class

mc2.setRGB(0xFF) ; // ok

@Yehia Shouman : your delete in your "changeColorTo" method is useless
because all local variables with a var in a method is remove by the Garbage
collector at the end of the call function.

EKA+ :)


2006/12/1, Yehia Shouman <[EMAIL PROTECTED]>:


function Square(){}
Square.prototype=new MovieClip();
Square.prototype.changeColorTo=function (clr:Number)
{
var tempClr:Color=new Color(this);
tempClr.setRGB(clr);
delete tempClr;
}
var linkageID_str:String="exportedClip";
//associate the linked clip with sub class
Object.registerClass(linkageID_str,Square);
//attach
var mc:MovieClip= attachMovie(linkageID_str,"mc",1);
//then prohibit further association of linked clip to class
Object.registerClass(linkageID_str,null);
//when you call the method it should work
mc.changeColorTo(0xFF);

Same idea if you're working with Actionscript 2.0

Y Shouman




On 12/1/06, Micky Hulse <[EMAIL PROTECTED]> wrote:
>
> Just curious if it is possible to extend/apply a sub class to a swf
> which is loaded via attachMovie()?
>
> TIA,
> Cheers,
> M
>
> --
>   Wishlist: 
> Switch: 
>   BCC?: 
> My: 
> ___
> 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] link a function from a textfield

2006-12-01 Thread dario

Hi to all,
I'm a web developers workinf for European Commission.
I've a problem with my Flash application: In a textfield I load a text
from a XMK file and it works well. In this text are present some links
those should start a Flash fuction().

How can I realize this linkage system?
Is it possible to avoid using javascript code?

Thanks,
Dario
___
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] link a function from a textfield

2006-12-01 Thread eric dolecki

look up asfunction


Re: [Flashcoders] Attach sub class to swf which is loaded via attachMovie()?

2006-12-01 Thread Micky Hulse
Excellent! Many many many thanks Yehia and EKA... I have not had any 
luck finding examples on the www... both examples will be great for me 
to learn from. :D


Thanks again!
Cheers,
Micky

--
 Wishlist: 
   Switch: 
 BCC?: 
   My: 
___
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] Attach sub class to swf which is loaded via attachMovie()?

2006-12-01 Thread Yehia Shouman

You're welcome Micky



EKA,
I've been really confused by the garbage collection and how it sometimes
sits their coldly not doing the job ! I read somewhere the garbage
collection won't fire unless the application is in a still state. In an
application, that I had some interval process happening, the garbage
collection never worked and the memory usage kept going up. I've watched a
presentation by G Skinner, read some articles, but never found a way to fire
that garbage collector other than minimizing the application (and that works
in IE, it doesnt with firefox). So its an act of anxiety ! Can you point us
to links where the garbage collection work ?, Perhaps with a new message

Thanks for your comment,
Yehia

On 12/1/06, eka <[EMAIL PROTECTED]> wrote:


Hello :)

the __proto__ solution is a good solution :

/**
* Constructor of the class
*/
function Square()
{
this.draw() ;
}

/**
* Square extends MovieClip
*/
Square.prototype.__proto__ = MovieClip.prototype ;

/**
* Draw the square shape.
*/
Square.prototype.draw = function()
{
this.beginFill(0xFF, 100) ;
this.lineTo(100,0) ;
this.lineTo(100,100) ;
this.lineTo(0,0) ;
this.lineTo(0,0) ;
this.endFill() ;
}

/**
* Sets the color of the movieclip.
*/
Square.prototype.setRGB = function ( color:Number )
{
(new Color(this)).setRGB(color) ;
}

// test attachMovie

var mc1:MovieClip = attachMovie("myID", "myClip", 1) ;
mc1.__proto__ = Square.prototype ; // change the prototype reference
Square.call(mc2) ; // launch the constructor of the Square class
mc1.setRGB(0xFF) ; // ok

// test with createEmptyMovieClip

var mc2:MovieClip = createEmptyMovieClip("myClip2", 2) ;
mc2.__proto__ = Square.prototype ; // change the prototype reference
Square.call(mc2) ; // launch the constructor of the Square class

mc2.setRGB(0xFF) ; // ok

@Yehia Shouman : your delete in your "changeColorTo" method is useless
because all local variables with a var in a method is remove by the
Garbage
collector at the end of the call function.

EKA+ :)


2006/12/1, Yehia Shouman <[EMAIL PROTECTED]>:
>
> function Square(){}
> Square.prototype=new MovieClip();
> Square.prototype.changeColorTo=function (clr:Number)
> {
> var tempClr:Color=new Color(this);
> tempClr.setRGB(clr);
> delete tempClr;
> }
> var linkageID_str:String="exportedClip";
> //associate the linked clip with sub class
> Object.registerClass(linkageID_str,Square);
> //attach
> var mc:MovieClip= attachMovie(linkageID_str,"mc",1);
> //then prohibit further association of linked clip to class
> Object.registerClass(linkageID_str,null);
> //when you call the method it should work
> mc.changeColorTo(0xFF);
>
> Same idea if you're working with Actionscript 2.0
>
> Y Shouman
>
>
>
>
> On 12/1/06, Micky Hulse <[EMAIL PROTECTED]> wrote:
> >
> > Just curious if it is possible to extend/apply a sub class to a swf
> > which is loaded via attachMovie()?
> >
> > TIA,
> > Cheers,
> > M
> >
> > --
> >   Wishlist: 
> > Switch: 
> >   BCC?: 
> > My: 
> > ___
> > 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] xml thumbnail gallery reverse order problem

2006-12-01 Thread Scott Morgan
You could also use the reverse method which reverse's the order of your
array:

myArray.reverse();

and then loop through it like you normally would. Six of one, half-dozen
of the other.

Scott
---
http://blog.socttgmorgan.com




-

Date: Fri, 01 Dec 2006 09:04:31 -0500
From: "Merrill, Jason" <[EMAIL PROTECTED]>
Subject: RE: [Flashcoders] xml thumbnail gallery reverse order problem
To: Flashcoders mailing list 
Message-ID:

<[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii

>>i'm kind of a noob, so there is probably a really simple solution i'm
>>overlooking.  i was thinking: how would one reverse the order in which
>>flash is processing/placing the thumbs?  or maybe instead of using my
>>script, there's some kind of for loop that might work?  

Note that a loop like this:

for(var i=0; i>for some reason flash does things in reverse order 

Flash only does what you tell it to do. :)  

Hope that's useful to you.

Jason Merrill
Bank of America 
Learning & Organizational Effectiveness
 
 
 




The information contained in this message is confidential. It is intended to be 
read only by the individual or entity named above or their designee. If the 
reader of this message is not the intended recipient, you are hereby notified 
that any distribution of this message, in any form, is strictly prohibited. If 
you have received this message in error, please immediately notify the sender 
and delete or destroy any copy of this message.

___
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] Attach sub class to swf which is loaded via attachMovie()?

2006-12-01 Thread eka

Hello :)

a delete in a function failed to destroy a variable ;)

My french article about this subject :
http://www.ekameleon.net/blog/index.php?2006/06/10/34--as-ssas-delete-un-peu-capricieux

Used google translator or bablefish if you want read my article in english
(sorry .. i speak english very bad...)

delete method returns false if the variable isn't clear on memory (protected
with a ASSetPropFlags or if the variable is undefined too)

function test() {
   var a = 1 ;
   trace("> a : " + a) ; // > a : 1
   trace("i remove the variable 'a' : " + delete(a)) ; // output false
   trace("> a : " + a) ; // > a : 1 // the value isn't deleted !
}

trace("++ delete sur une variable dans une fonction") ;
test() ;

.. you can read some good articles about Garbage collector (in FP8 and FP9
the garbage is better...)

- http://www.tekool.net/flash/benchmark/garbage_collector/ (french)
-
http://weblog.shaoken.be/index.php?2005/09/23/17-gestion-du-garbage-collector-sous-flash8(french)

- http://www.blog.lessrain.com/?p=237 (benchmark)
-
http://www.kaourantin.net/2005/09/garbage-collection-in-flash-player-8.html(english)
- http://www.adobe.com/devnet/flashplayer/articles/fp8_performance.html(english)
- http://www.informit.com/guides/content.asp?g=flash&seqNum=344&rl=1(english)

- http://www.gskinner.com/blog/archives/2006/09/garbage_collect.html (search
the key work Garbage collector in this blog)

EKA+ :)

2006/12/1, Yehia Shouman <[EMAIL PROTECTED]>:


You're welcome Micky



EKA,
I've been really confused by the garbage collection and how it sometimes
sits their coldly not doing the job ! I read somewhere the garbage
collection won't fire unless the application is in a still state. In an
application, that I had some interval process happening, the garbage
collection never worked and the memory usage kept going up. I've watched a
presentation by G Skinner, read some articles, but never found a way to
fire
that garbage collector other than minimizing the application (and that
works
in IE, it doesnt with firefox). So its an act of anxiety ! Can you point
us
to links where the garbage collection work ?, Perhaps with a new message

Thanks for your comment,
Yehia

On 12/1/06, eka <[EMAIL PROTECTED]> wrote:
>
> Hello :)
>
> the __proto__ solution is a good solution :
>
> /**
> * Constructor of the class
> */
> function Square()
> {
> this.draw() ;
> }
>
> /**
> * Square extends MovieClip
> */
> Square.prototype.__proto__ = MovieClip.prototype ;
>
> /**
> * Draw the square shape.
> */
> Square.prototype.draw = function()
> {
> this.beginFill(0xFF, 100) ;
> this.lineTo(100,0) ;
> this.lineTo(100,100) ;
> this.lineTo(0,0) ;
> this.lineTo(0,0) ;
> this.endFill() ;
> }
>
> /**
> * Sets the color of the movieclip.
> */
> Square.prototype.setRGB = function ( color:Number )
> {
> (new Color(this)).setRGB(color) ;
> }
>
> // test attachMovie
>
> var mc1:MovieClip = attachMovie("myID", "myClip", 1) ;
> mc1.__proto__ = Square.prototype ; // change the prototype reference
> Square.call(mc2) ; // launch the constructor of the Square class
> mc1.setRGB(0xFF) ; // ok
>
> // test with createEmptyMovieClip
>
> var mc2:MovieClip = createEmptyMovieClip("myClip2", 2) ;
> mc2.__proto__ = Square.prototype ; // change the prototype reference
> Square.call(mc2) ; // launch the constructor of the Square class
>
> mc2.setRGB(0xFF) ; // ok
>
> @Yehia Shouman : your delete in your "changeColorTo" method is useless
> because all local variables with a var in a method is remove by the
> Garbage
> collector at the end of the call function.
>
> EKA+ :)
>
>
> 2006/12/1, Yehia Shouman <[EMAIL PROTECTED]>:
> >
> > function Square(){}
> > Square.prototype=new MovieClip();
> > Square.prototype.changeColorTo=function (clr:Number)
> > {
> > var tempClr:Color=new Color(this);
> > tempClr.setRGB(clr);
> > delete tempClr;
> > }
> > var linkageID_str:String="exportedClip";
> > //associate the linked clip with sub class
> > Object.registerClass(linkageID_str,Square);
> > //attach
> > var mc:MovieClip= attachMovie(linkageID_str,"mc",1);
> > //then prohibit further association of linked clip to class
> > Object.registerClass(linkageID_str,null);
> > //when you call the method it should work
> > mc.changeColorTo(0xFF);
> >
> > Same idea if you're working with Actionscript 2.0
> >
> > Y Shouman
> >
> >
> >
> >
> > On 12/1/06, Micky Hulse <[EMAIL PROTECTED]> wrote:
> > >
> > > Just curious if it is possible to extend/apply a sub class to a swf
> > > which is loaded via attachMovie()?
> > >
> > > TIA,
> > > Cheers,
> > > M
> > >
> > > --
> > >   Wishlist: 
> > > Switch: 
> > >   BCC?: 
> > > My: 
> > > ___
> > > Flashcoders@chattyfig.figleaf.com
> > > To change your subscription options or search the archive:
> > > http://chattyfig.figleaf.com/mailman

Re: [Flashcoders] xml thumbnail gallery reverse order problem

2006-12-01 Thread Mick G

Does this help?

for(var i=Array.length; i>=0; i--){
  //loop backwards
 }




On 12/1/06, Scott Morgan <[EMAIL PROTECTED]> wrote:


You could also use the reverse method which reverse's the order of your
array:

myArray.reverse();

and then loop through it like you normally would. Six of one, half-dozen
of the other.

Scott
---
http://blog.socttgmorgan.com




-

Date: Fri, 01 Dec 2006 09:04:31 -0500
From: "Merrill, Jason" <[EMAIL PROTECTED]>
Subject: RE: [Flashcoders] xml thumbnail gallery reverse order problem
To: Flashcoders mailing list 
Message-ID:

<[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii

>>i'm kind of a noob, so there is probably a really simple solution i'm
>>overlooking.  i was thinking: how would one reverse the order in which
>>flash is processing/placing the thumbs?  or maybe instead of using my
>>script, there's some kind of for loop that might work?

Note that a loop like this:

for(var i=0; i>for some reason flash does things in reverse order

Flash only does what you tell it to do. :)

Hope that's useful to you.

Jason Merrill
Bank of America
Learning & Organizational Effectiveness







The information contained in this message is confidential. It is intended
to be read only by the individual or entity named above or their designee.
If the reader of this message is not the intended recipient, you are hereby
notified that any distribution of this message, in any form, is strictly
prohibited. If you have received this message in error, please immediately
notify the sender and delete or destroy any copy of this message.

___
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] AS2 unloading class completely

2006-12-01 Thread Setaro, James
I load and unload several clips dynamically. Does anyone know how to
unload a loaded movie and its corresponding classes completely?

 

 

 

For instance, if I have a base swf, which I will A .

 

Clip A then loads clips B.

Clip A then unloads clip B 

Clip A then loads clip C

 

 

Clips B and C share a common class (LoaderTest.as) file.  If clip B is
published with one version of the class, and then changes are made to
class and clip C is published with another version, clips C's version
changes are never reflected.  Clip B's version seems to be "stuck" in
the VM.  It could be that I am not unloading clip B correctly, but I
have tried everything I can think of.

 

 

 

Here is the code:

 

-A.fla--
---

 

trace("Starting");

 

var _mc:MovieClip;

var _mcl:MovieClipLoader;

_global.A = this;

loadHandler("B.swf");

 

function loadHandler(data:String){

_mc = this.createEmptyMovieClip("screen_mc",99);//99 because
I was using the Alert component (POS)

var loadInit:Function = function(ref):Void{

ref.init();

}

loader(screen_mc, data, loadInit, "A");

}

 

 

function loader(_clip:MovieClip, _path:String, loadInit:Function,
callee_name:String):Void{

_mcl = new MovieClipLoader();



var loader_obj = new Object();

loader_obj.loadInit = loadInit;

 

_mcl.addListener(loader_obj);

_mcl.loadClip(_path,_clip);

}

 

function navigate(nav:Number)

{

  screen_mc.unloadClip();

  _mcl.unloadClip(screen_mc);

  _mc.unloadMovie();

  unloadMovie ("_root.screen_mc");

  _mc.removeMovieClip();

  screen_mc = null;

  delete screen_mc;   

  delete _mcl;

  delete _mc;

  if(nav == 0)

loadHandler("B.swf");

  else

loadHandler("C.swf");

  

 }

 

 

 

-B.fla--
---

 

import test.loader.LoaderTest;

LoaderTest.output();

var base = this;

next_item.onRelease = function() {

trace("ACTION");

_global.A.navigate(1);

unloadMovie(base);

};

 

-C.fla--
---

import test.loader.LoaderTest;

LoaderTest.output();

previous_Item.onRelease = function (){

  trace("ACTION");

  _global.A.navigate(0);

  };

 

 

 

- LoaderTest
-

 

 

class test.loader.LoaderTest { 

 

 

public function LoaderTest()

{



trace("Loader running");



}

 

public static function output()

{



trace("Loader running");

//comment above and uncomment below to see
change

// trace("Loader should print out something
different");



}



}

 

 

 

 

 

 

 

 

 

 


 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 

___
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] AS2 unloading class completely

2006-12-01 Thread Ian Thomas

Hi James,
 By default the player uses - and keeps - the first version of any
class that's loaded. Unloading a submovie won't help.

 If you know which class you are trying to unload, I think you can
get rid of it in the following way (this is off the top of my head, so
try it out!)

 If the class was called, for example, com.mycompany.apps.MyClass:

delete _global.com.mycompany.apps.MyClass;

 HTH,
Ian

On 12/1/06, Setaro, James <[EMAIL PROTECTED]> wrote:

I load and unload several clips dynamically. Does anyone know how to
unload a loaded movie and its corresponding classes completely?



___
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] (revised post) textFormat, CSS, embedded fonts, dynamic font size control

2006-12-01 Thread Marc Hoffman
[I'm revising and re-sending this as I'm not sure this reached the 
list, and I've answered some of my own questions. -Marc]


I'm working on an all-Flash site that will use a single swf to 
display many "pages" of information about manufactured products. 
Regarding text functionality, I'm not sure what combination of 
textFormat, CSS, and font embedding to use. I want to achieve the following:


1. Dynamic text fields that display text from an xml file.
2. Embedding several fonts, but not the entire character sets.
3. Allowing the user to modify the point size of the text (for accessibility).
4. Controlling a:hover and a:link properties from a central location 
so that I can apply color and underline effects to links.


#1: This is no problem for me.

#2: The issue is that if I use CSS rather than TextFormat, the 
embedded fonts aren't accessed by Flash, so the font must reside on 
the user's system, which is no good.


#3: Is there a way to trap the browser text-size controls so that 
they tell Flash to resize the text? Sort of like trapping the Forward 
and Back buttons in the browser. But it could be too complicated if 
the different browsers use different methods to resize the text. 
Anybody have experience with this?


#4: Can CSS be used at the same time as TextFormat? If so, how? 
Specifically, I'd like to specify a:hover and a:link properties via 
CSS, but handle most other text properties via TextFormat.


Many thanks!

Marc Hoffman


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

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


RE: [Flashcoders] xml thumbnail gallery reverse order problem

2006-12-01 Thread Andrea Hendel

thanks for all the suggestions, y'all, this is great!

i tried reversing the order of my xml/array, but the image position in 
the array determines which large image is shown in the gallery.  if i 
flip the array, the wrong images appear.


i'm in the midst of trying a for loop (thanks, jason, for clarifying the 
backwards/forwards loops! that's one mystery solved for me.).  i called 
"k" from when i load the xml into flash, it's the same as "i".  is there 
a way to make it go up instead of down when i call it?  i tried to sort 
the array backwards right before thumbnails_fn, but then some of the 
thumbnails show up multiple times, and some not at all.  i think my 
problem comes in when i use the movieClipLoader, because i'm calling 
(thumbnails[k], "thumbnail_mc.t"+k) from (target_mc), right?  so it's 
loading the jpg's defined by the xml array one by one from the last to 
the first as movieClips into thumbnail_mc instead of first to last.


learning is fun.  horrifyingly, frustratingly fun.  if i had the $$ i 
would take a class!


i'll keep barreling forward, but in case any of you feel inspired with 
more genius than me, here's the  version with (hopefully) all 
the relevant info:



   for (i=0; i   image[i] = 
xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
   thumbnails[i] = 
xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;

    here's what's being called by k
   thumbnails_fn(i);
   }


w = 0
function thumbnails_fn(k) {
   thumbnail_mc.createEmptyMovieClip("t"+k, 
thumbnail_mc.getNextHighestDepth());

   tlistener = new Object();
   tlistener.onLoadInit = function(target_mc) {
   /// place thumbs THIS IS WHAT'S MESSIN' ME UP
   target_mc._x = w
   w = target_mc._x + target_mc._width + 1


   };
   image_mcl = new MovieClipLoader();
   image_mcl.addListener(tlistener);
   image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}

___
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[2]: [Flashcoders] xml thumbnail gallery reverse order problem

2006-12-01 Thread R�kos Attila

MG> Does this help?
MG> 
MG>  for(var i=Array.length; i>=0; i--){
MG>//loop backwards
MG>   }

No, it doesn't help, since the first index is out of range :)

___
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] (revised post) textFormat, CSS, embedded fonts, dynamic font size control

2006-12-01 Thread Jim Kremens

"#2: The issue is that if I use CSS rather than TextFormat, the
embedded fonts aren't accessed by Flash, so the font must reside on
the user's system, which is no good."

This is not true.  I've used CSS and embedded fonts lots of times.
You should be able to find plenty of examples by Googling.  A trick
you might employ:  embed the fonts you need in dummy textfields
offstage.  Then, when Flash calls for the font specified in the
stylesheet, it's in the swf.  Alternatively, you could look into
shared libraries for loading the font.  And lastly, several dynamic
font loaders have ben written that can address this problem.  Using
one of these, you'd load the fonts you need into the swf just like you
load images or any other asset.

#4: Can CSS be used at the same time as TextFormat? If so, how?
Specifically, I'd like to specify a:hover and a:link properties via
CSS, but handle most other text properties via TextFormat.

As far as I know, you can't really do this.  But look into
stylesheet.transform() as a way of expanding the things that can be
done with CSS.  Again, Google is your friend.

Good luck!

Jim Kremens


On 12/1/06, Marc Hoffman <[EMAIL PROTECTED]> wrote:

[I'm revising and re-sending this as I'm not sure this reached the
list, and I've answered some of my own questions. -Marc]

I'm working on an all-Flash site that will use a single swf to
display many "pages" of information about manufactured products.
Regarding text functionality, I'm not sure what combination of
textFormat, CSS, and font embedding to use. I want to achieve the following:

1. Dynamic text fields that display text from an xml file.
2. Embedding several fonts, but not the entire character sets.
3. Allowing the user to modify the point size of the text (for accessibility).
4. Controlling a:hover and a:link properties from a central location
so that I can apply color and underline effects to links.

#1: This is no problem for me.

#2: The issue is that if I use CSS rather than TextFormat, the
embedded fonts aren't accessed by Flash, so the font must reside on
the user's system, which is no good.

#3: Is there a way to trap the browser text-size controls so that
they tell Flash to resize the text? Sort of like trapping the Forward
and Back buttons in the browser. But it could be too complicated if
the different browsers use different methods to resize the text.
Anybody have experience with this?

#4: Can CSS be used at the same time as TextFormat? If so, how?
Specifically, I'd like to specify a:hover and a:link properties via
CSS, but handle most other text properties via TextFormat.

Many thanks!

Marc Hoffman


___
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




--
Jim Kremens
___
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] Transmit image diff?

2006-12-01 Thread Wojtek Dabrowski
Hello everybody!

I was just wondering... I need to display a short video clip that is
generated dynamically by the server. Now the most stupid approach would
be transmitting the movie frame-by-frame as images. Transmitting only
the differences between the frames sounds much more intelligent, kind of
like live-mpeg-encoding-and-streaming. Any pointers on how that might be
easiest to achieve? Pre-rendering the movie and then sending it as one
file is unfortunately not really an option. Nor is sending the
primitives and transformation instructions to the client, the rendering
algorithm is a bit too complicated.

I'd be happy about any kind of pointer - liks to tutorials, algorithm
descriptions, code snipplets... as long as I can make any sense of it,
it'll make me happy :)

Thanks a lot in advance,
-Wojtek Dabrowski

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

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


RE: [Flashcoders] xml thumbnail gallery reverse order problem

2006-12-01 Thread Merrill, Jason
That's odd, it should be incrementing K from 0 and then up from there.
Have you done a trace on the value of k to see if it really is going
down instead of up?

Jason Merrill
Bank of America 
Learning & Organizational Effectiveness
 
 
 
 
 

>>-Original Message-
>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>[EMAIL PROTECTED] On Behalf Of Andrea Hendel
>>Sent: Friday, December 01, 2006 2:31 PM
>>To: flashcoders@chattyfig.figleaf.com
>>Subject: RE: [Flashcoders] xml thumbnail gallery reverse order problem
>>
>>thanks for all the suggestions, y'all, this is great!
>>
>>i tried reversing the order of my xml/array, but the image position in
>>the array determines which large image is shown in the gallery.  if i
>>flip the array, the wrong images appear.
>>
>>i'm in the midst of trying a for loop (thanks, jason, for clarifying
the
>>backwards/forwards loops! that's one mystery solved for me.).  i
called
>>"k" from when i load the xml into flash, it's the same as "i".  is
there
>>a way to make it go up instead of down when i call it?  i tried to
sort
>>the array backwards right before thumbnails_fn, but then some of the
>>thumbnails show up multiple times, and some not at all.  i think my
>>problem comes in when i use the movieClipLoader, because i'm calling
>>(thumbnails[k], "thumbnail_mc.t"+k) from (target_mc), right?  so it's
>>loading the jpg's defined by the xml array one by one from the last to
>>the first as movieClips into thumbnail_mc instead of first to last.
>>
>>learning is fun.  horrifyingly, frustratingly fun.  if i had the $$ i
>>would take a class!
>>
>>i'll keep barreling forward, but in case any of you feel inspired with
>>more genius than me, here's the  version with (hopefully) all
>>the relevant info:
>>
>>
>>for (i=0; i>image[i] =
>>xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
>>thumbnails[i] =
>>xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
>> here's what's being called by k
>>thumbnails_fn(i);
>>}
>>
>>
>>w = 0
>>function thumbnails_fn(k) {
>>thumbnail_mc.createEmptyMovieClip("t"+k,
>>thumbnail_mc.getNextHighestDepth());
>>tlistener = new Object();
>>tlistener.onLoadInit = function(target_mc) {
>>/// place thumbs THIS IS WHAT'S MESSIN' ME UP
>>target_mc._x = w
>>w = target_mc._x + target_mc._width + 1
>>
>>
>>};
>>image_mcl = new MovieClipLoader();
>>image_mcl.addListener(tlistener);
>>image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
>>}
>>
>>___
>>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] AS2 unloading class completely

2006-12-01 Thread Steven Sacks | BLITZ
You can use the abstract factory design pattern, interface, etc.

Google 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


RE: Re[2]: [Flashcoders] xml thumbnail gallery reverse order problem

2006-12-01 Thread Merrill, Jason
>>No, it doesn't help, since the first index is out of range :)

What do you mean?  There's nothing wrong with the way they wrote that either - 
this works for me:

myArray = [1,1,1,1,1,1,1,1];

for(var i=myArray.length; i>=0; i--){
trace(i)
}

I don't think they meant the word "Array" literally...

Jason Merrill
Bank of America 
Learning & Organizational Effectiveness
 
 
 
 
 

>>-Original Message-
>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>[EMAIL PROTECTED] On Behalf Of Rákos Attila
>>Sent: Friday, December 01, 2006 2:48 PM
>>To: Flashcoders mailing list
>>Subject: Re[2]: [Flashcoders] xml thumbnail gallery reverse order problem
>>
>>
>>MG> Does this help?
>>MG>
>>MG>  for(var i=Array.length; i>=0; i--){
>>MG>//loop backwards
>>MG>   }
>>
>>No, it doesn't help, since the first index is out of range :)
>>
>>___
>>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] Transmit image diff?

2006-12-01 Thread Ian Thomas

Hi Wojtek,
 Is pre-rendering really not an option? It'd be the simplest - take a
look at ffmpeg. I'm pretty sure that it can take a set of image files
as input and produce an output .flv.

HTH,
  Ian

On 12/1/06, Wojtek Dabrowski <[EMAIL PROTECTED]> wrote:

Hello everybody!

I was just wondering... I need to display a short video clip that is
generated dynamically by the server. Now the most stupid approach would
be transmitting the movie frame-by-frame as images. Transmitting only
the differences between the frames sounds much more intelligent, kind of
like live-mpeg-encoding-and-streaming. Any pointers on how that might be
easiest to achieve? Pre-rendering the movie and then sending it as one
file is unfortunately not really an option. Nor is sending the
primitives and transformation instructions to the client, the rendering
algorithm is a bit too complicated.

I'd be happy about any kind of pointer - liks to tutorials, algorithm
descriptions, code snipplets... as long as I can make any sense of it,
it'll make me happy :)

Thanks a lot in advance,
-Wojtek Dabrowski

___
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] Transmit image diff?

2006-12-01 Thread Wojtek Dabrowski
Hello Ian,

Thanks for the tip, but unfortunately, pre-rendering is really not an
option. I need to render the video in response to user input, inputs
coming from a few other nodes, and the state of the server itself (e.g.
load) - basically a heap of information that I don't have earlier. 

I'll have a closer look at ffmpeg and ffserver though... they might be
going into the direction that I need.

Or does anybody have an idea for a simpler method?

Thanks a lot in advance,
-Wojtek

On Fri, 2006-12-01 at 20:28 +, Ian Thomas wrote:
> Hi Wojtek,
>   Is pre-rendering really not an option? It'd be the simplest - take a
> look at ffmpeg. I'm pretty sure that it can take a set of image files
> as input and produce an output .flv.
> 
> HTH,
>Ian
> 
> On 12/1/06, Wojtek Dabrowski <[EMAIL PROTECTED]> wrote:
> > Hello everybody!
> >
> > I was just wondering... I need to display a short video clip that is
> > generated dynamically by the server. Now the most stupid approach would
> > be transmitting the movie frame-by-frame as images. Transmitting only
> > the differences between the frames sounds much more intelligent, kind of
> > like live-mpeg-encoding-and-streaming. Any pointers on how that might be
> > easiest to achieve? Pre-rendering the movie and then sending it as one
> > file is unfortunately not really an option. Nor is sending the
> > primitives and transformation instructions to the client, the rendering
> > algorithm is a bit too complicated.
> >
> > I'd be happy about any kind of pointer - liks to tutorials, algorithm
> > descriptions, code snipplets... as long as I can make any sense of it,
> > it'll make me happy :)
> >
> > Thanks a lot in advance,
> > -Wojtek Dabrowski
> ___
> 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[4]: [Flashcoders] xml thumbnail gallery reverse order problem

2006-12-01 Thread R�kos Attila

write trace(myArray[i]) instead of trace(i)

MJ> What do you mean?  There's nothing wrong with the way they wrote that 
either - this works for me:
MJ> 
MJ> myArray = [1,1,1,1,1,1,1,1];
MJ> 
MJ> for(var i=myArray.length; i>=0; i--){
MJ> trace(i)
MJ> }
MJ>
MJ> I don't think they meant the word "Array" literally


___
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] Transmit image diff?

2006-12-01 Thread Andy Herrman

You're probably better off sending the commands themselves.  Your
rendering algorithm may be complicated, but sending commands is almost
always going to be more efficient (and as such will probably save you
on bandwidth).

Calculating image diffs is kind of expensive, and can be pretty
complex if you're trying to optimize it.  It would probably be easier
to implement the handling of the commands, since you already know how
that has to work, than to try and do image diffs (part of the
application I work on has something that sounds a bit similar, and
we've always wanted to add image diffs, but haven't gotten to it as we
could never come up with a good enough algorithm for it).

If that doesn't work I'd go with pre-rendering.  It would use more
bandwidth and processing (on the server at least) but would be a lot
faster implementation wise than trying to implement your own image
diff generation and rendering.

  -Andy

On 12/1/06, Wojtek Dabrowski <[EMAIL PROTECTED]> wrote:

Hello Ian,

Thanks for the tip, but unfortunately, pre-rendering is really not an
option. I need to render the video in response to user input, inputs
coming from a few other nodes, and the state of the server itself (e.g.
load) - basically a heap of information that I don't have earlier.

I'll have a closer look at ffmpeg and ffserver though... they might be
going into the direction that I need.

Or does anybody have an idea for a simpler method?

Thanks a lot in advance,
-Wojtek

On Fri, 2006-12-01 at 20:28 +, Ian Thomas wrote:
> Hi Wojtek,
>   Is pre-rendering really not an option? It'd be the simplest - take a
> look at ffmpeg. I'm pretty sure that it can take a set of image files
> as input and produce an output .flv.
>
> HTH,
>Ian
>
> On 12/1/06, Wojtek Dabrowski <[EMAIL PROTECTED]> wrote:
> > Hello everybody!
> >
> > I was just wondering... I need to display a short video clip that is
> > generated dynamically by the server. Now the most stupid approach would
> > be transmitting the movie frame-by-frame as images. Transmitting only
> > the differences between the frames sounds much more intelligent, kind of
> > like live-mpeg-encoding-and-streaming. Any pointers on how that might be
> > easiest to achieve? Pre-rendering the movie and then sending it as one
> > file is unfortunately not really an option. Nor is sending the
> > primitives and transformation instructions to the client, the rendering
> > algorithm is a bit too complicated.
> >
> > I'd be happy about any kind of pointer - liks to tutorials, algorithm
> > descriptions, code snipplets... as long as I can make any sense of it,
> > it'll make me happy :)
> >
> > Thanks a lot in advance,
> > -Wojtek Dabrowski
> ___
> 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: Re[4]: [Flashcoders] xml thumbnail gallery reverse order problem

2006-12-01 Thread Merrill, Jason
Ok - then this:

myArray = [2,3,4,5,6,7,8];

for(var i=myArray.length-1; i>=0; i--){
trace(myArray[i])
}


Jason Merrill
Bank of America 
Learning & Organizational Effectiveness
 
 
 
 
 

>>-Original Message-
>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>[EMAIL PROTECTED] On Behalf Of Rákos Attila
>>Sent: Friday, December 01, 2006 3:41 PM
>>To: Flashcoders mailing list
>>Subject: Re[4]: [Flashcoders] xml thumbnail gallery reverse order problem
>>
>>
>>write trace(myArray[i]) instead of trace(i)
>>
>>MJ> What do you mean?  There's nothing wrong with the way they wrote that
>>either - this works for me:
>>MJ>
>>MJ> myArray = [1,1,1,1,1,1,1,1];
>>MJ>
>>MJ> for(var i=myArray.length; i>=0; i--){
>>MJ> trace(i)
>>MJ> }
>>MJ>
>>MJ> I don't think they meant the word "Array" literally
>>
>>
>>___
>>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] Transmit image diff?

2006-12-01 Thread Wojtek Dabrowski
Hi Andy!

The problem is, I really need to be operating more or less in real-time.
What's happening on the server is that I'm generating a lot of single
image files. Pre-rendering would be an option if I could find some
program that can take a continuous supply of image files, encode them to
some movie format, and stream the movie to the client. Unfortunately, I
haven't been able to find something like that yet - and to make things
worse, it would need to be open-source.

I really can't leave rendering to the client, because in the (far)
future the rendering will become so resource-intensive that I won't be
able to put that kind of load on the clients.

Any pointers towards a program that could do this kind of live streaming
from a series of images?

Thanks a lot in advance,
-Wojtek

On Fri, 2006-12-01 at 15:48 -0500, Andy Herrman wrote:
> You're probably better off sending the commands themselves.  Your
> rendering algorithm may be complicated, but sending commands is almost
> always going to be more efficient (and as such will probably save you
> on bandwidth).
> 
> Calculating image diffs is kind of expensive, and can be pretty
> complex if you're trying to optimize it.  It would probably be easier
> to implement the handling of the commands, since you already know how
> that has to work, than to try and do image diffs (part of the
> application I work on has something that sounds a bit similar, and
> we've always wanted to add image diffs, but haven't gotten to it as we
> could never come up with a good enough algorithm for it).
> 
> If that doesn't work I'd go with pre-rendering.  It would use more
> bandwidth and processing (on the server at least) but would be a lot
> faster implementation wise than trying to implement your own image
> diff generation and rendering.
> 
>-Andy

___
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] Transmit image diff?

2006-12-01 Thread Andy Herrman

Won't be able to put that kind of load on the clients?  In general
things like this are probably better to put load on the clients than
on the server if you can.  Remember, the less load you put on the
server the more it will scale. :)

If you really don't want to do the processing on the client sides,
then here's what I would do.  First, have the servers render the
images and then send the full images to the clients (compressed if you
can - if your images follow some well defined pattern then you might
be able to come up with your own compression that will work pretty
well).  See how the performance is.  If that performance is good
enough and the bandwidth usage isn't too high then go with that for an
initial pass.  That's your first iteration.

Once you have that working, start looking at ways to improve it.  This
may mean moving the rendering to the client (if you structure your
code well enough this shouldn't be too big a change) or finding ways
to better 'compress' the images (like using diffs).

Doing something iterative like this will get you something working a
lot faster, and having a fully functioning app will make it easier to
tell what parts need to be optimized.  Otherwise you might spend a
month working on optimizing the image transport only to find out you
didn't need it.

  -Andy



On 12/1/06, Wojtek Dabrowski <[EMAIL PROTECTED]> wrote:

Hi Andy!

The problem is, I really need to be operating more or less in real-time.
What's happening on the server is that I'm generating a lot of single
image files. Pre-rendering would be an option if I could find some
program that can take a continuous supply of image files, encode them to
some movie format, and stream the movie to the client. Unfortunately, I
haven't been able to find something like that yet - and to make things
worse, it would need to be open-source.

I really can't leave rendering to the client, because in the (far)
future the rendering will become so resource-intensive that I won't be
able to put that kind of load on the clients.

Any pointers towards a program that could do this kind of live streaming
from a series of images?

Thanks a lot in advance,
-Wojtek

On Fri, 2006-12-01 at 15:48 -0500, Andy Herrman wrote:
> You're probably better off sending the commands themselves.  Your
> rendering algorithm may be complicated, but sending commands is almost
> always going to be more efficient (and as such will probably save you
> on bandwidth).
>
> Calculating image diffs is kind of expensive, and can be pretty
> complex if you're trying to optimize it.  It would probably be easier
> to implement the handling of the commands, since you already know how
> that has to work, than to try and do image diffs (part of the
> application I work on has something that sounds a bit similar, and
> we've always wanted to add image diffs, but haven't gotten to it as we
> could never come up with a good enough algorithm for it).
>
> If that doesn't work I'd go with pre-rendering.  It would use more
> bandwidth and processing (on the server at least) but would be a lot
> faster implementation wise than trying to implement your own image
> diff generation and rendering.
>
>-Andy

___
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] loadClip vs loadMovie: swf's losing control... literally

2006-12-01 Thread Micky Hulse

Hi,

Before I hit hay, I noticed loadClip() is causing my loaded swf to loose 
control... I can't seem to tell the loaded clip(s) to do anything 
(targMc.play(), targMc.stop(), targMc.goToFrame())... Is this normal 
behavior, or am I doing things wrong (can post code later if need be)?


It sounds like I should be using loadMovie() if I want to target and 
control the timeline of my loaded clips. From livedocs:


"This class [MovieClipLoader] lets you implement listener callbacks that 
provide status information while SWF, JPEG, GIF, and PNG files are being 
loaded into movie clips. To use MovieClipLoader features, use 
MovieClipLoader.loadClip() instead of loadMovie() or 
MovieClip.loadMovie() to load SWF files."


I really like the listener callbacks.

Anyway, just testing code... so not a big deal (other options are 
available thanks to the kind peeps on this list), but for learning 
purposes: am I correct in thinking that loadClip takes-away timeline 
control of loaded swf's? Or, do I access the timeline in some other way 
(i.e. something other than targMc.goToFrame(8);)?


Just curious if my sleep deprived thinking is on the right track... if 
so, how do you handle similar situation?


Many thanks!
Cheers,
M



--
 Wishlist: 
   Switch: 
 BCC?: 
   My: 
___
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[4]: [Flashcoders] xml thumbnail gallery reverse order problem

2006-12-01 Thread Steven Sacks | BLITZ
Yuck!

> for(var i=myArray.length-1; i>=0; i--){
> trace(myArray[i])
> }



Yum!

var i:Number = myArray.length;
while (i--) {
trace(i);
}


Zoom!

var i:Number = myArray.length;
while (--i -(-1)) {
trace(i);
}
___
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] Attach sub class to swf which is loaded via attachMovie()?

2006-12-01 Thread Yehia Shouman

No don't worry man about your english.
Thanks alot eka,

Yehia



On 12/1/06, eka <[EMAIL PROTECTED]> wrote:


Hello :)

a delete in a function failed to destroy a variable ;)

My french article about this subject :

http://www.ekameleon.net/blog/index.php?2006/06/10/34--as-ssas-delete-un-peu-capricieux

Used google translator or bablefish if you want read my article in english
(sorry .. i speak english very bad...)

delete method returns false if the variable isn't clear on memory
(protected
with a ASSetPropFlags or if the variable is undefined too)

function test() {
var a = 1 ;
trace("> a : " + a) ; // > a : 1
trace("i remove the variable 'a' : " + delete(a)) ; // output false
trace("> a : " + a) ; // > a : 1 // the value isn't deleted !
}

trace("++ delete sur une variable dans une fonction") ;
test() ;

.. you can read some good articles about Garbage collector (in FP8 and FP9
the garbage is better...)

- http://www.tekool.net/flash/benchmark/garbage_collector/ (french)
-

http://weblog.shaoken.be/index.php?2005/09/23/17-gestion-du-garbage-collector-sous-flash8(french)

- http://www.blog.lessrain.com/?p=237 (benchmark)
-

http://www.kaourantin.net/2005/09/garbage-collection-in-flash-player-8.html(english)
-
http://www.adobe.com/devnet/flashplayer/articles/fp8_performance.html(english)
-
http://www.informit.com/guides/content.asp?g=flash&seqNum=344&rl=1(english)

- http://www.gskinner.com/blog/archives/2006/09/garbage_collect.html(search
the key work Garbage collector in this blog)

EKA+ :)

2006/12/1, Yehia Shouman <[EMAIL PROTECTED]>:
>
> You're welcome Micky
>
>
>
> EKA,
> I've been really confused by the garbage collection and how it sometimes
> sits their coldly not doing the job ! I read somewhere the garbage
> collection won't fire unless the application is in a still state. In an
> application, that I had some interval process happening, the garbage
> collection never worked and the memory usage kept going up. I've watched
a
> presentation by G Skinner, read some articles, but never found a way to
> fire
> that garbage collector other than minimizing the application (and that
> works
> in IE, it doesnt with firefox). So its an act of anxiety ! Can you point
> us
> to links where the garbage collection work ?, Perhaps with a new message
>
> Thanks for your comment,
> Yehia
>
> On 12/1/06, eka <[EMAIL PROTECTED]> wrote:
> >
> > Hello :)
> >
> > the __proto__ solution is a good solution :
> >
> > /**
> > * Constructor of the class
> > */
> > function Square()
> > {
> > this.draw() ;
> > }
> >
> > /**
> > * Square extends MovieClip
> > */
> > Square.prototype.__proto__ = MovieClip.prototype ;
> >
> > /**
> > * Draw the square shape.
> > */
> > Square.prototype.draw = function()
> > {
> > this.beginFill(0xFF, 100) ;
> > this.lineTo(100,0) ;
> > this.lineTo(100,100) ;
> > this.lineTo(0,0) ;
> > this.lineTo(0,0) ;
> > this.endFill() ;
> > }
> >
> > /**
> > * Sets the color of the movieclip.
> > */
> > Square.prototype.setRGB = function ( color:Number )
> > {
> > (new Color(this)).setRGB(color) ;
> > }
> >
> > // test attachMovie
> >
> > var mc1:MovieClip = attachMovie("myID", "myClip", 1) ;
> > mc1.__proto__ = Square.prototype ; // change the prototype reference
> > Square.call(mc2) ; // launch the constructor of the Square class
> > mc1.setRGB(0xFF) ; // ok
> >
> > // test with createEmptyMovieClip
> >
> > var mc2:MovieClip = createEmptyMovieClip("myClip2", 2) ;
> > mc2.__proto__ = Square.prototype ; // change the prototype reference
> > Square.call(mc2) ; // launch the constructor of the Square class
> >
> > mc2.setRGB(0xFF) ; // ok
> >
> > @Yehia Shouman : your delete in your "changeColorTo" method is useless
> > because all local variables with a var in a method is remove by the
> > Garbage
> > collector at the end of the call function.
> >
> > EKA+ :)
> >
> >
> > 2006/12/1, Yehia Shouman <[EMAIL PROTECTED]>:
> > >
> > > function Square(){}
> > > Square.prototype=new MovieClip();
> > > Square.prototype.changeColorTo=function (clr:Number)
> > > {
> > > var tempClr:Color=new Color(this);
> > > tempClr.setRGB(clr);
> > > delete tempClr;
> > > }
> > > var linkageID_str:String="exportedClip";
> > > //associate the linked clip with sub class
> > > Object.registerClass(linkageID_str,Square);
> > > //attach
> > > var mc:MovieClip= attachMovie(linkageID_str,"mc",1);
> > > //then prohibit further association of linked clip to class
> > > Object.registerClass(linkageID_str,null);
> > > //when you call the method it should work
> > > mc.changeColorTo(0xFF);
> > >
> > > Same idea if you're working with Actionscript 2.0
> > >
> > > Y Shouman
> > >
> > >
> > >
> > >
> > > On 12/1/06, Micky Hulse <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Just curious if it is possible to extend/apply a sub class to a
swf
> > > > which is loaded via attachMovie()?
> > > >
> > > > TIA,
> > > > Cheers,
> > > > M
> > > >
> > > > --
> > > >   Wishlist: 

Re: [Flashcoders] Transmit image diff?

2006-12-01 Thread Ian Thomas

On 12/1/06, Wojtek Dabrowski <[EMAIL PROTECTED]> wrote:

Hello Ian,

Thanks for the tip, but unfortunately, pre-rendering is really not an
option. I need to render the video in response to user input, inputs
coming from a few other nodes, and the state of the server itself (e.g.
load) - basically a heap of information that I don't have earlier.


I don't quite get that - surely the user input can be sent back to the
server, then the server can render based on all the inputs?

I do agree it may put quite a load on the server; but if you want to
get the data out to the client in a timely fashion, you may just have
to put up with that as a requirement of your app and provide
servers/load balancing accordingly.

Ian
___
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] loadClip vs loadMovie: swf's losing control... literally

2006-12-01 Thread Ray Chuan

Hi,
where are you putting those commands? If you put them in onLoadInit it
should work:

mcl.addListener({
 onLoadInit: function(target:MovieClip) {
   target.stop();
 }
});

On 12/2/06, Micky Hulse <[EMAIL PROTECTED]> wrote:

Hi,

Before I hit hay, I noticed loadClip() is causing my loaded swf to loose
control... I can't seem to tell the loaded clip(s) to do anything
(targMc.play(), targMc.stop(), targMc.goToFrame())... Is this normal
behavior, or am I doing things wrong (can post code later if need be)?

It sounds like I should be using loadMovie() if I want to target and
control the timeline of my loaded clips. From livedocs:

"This class [MovieClipLoader] lets you implement listener callbacks that
provide status information while SWF, JPEG, GIF, and PNG files are being
loaded into movie clips. To use MovieClipLoader features, use
MovieClipLoader.loadClip() instead of loadMovie() or
MovieClip.loadMovie() to load SWF files."

I really like the listener callbacks.

Anyway, just testing code... so not a big deal (other options are
available thanks to the kind peeps on this list), but for learning
purposes: am I correct in thinking that loadClip takes-away timeline
control of loaded swf's? Or, do I access the timeline in some other way
(i.e. something other than targMc.goToFrame(8);)?

Just curious if my sleep deprived thinking is on the right track... if
so, how do you handle similar situation?

Many thanks!
Cheers,
M



--
  Wishlist: 
Switch: 
  BCC?: 
My: 
___
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] onFrameReached {do something}

2006-12-01 Thread Ray Chuan

Hi,

afaik there's no such thing.

If you want to, in the frame that you are looking for you can put a
dispatch call, eg at frame 30:

trace("frame reached");
broadcaster.dispatch({type: "onFrameReached"});

I made that up, there's no event by the name onFrameReached.

Even if you do that or use onEnterFrame you may not get what you want
since the player can choose to skip that frame/not call onEnterFrame
for performance reasons.

On 12/1/06, Wendy Richardson <[EMAIL PROTECTED]> wrote:

Hi All,

I'm looking for some suggestions for the best way to know when a certain
frame has been reached or plays.

Barring checking for that frame-by-frame on each onEnterFrame, is there
a way to listen for a swf reaching or playing a certain frame?  Some
event to listen for?

Code will be 1st frame only or via new classes.

Thanks for any ideas!

Wendy
___
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] (revised post) textFormat, CSS, embedded fonts, dynamic font size control

2006-12-01 Thread Marc Hoffman

Hi Jim,

Thanks so much for the reply. I'll have to double-check my tests -- I 
embedded the fonts (as you suggested) in offstage textfields. Then I 
designated the font face and other attributes in CSS, loaded the CSS 
into a style, and attached the style to an onstage textfield (or some 
such procedure -- the point being it mostly worked). All the CSS 
attributes worked (a:hover, a:link, color, size) but the font 
designation would not work unless the font was on my system. Are you 
sure it worked for you when the font wasn't present on the user's system?


This is also becoming complicated by the fact that I now am letting 
the user increase text size by modifying the TextFormat size and 
reapplying the TextFormat to the textfield. I suppose I could do 
something similar using CSS, though I don't know how to dynamically 
change the text size in CSS.


Marc

At 11:58 AM 12/1/2006, you wrote:

"#2: The issue is that if I use CSS rather than TextFormat, the
embedded fonts aren't accessed by Flash, so the font must reside on
the user's system, which is no good."

This is not true.  I've used CSS and embedded fonts lots of times.
You should be able to find plenty of examples by Googling.  A trick
you might employ:  embed the fonts you need in dummy textfields
offstage.  Then, when Flash calls for the font specified in the
stylesheet, it's in the swf.  Alternatively, you could look into
shared libraries for loading the font.  And lastly, several dynamic
font loaders have ben written that can address this problem.  Using
one of these, you'd load the fonts you need into the swf just like you
load images or any other asset.

#4: Can CSS be used at the same time as TextFormat? If so, how?
Specifically, I'd like to specify a:hover and a:link properties via
CSS, but handle most other text properties via TextFormat.

As far as I know, you can't really do this.  But look into
stylesheet.transform() as a way of expanding the things that can be
done with CSS.  Again, Google is your friend.

Good luck!

Jim Kremens


On 12/1/06, Marc Hoffman <[EMAIL PROTECTED]> wrote:

[I'm revising and re-sending this as I'm not sure this reached the
list, and I've answered some of my own questions. -Marc]

I'm working on an all-Flash site that will use a single swf to
display many "pages" of information about manufactured products.
Regarding text functionality, I'm not sure what combination of
textFormat, CSS, and font embedding to use. I want to achieve the following:

1. Dynamic text fields that display text from an xml file.
2. Embedding several fonts, but not the entire character sets.
3. Allowing the user to modify the point size of the text (for 
accessibility).

4. Controlling a:hover and a:link properties from a central location
so that I can apply color and underline effects to links.

#1: This is no problem for me.

#2: The issue is that if I use CSS rather than TextFormat, the
embedded fonts aren't accessed by Flash, so the font must reside on
the user's system, which is no good.

#3: Is there a way to trap the browser text-size controls so that
they tell Flash to resize the text? Sort of like trapping the Forward
and Back buttons in the browser. But it could be too complicated if
the different browsers use different methods to resize the text.
Anybody have experience with this?

#4: Can CSS be used at the same time as TextFormat? If so, how?
Specifically, I'd like to specify a:hover and a:link properties via
CSS, but handle most other text properties via TextFormat.

Many thanks!

Marc Hoffman


___
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



--
Jim Kremens
___
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] Runtime skinning: Dynamically assigning Class at runtime for use

2006-12-01 Thread Austin Kottke
Hi guys,

This is more of a flex question, but I think some people
might know. I'm trying to load in a skin at runtime just 
as PNG data and then draw this in an extended UIComponent
which can then be used as a style for all buttons within
the app using 9 scale skinning.

I've got the png data loaded and I can display it just as a 
UIComponent on stage. What I cannot do is dynamically
set it as a "Class" object so the style manager uses this
PNG data as the formation of all buttons.

Im doing it this way so that I can have all of the JPEGS and
PNGS packed in a single zip file which then gets loaded at
runtime whereupon I can unpack the pngs in the flex app and
then assign skin the app.

Any ideas?

Best, Austin

 
___
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] perspective texture mapping

2006-12-01 Thread shang liang

Not sure whether you've seen this.
http://www.flashsandy.org/

On 11/30/06, Boon Chew <[EMAIL PROTECTED]> wrote:


I am investigating the different ways one can implement or simulate perspective 
texture mapping both using Flash 8 API (e.g. with bitmapdata) and without using 
Flash 8 API (without bitmapdata, how?).

Anyone with experience in this or knows of any resources exploring this topic?



-
Check out the all-new Yahoo! Mail beta - Fire up a more powerful email and get 
things done faster.
___
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




--
/*
bored
*/
___
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] loadClip vs loadMovie: swf's losing control... literally

2006-12-01 Thread Micky Hulse

Micky Hulse wrote:
Just curious if my sleep deprived thinking is on the right track... if 
so, how do you handle similar situation?


Well, I feel like a dolt... this whole day I have been banging my head 
on keyboard trying to figure out why I could not get totalframes, or 
control the inner-workings of the loaded swf...


Ends up that it was the swf that had the problem.

I had created all my swf's by exporting them out of an FLA by right 
clicking on the movieclip in the library and choosing "Export Flash Movie".


Not sure why that would break things... I can guess but whatever the 
case may be, looks like I need to figure out a different way to generate 
my swfs...


Ok, now time for sleep for real this time... can... barely... type...

Thanks for putting-up with me all. :)

M



--
 Wishlist: 
   Switch: 
 BCC?: 
   My: 
___
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