Re: [Flashcoders] Private var not accessible?

2007-06-08 Thread eka

Hello :)

more information about vegas in the projects page :

- http://code.google.com/p/vegas/

And you can see the event model tutorials in this page :
http://code.google.com/p/vegas/wiki/VegasTutorialsEvents

EKA+ :)

2007/6/8, JOR [EMAIL PROTECTED]:


Oh cool, I never saw the VEGAS framework before.  Looks interesting,
I'll check it out.

Thanks,
James


eka wrote:
 Hello :)

 i have the same implementation in VEGAS inspired of the
 flash.util.Timeclass :

 http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/vegas/util/Timer.as

http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/vegas/util/FrameTimer.as


 For me it's a better solution to use this implementation :) I prefere
the
 dom2/3 of the W3C event model to manage my intervals too ;)

 EKA+ :)


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

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


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

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


[Flashcoders] Flash video graphic

2007-06-08 Thread Karl Schneider

I want to add a static graphic to my Flash movie. When a visitor visits the
Web page with the embedded flash video the visitor would see the graphic in
the Flash video player and not the black video player screen. I have seen
this done on the CNET and other Websites. What is this treatment called?
Where can I learn how to do this? The graphic will display in the embedded
Flash video player until the Web visitor clicks on the play button to view
the video. Any help or enlightenment on this subject would be greatly
appreciated.

Regards,
KGS
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] Composition access

2007-06-08 Thread Helmut Granda

I am slowly moving from inheritance to composition for a specific project,
one way to extend my classes is by creating a copy of them into the new
created classes...

class OriginalClass {

var mc:MovieClip;

function original(mc:MovieClip) {
 this.mc = mc;
 init();
};

function init() {
 trace(original);
}

-- now trying to overwrite init

class CopyClass {

var original : OriginalClass;
var mc : MovieClip;

function CopyClass(mc:MovieClip) {
this.mc = mc;
original = new OriginalClass(mc);

}

//How do I access init from the original class? I know that doing
inheritance I can just declare a new init method in my CopyClass but in this
case it doesnt work that way.

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

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


Re: [Flashcoders] Flash video graphic

2007-06-08 Thread Helmut Granda

I dont know if there a specific name for doing this but I would load the
image on top of the player and add a listener so when the user clicks on the
play button you can unload/hide/delete the image

...helmut

On 6/8/07, Karl Schneider [EMAIL PROTECTED] wrote:


I want to add a static graphic to my Flash movie. When a visitor visits
the
Web page with the embedded flash video the visitor would see the graphic
in
the Flash video player and not the black video player screen. I have seen
this done on the CNET and other Websites. What is this treatment called?
Where can I learn how to do this? The graphic will display in the embedded
Flash video player until the Web visitor clicks on the play button to view
the video. Any help or enlightenment on this subject would be greatly
appreciated.

Regards,
KGS
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] Composition access

2007-06-08 Thread David Ngo
You'd basically create a 'wrapper' method:

class CopyClass {

private var original:OriginalClass;
private var mc:MovieClip;

public function CopyClass(mc:MovieClip)
{
this.mc = mc;
original = new OriginalClass(mc);
}

public function init():Void
{
original.init();
}
}


It's almost like calling super. However, if you're looking to override the
original class' init(), then you don't need to call original.init() and just
create your logic in your CopyClass' init method. This is the one drawback
to using Composition over Inheritance, but I would say it's worth it in the
long-run.


David


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Helmut
Granda
Sent: Friday, June 08, 2007 10:27 AM
To: Flashcoders mailing list
Subject: [Flashcoders] Composition access

I am slowly moving from inheritance to composition for a specific project,
one way to extend my classes is by creating a copy of them into the new
created classes...

class OriginalClass {

var mc:MovieClip;

function original(mc:MovieClip) {
  this.mc = mc;
  init();
};

function init() {
  trace(original);
}

-- now trying to overwrite init

class CopyClass {

var original : OriginalClass;
var mc : MovieClip;

function CopyClass(mc:MovieClip) {
this.mc = mc;
original = new OriginalClass(mc);

}

//How do I access init from the original class? I know that doing
inheritance I can just declare a new init method in my CopyClass but in this
case it doesnt work that way.

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

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

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

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


Re: [Flashcoders] Flash video graphic

2007-06-08 Thread Muzak
erhmmm.. try here:

http://chattyfig.figleaf.com/mailman/listinfo/flashnewbie


- Original Message - 
From: Karl Schneider [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Friday, June 08, 2007 4:31 PM
Subject: [Flashcoders] Flash video graphic


I want to add a static graphic to my Flash movie. When a visitor visits the
 Web page with the embedded flash video the visitor would see the graphic in
 the Flash video player and not the black video player screen. I have seen
 this done on the CNET and other Websites. What is this treatment called?
 Where can I learn how to do this? The graphic will display in the embedded
 Flash video player until the Web visitor clicks on the play button to view
 the video. Any help or enlightenment on this subject would be greatly
 appreciated.

 Regards,
 KGS


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] Composition access

2007-06-08 Thread Helmut Granda

Thanks David,

For some odd reason if I do in my coopy

public function init():Void
{
trace(init in copy class);
}

it wont fire but it will fire the init method from the Original Class (which
by the way seem very similar to inheritance :) ) any ideas why this
could be happening?

Thanks again...

On 6/8/07, David Ngo [EMAIL PROTECTED] wrote:


You'd basically create a 'wrapper' method:

class CopyClass {

private var original:OriginalClass;
private var mc:MovieClip;

public function CopyClass(mc:MovieClip)
{
this.mc = mc;
original = new OriginalClass(mc);
}

public function init():Void
{
original.init();
}
}


It's almost like calling super. However, if you're looking to override the
original class' init(), then you don't need to call original.init() and
just
create your logic in your CopyClass' init method. This is the one drawback
to using Composition over Inheritance, but I would say it's worth it in
the
long-run.


David


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Helmut
Granda
Sent: Friday, June 08, 2007 10:27 AM
To: Flashcoders mailing list
Subject: [Flashcoders] Composition access

I am slowly moving from inheritance to composition for a specific project,
one way to extend my classes is by creating a copy of them into the new
created classes...

class OriginalClass {

var mc:MovieClip;

function original(mc:MovieClip) {
  this.mc = mc;
  init();
};

function init() {
  trace(original);
}

-- now trying to overwrite init

class CopyClass {

var original : OriginalClass;
var mc : MovieClip;

function CopyClass(mc:MovieClip) {
this.mc = mc;
original = new OriginalClass(mc);

}

//How do I access init from the original class? I know that doing
inheritance I can just declare a new init method in my CopyClass but in
this
case it doesnt work that way.

TIA
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] Composition access

2007-06-08 Thread Helmut Granda

hey David,

your suggestion works perfectly, it was my implementation that was breaking
the code.

Thanks again.
-h

On 6/8/07, Helmut Granda [EMAIL PROTECTED] wrote:


Thanks David,

For some odd reason if I do in my coopy

public function init():Void
{
trace(init in copy class);
}

it wont fire but it will fire the init method from the Original Class
(which by the way seem very similar to inheritance :) ) any ideas why
this could be happening?

Thanks again...

On 6/8/07, David Ngo [EMAIL PROTECTED] wrote:

 You'd basically create a 'wrapper' method:

 class CopyClass {

 private var original:OriginalClass;
 private var mc:MovieClip;

 public function CopyClass(mc:MovieClip)
 {
 this.mc = mc;
 original = new OriginalClass(mc);
 }

 public function init():Void
 {
 original.init ();
 }
 }


 It's almost like calling super. However, if you're looking to override
 the
 original class' init(), then you don't need to call original.init() and
 just
 create your logic in your CopyClass' init method. This is the one
 drawback
 to using Composition over Inheritance, but I would say it's worth it in
 the
 long-run.


 David


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Helmut
 Granda
 Sent: Friday, June 08, 2007 10:27 AM
 To: Flashcoders mailing list
 Subject: [Flashcoders] Composition access

 I am slowly moving from inheritance to composition for a specific
 project,
 one way to extend my classes is by creating a copy of them into the
 new
 created classes...

 class OriginalClass {

 var mc:MovieClip;

 function original(mc:MovieClip) {
   this.mc = mc;
   init();
 };

 function init() {
   trace(original);
 }

 -- now trying to overwrite init

 class CopyClass {

 var original : OriginalClass;
 var mc : MovieClip;

 function CopyClass(mc:MovieClip) {
 this.mc = mc;
 original = new OriginalClass(mc);

 }

 //How do I access init from the original class? I know that doing
 inheritance I can just declare a new init method in my CopyClass but in
 this
 case it doesnt work that way.

 TIA
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/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] Composition access

2007-06-08 Thread Helmut Granda

One more question while in Composition mode

lets say I have my main class

Main
-method1 (calls method2)
-method2 (calls method3)
-method3

With Inheritance I could do

Copy

-method2 (calls method3 of Main)

When instantiating Copy it would know to use method1, and method3 from
original while using method2 from the copy.

Is there a way to achieve the same issue with composition?

So far thanks to the explanation above I can access the methods of Main from
a Copy instantiation but cant access methods of Copy from Main when needed.
I might be approaching this all wrong which might be the main issue :(

TIA

On 6/8/07, Helmut Granda [EMAIL PROTECTED] wrote:


hey David,

your suggestion works perfectly, it was my implementation that was
breaking the code.

Thanks again.
-h

On 6/8/07, Helmut Granda [EMAIL PROTECTED] wrote:

 Thanks David,

 For some odd reason if I do in my coopy

 public function init():Void
 {
 trace(init in copy class);
 }

 it wont fire but it will fire the init method from the Original Class
 (which by the way seem very similar to inheritance :) ) any ideas why
 this could be happening?

 Thanks again...

 On 6/8/07, David Ngo  [EMAIL PROTECTED] wrote:
 
  You'd basically create a 'wrapper' method:
 
  class CopyClass {
 
  private var original:OriginalClass;
  private var mc:MovieClip;
 
  public function CopyClass(mc:MovieClip)
  {
  this.mc = mc;
  original = new OriginalClass(mc);
  }
 
  public function init():Void
  {
  original.init ();
  }
  }
 
 
  It's almost like calling super. However, if you're looking to override
  the
  original class' init(), then you don't need to call original.init()
  and just
  create your logic in your CopyClass' init method. This is the one
  drawback
  to using Composition over Inheritance, but I would say it's worth it
  in the
  long-run.
 
 
  David
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of Helmut
  Granda
  Sent: Friday, June 08, 2007 10:27 AM
  To: Flashcoders mailing list
  Subject: [Flashcoders] Composition access
 
  I am slowly moving from inheritance to composition for a specific
  project,
  one way to extend my classes is by creating a copy of them into the
  new
  created classes...
 
  class OriginalClass {
 
  var mc:MovieClip;
 
  function original(mc:MovieClip) {
this.mc = mc;
init();
  };
 
  function init() {
trace(original);
  }
 
  -- now trying to overwrite init
 
  class CopyClass {
 
  var original : OriginalClass;
  var mc : MovieClip;
 
  function CopyClass(mc:MovieClip) {
  this.mc = mc;
  original = new OriginalClass(mc);
 
  }
 
  //How do I access init from the original class? I know that doing
  inheritance I can just declare a new init method in my CopyClass but
  in this
  case it doesnt work that way.
 
  TIA
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/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] Using Vista, Flash doesn't reload in FF or IE

2007-06-08 Thread Ian Thomas

I'm using Vista for development every day, and have never seen that error.

Are you sure the Flash plugin is installed correctly?

Does the Flash movie work in the Flash Player?

Is there anything odd going on with regards to loading? Can your
browser read the resources directly without errors? (if you're using
external resources).

My normal approach to debugging things like this - if there's nothing
obvious going on - is to start commenting out/removing parts of the
offending movie until it works. But as I said, I've never had this
problem (specifically) on Vista. I have had behaviour differences
between browsers, where sometimes movies fail; mostly to do with items
being loaded in the wrong order (or loading from the cache before a
function has returned).

Ian

On 6/8/07, James Marsden [EMAIL PROTECTED] wrote:

Hallo,

We've got a presentation to give with some Flash using a Vista laptop,
and reloading the page with the Flash on it causes the Flash to stall on
the first frame (no code executed either). We're using SWFObject to
embed, and it works fine on XP with IE 6, 7 and FF, and on OSX with both
Safari and FF.

Does Vista suck or are we missing a Make this OS good setting somewhere?

Thanks all,

James
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] Using Vista, Flash doesn't reload in FF or IE

2007-06-08 Thread gareth gwyther

Why are you using swf for a presentation. Go into your publishing setting
and make a projector
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] Using Vista, Flash doesn't reload in FF or IE

2007-06-08 Thread James Marsden

Hallo,

We've got a presentation to give with some Flash using a Vista laptop, 
and reloading the page with the Flash on it causes the Flash to stall on 
the first frame (no code executed either). We're using SWFObject to 
embed, and it works fine on XP with IE 6, 7 and FF, and on OSX with both 
Safari and FF.


Does Vista suck or are we missing a Make this OS good setting somewhere?

Thanks all,

James
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] Using Vista, Flash doesn't reload in FF or IE

2007-06-08 Thread gareth gwyther

sorry just reread that. My reckoning is vista makes the flash player work
harder becasue microsft wants to sell more of its dodgey net frame work
adobe has a new script with cs3 for flash embedding thats pretty good try
that
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] Using Vista, Flash doesn't reload in FF or IE

2007-06-08 Thread Ian Thomas

For the record, SWFObject works fine on Vista - so it's not that.

Ian

On 6/8/07, James Marsden [EMAIL PROTECTED] wrote:

Hallo,

We've got a presentation to give with some Flash using a Vista laptop,
and reloading the page with the Flash on it causes the Flash to stall on
the first frame (no code executed either). We're using SWFObject to
embed, and it works fine on XP with IE 6, 7 and FF, and on OSX with both
Safari and FF.

Does Vista suck or are we missing a Make this OS good setting somewhere?

Thanks all,

James

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] suppressing the Context Menu Class

2007-06-08 Thread Matthew Ganz
Hi..

I know that you can trap right clicks in Flash, but will that always invoke the 
Context Menu Class or can I suppress it and do something else? 

Thanks. 

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

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


Re: [Flashcoders] Using Vista, Flash doesn't reload in FF or IE

2007-06-08 Thread Odie Bracy
Just this morning I was having problems on a new HP with Vista  
loading any Flash from any website. I Googled and found that a large  
number of people are having problems with slow internet with Vista.  
Most people talked about removing McAfee to solve the problem. I had  
Norton rather than McAfee but I removed Norton and turned off the  
Phish filters and suddenly everything started working.


Odie


On Jun 8, 2007, at 12:58 PM, James Marsden wrote:


Hallo,

We've got a presentation to give with some Flash using a Vista  
laptop, and reloading the page with the Flash on it causes the  
Flash to stall on the first frame (no code executed either). We're  
using SWFObject to embed, and it works fine on XP with IE 6, 7 and  
FF, and on OSX with both Safari and FF.


Does Vista suck or are we missing a Make this OS good setting  
somewhere?


Thanks all,

James
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] suppressing the Context Menu Class

2007-06-08 Thread Hershell Bryant
AFAIK, the only way to use a right mouse button for anything but Flash's
context menu (you can suppress and add individual items, but it still looks
like Flash's context menu) is to have your swf sit on a layer below an
invisible layer on a web page, and use javascript to respond to right mouse
events. Javascript can then talk to your swf and tell is whatever you want.

One of these days, Adobe is going to realize that we are going to be a lot
happier with the right mouse button.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Matthew Ganz
Sent: Friday, June 08, 2007 11:06 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] suppressing the Context Menu Class

Hi..

I know that you can trap right clicks in Flash, but will that always invoke
the Context Menu Class or can I suppress it and do something else? 

Thanks. 

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

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


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

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


RE: [Flashcoders] Composition access

2007-06-08 Thread David Ngo
No. You would have to create wrappers for all three methods. It sounds like
you should be using Inheritance instead of Composition if you're overriding
that many methods...



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Helmut
Granda
Sent: Friday, June 08, 2007 12:40 PM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Composition access

One more question while in Composition mode

lets say I have my main class

Main
-method1 (calls method2)
-method2 (calls method3)
-method3

With Inheritance I could do

Copy

-method2 (calls method3 of Main)

When instantiating Copy it would know to use method1, and method3 from
original while using method2 from the copy.

Is there a way to achieve the same issue with composition?

So far thanks to the explanation above I can access the methods of Main from
a Copy instantiation but cant access methods of Copy from Main when needed.
I might be approaching this all wrong which might be the main issue :(

TIA

On 6/8/07, Helmut Granda [EMAIL PROTECTED] wrote:

 hey David,

 your suggestion works perfectly, it was my implementation that was
 breaking the code.

 Thanks again.
 -h

 On 6/8/07, Helmut Granda [EMAIL PROTECTED] wrote:
 
  Thanks David,
 
  For some odd reason if I do in my coopy
 
  public function init():Void
  {
  trace(init in copy class);
  }
 
  it wont fire but it will fire the init method from the Original Class
  (which by the way seem very similar to inheritance :) ) any ideas
why
  this could be happening?
 
  Thanks again...
 
  On 6/8/07, David Ngo  [EMAIL PROTECTED] wrote:
  
   You'd basically create a 'wrapper' method:
  
   class CopyClass {
  
   private var original:OriginalClass;
   private var mc:MovieClip;
  
   public function CopyClass(mc:MovieClip)
   {
   this.mc = mc;
   original = new OriginalClass(mc);
   }
  
   public function init():Void
   {
   original.init ();
   }
   }
  
  
   It's almost like calling super. However, if you're looking to override
   the
   original class' init(), then you don't need to call original.init()
   and just
   create your logic in your CopyClass' init method. This is the one
   drawback
   to using Composition over Inheritance, but I would say it's worth it
   in the
   long-run.
  
  
   David
  
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] On Behalf Of Helmut
   Granda
   Sent: Friday, June 08, 2007 10:27 AM
   To: Flashcoders mailing list
   Subject: [Flashcoders] Composition access
  
   I am slowly moving from inheritance to composition for a specific
   project,
   one way to extend my classes is by creating a copy of them into the
   new
   created classes...
  
   class OriginalClass {
  
   var mc:MovieClip;
  
   function original(mc:MovieClip) {
 this.mc = mc;
 init();
   };
  
   function init() {
 trace(original);
   }
  
   -- now trying to overwrite init
  
   class CopyClass {
  
   var original : OriginalClass;
   var mc : MovieClip;
  
   function CopyClass(mc:MovieClip) {
   this.mc = mc;
   original = new OriginalClass(mc);
  
   }
  
   //How do I access init from the original class? I know that doing
   inheritance I can just declare a new init method in my CopyClass but
   in this
   case it doesnt work that way.
  
   TIA
   ___
   Flashcoders@chattyfig.figleaf.com
   To change your subscription options or search the archive:
   http://chattyfig.figleaf.com/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] Composition access

2007-06-08 Thread Helmut Granda

Ok, figured out

Main
-method1 (calls method2)
-method2 (calls method3)
-method3

Copy
method2 = this.method2
-method2 = calls main.method3;

so you can make them talk to each other, I just was confused how to put it
into code.

Thanks
-h

On 6/8/07, Helmut Granda [EMAIL PROTECTED] wrote:


One more question while in Composition mode

lets say I have my main class

Main
-method1 (calls method2)
-method2 (calls method3)
-method3

With Inheritance I could do

Copy

-method2 (calls method3 of Main)

When instantiating Copy it would know to use method1, and method3 from
original while using method2 from the copy.

Is there a way to achieve the same issue with composition?

So far thanks to the explanation above I can access the methods of Main
from a Copy instantiation but cant access methods of Copy from Main when
needed. I might be approaching this all wrong which might be the main issue
:(

TIA

On 6/8/07, Helmut Granda [EMAIL PROTECTED] wrote:

 hey David,

 your suggestion works perfectly, it was my implementation that was
 breaking the code.

 Thanks again.
 -h

 On 6/8/07, Helmut Granda [EMAIL PROTECTED] wrote:
 
  Thanks David,
 
  For some odd reason if I do in my coopy
 
  public function init():Void
  {
  trace(init in copy class);
  }
 
  it wont fire but it will fire the init method from the Original Class
  (which by the way seem very similar to inheritance :) ) any ideas why
  this could be happening?
 
  Thanks again...
 
  On 6/8/07, David Ngo  [EMAIL PROTECTED] wrote:
  
   You'd basically create a 'wrapper' method:
  
   class CopyClass {
  
   private var original:OriginalClass;
   private var mc:MovieClip;
  
   public function CopyClass(mc:MovieClip)
   {
   this.mc = mc;
   original = new OriginalClass(mc);
   }
  
   public function init():Void
   {
   original.init ();
   }
   }
  
  
   It's almost like calling super. However, if you're looking to
   override the
   original class' init(), then you don't need to call original.init()
   and just
   create your logic in your CopyClass' init method. This is the one
   drawback
   to using Composition over Inheritance, but I would say it's worth it
   in the
   long-run.
  
  
   David
  
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] On Behalf Of
   Helmut
   Granda
   Sent: Friday, June 08, 2007 10:27 AM
   To: Flashcoders mailing list
   Subject: [Flashcoders] Composition access
  
   I am slowly moving from inheritance to composition for a specific
   project,
   one way to extend my classes is by creating a copy of them into
   the new
   created classes...
  
   class OriginalClass {
  
   var mc:MovieClip;
  
   function original(mc:MovieClip) {
 this.mc = mc;
 init();
   };
  
   function init() {
 trace(original);
   }
  
   -- now trying to overwrite init
  
   class CopyClass {
  
   var original : OriginalClass;
   var mc : MovieClip;
  
   function CopyClass(mc:MovieClip) {
   this.mc = mc;
   original = new OriginalClass(mc);
  
   }
  
   //How do I access init from the original class? I know that doing
   inheritance I can just declare a new init method in my CopyClass but
   in this
   case it doesnt work that way.
  
   TIA
   ___
   Flashcoders@chattyfig.figleaf.com
   To change your subscription options or search the archive:
   http://chattyfig.figleaf.com/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] FLVplayback IE loading progress problem

2007-06-08 Thread Felipe Hefler

Hi Folks!

I'm using FLVplayback component. I'm having some trouble when playing a FLV
file on IE (6 or 7). The download progress bar just doesn't work. On
firefox, safari it works perfectly. Does anyone know about this issue?

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] Having MovieClip behaviours in a class..

2007-06-08 Thread O. Fouad

Ok, this is just frustrating me... somebody help me please :(

i've got this class DrawBox that as it says, draws a box on the stage..

class DrawBox extends MovieClip {
   var myMC:MovieClip;

   public function DrawBox(boxName:String) {
   this.myMC =
_root.createEmptyMovieClip(boxName,_root.getNextHighestDepth());
   this.myMC.beginFill(0xFF,100);
   this.myMC.moveTo(0,0);
   this.myMC.lineTo(100,0);
   this.myMC.lineTo(100,100);
   this.myMC.lineTo(0,100);
   this.myMC.lineTo(0,0);
   this.myMC.endFill();
   }
}

this works so fine and in fact i've got a 100x100 red box on my stage, and i
thought that extending MovieClip, this class, should get the same behaviours
of a MovieClip like this:

var myBox:DrawBox(boxname);
myBox._y = 100;
myBox._alpha = 50;

but desperately it doesnt work as in the box alpha and y doesnt change...

is there something Missing?
Thanks :)

--
O.Fouad - Digital Emotions
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] Uncover the Flash Files

2007-06-08 Thread Glen Pike

Hi,

   Looks nice, except I only have a 1024 x 768 monitor - you are not 
really establishing a good case for flash being used to create usable 
sites because the bottom part of the page is cut off in my browser...


   Make it work before making it look good - then Jakob will shut up.

   Glen
  


Frederic Caron wrote:

Hi there,

Since there have been many rumours circulating about Flash - monolithic 100%
Flash-based sites are complex and unmanageable, they can't be optimized to
be search engine friendly, they can't be bookmarked, and sending a URL of a
specific page is next to impossible. But is any of that really true?  


With all the bad press surrounding Flash sites, we have decided to create a
Website to put an end to the biggest misconceptions, including: 


* SEO-friendly Flash sites
* Accessibility for disabled users
* Browser functionalities of 100% Flash sites
* Bookmarking
* Deep linking
* The use of Express Install
* Three-tier architectures
* Content management systems
* Analytics 


Rifle through the Flash Files and be part of the investigation. We want your
feedback. Do you agree? Do you disagree? Have anything to add?  Tell us what
you think about the arguments presented. Do your friends have the same
opinion? Let them know about the site. Let's spark a worldwide debate! 


Just drop us an email with any questions and/or comments!
http://www.the-flash-files.com
 
Frédéric Caron  
Flash team lead

Nurun inc.
 
www.nurun.com

Tel : (514) 392 1292 # 2128




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] Having MovieClip behaviours in a class..

2007-06-08 Thread Glen Pike

Hi,
  
   If you are extending a movie-clip, why can't you just draw in there??


   e.g.

class DrawBox extends MovieClip {

 public function drawBox() {
  beginFill(0xFF,100);
  moveTo(0,0);
  lineTo(100,0);
  lineTo(100,100);
  lineTo(0,100);
  lineTo(0,0);
  endFill();
  }
}

attachMovie(DrawBox, myBox, 1);

myBox.drawBox();

myBox._y = ...

HTH

Glen
  


O. Fouad wrote:

Ok, this is just frustrating me... somebody help me please :(

i've got this class DrawBox that as it says, draws a box on the stage..

class DrawBox extends MovieClip {
   var myMC:MovieClip;

   public function DrawBox(boxName:String) {
   this.myMC =
_root.createEmptyMovieClip(boxName,_root.getNextHighestDepth());
   this.myMC.beginFill(0xFF,100);
   this.myMC.moveTo(0,0);
   this.myMC.lineTo(100,0);
   this.myMC.lineTo(100,100);
   this.myMC.lineTo(0,100);
   this.myMC.lineTo(0,0);
   this.myMC.endFill();
   }
}

this works so fine and in fact i've got a 100x100 red box on my stage, 
and i
thought that extending MovieClip, this class, should get the same 
behaviours

of a MovieClip like this:

var myBox:DrawBox(boxname);
myBox._y = 100;
myBox._alpha = 50;

but desperately it doesnt work as in the box alpha and y doesnt change...

is there something Missing?
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] Having MovieClip behaviours in a class..

2007-06-08 Thread O. Fouad

this is just an example..
u know i wanted to apply some custom effect to a movieClip and using
mc.applyFX(bla bla) instead of applyFX(mc, bla bla);

Just like mc_tween's mc.alphaTo() for example...

--
O.Fouad - Digital Emotions
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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: EventDispatcher.initialize() and super() conflict?

2007-06-08 Thread Merrill, Jason
I have a class that has to call it's superclass in the constructor.
However, it also needs to initialize EventDispatcher to listen to
dispatch events that another class is listening to.  It seems, and I
could be wrong, that EventDispatcher does not work if it's not the first
thing in the constructor.  I thought someone had said once, or I read
it, that EventDispatcher has to be first in the constructor.  And of
course, probkem then is super() will not work if it's not first, so it
seems to be a catch-22.  Is this true regarding
EventDispatcher.initialize() and how to avoid?

code snippet:

   /*=Constructor=*/
public function MyClass(m:Model)
{
super(m);
EventDispatcher.initialize(this);
}

If this is OK then maybe something else is wrong in my code, I just
wanted to find out if maybe this is why the events aren't firing.  

Thanks,


Jason Merrill
Bank of America  
GTO Learning  Leadership Development
eTools  Multimedia Team


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] Having MovieClip behaviours in a class..

2007-06-08 Thread Jesse Graupmann
Or try static methods...


//
//  IN FLA
//


var myBox:DrawBox = DrawBox.newBox ( boxname, _root );
myBox._y = 100;
myBox._alpha = 50;


//
//  IN DrawBox.as
//


class DrawBox extends MovieClip 
{

public function DrawBox ( )
{
}

public static function newBox ( boxname, boxtarget ):DrawBox
{

var mc = boxtarget.createEmptyMovieClip ( boxname,
boxtarget.getNextHighestDepth());
mc.__proto__ = DrawBox.prototype;
mc.INIT ();
return mc;
}

private function INIT()
{
with ( this )
{
beginFill(0xFF,100);
moveTo(0,0);
lineTo(100,0);
lineTo(100,100);
lineTo(0,100);
lineTo(0,0);
endFill();
}
}
}



_

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



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Glen Pike
Sent: Friday, June 08, 2007 3:58 PM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Having MovieClip behaviours in a class..

Hi,
   
If you are extending a movie-clip, why can't you just draw in there??

e.g.

class DrawBox extends MovieClip {

  public function drawBox() {
   beginFill(0xFF,100);
   moveTo(0,0);
   lineTo(100,0);
   lineTo(100,100);
   lineTo(0,100);
   lineTo(0,0);
   endFill();
   }
}

attachMovie(DrawBox, myBox, 1);

myBox.drawBox();

myBox._y = ...

HTH

Glen
   

O. Fouad wrote:
 Ok, this is just frustrating me... somebody help me please :(

 i've got this class DrawBox that as it says, draws a box on the stage..

 class DrawBox extends MovieClip {
var myMC:MovieClip;

public function DrawBox(boxName:String) {
this.myMC =
 _root.createEmptyMovieClip(boxName,_root.getNextHighestDepth());
this.myMC.beginFill(0xFF,100);
this.myMC.moveTo(0,0);
this.myMC.lineTo(100,0);
this.myMC.lineTo(100,100);
this.myMC.lineTo(0,100);
this.myMC.lineTo(0,0);
this.myMC.endFill();
}
 }

 this works so fine and in fact i've got a 100x100 red box on my stage, 
 and i
 thought that extending MovieClip, this class, should get the same 
 behaviours
 of a MovieClip like this:

 var myBox:DrawBox(boxname);
 myBox._y = 100;
 myBox._alpha = 50;

 but desperately it doesnt work as in the box alpha and y doesnt change...

 is there something Missing?
 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] AS2: EventDispatcher.initialize() and super()conflict?

2007-06-08 Thread Jesse Graupmann
I never use super() so I have no idea, but see what happens when you throw
the initialize in a static variable like;


class myClass extends otherClass
{
private static var EventDispatcherDependancy  =
mx.events.EventDispatcher.initialize ( myClass.prototype );
public var addEventListener:Function;
public var removeEventListener:Function;
public var dispatchEvent:Function;

public function myClass (m:Model) {
super();
}
}

_

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



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: Friday, June 08, 2007 4:31 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] AS2: EventDispatcher.initialize() and
super()conflict?

I have a class that has to call it's superclass in the constructor.
However, it also needs to initialize EventDispatcher to listen to
dispatch events that another class is listening to.  It seems, and I
could be wrong, that EventDispatcher does not work if it's not the first
thing in the constructor.  I thought someone had said once, or I read
it, that EventDispatcher has to be first in the constructor.  And of
course, probkem then is super() will not work if it's not first, so it
seems to be a catch-22.  Is this true regarding
EventDispatcher.initialize() and how to avoid?

code snippet:

   /*=Constructor=*/
public function MyClass(m:Model)
{
super(m);
EventDispatcher.initialize(this);
}

If this is OK then maybe something else is wrong in my code, I just
wanted to find out if maybe this is why the events aren't firing.  

Thanks,


Jason Merrill
Bank of America  
GTO Learning  Leadership Development
eTools  Multimedia Team

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] Having MovieClip behaviours in a class..

2007-06-08 Thread O. Fouad

thanks :D but why should i use static methods I am trying to create some
color effect shortcuti wont need to create new instances. If i  have a
movieClip on my stage i wouldlike to have it
myMC.someEffect(par);
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] Uncover the Flash Files

2007-06-08 Thread Snepo - Arse
I also missed content because of the window size. The Flash Times  
link, for example, cannot be scrolled to if the window is to small.


Fonts are hard to read, no preloader, mystery meat navigation etc

Why don't you just offer the information in a usable and clear  
fashion... no wonder there is a lot of anti-flash sentiment of this  
is how we address the issues.


A


On 09/06/2007, at 9:03 AM, Glen Pike wrote:


Hi,

   Looks nice, except I only have a 1024 x 768 monitor - you are  
not really establishing a good case for flash being used to create  
usable sites because the bottom part of the page is cut off in my  
browser...


   Make it work before making it look good - then Jakob will shut up.

   Glen

Frederic Caron wrote:

Hi there,

Since there have been many rumours circulating about Flash -  
monolithic 100%
Flash-based sites are complex and unmanageable, they can't be  
optimized to
be search engine friendly, they can't be bookmarked, and sending a  
URL of a

specific page is next to impossible. But is any of that really true?
With all the bad press surrounding Flash sites, we have decided to  
create a

Website to put an end to the biggest misconceptions, including:
* SEO-friendly Flash sites
* Accessibility for disabled users
* Browser functionalities of 100% Flash sites
* Bookmarking
* Deep linking
* The use of Express Install
* Three-tier architectures
* Content management systems
* Analytics
Rifle through the Flash Files and be part of the investigation. We  
want your
feedback. Do you agree? Do you disagree? Have anything to add?   
Tell us what
you think about the arguments presented. Do your friends have the  
same
opinion? Let them know about the site. Let's spark a worldwide  
debate!

Just drop us an email with any questions and/or comments!
http://www.the-flash-files.com
 Frédéric Caron  Flash team lead
Nurun inc.
 www.nurun.com
Tel : (514) 392 1292 # 2128




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] Having MovieClip behaviours in a class..

2007-06-08 Thread O. Fouad

continued...

just the same way when in actionsript 1 i write:

MovieClip.prototype.myEffect = function () {
 //some code here

}

myMC.myEffect();
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] Having MovieClip behaviors in a class..

2007-06-08 Thread Jesse Graupmann
I'm not saying you have to create a new instance but was just getting as
close to your example as I could, which looks like a new instance to me;

var myBox:DrawBox(boxname);
myBox._y = 100;
myBox._alpha = 50;

 this is just an example..
u know i wanted to apply some custom effect to a movieClip and using
mc.applyFX(bla bla) instead of applyFX(mc, bla bla);
Just like mc_tween's mc.alphaTo() for example...

If you want shortcuts like mc_tween then you are probably attaching them to
the MovieClip prototype. This will give every MovieClip from there on out
the same functions ( version1 ).

If you want and instance by instance basis with shortcuts, then you can try
using a class like EventDispatcher.initialize ( object ), or replace a
simple MovieClip with a class that extends the MovieClip class which
includes those shortcuts you want ( version2 ).

You'll notice in version2 each shortcut calls static methods in another
class. Maybe that keeps file size and memory usage down... who knows?



/
//
//  VERSION 1: Prototype Approach 
//
/


var mc = this.createEmptyMovieClip ( 'box', this.getNextHighestDepth() );
MovieClip.prototype.OFouction = function(){ trace( 'this function is
special' ) };
mc.OFouction (); // this function is special




/
//
//  VERSION 2: Shortcuts with static methods
//
/


//  In .fla


var myBox = this.createEmptyMovieClip ('myBox', this.getNextHighestDepth()
);
myBox.__proto__ = DrawBox.prototype;
myBox.drawMe ();
myBox._y = 100;
myBox._alpha = 0;
myBox.alphaTo ( 100 );



//  in DrawBox.as


import CrazyEffects;
class DrawBox extends MovieClip
{
public function DrawBox ( ) {   
}

public function drawMe (  ):Void { CrazyEffects.drawBox ( this ); }
public function alphaTo ( alpha:Number ):Void { CrazyEffects.alphaTo
( this, alpha )  };
}



//  in CrazyEffects.as


class CrazyEffects
{

public function CrazyEffects ( )
{
}

public static function drawBox ( mc ):Void
{
with ( mc )
{
beginFill(0xFF,100);
moveTo(0,0);
lineTo(100,0);
lineTo(100,100);
lineTo(0,100);
lineTo(0,0);
endFill();
}
}

public static function alphaTo ( mc, alpha ):Void
{
mc.onEnterFrame = function()
{
 var dif = alpha - this._alpha;
 if ( Math.abs( dif)  2  )
 {
 this._alpha = alpha;
 delete this.onEnterFrame;
 }
 else
 {
 this._alpha += dif / 6;
 }
}
}
}

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of O. Fouad
Sent: Friday, June 08, 2007 7:09 PM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Having MovieClip behaviours in a class..

thanks :D but why should i use static methods I am trying to create some
color effect shortcuti wont need to create new instances. If i  have a
movieClip on my stage i wouldlike to have it
myMC.someEffect(par);


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] Having MovieClip behaviors in a class..

2007-06-08 Thread O. Fouad

Thanks Jesse this was what i really wanted to know... :)

On 6/9/07, Jesse Graupmann [EMAIL PROTECTED] wrote:


I'm not saying you have to create a new instance but was just getting as
close to your example as I could, which looks like a new instance to me;

var myBox:DrawBox(boxname);
myBox._y = 100;
myBox._alpha = 50;

 this is just an example..
u know i wanted to apply some custom effect to a movieClip and using
mc.applyFX(bla bla) instead of applyFX(mc, bla bla);
Just like mc_tween's mc.alphaTo() for example...

If you want shortcuts like mc_tween then you are probably attaching them
to
the MovieClip prototype. This will give every MovieClip from there on out
the same functions ( version1 ).

If you want and instance by instance basis with shortcuts, then you can
try
using a class like EventDispatcher.initialize ( object ), or replace a
simple MovieClip with a class that extends the MovieClip class which
includes those shortcuts you want ( version2 ).

You'll notice in version2 each shortcut calls static methods in another
class. Maybe that keeps file size and memory usage down... who knows?



/
//
//  VERSION 1: Prototype Approach
//
/


var mc = this.createEmptyMovieClip ( 'box', this.getNextHighestDepth() );
MovieClip.prototype.OFouction = function(){ trace( 'this function is
special' ) };
mc.OFouction (); // this function is special




/
//
//  VERSION 2: Shortcuts with static methods
//
/


//  In .fla


var myBox = this.createEmptyMovieClip ('myBox', this.getNextHighestDepth()
);
myBox.__proto__ = DrawBox.prototype;
myBox.drawMe ();
myBox._y = 100;
myBox._alpha = 0;
myBox.alphaTo ( 100 );



//  in DrawBox.as


import CrazyEffects;
class DrawBox extends MovieClip
{
public function DrawBox ( ) {
}

public function drawMe (  ):Void { CrazyEffects.drawBox ( this );
}
public function alphaTo ( alpha:Number ):Void {
CrazyEffects.alphaTo
( this, alpha )  };
}



//  in CrazyEffects.as


class CrazyEffects
{

public function CrazyEffects ( )
{
}

public static function drawBox ( mc ):Void
{
with ( mc )
{
beginFill(0xFF,100);
moveTo(0,0);
lineTo(100,0);
lineTo(100,100);
lineTo(0,100);
lineTo(0,0);
endFill();
}
}

public static function alphaTo ( mc, alpha ):Void
{
mc.onEnterFrame = function()
{
 var dif = alpha - this._alpha;
 if ( Math.abs( dif)  2  )
 {
 this._alpha = alpha;
 delete this.onEnterFrame;
 }
 else
 {
 this._alpha += dif / 6;
 }
}
}
}

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of O. Fouad
Sent: Friday, June 08, 2007 7:09 PM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Having MovieClip behaviours in a class..

thanks :D but why should i use static methods I am trying to create
some
color effect shortcuti wont need to create new instances. If i  have a
movieClip on my stage i wouldlike to have it
myMC.someEffect(par);


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

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





--
O.Fouad
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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: EventDispatcher.initialize() andsuper()conflict?

2007-06-08 Thread Muzak
As Jesse said, use the static way instead of initializing it in the constructor.
This serves 2 purposes:
- mixin only occurs once (rather than which each instance created)
- mixin occurs before the constructor is run

With that said, any reason why you're not decorating the super class with 
EventDispatcher?
When decorating the super class every subclass will have event dispatching 
(which is usually what you want).

regards,
Muzak

- Original Message - 
From: Jesse Graupmann [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Saturday, June 09, 2007 1:57 AM
Subject: RE: [Flashcoders] AS2: EventDispatcher.initialize() andsuper()conflict?


I never use super() so I have no idea, but see what happens when you throw
 the initialize in a static variable like;


 class myClass extends otherClass
 {
 private static var EventDispatcherDependancy  =
 mx.events.EventDispatcher.initialize ( myClass.prototype );
 public var addEventListener:Function;
 public var removeEventListener:Function;
 public var dispatchEvent:Function;

 public function myClass (m:Model) {
 super();
 }
 }

 _

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



 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
 Jason
 Sent: Friday, June 08, 2007 4:31 PM
 To: flashcoders@chattyfig.figleaf.com
 Subject: [Flashcoders] AS2: EventDispatcher.initialize() and
 super()conflict?

 I have a class that has to call it's superclass in the constructor.
 However, it also needs to initialize EventDispatcher to listen to
 dispatch events that another class is listening to.  It seems, and I
 could be wrong, that EventDispatcher does not work if it's not the first
 thing in the constructor.  I thought someone had said once, or I read
 it, that EventDispatcher has to be first in the constructor.  And of
 course, probkem then is super() will not work if it's not first, so it
 seems to be a catch-22.  Is this true regarding
 EventDispatcher.initialize() and how to avoid?

 code snippet:

   /*=Constructor=*/
 public function MyClass(m:Model)
 {
 super(m);
 EventDispatcher.initialize(this);
 }

 If this is OK then maybe something else is wrong in my code, I just
 wanted to find out if maybe this is why the events aren't firing.

 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