Re: [Flashcoders] Creating An OOP MC Via Composition

2006-01-11 Thread Martin Wood

passing the target into the constructor.

martin.

Chris Kennon wrote:

Hi,

I attempting to create a mc, then attach a textField via composition,  
instead of extending the movieClip class. Could someone point out  what 
I missed?


--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Creating An OOP MC Via Composition

2006-01-11 Thread Chris Kennon

Hi,

Thanks for the prompt response. When I create the Hello object on the  
AS timeline, nothing is rendered to screen.


[CODE]

import com.bushidodeep.*;
var myHello:Hello = new Hello();


[/CODE]

[CODE]
/**
A Simple hello class
that assigns a custom
message to a text field
based upon time of day.
**/
class com.bushidodeep.Hello {
private var width:Number;
private var height:Number;
private static var textFieldDepth:Number = 0;
public static var message:String = Hello It's Me;
// Movie clip that will contain visual
// elements of the hello.
private var container_mc:MovieClip;
//
   public function Hello(target:MovieClip) {
container_mc = target.createEmptyMovieClip 
(messageDisplay, 1);

container_mc.displayGreeting();
}
private function placeGreeting() {
}
private function displayGreeting() {
container_mc.createTextField(messageText,  
textFieldDepth, 200, 100, 250, 125);

container_mc.messageText.text = test;
container_mc.messageText.border = true;
}
}

[/CODE]

On Jan 11, 2006, at 5:32 PM, Martin Wood wrote:


passing the target into the constructor.

martin.

Chris Kennon wrote:

Hi,
I attempting to create a mc, then attach a textField via  
composition,  instead of extending the movieClip class. Could  
someone point out  what I missed?


--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Creating An OOP MC Via Composition

2006-01-11 Thread Andy Johnston

public function Hello(target:MovieClip) {
   container_mc = target.createEmptyMovieClip 
(messageDisplay, 1);

 displayGreeting();
}


Hi,

Thanks for the prompt response. When I create the Hello object on the  
AS timeline, nothing is rendered to screen.


[CODE]

import com.bushidodeep.*;
var myHello:Hello = new Hello();


[/CODE]

[CODE]
/**
A Simple hello class
that assigns a custom
message to a text field
based upon time of day.
**/
class com.bushidodeep.Hello {
private var width:Number;
private var height:Number;
private static var textFieldDepth:Number = 0;
public static var message:String = Hello It's Me;
// Movie clip that will contain visual
// elements of the hello.
private var container_mc:MovieClip;
//
   public function Hello(target:MovieClip) {
container_mc = target.createEmptyMovieClip 
(messageDisplay, 1);

container_mc.displayGreeting();
}
private function placeGreeting() {
}
private function displayGreeting() {
container_mc.createTextField(messageText,  
textFieldDepth, 200, 100, 250, 125);

container_mc.messageText.text = test;
container_mc.messageText.border = true;
}
}

[/CODE]

On Jan 11, 2006, at 5:32 PM, Martin Wood wrote:


passing the target into the constructor.

martin.

Chris Kennon wrote:


Hi,
I attempting to create a mc, then attach a textField via  
composition,  instead of extending the movieClip class. Could  
someone point out  what I missed?



--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Creating An OOP MC Via Composition

2006-01-11 Thread Andy Johnston

nah actually should be


[CODE]
var myHelloClip:MovieClip = createEmptyMovieClip(hello_mc, 1);

import com.bushidodeep.*;
var myHello:Hello = new Hello(myHelloClip);


[/CODE]

[CODE]
/**
A Simple hello class
that assigns a custom
message to a text field
based upon time of day.
**/
class com.bushidodeep.Hello {
   private var width:Number;
   private var height:Number;
   private static var textFieldDepth:Number = 0;
   public static var message:String = Hello It's Me;
   // Movie clip that will contain visual
   // elements of the hello.
   private var container_mc:MovieClip;
   //
  public function Hello(target:MovieClip) {
   container_mc = target;
   displayGreeting();
   }
   private function placeGreeting() {
   }
   private function displayGreeting() {
   container_mc.createTextField(messageText,  
textFieldDepth, 200, 100, 250, 125);

   container_mc.messageText.text = test;
   container_mc.messageText.border = true;
   }
}


Hi,

Thanks for the prompt response. When I create the Hello object on the  
AS timeline, nothing is rendered to screen.


[CODE]

import com.bushidodeep.*;
var myHello:Hello = new Hello();


[/CODE]

[CODE]
/**
A Simple hello class
that assigns a custom
message to a text field
based upon time of day.
**/
class com.bushidodeep.Hello {
private var width:Number;
private var height:Number;
private static var textFieldDepth:Number = 0;
public static var message:String = Hello It's Me;
// Movie clip that will contain visual
// elements of the hello.
private var container_mc:MovieClip;
//
   public function Hello(target:MovieClip) {
container_mc = target.createEmptyMovieClip 
(messageDisplay, 1);

container_mc.displayGreeting();
}
private function placeGreeting() {
}
private function displayGreeting() {
container_mc.createTextField(messageText,  
textFieldDepth, 200, 100, 250, 125);

container_mc.messageText.text = test;
container_mc.messageText.border = true;
}
}

[/CODE]

On Jan 11, 2006, at 5:32 PM, Martin Wood wrote:


passing the target into the constructor.

martin.

Chris Kennon wrote:


Hi,
I attempting to create a mc, then attach a textField via  
composition,  instead of extending the movieClip class. Could  
someone point out  what I missed?



--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Creating An OOP MC Via Composition

2006-01-11 Thread Chris Kennon
Have I missed something in the displayGreeting(); method or creating  
the timeline object? Nothing appears on stage. Would you like to view  
the files?



Respectfully,
Chris
On Jan 11, 2006, at 5:47 PM, Andy Johnston wrote:


public function Hello(target:MovieClip) {
   container_mc = target.createEmptyMovieClip  
(messageDisplay, 1);

 displayGreeting();
}


Hi,

Thanks for the prompt response. When I create the Hello object on  
the  AS timeline, nothing is rendered to screen.


[CODE]

import com.bushidodeep.*;
var myHello:Hello = new Hello();


[/CODE]

[CODE]
/**
A Simple hello class
that assigns a custom
message to a text field
based upon time of day.
**/
class com.bushidodeep.Hello {
private var width:Number;
private var height:Number;
private static var textFieldDepth:Number = 0;
public static var message:String = Hello It's Me;
// Movie clip that will contain visual
// elements of the hello.
private var container_mc:MovieClip;
//
   public function Hello(target:MovieClip) {
container_mc = target.createEmptyMovieClip  
(messageDisplay, 1);

container_mc.displayGreeting();
}
private function placeGreeting() {
}
private function displayGreeting() {
container_mc.createTextField(messageText,   
textFieldDepth, 200, 100, 250, 125);

container_mc.messageText.text = test;
container_mc.messageText.border = true;
}
}

[/CODE]

On Jan 11, 2006, at 5:32 PM, Martin Wood wrote:


passing the target into the constructor.

martin.

Chris Kennon wrote:


Hi,
I attempting to create a mc, then attach a textField via   
composition,  instead of extending the movieClip class. Could   
someone point out  what I missed?



--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Creating An OOP MC Via Composition

2006-01-11 Thread Chris Kennon

Hi,

This worked on the FLA timeline test is displayed in the textField,  
but shouldn't this functionality be in the class?


Respectfully,
Chris
On Jan 11, 2006, at 5:56 PM, Andy Johnston wrote:


nah actually should be


[CODE]
var myHelloClip:MovieClip = createEmptyMovieClip(hello_mc, 1);

import com.bushidodeep.*;
var myHello:Hello = new Hello(myHelloClip);


[/CODE]

[CODE]
/**
A Simple hello class
that assigns a custom
message to a text field
based upon time of day.
**/
class com.bushidodeep.Hello {
   private var width:Number;
   private var height:Number;
   private static var textFieldDepth:Number = 0;
   public static var message:String = Hello It's Me;
   // Movie clip that will contain visual
   // elements of the hello.
   private var container_mc:MovieClip;
   //
  public function Hello(target:MovieClip) {
   container_mc = target;
   displayGreeting();
   }
   private function placeGreeting() {
   }
   private function displayGreeting() {
   container_mc.createTextField(messageText,   
textFieldDepth, 200, 100, 250, 125);

   container_mc.messageText.text = test;
   container_mc.messageText.border = true;
   }
}


Hi,

Thanks for the prompt response. When I create the Hello object on  
the  AS timeline, nothing is rendered to screen.


[CODE]

import com.bushidodeep.*;
var myHello:Hello = new Hello();


[/CODE]

[CODE]
/**
A Simple hello class
that assigns a custom
message to a text field
based upon time of day.
**/
class com.bushidodeep.Hello {
private var width:Number;
private var height:Number;
private static var textFieldDepth:Number = 0;
public static var message:String = Hello It's Me;
// Movie clip that will contain visual
// elements of the hello.
private var container_mc:MovieClip;
//
   public function Hello(target:MovieClip) {
container_mc = target.createEmptyMovieClip  
(messageDisplay, 1);

container_mc.displayGreeting();
}
private function placeGreeting() {
}
private function displayGreeting() {
container_mc.createTextField(messageText,   
textFieldDepth, 200, 100, 250, 125);

container_mc.messageText.text = test;
container_mc.messageText.border = true;
}
}

[/CODE]

On Jan 11, 2006, at 5:32 PM, Martin Wood wrote:


passing the target into the constructor.

martin.

Chris Kennon wrote:


Hi,
I attempting to create a mc, then attach a textField via   
composition,  instead of extending the movieClip class. Could   
someone point out  what I missed?



--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Creating An OOP MC Via Composition

2006-01-11 Thread Andy Johnston

if you want the class to actually do the creating of the clip you should:

[CODE]

import com.bushidodeep.*;
var myHello:Hello = new Hello(this);


[/CODE]

[CODE]
/**
A Simple hello class
that assigns a custom
message to a text field
based upon time of day.
**/
class com.bushidodeep.Hello {
  private var width:Number;
  private var height:Number;
  private static var textFieldDepth:Number = 0;
  public static var message:String = Hello It's Me;
  // Movie clip that will contain visual
  // elements of the hello.
  private var container_mc:MovieClip;
  //
 public function Hello(target:MovieClip) {
  container_mc = target.createEmptyMovieClip(blah, 1);
  displayGreeting();
  }
  private function placeGreeting() {
  }
  private function displayGreeting() {
  container_mc.createTextField(messageText,   
textFieldDepth, 200, 100, 250, 125);

  container_mc.messageText.text = test;
  container_mc.messageText.border = true;
  }
}


Hi,

This worked on the FLA timeline test is displayed in the textField,  
but shouldn't this functionality be in the class?


Respectfully,
Chris
On Jan 11, 2006, at 5:56 PM, Andy Johnston wrote:


nah actually should be


[CODE]
var myHelloClip:MovieClip = createEmptyMovieClip(hello_mc, 1);

import com.bushidodeep.*;
var myHello:Hello = new Hello(myHelloClip);


[/CODE]

[CODE]
/**
A Simple hello class
that assigns a custom
message to a text field
based upon time of day.
**/
class com.bushidodeep.Hello {
   private var width:Number;
   private var height:Number;
   private static var textFieldDepth:Number = 0;
   public static var message:String = Hello It's Me;
   // Movie clip that will contain visual
   // elements of the hello.
   private var container_mc:MovieClip;
   //
  public function Hello(target:MovieClip) {
   container_mc = target;
   displayGreeting();
   }
   private function placeGreeting() {
   }
   private function displayGreeting() {
   container_mc.createTextField(messageText,   
textFieldDepth, 200, 100, 250, 125);

   container_mc.messageText.text = test;
   container_mc.messageText.border = true;
   }
}


Hi,

Thanks for the prompt response. When I create the Hello object on  
the  AS timeline, nothing is rendered to screen.


[CODE]

import com.bushidodeep.*;
var myHello:Hello = new Hello();


[/CODE]

[CODE]
/**
A Simple hello class
that assigns a custom
message to a text field
based upon time of day.
**/
class com.bushidodeep.Hello {
private var width:Number;
private var height:Number;
private static var textFieldDepth:Number = 0;
public static var message:String = Hello It's Me;
// Movie clip that will contain visual
// elements of the hello.
private var container_mc:MovieClip;
//
   public function Hello(target:MovieClip) {
container_mc = target.createEmptyMovieClip  
(messageDisplay, 1);

container_mc.displayGreeting();
}
private function placeGreeting() {
}
private function displayGreeting() {
container_mc.createTextField(messageText,   
textFieldDepth, 200, 100, 250, 125);

container_mc.messageText.text = test;
container_mc.messageText.border = true;
}
}

[/CODE]

On Jan 11, 2006, at 5:32 PM, Martin Wood wrote:


passing the target into the constructor.

martin.

Chris Kennon wrote:


Hi,
I attempting to create a mc, then attach a textField via   
composition,  instead of extending the movieClip class. Could   
someone point out  what I missed?




--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Creating An OOP MC Via Composition

2006-01-11 Thread Chris Kennon

Perfect..
Thanks so much!

On Jan 11, 2006, at 6:25 PM, Andy Johnston wrote:



import com.bushidodeep.*;
var myHello:Hello = new Hello(this);


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders