Re: [Flashcoders] Problem understanding Class heirarchy issue

2009-09-01 Thread Steven Sacks

You're not calling super() in the ClassA constructor.


On Aug 31, 2009, at 11:12 PM, Sajid Saiyed wrote:


Ok, Here is a bit more information.

ClassA (works pefrectly fine):
---
package com.folder.subfolder
{
   import flash.display.*;
   import flash.events.*;
   import flash.filters.*;
   import flash.utils.Timer;
   import com.folder.subfolder.*;

   public class ClassA extends ClassC
{
   public var myMenu: ClassB;

   public function ClassA (){
addEventListener(ClassC.moveUP, someFunction);
   }
   public function someFunction(){
myMenu = new ClassB();
 myMenu.name = "mymenu";
 this.addChild(myMenu);
   }

   }
}

ClassB
---
package com.folder.subfolder
{
   import flash.display.*;
   import flash.events.*;
   import flash.filters.*;
   import flash.utils.Timer;
   import com.folder.subfolder.*;

   public class ClassB extends ClassC
{
   public function ClassB (){
// This is not getting called.
   }
   }
}


Does this explanation help a bit??
Am I looking at the right place for the problem or the problem could
be somewhere else?

Thanks
Sajid

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


Re: [Flashcoders] Problem understanding Class heirarchy issue

2009-09-01 Thread Jim Lafser
Have you verified that someFunciton is getting called?
Is someFunction getting called in the scope that you expect?
May need to use:
    addEventListener(ClassC.moveUP, Delegate.create(this, someFunction); 
to get someFunciton to run in the scope that you expect.

--- On Tue, 9/1/09, Steven Sacks  wrote:


From: Steven Sacks 
Subject: Re: [Flashcoders] Problem understanding Class heirarchy issue
To: "Flash Coders List" 
Date: Tuesday, September 1, 2009, 9:11 AM


You're not calling super() in the ClassA constructor.


On Aug 31, 2009, at 11:12 PM, Sajid Saiyed wrote:

> Ok, Here is a bit more information.
>
> ClassA (works pefrectly fine):
> ---
> package com.folder.subfolder
> {
>    import flash.display.*;
>    import flash.events.*;
>    import flash.filters.*;
>    import flash.utils.Timer;
>    import com.folder.subfolder.*;
>
>    public class ClassA extends ClassC
>     {
>            public var myMenu: ClassB;
>
>            public function ClassA (){
>                 addEventListener(ClassC.moveUP, someFunction);
>            }
>            public function someFunction(){
>                 myMenu = new ClassB();
>      myMenu.name = "mymenu";
>      this.addChild(myMenu);
>            }
>
>        }
> }
>
> ClassB
> ---
> package com.folder.subfolder
> {
>    import flash.display.*;
>    import flash.events.*;
>    import flash.filters.*;
>    import flash.utils.Timer;
>    import com.folder.subfolder.*;
>
>    public class ClassB extends ClassC
>     {
>            public function ClassB (){
>                 // This is not getting called.
>            }
>        }
> }
>
>
> Does this explanation help a bit??
> Am I looking at the right place for the problem or the problem could
> be somewhere else?
>
> Thanks
> Sajid
___
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] Problem understanding Class heirarchy issue

2009-09-01 Thread Sajid Saiyed
yes, someFunction is getting called.
If I change ClassB to:

public class ClassB extends MovieClip
or
public class ClassB extends Sprite

Then the constructor gets called.

I still have to try super() as suggested by Steven (I am at home now
so dont have the code with me)
So Steven,
Do youmean that I just add "super()" in the first line of ClassA constructor?

Regards
Sajid

On Tue, Sep 1, 2009 at 11:03 PM, Jim Lafser wrote:
> Have you verified that someFunciton is getting called?
> Is someFunction getting called in the scope that you expect?
> May need to use:
>     addEventListener(ClassC.moveUP, Delegate.create(this, someFunction);
> to get someFunciton to run in the scope that you expect.
>
> --- On Tue, 9/1/09, Steven Sacks  wrote:
>
>
> From: Steven Sacks 
> Subject: Re: [Flashcoders] Problem understanding Class heirarchy issue
> To: "Flash Coders List" 
> Date: Tuesday, September 1, 2009, 9:11 AM
>
>
> You're not calling super() in the ClassA constructor.
>
>
> On Aug 31, 2009, at 11:12 PM, Sajid Saiyed wrote:
>
>> Ok, Here is a bit more information.
>>
>> ClassA (works pefrectly fine):
>> ---
>> package com.folder.subfolder
>> {
>>    import flash.display.*;
>>    import flash.events.*;
>>    import flash.filters.*;
>>    import flash.utils.Timer;
>>    import com.folder.subfolder.*;
>>
>>    public class ClassA extends ClassC
>>     {
>>            public var myMenu: ClassB;
>>
>>            public function ClassA (){
>>                 addEventListener(ClassC.moveUP, someFunction);
>>            }
>>            public function someFunction(){
>>                 myMenu = new ClassB();
>>      myMenu.name = "mymenu";
>>      this.addChild(myMenu);
>>            }
>>
>>        }
>> }
>>
>> ClassB
>> ---
>> package com.folder.subfolder
>> {
>>    import flash.display.*;
>>    import flash.events.*;
>>    import flash.filters.*;
>>    import flash.utils.Timer;
>>    import com.folder.subfolder.*;
>>
>>    public class ClassB extends ClassC
>>     {
>>            public function ClassB (){
>>                 // This is not getting called.
>>            }
>>        }
>> }
>>
>>
>> Does this explanation help a bit??
>> Am I looking at the right place for the problem or the problem could
>> be somewhere else?
>>
>> Thanks
>> Sajid
> ___
> 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] Problem understanding Class heirarchy issue

2009-09-01 Thread Matt Gitchell
super(arg:AnyApplicableArgument) calls the constructor of the parent class,
in this case all the stuff that happens in function ClassB(){...}

On Tue, Sep 1, 2009 at 8:23 AM, Sajid Saiyed  wrote:

> yes, someFunction is getting called.
> If I change ClassB to:
> 
> public class ClassB extends MovieClip
> or
> public class ClassB extends Sprite
> 
> Then the constructor gets called.
>
> I still have to try super() as suggested by Steven (I am at home now
> so dont have the code with me)
> So Steven,
> Do youmean that I just add "super()" in the first line of ClassA
> constructor?
>
> Regards
> Sajid
>
> On Tue, Sep 1, 2009 at 11:03 PM, Jim Lafser wrote:
> > Have you verified that someFunciton is getting called?
> > Is someFunction getting called in the scope that you expect?
> > May need to use:
> > addEventListener(ClassC.moveUP, Delegate.create(this, someFunction);
> > to get someFunciton to run in the scope that you expect.
> >
> > --- On Tue, 9/1/09, Steven Sacks  wrote:
> >
> >
> > From: Steven Sacks 
> > Subject: Re: [Flashcoders] Problem understanding Class heirarchy issue
> > To: "Flash Coders List" 
> > Date: Tuesday, September 1, 2009, 9:11 AM
> >
> >
> > You're not calling super() in the ClassA constructor.
> >
> >
> > On Aug 31, 2009, at 11:12 PM, Sajid Saiyed wrote:
> >
> >> Ok, Here is a bit more information.
> >>
> >> ClassA (works pefrectly fine):
> >> ---
> >> package com.folder.subfolder
> >> {
> >>import flash.display.*;
> >>import flash.events.*;
> >>import flash.filters.*;
> >>import flash.utils.Timer;
> >>import com.folder.subfolder.*;
> >>
> >>public class ClassA extends ClassC
> >> {
> >>public var myMenu: ClassB;
> >>
> >>public function ClassA (){
> >> addEventListener(ClassC.moveUP, someFunction);
> >>}
> >>public function someFunction(){
> >> myMenu = new ClassB();
> >>  myMenu.name = "mymenu";
> >>  this.addChild(myMenu);
> >>}
> >>
> >>}
> >> }
> >>
> >> ClassB
> >> ---
> >> package com.folder.subfolder
> >> {
> >>import flash.display.*;
> >>import flash.events.*;
> >>import flash.filters.*;
> >>import flash.utils.Timer;
> >>import com.folder.subfolder.*;
> >>
> >>public class ClassB extends ClassC
> >> {
> >>public function ClassB (){
> >> // This is not getting called.
> >>}
> >>}
> >> }
> >>
> >>
> >> Does this explanation help a bit??
> >> Am I looking at the right place for the problem or the problem could
> >> be somewhere else?
> >>
> >> Thanks
> >> Sajid
> > ___
> > 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] activeX swfobject flash install broken?

2009-09-01 Thread Hudson Ansley
One thing that IE had over other browsers wrt flash was to install the
plugin without restarting or having the user run an installer.
Recently, sites I have using swfobject no longer seem to auto-install
flash on IE. Anybody else notice this? I'm currently using IE 7, but I
think the same goes for IE8... oh and obviously this is on windows

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


Re: [Flashcoders] Problem understanding Class heirarchy issue

2009-09-01 Thread Steven Sacks
In AS2, super() was called automatically (so to speak), so calling it was a 
matter of proper form more than anything else.  In AS3, you have to call it 
yourself or it doesn't get called.

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


Re: [Flashcoders] Can I display slanted quotes in a textField?

2009-09-01 Thread Steven Sacks
I believe you're talking about "curly quotes" and yes you can include them BUT 
you have to embed them specifically by copying and pasting them into the embed 
characters field on the TextField in Flash as they're not included in the basic 
glyph set.


Also, you have to make sure the font you're using has those curly quotes.





Paul Freedman wrote:

I've never dealt too carefully with the appearance of text. As a developer, 
that was always the designer's problem. Fortunately, I've always worked with 
designers who accommodated my - and Flash's - limitations, and let me import 
.txt files and re-create their formatting as best I could using TextFormat 
objects.

Now, I'm importing poems from Word .docx files. The poet has used slanted quotes and apostrophes. He's mighty picky about the appearance of his work. I'll point out that I'm already passing the txt through a routine that strips the carriage-returns, leaving only the linefeeds, so that I get proper line distribution. I can substitute normal ascii vertical quotes, etc, but he likes the way it looks as he did it. 

Short of making jpgs of his pages (and there are 1000 of them), can I display them as he wishes? 


Any help will be gratefully appreciated.

Thanks,
Paul Freedman
___
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] Problem understanding Class heirarchy issue

2009-09-01 Thread Muzak

Are you talking about something like this??

package {
public class ClassA {
 public function ClassA():void {
  trace("ClassA ::: CONSTRUCTOR");
 }
}
}

package {
public class ClassB extends ClassA {
 public function ClassB():void {
  trace("ClassB ::: CONSTRUCTOR");
 }
}
}

// in fla
var b:ClassB = new ClassB();

// output
ClassA ::: CONSTRUCTOR
ClassB ::: CONSTRUCTOR

There's no need to call super() in the constructor.
Or are you talking about something else?

regards,
Muzak

- Original Message - 
From: "Steven Sacks" 

To: "Flash Coders List" 
Sent: Wednesday, September 02, 2009 12:56 AM
Subject: Re: [Flashcoders] Problem understanding Class heirarchy issue


In AS2, super() was called automatically (so to speak), so calling it was a 
matter of proper form more than anything else.  In AS3, you have to call it 
yourself or it doesn't get called.

___
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] Problem understanding Class heirarchy issue

2009-09-01 Thread Muzak

AKAIK, a constructor is always invoked when an instance is created and there's 
no way around that.
So if you have some trace() actions in the contstructor of ClassB and you don't 
see the output, no instance is created.
Which in this case probably means that someFunction() is not being invoked.

When is the moveUP event dispatched?

regards,
Muzak

- Original Message - 
From: "Sajid Saiyed" 

To: "Flash Coders List" 
Sent: Tuesday, September 01, 2009 8:12 AM
Subject: Re: [Flashcoders] Problem understanding Class heirarchy issue



Ok, Here is a bit more information.

ClassA (works pefrectly fine):
---
package com.folder.subfolder
{
   import flash.display.*;
   import flash.events.*;
   import flash.filters.*;
   import flash.utils.Timer;
   import com.folder.subfolder.*;

   public class ClassA extends ClassC
{
   public var myMenu: ClassB;

   public function ClassA (){
addEventListener(ClassC.moveUP, someFunction);
   }
   public function someFunction(){
myMenu = new ClassB();
myMenu.name = "mymenu";
this.addChild(myMenu);
   }

   }
}

ClassB
---
package com.folder.subfolder
{
   import flash.display.*;
   import flash.events.*;
   import flash.filters.*;
   import flash.utils.Timer;
   import com.folder.subfolder.*;

   public class ClassB extends ClassC
{
   public function ClassB (){
// This is not getting called.
   }
   }
}


Does this explanation help a bit??
Am I looking at the right place for the problem or the problem could
be somewhere else?

Thanks
Sajid


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


Re: [Flashcoders] Problem understanding Class heirarchy issue

2009-09-01 Thread Muzak

Works fine here:

ClassA extends ClassC
ClassB extends ClassC
ClassC extends ClassD
ClassD extends MovieClip

// ClassA
package {
import flash.events.Event;
public class ClassA extends ClassC {
 public var b:ClassB;
 public function ClassA():void {
  trace("ClassA ::: CONSTRUCTOR");
  addEventListener(ClassC.MOVE_UP, moveUpHandler);
 }
 protected function moveUpHandler(event:Event):void {
  trace("ClassA ::: moveUpHandler");
  b = new ClassB();
  trace("- instance 'b': ", b);
 }
}
}

// ClassB
package {
public class ClassB extends ClassC {
 public function ClassB():void {
  trace("ClassB ::: CONSTRUCTOR");
 }
}
}

// ClassC
package {
public class ClassC extends ClassD {
 public static const MOVE_UP:String = "moveUp";
 public function ClassC():void {
  trace("ClassC ::: CONSTRUCTOR");
 }
}
}

// ClassD
package {
import flash.display.MovieClip;
public class ClassD extends MovieClip {
 public function ClassD():void {
  trace("ClassD ::: CONSTRUCTOR");
 }
}
}

In FLA:

var a = new ClassA();
trace("- instance 'a': ", a);
trace("- disptaching MOVE_UP event on 'a'");
a.dispatchEvent(new Event(ClassC.MOVE_UP));


//Output

ClassD ::: CONSTRUCTOR
ClassC ::: CONSTRUCTOR
ClassA ::: CONSTRUCTOR
   - instance 'a':  [object ClassA]
   - disptaching MOVE_UP event on 'a'
ClassA ::: moveUpHandler
ClassD ::: CONSTRUCTOR
ClassC ::: CONSTRUCTOR
ClassB ::: CONSTRUCTOR
   - instance 'b':  [object ClassB]


Exactly as expected. From what I can tell, it doesn't really matter which class 
extends which.
The only thing that matters is that the MOVE_UP event handler (moveUpHandler) in ClassA gets called, which happens when I dispatch a 
MOVE_UP event on 'a' in the fla.


regards,
Muzak

- Original Message - 
From: "Sajid Saiyed" 

To: "Flash Coders List" 
Sent: Tuesday, September 01, 2009 8:12 AM
Subject: Re: [Flashcoders] Problem understanding Class heirarchy issue



Ok, Here is a bit more information.

ClassA (works pefrectly fine):
---
package com.folder.subfolder
{
   import flash.display.*;
   import flash.events.*;
   import flash.filters.*;
   import flash.utils.Timer;
   import com.folder.subfolder.*;

   public class ClassA extends ClassC
{
   public var myMenu: ClassB;

   public function ClassA (){
addEventListener(ClassC.moveUP, someFunction);
   }
   public function someFunction(){
myMenu = new ClassB();
myMenu.name = "mymenu";
this.addChild(myMenu);
   }

   }
}

ClassB
---
package com.folder.subfolder
{
   import flash.display.*;
   import flash.events.*;
   import flash.filters.*;
   import flash.utils.Timer;
   import com.folder.subfolder.*;

   public class ClassB extends ClassC
{
   public function ClassB (){
// This is not getting called.
   }
   }
}


Does this explanation help a bit??
Am I looking at the right place for the problem or the problem could
be somewhere else?

Thanks
Sajid





On Mon, Aug 31, 2009 at 10:46 PM, jonathan howe wrote:

Are you defining a subclass constructor and then failing to explicitly call
the super() (superclass's constructor)?

On Mon, Aug 31, 2009 at 8:37 AM, Sajid Saiyed  wrote:


I am already importing all the classes in the package.

Still cant seem to get my head around this.
Maybe later today I will post excerpts of my classes here.

That might help.

Regards
Sajid

On Mon, Aug 31, 2009 at 6:14 PM, Cor wrote:
> Not knowing what you are trying to do, you have to import ClassB to
> instantiate it in ClassA.
>
> HTH
> Cor
>
> -Original Message-
> From: flashcoders-boun...@chattyfig.figleaf.com
> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Sajid
Saiyed
> Sent: maandag 31 augustus 2009 12:06
> To: flashcoders@chattyfig.figleaf.com
> Subject: [Flashcoders] Problem understanding Class heirarchy issue
>
> Hi,
> I have following Class structure:
>
> ClassA extends ClassC
>
> ClassB extends ClassC
>
> ClassC extends ClassD
>
> ClassD extends MovieClip
>
> Now,
> If I instantiate ClassB from ClassA, the constructor does not execute.
> note: Inside ClassB, I am instantiating another ClassE which extends
> MovieClip
>
> Is there something I am doing wrong?
> ___
> 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





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


___
Flashcoders m

Re: [Flashcoders] Problem understanding Class heirarchy issue

2009-09-01 Thread Sajid Saiyed
Hi,
Thanks all of you for adding your valuable inputs, I am reviewing all
suggestions.

Meanwhile, I would like to say that, I am not writing anything in my FLA.
(I guess thats the best practice, is it correct?)

So, ONlything I do in the FLA is declare ClassA as my document root class.

Could that be the problem?

Also the trace in my "someFunction" is getting called.
Then immediately after the trace, I have the code to instantiate ClassB.
The trace immediately after this instantiation does not appear.

Regards
Sajid

On Wed, Sep 2, 2009 at 8:06 AM, Muzak wrote:
> Works fine here:
>
> ClassA extends ClassC
> ClassB extends ClassC
> ClassC extends ClassD
> ClassD extends MovieClip
>
> // ClassA
> package {
> import flash.events.Event;
> public class ClassA extends ClassC {
>  public var b:ClassB;
>  public function ClassA():void {
>  trace("ClassA ::: CONSTRUCTOR");
>  addEventListener(ClassC.MOVE_UP, moveUpHandler);
>  }
>  protected function moveUpHandler(event:Event):void {
>  trace("ClassA ::: moveUpHandler");
>  b = new ClassB();
>  trace("    - instance 'b': ", b);
>  }
> }
> }
>
> // ClassB
> package {
> public class ClassB extends ClassC {
>  public function ClassB():void {
>  trace("ClassB ::: CONSTRUCTOR");
>  }
> }
> }
>
> // ClassC
> package {
> public class ClassC extends ClassD {
>  public static const MOVE_UP:String = "moveUp";
>  public function ClassC():void {
>  trace("ClassC ::: CONSTRUCTOR");
>  }
> }
> }
>
> // ClassD
> package {
> import flash.display.MovieClip;
> public class ClassD extends MovieClip {
>  public function ClassD():void {
>  trace("ClassD ::: CONSTRUCTOR");
>  }
> }
> }
>
> In FLA:
>
> var a = new ClassA();
> trace("    - instance 'a': ", a);
> trace("    - disptaching MOVE_UP event on 'a'");
> a.dispatchEvent(new Event(ClassC.MOVE_UP));
>
>
> //Output
>
> ClassD ::: CONSTRUCTOR
> ClassC ::: CONSTRUCTOR
> ClassA ::: CONSTRUCTOR
>   - instance 'a':  [object ClassA]
>   - disptaching MOVE_UP event on 'a'
> ClassA ::: moveUpHandler
> ClassD ::: CONSTRUCTOR
> ClassC ::: CONSTRUCTOR
> ClassB ::: CONSTRUCTOR
>   - instance 'b':  [object ClassB]
>
>
> Exactly as expected. From what I can tell, it doesn't really matter which
> class extends which.
> The only thing that matters is that the MOVE_UP event handler
> (moveUpHandler) in ClassA gets called, which happens when I dispatch a
> MOVE_UP event on 'a' in the fla.
>
> regards,
> Muzak
>
> - Original Message - From: "Sajid Saiyed" 
> To: "Flash Coders List" 
> Sent: Tuesday, September 01, 2009 8:12 AM
> Subject: Re: [Flashcoders] Problem understanding Class heirarchy issue
>
>
>> Ok, Here is a bit more information.
>>
>> ClassA (works pefrectly fine):
>> ---
>> package com.folder.subfolder
>> {
>>   import flash.display.*;
>>   import flash.events.*;
>>   import flash.filters.*;
>>   import flash.utils.Timer;
>>   import com.folder.subfolder.*;
>>
>>   public class ClassA extends ClassC
>> {
>>           public var myMenu: ClassB;
>>
>>           public function ClassA (){
>>                addEventListener(ClassC.moveUP, someFunction);
>>           }
>>           public function someFunction(){
>>                myMenu = new ClassB();
>> myMenu.name = "mymenu";
>> this.addChild(myMenu);
>>           }
>>
>>       }
>> }
>>
>> ClassB
>> ---
>> package com.folder.subfolder
>> {
>>   import flash.display.*;
>>   import flash.events.*;
>>   import flash.filters.*;
>>   import flash.utils.Timer;
>>   import com.folder.subfolder.*;
>>
>>   public class ClassB extends ClassC
>> {
>>           public function ClassB (){
>>                // This is not getting called.
>>           }
>>       }
>> }
>>
>>
>> Does this explanation help a bit??
>> Am I looking at the right place for the problem or the problem could
>> be somewhere else?
>>
>> Thanks
>> Sajid
>>
>>
>>
>>
>>
>> On Mon, Aug 31, 2009 at 10:46 PM, jonathan howe
>> wrote:
>>>
>>> Are you defining a subclass constructor and then failing to explicitly
>>> call
>>> the super() (superclass's constructor)?
>>>
>>> On Mon, Aug 31, 2009 at 8:37 AM, Sajid Saiyed 
>>> wrote:
>>>
 I am already importing all the classes in the package.

 Still cant seem to get my head around this.
 Maybe later today I will post excerpts of my classes here.

 That might help.

 Regards
 Sajid

 On Mon, Aug 31, 2009 at 6:14 PM, Cor wrote:
 > Not knowing what you are trying to do, you have to import ClassB to
 > instantiate it in ClassA.
 >
 > HTH
 > Cor
 >
 > -Original Message-
 > From: flashcoders-boun...@chattyfig.figleaf.com
 > [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Sajid
 Saiyed
 > Sent: maandag 31 augustus 2009 12:06
 > To: flashcoders@chattyfig.figleaf.com
 > Subject: [Flashcoders] Problem understanding Class heirarchy issue
 >
 > Hi,
 > I have following Class structure:
 >
 > ClassA extends ClassC
 >
 > ClassB exten

Re: [Flashcoders] Can I display slanted quotes in a textField?

2009-09-01 Thread Paul Freedman
you have to embed them specifically by copying and pasting them into the 
embed characters field on the TextField in Flash ...


I'm creating my textFields at runtime. Of course, that entails code such as:

this.createTextField("lorem_txt", 20, 0, 20, Stage.width, 0);
lorem_txt.embedFonts = true;

But there's no "embed characters" property.  Any thoughts? You think, maybe, 
I could pull it off using the styleSheet.transform() method? I don't 
understand what "the mapping of CSS rules to text format properties" means.


Why (he asks rhetorically) is displaying these characters in Flash an Issue 
at all? Textpad is about as basic a text-display device as there is, and 
Textpad displays them quite routinely, and has for years.



- Original Message - 
From: "Steven Sacks" 

To: "Flash Coders List" 
Sent: Tuesday, September 01, 2009 7:12 PM
Subject: Re: [Flashcoders] Can I display slanted quotes in a textField?


I believe you're talking about "curly quotes" and yes you can include them 
BUT you have to embed them specifically by copying and pasting them into 
the embed characters field on the TextField in Flash as they're not 
included in the basic glyph set.


Also, you have to make sure the font you're using has those curly quotes.





Paul Freedman wrote:
I've never dealt too carefully with the appearance of text. As a 
developer, that was always the designer's problem. Fortunately, I've 
always worked with designers who accommodated my - and Flash's - 
limitations, and let me import .txt files and re-create their formatting 
as best I could using TextFormat objects.


Now, I'm importing poems from Word .docx files. The poet has used slanted 
quotes and apostrophes. He's mighty picky about the appearance of his 
work. I'll point out that I'm already passing the txt through a routine 
that strips the carriage-returns, leaving only the linefeeds, so that I 
get proper line distribution. I can substitute normal ascii vertical 
quotes, etc, but he likes the way it looks as he did it. Short of making 
jpgs of his pages (and there are 1000 of them), can I display them as he 
wishes? Any help will be gratefully appreciated.


Thanks,
Paul Freedman
___
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] Can I display slanted quotes in a textField?

2009-09-01 Thread Karl DeSaulniers
Just a thought. Make your textBox display as HTML and use the  
urlencoding for those quotes somehow. Eg: "e;


If your loading the text dynamically, you should be using them  
anyways. IMO. Urlencodings that is.


Karl

Sent from losPhone

On Sep 1, 2009, at 11:36 PM, "Paul Freedman"   
wrote:


you have to embed them specifically by copying and pasting them  
into the embed characters field on the TextField in Flash ...


I'm creating my textFields at runtime. Of course, that entails code  
such as:


this.createTextField("lorem_txt", 20, 0, 20, Stage.width, 0);
lorem_txt.embedFonts = true;

But there's no "embed characters" property.  Any thoughts? You  
think, maybe, I could pull it off using the styleSheet.transform()  
method? I don't understand what "the mapping of CSS rules to text  
format properties" means.


Why (he asks rhetorically) is displaying these characters in Flash  
an Issue at all? Textpad is about as basic a text-display device as  
there is, and Textpad displays them quite routinely, and has for  
years.



- Original Message - From: "Steven Sacks" >

To: "Flash Coders List" 
Sent: Tuesday, September 01, 2009 7:12 PM
Subject: Re: [Flashcoders] Can I display slanted quotes in a  
textField?



I believe you're talking about "curly quotes" and yes you can  
include them BUT you have to embed them specifically by copying and  
pasting them into the embed characters field on the TextField in  
Flash as they're not included in the basic glyph set.


Also, you have to make sure the font you're using has those curly  
quotes.






Paul Freedman wrote:
I've never dealt too carefully with the appearance of text. As a  
developer, that was always the designer's problem. Fortunately,  
I've always worked with designers who accommodated my - and  
Flash's - limitations, and let me import .txt files and re-create  
their formatting as best I could using TextFormat objects.


Now, I'm importing poems from Word .docx files. The poet has used  
slanted quotes and apostrophes. He's mighty picky about the  
appearance of his work. I'll point out that I'm already passing  
the txt through a routine that strips the carriage-returns,  
leaving only the linefeeds, so that I get proper line  
distribution. I can substitute normal ascii vertical quotes, etc,  
but he likes the way it looks as he did it. Short of making jpgs  
of his pages (and there are 1000 of them), can I display them as  
he wishes? Any help will be gratefully appreciated.


Thanks,
Paul Freedman
___
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] Problem understanding Class heirarchy issue

2009-09-01 Thread Sajid Saiyed
Hi,
In ClassA, the someFunction definition is:

public function someFunction(){
trace(this, "Some function called");
objectB = new ClassB();
objectB.name = "myobjectB";
this.addChild(objectB);
trace(this, "This is not getting called");
}

Regards
Sajid

On Wed, Sep 2, 2009 at 10:07 AM, Sajid Saiyed wrote:
> Hi,
> Thanks all of you for adding your valuable inputs, I am reviewing all
> suggestions.
>
> Meanwhile, I would like to say that, I am not writing anything in my FLA.
> (I guess thats the best practice, is it correct?)
>
> So, ONlything I do in the FLA is declare ClassA as my document root class.
>
> Could that be the problem?
>
> Also the trace in my "someFunction" is getting called.
> Then immediately after the trace, I have the code to instantiate ClassB.
> The trace immediately after this instantiation does not appear.
>
> Regards
> Sajid
>
> On Wed, Sep 2, 2009 at 8:06 AM, Muzak wrote:
>> Works fine here:
>>
>> ClassA extends ClassC
>> ClassB extends ClassC
>> ClassC extends ClassD
>> ClassD extends MovieClip
>>
>> // ClassA
>> package {
>> import flash.events.Event;
>> public class ClassA extends ClassC {
>>  public var b:ClassB;
>>  public function ClassA():void {
>>  trace("ClassA ::: CONSTRUCTOR");
>>  addEventListener(ClassC.MOVE_UP, moveUpHandler);
>>  }
>>  protected function moveUpHandler(event:Event):void {
>>  trace("ClassA ::: moveUpHandler");
>>  b = new ClassB();
>>  trace("    - instance 'b': ", b);
>>  }
>> }
>> }
>>
>> // ClassB
>> package {
>> public class ClassB extends ClassC {
>>  public function ClassB():void {
>>  trace("ClassB ::: CONSTRUCTOR");
>>  }
>> }
>> }
>>
>> // ClassC
>> package {
>> public class ClassC extends ClassD {
>>  public static const MOVE_UP:String = "moveUp";
>>  public function ClassC():void {
>>  trace("ClassC ::: CONSTRUCTOR");
>>  }
>> }
>> }
>>
>> // ClassD
>> package {
>> import flash.display.MovieClip;
>> public class ClassD extends MovieClip {
>>  public function ClassD():void {
>>  trace("ClassD ::: CONSTRUCTOR");
>>  }
>> }
>> }
>>
>> In FLA:
>>
>> var a = new ClassA();
>> trace("    - instance 'a': ", a);
>> trace("    - disptaching MOVE_UP event on 'a'");
>> a.dispatchEvent(new Event(ClassC.MOVE_UP));
>>
>>
>> //Output
>>
>> ClassD ::: CONSTRUCTOR
>> ClassC ::: CONSTRUCTOR
>> ClassA ::: CONSTRUCTOR
>>   - instance 'a':  [object ClassA]
>>   - disptaching MOVE_UP event on 'a'
>> ClassA ::: moveUpHandler
>> ClassD ::: CONSTRUCTOR
>> ClassC ::: CONSTRUCTOR
>> ClassB ::: CONSTRUCTOR
>>   - instance 'b':  [object ClassB]
>>
>>
>> Exactly as expected. From what I can tell, it doesn't really matter which
>> class extends which.
>> The only thing that matters is that the MOVE_UP event handler
>> (moveUpHandler) in ClassA gets called, which happens when I dispatch a
>> MOVE_UP event on 'a' in the fla.
>>
>> regards,
>> Muzak
>>
>> - Original Message - From: "Sajid Saiyed" 
>> To: "Flash Coders List" 
>> Sent: Tuesday, September 01, 2009 8:12 AM
>> Subject: Re: [Flashcoders] Problem understanding Class heirarchy issue
>>
>>
>>> Ok, Here is a bit more information.
>>>
>>> ClassA (works pefrectly fine):
>>> ---
>>> package com.folder.subfolder
>>> {
>>>   import flash.display.*;
>>>   import flash.events.*;
>>>   import flash.filters.*;
>>>   import flash.utils.Timer;
>>>   import com.folder.subfolder.*;
>>>
>>>   public class ClassA extends ClassC
>>> {
>>>           public var myMenu: ClassB;
>>>
>>>           public function ClassA (){
>>>                addEventListener(ClassC.moveUP, someFunction);
>>>           }
>>>           public function someFunction(){
>>>                myMenu = new ClassB();
>>> myMenu.name = "mymenu";
>>> this.addChild(myMenu);
>>>           }
>>>
>>>       }
>>> }
>>>
>>> ClassB
>>> ---
>>> package com.folder.subfolder
>>> {
>>>   import flash.display.*;
>>>   import flash.events.*;
>>>   import flash.filters.*;
>>>   import flash.utils.Timer;
>>>   import com.folder.subfolder.*;
>>>
>>>   public class ClassB extends ClassC
>>> {
>>>           public function ClassB (){
>>>                // This is not getting called.
>>>           }
>>>       }
>>> }
>>>
>>>
>>> Does this explanation help a bit??
>>> Am I looking at the right place for the problem or the problem could
>>> be somewhere else?
>>>
>>> Thanks
>>> Sajid
>>>
>>>
>>>
>>>
>>>
>>> On Mon, Aug 31, 2009 at 10:46 PM, jonathan howe
>>> wrote:

 Are you defining a subclass constructor and then failing to explicitly
 call
 the super() (superclass's constructor)?

 On Mon, Aug 31, 2009 at 8:37 AM, Sajid Saiyed 
 wrote:

> I am already importing all the classes in the package.
>
> Still cant seem to get my head around this.
> Maybe later today I will post excerpts of my classes here.
>
> That might help.
>
> Regards
> Sajid
>
> On Mon, Aug 31, 2009 at 6:14 PM, Cor wrote:
> > Not knowing what you are trying to do, you have to

Re: [Flashcoders] Can I display slanted quotes in a textField?

2009-09-01 Thread Karl DeSaulniers

A good resource.

http://www.w3schools.com/TAGS/ref_entities.asp

Karl


On Sep 2, 2009, at 12:00 AM, Karl DeSaulniers wrote:

Just a thought. Make your textBox display as HTML and use the  
urlencoding for those quotes somehow. Eg: "e;


If your loading the text dynamically, you should be using them  
anyways. IMO. Urlencodings that is.


Karl

Sent from losPhone

On Sep 1, 2009, at 11:36 PM, "Paul Freedman"   
wrote:


you have to embed them specifically by copying and pasting them  
into the embed characters field on the TextField in Flash ...


I'm creating my textFields at runtime. Of course, that entails  
code such as:


this.createTextField("lorem_txt", 20, 0, 20, Stage.width, 0);
lorem_txt.embedFonts = true;

But there's no "embed characters" property.  Any thoughts? You  
think, maybe, I could pull it off using the styleSheet.transform()  
method? I don't understand what "the mapping of CSS rules to text  
format properties" means.


Why (he asks rhetorically) is displaying these characters in Flash  
an Issue at all? Textpad is about as basic a text-display device  
as there is, and Textpad displays them quite routinely, and has  
for years.



- Original Message - From: "Steven Sacks"  


To: "Flash Coders List" 
Sent: Tuesday, September 01, 2009 7:12 PM
Subject: Re: [Flashcoders] Can I display slanted quotes in a  
textField?



I believe you're talking about "curly quotes" and yes you can  
include them BUT you have to embed them specifically by copying  
and pasting them into the embed characters field on the TextField  
in Flash as they're not included in the basic glyph set.


Also, you have to make sure the font you're using has those curly  
quotes.






Paul Freedman wrote:
I've never dealt too carefully with the appearance of text. As a  
developer, that was always the designer's problem. Fortunately,  
I've always worked with designers who accommodated my - and  
Flash's - limitations, and let me import .txt files and re- 
create their formatting as best I could using TextFormat objects.


Now, I'm importing poems from Word .docx files. The poet has  
used slanted quotes and apostrophes. He's mighty picky about the  
appearance of his work. I'll point out that I'm already passing  
the txt through a routine that strips the carriage-returns,  
leaving only the linefeeds, so that I get proper line  
distribution. I can substitute normal ascii vertical quotes,  
etc, but he likes the way it looks as he did it. Short of making  
jpgs of his pages (and there are 1000 of them), can I display  
them as he wishes? Any help will be gratefully appreciated.


Thanks,
Paul Freedman
___
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


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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


Re: [Flashcoders] Can I display slanted quotes in a textField?

2009-09-01 Thread Karl DeSaulniers
Sorry that "e; was ISO-8859-1 translation, but something to that  
effect.

Best,

Karl


On Sep 2, 2009, at 12:00 AM, Karl DeSaulniers wrote:

Just a thought. Make your textBox display as HTML and use the  
urlencoding for those quotes somehow. Eg: "e;


If your loading the text dynamically, you should be using them  
anyways. IMO. Urlencodings that is.


Karl

Sent from losPhone

On Sep 1, 2009, at 11:36 PM, "Paul Freedman"   
wrote:


you have to embed them specifically by copying and pasting them  
into the embed characters field on the TextField in Flash ...


I'm creating my textFields at runtime. Of course, that entails  
code such as:


this.createTextField("lorem_txt", 20, 0, 20, Stage.width, 0);
lorem_txt.embedFonts = true;

But there's no "embed characters" property.  Any thoughts? You  
think, maybe, I could pull it off using the styleSheet.transform()  
method? I don't understand what "the mapping of CSS rules to text  
format properties" means.


Why (he asks rhetorically) is displaying these characters in Flash  
an Issue at all? Textpad is about as basic a text-display device  
as there is, and Textpad displays them quite routinely, and has  
for years.



- Original Message - From: "Steven Sacks"  


To: "Flash Coders List" 
Sent: Tuesday, September 01, 2009 7:12 PM
Subject: Re: [Flashcoders] Can I display slanted quotes in a  
textField?



I believe you're talking about "curly quotes" and yes you can  
include them BUT you have to embed them specifically by copying  
and pasting them into the embed characters field on the TextField  
in Flash as they're not included in the basic glyph set.


Also, you have to make sure the font you're using has those curly  
quotes.






Paul Freedman wrote:
I've never dealt too carefully with the appearance of text. As a  
developer, that was always the designer's problem. Fortunately,  
I've always worked with designers who accommodated my - and  
Flash's - limitations, and let me import .txt files and re- 
create their formatting as best I could using TextFormat objects.


Now, I'm importing poems from Word .docx files. The poet has  
used slanted quotes and apostrophes. He's mighty picky about the  
appearance of his work. I'll point out that I'm already passing  
the txt through a routine that strips the carriage-returns,  
leaving only the linefeeds, so that I get proper line  
distribution. I can substitute normal ascii vertical quotes,  
etc, but he likes the way it looks as he did it. Short of making  
jpgs of his pages (and there are 1000 of them), can I display  
them as he wishes? Any help will be gratefully appreciated.


Thanks,
Paul Freedman
___
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


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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