[Flashcoders] hiding datagrid columns?

2006-02-08 Thread srishti
Does anyone know a way to hide a datagrid column.
The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s)and may 
contain confidential or privileged information. If you are not the intended 
recipient, please notify the sender or [EMAIL PROTECTED]
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Unit Tesing Framework Recommendations

2006-02-08 Thread Alias
AsUnit is definitely the best.

HTH,
Alias

On 2/8/06, Chris Velevitch [EMAIL PROTECTED] wrote:
 I'm interested in finding what unit testing frameworks exist for Flash
 and the pros and cons of each.


 Chris
 --
 Chris Velevitch
 Manager - Sydney Flash Platform Developers Group
 www.flashdev.org.au
 ___
 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] passing variables to a popup using javascript instead of php/asp

2006-02-08 Thread Kalle Thyselius, Inlovewith
hi,

just found a way to send variables to a pop up (or similar) without
having to use a server side language like php or asp.

it's a java script property called document.location.search and is
The sub string that follows the question mark is the query string or
form data.


example:

example getURL in the mother swf:

getURL('javascript:OpenWin(popup.html?someVar=' + someVar + ', 700, 400);')

and the code inside popup.html

var fo = new FlashObject(main.swf + document.location.search,
fotester, 700, 400, 7);

as i have been using php like a sucker all these years, this can make
it simpler for me to work. perhaps it can help someone else.


kalle



--
www.inlovewith.com
inlovewith ltd.
kalle thyselius
linnégatan 76, stockholm, sweden
+ 46 707 602 600
inlovewith you
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] adding button handlers extending movieclip

2006-02-08 Thread Jiri Heitlager

He,

I have a question, wich is probably very simple.
In a class I am looping through an array to make buttons;

for (var i : Number = 0 ; i  buttonList.length ; i ++)
{
var btn = makeButton (listholder_mc , 0 , 0 , labelTXT );
btn._y = 1 + (prevBtn._y + prevBtn._height);
btn.onPress = Delegate.create (this, _onPress)
btn.onRollOver = Delegate.create (this, _onRollOver)
var prevBtn = btn;
}

As you can see I am assigning button handlers by using Delegate and 
pointing to a method of the class.
My question is, is it possible to it by letting this class extend the 
MovieCLip class. And how would i do this.

Or is this the normal way to do it?

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


[Flashcoders] Dynamic width of image...

2006-02-08 Thread MJorge
Hello,

I am loading dynamically some images to a emptyClip. The images have
different width anh height values each one. What i wanted is that my Clip
(or image after loading) had a maximum width of 163

I am using this code at my Clip but it´s not working correctly. Can anyone
help?

onClipEvent (data) {
maxWidth = 163;
if (this._width  maxWidth)
{
scaleFactor = maxWidth / this._width;
this._width = Math.floor (this._width * scaleFactor);
this._height = Math.floor (this._height * scaleFactor);
}
}

Thanks.

--

Mário Jorge
Icq: 164987050
Msn + Mail: [EMAIL PROTECTED]
Web: http://www.beedigital.net
Blog: http://www.beedigital.net/blog
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Dynamic width of image...

2006-02-08 Thread erixtekila

_xscale and _yscale should be your friends.
Your approach is good btw.


I am loading dynamically some images to a emptyClip. The images have
different width anh height values each one. What i wanted is that my 
Clip

(or image after loading) had a maximum width of 163

I am using this code at my Clip but it´s not working correctly. Can 
anyone

help?

onClipEvent (data) {
maxWidth = 163;
if (this._width  maxWidth)
{
scaleFactor = maxWidth / this._width;
this._width = Math.floor (this._width * scaleFactor);
this._height = Math.floor (this._height * scaleFactor);
}
}


---
erixtekila
http://blog.v-i-a.net/

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


Re: [Flashcoders] Dynamic width of image...

2006-02-08 Thread MJorge
I know that my approach is working, the prob is that i have a button to load
another image to the clip. That´s when all the problems come...

The width value is not respected anymore. That´s my prob.



On 2/8/06, erixtekila [EMAIL PROTECTED] wrote:

 _xscale and _yscale should be your friends.
 Your approach is good btw.

  I am loading dynamically some images to a emptyClip. The images have
  different width anh height values each one. What i wanted is that my
  Clip
  (or image after loading) had a maximum width of 163
 
  I am using this code at my Clip but it´s not working correctly. Can
  anyone
  help?
 
  onClipEvent (data) {
  maxWidth = 163;
  if (this._width  maxWidth)
  {
  scaleFactor = maxWidth / this._width;
  this._width = Math.floor (this._width * scaleFactor);
  this._height = Math.floor (this._height * scaleFactor);
  }
  }
 
 ---
 erixtekila
 http://blog.v-i-a.net/

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




--

Mário Jorge
Icq: 164987050
Msn + Mail: [EMAIL PROTECTED]
Web: http://www.beedigital.net
Blog: http://www.beedigital.net/blog
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Complex paremeters interface for component

2006-02-08 Thread Éric Thibault

I'll look it up!

Thanks.

These articles talk about Flash MX and Flash MX 2004.  Are they 
applicable also for Flash 8?


A+

Eric.

GregoryN wrote:


I think Custom UI is exactly what you need:
http://www.macromedia.com/devnet/flash/articles/buildtest_comp_07.html
http://www.macromedia.com/devnet/flash/articles/create_components_5.0.html
http://www.flashcomponents.net/tutorials/triangle/triangle.html
http://www.devx.com/webdev/Article/27326/0/page/2

Custom UI is pre-made SWF which communicates with IDE via xch
object.

 


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


[Flashcoders]

2006-02-08 Thread CARABUS plus
Hello,

I create dynamic textfield with functions and I try to field them without
success, Have you got an idea ?

Thank you

var dt:Number = 0;
var dtd;

for (var dt:Number = 0; dt = 70; i++) {
dtd = var+dt;
trace (dtd);
trace (dt);
_root.createTextField (dtd, dt, 50+dt, 50+dt, 200, 100);
dtd.text=dr;
dtd.border = true;
dtd.background = true;
dt += 1;
}



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


Re: [Flashcoders]

2006-02-08 Thread Julien Vignali

2 things:
- your for loop is erroneous... your dt variable isn't used as 
expected (increment it in the for statement) and your i variable is 
unused and shouldn't be here ;-).
- you should prefix all your textfields with _root as they are created 
on _root level.


Change your code as below, and you'll see plenty of textfields :)

for (var dt:Number = 0; dt = 70; dt++) {
 dtd = var+dt;
 trace (dtd);
 trace (dt);
 _root.createTextField (dtd, dt, 50+dt, 50+dt, 200, 100);
 _root[dtd].text=dr;
 _root[dtd].border = true;
 _root[dtd].background = true;
}


CARABUS plus a écrit :

Hello,

I create dynamic textfield with functions and I try to field them without
success, Have you got an idea ?

Thank you

var dt:Number = 0;
var dtd;

for (var dt:Number = 0; dt = 70; i++) {
dtd = var+dt;
trace (dtd);
trace (dt);
_root.createTextField (dtd, dt, 50+dt, 50+dt, 200, 100);
dtd.text=dr;
dtd.border = true;
dtd.background = true;
dt += 1;
}



___
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]

2006-02-08 Thread Mark Winterhalder
On 2/8/06, CARABUS plus [EMAIL PROTECTED] wrote:
 Hello,

 I create dynamic textfield with functions and I try to field them without
 success, Have you got an idea ?

yes. in fact, i have quite a few suggestions -- sorry if they sound a
bit harsh, that's not my intention, they might help you get answers to
future problems, and apply to some others as well:

-- consider posting to the newbies list:
http://chattyfig.figleaf.com/mailman/listinfo/flashnewbie

-- use a subject line that is more descriptive than . at most, i
would have expected this to relate to the bitwise rightshift operator.

-- be more descriptive. without success means what exactly? you see
nothing at all, the text doesn't show but the borders do, or what
exactly?
you already have traces in your code. what do they trace? when you
post here you probably have tried to solve the problem yourself
already, so why not tell others what potential causes you have
excluded so they don't have to go through the same again? you know
what dt and dtd are, i know it because i read to the
createTextField line, but normally i wouldn't bother. it takes only a
few seconds to change the variable names to something meaningful,
instead everybody who reads it has to figure out what they are by
oneself.
in what scope is the code? you talk about creating textfields with a
function, is this in a function?
what are you trying to do? it looks like you're trying to create a
textfield with 70px thick top and left borders.

-- you can replace the i in i++ with dt and remove the last line
of your code.

-- you declare var dt:Number twice. remove the first one.

-- instead of dtd.text etc, use _root[ dtd ] to make it work.

again, sorry if this sounds too harsh, it just needs to be said once
in a while, and really is more of a general hint to many than directed
only at you. i often don't even look at the code if i don't know what
i'm looking for, yours just happened to be pretty short. you know what
it's supposed to do, what does/doesn't happen, and what causes you
already have excluded. we don't, and can't figure it out as easily as
you could provide us with that information. if your code would have
been only slightly longer i'd have simply closed your mail and moved
on, you and others really miss lots of good advice or solutions that
way. not because nobody knows, but because they don't look at the code
without knowing what to look for.

hth,
mark

--
http://snafoo.org/
jabber: [EMAIL PROTECTED]
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] hiding datagrid columns?

2006-02-08 Thread Dave Mennenoh
Could you set the column's width to 0? Are you trying to hide on a button 
click or something?


Dave -
www.blurredistinction.com
www.macromedia.com/support/forums/team_macromedia/ 



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


RE: [Flashcoders] hiding datagrid columns?

2006-02-08 Thread Merrill, Jason
Please stop cross-posting!  Thank you.

Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com










-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Wednesday, February 08, 2006 4:47 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] hiding datagrid columns?

Does anyone know a way to hide a datagrid column.
The information contained in this electronic message and any
attachments to this
message are intended for the exclusive use of the addressee(s)and may
contain
confidential or privileged information. If you are not the intended
recipient,
please notify the sender or [EMAIL PROTECTED]
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
NOTICE:
This message is for the designated recipient only and may contain privileged or 
confidential information. If you have received it in error, please notify the 
sender immediately and delete the original. Any other use of this e-mail by you 
is prohibited.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] hiding datagrid columns?

2006-02-08 Thread Nathan Derksen

Use removeColumnAt() and addColumn()/addColumnAt()

var dataArray:Array = new Array();
dataArray.push({foo:1, bar:2, baz:3});
dataArray.push({foo:1, bar:2, baz:3});
dataArray.push({foo:1, bar:2, baz:3});
dataArray.push({foo:1, bar:2, baz:3});
dataArray.push({foo:1, bar:2, baz:3});
dataArray.push({foo:1, bar:2, baz:3});
dataArray.push({foo:1, bar:2, baz:3});
dataArray.push({foo:1, bar:2, baz:3});
dataArray.push({foo:1, bar:2, baz:3});

myDG.dataProvider = dataArray;

myDG.removeColumnAt(2);
// Later call the following to get the column back:
myDG.addColumnAt(2, baz);

Note that the third column of data is not removed from the data  
provider when you call removeColumnAt(2), it just removes the visual  
representation of the data.


Nathan
http://www.nathanderksen.com


On Feb 8, 2006, at 1:47 AM, [EMAIL PROTECTED]  
[EMAIL PROTECTED] wrote:



Does anyone know a way to hide a datagrid column.
The information contained in this electronic message and any  
attachments to this message are intended for the exclusive use of  
the addressee(s)and may contain confidential or privileged  
information. If you are not the intended recipient, please notify  
the sender or [EMAIL PROTECTED]

___
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] Can you extend the _y and _height setters of a movie clip?

2006-02-08 Thread David Lochhead
Hi,

I've got a movieclip that can have it's _y and _height properties
altered by various scripts. Is there a way I can extend the movieclip
class so that the setter for these properties can be extended so I can
act when the clip gets updated?

Any advice appreciated.

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


[Flashcoders] What is profile?

2006-02-08 Thread Morten Barklund TBWA\\Play

Hi all,

One for the detectives in y'all:


Background
--

I have an object, that I ought to fetch via a singleton and save as a 
local variable or member of my classes, but sometimes forget to declare. 
Thus sometimes I reference a member or a variable of a class, that 
hasn't been defined.


The compiler doesn't complain about this certain variable, which is 
quite annyoing as I thus doesn't know, that it is undefined.



Proof
-

I have very easily boiled it down to:

class Test {
function Test()  {
trace(prof is +profile);
}
}

No compiler-error. Change profile to any other (non-existing) variable 
and the compiler throws an error.


And of course, the trace is undefined - profile isn't a member, but why 
does the compiler handle this member-name in some special way? It looks 
 like some nasty hack made by some developer, who forgot to remove it :)


I do hope, that you are all able to reproduce. It have confirmed it at 
multiple computers using Win XP Pro and Flash 8.



Question


My question is as simple as: What is profile?

--
Morten Barklund - Information Architect - TBWA\Play
Gothersgade 49, 4th floor - DK-1123 Copenhagen K, Denmark
Phone: +45 7027 2227 - Fax: +45 3369 1174
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Can you extend the _y and _height setters of a movie clip?

2006-02-08 Thread Morten Barklund TBWA\\Play

David Lochhead wrote:

Hi,

I've got a movieclip that can have it's _y and _height properties
altered by various scripts. Is there a way I can extend the movieclip
class so that the setter for these properties can be extended so I can
act when the clip gets updated?

Any advice appreciated.


I've tried extending the enabled-property without luck. super.enabled 
= my_enabled doesn't really work. It would expect the same from _x and _y.


I do hope someone can give other advice, but until then, I believe it is 
undoable. :(


--
Morten Barklund - Information Architect - TBWA\Play
Gothersgade 49, 4th floor - DK-1123 Copenhagen K, Denmark
Phone: +45 7027 2227 - Fax: +45 3369 1174
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] what are differences between Flash5 and FlashMX?

2006-02-08 Thread JesterXL
That's the IDE, not the player.

...but yeah, JSFL rocks the mic.

- Original Message - 
From: Danny Kodicek [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Wednesday, February 08, 2006 2:41 AM
Subject: Re: [Flashcoders] what are differences between Flash5 and FlashMX?



 Well, I'll probably skip 10 billion details including IDE features, but 
 here
 goes my 2 minute stint on the good stuff:

One important thing you missed is JSFL: the ability to automate processes 
through code has been a lifesaver for me in two recent projects (was it 
introduced in MX04 or in MX?)

Danny 

___
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 you extend the _y and _height setters of amovie clip?

2006-02-08 Thread Scott Hyndman
You could try watching _y and _height with Object.watch(), and adding the extra 
code in the observing functions.

Scott

-Original Message-
From:   [EMAIL PROTECTED] on behalf of Morten Barklund TBWA\Play
Sent:   Wed 2/8/2006 11:46 AM
To: Flashcoders mailing list
Cc: 
Subject:Re: [Flashcoders] Can you extend the _y and _height setters of 
amovie   clip?

David Lochhead wrote:
 Hi,
 
 I've got a movieclip that can have it's _y and _height properties
 altered by various scripts. Is there a way I can extend the movieclip
 class so that the setter for these properties can be extended so I can
 act when the clip gets updated?
 
 Any advice appreciated.

I've tried extending the enabled-property without luck. super.enabled 
= my_enabled doesn't really work. It would expect the same from _x and _y.

I do hope someone can give other advice, but until then, I believe it is 
undoable. :(

-- 
Morten Barklund - Information Architect - TBWA\Play
Gothersgade 49, 4th floor - DK-1123 Copenhagen K, Denmark
Phone: +45 7027 2227 - Fax: +45 3369 1174
___
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 you extend the _y and _height setters of a movie clip?

2006-02-08 Thread Ian Thomas
Have you tried using Object.watch?

It certainly works for me with .enabled - might work with _x and _y, haven't
tried it.

Cheers,
  Ian

On 2/8/06, Morten Barklund TBWAPlay [EMAIL PROTECTED] wrote:

 David Lochhead wrote:
  Hi,
 
  I've got a movieclip that can have it's _y and _height properties
  altered by various scripts. Is there a way I can extend the movieclip
  class so that the setter for these properties can be extended so I can
  act when the clip gets updated?
 
  Any advice appreciated.

 I've tried extending the enabled-property without luck. super.enabled
 = my_enabled doesn't really work. It would expect the same from _x and _y.

 I do hope someone can give other advice, but until then, I believe it is
 undoable. :(

 --
 Morten Barklund - Information Architect - TBWA\Play
 Gothersgade 49, 4th floor - DK-1123 Copenhagen K, Denmark
 Phone: +45 7027 2227 - Fax: +45 3369 1174
 ___
 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] Zoom App

2006-02-08 Thread Jati Putra

Hi,
I`m working on a project that need zoom feature. but I`m stuck in making 
border that can validate my object width and height, so when I drag the 
movieclip object that include image, it can`t be over the border

I need to make it like this zoom aplication

http://www.artistscope.com/zoom/

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


RE: [Flashcoders] Dynamic width of image...

2006-02-08 Thread Ryan Potter
You could use a movie clip loader too.

Code below:


init();

function init(){
trace(code init);

this.createEmptyMovieClip(holder, this.getNextHighestDepth());
this.imageLoader = new MovieClipLoader();
this.imageLoader.addListener(this);

loadImg(MyImageName.jpg);
}


function loadImg(src:String):Void{
this.imageLoader.loadClip(src, this.holder);
}


function onLoadStart(target:MovieClip){
target._xscale = target._yscale = 50;
}

function onLoadInit(target:MovieClip){
var maxWidth = 163;
if (this._width  maxWidth)
{
scaleFactor = maxWidth / target._width;
trace(Scale Factor : +scaleFactor);
this._xscale = Math.floor (100 * scaleFactor);
this._yscale = Math.floor (100 * scaleFactor);
}
}



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of MJorge
Sent: Wednesday, February 08, 2006 6:54 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Dynamic width of image...

I had to go with another solution...

I have the same code at my Clip but now i have it at my lybrary and i´m
using attachMovie to load it to my stage...

Thanks.

On 2/8/06, Éric Thibault [EMAIL PROTECTED] wrote:

 And if you rescale the emptyclip back  to 100% before loading another
 image...


 :-)

 Eric.

 MJorge wrote:

 I know that my approach is working, the prob is that i have a button to
 load
 another image to the clip. That´s when all the problems come...
 
 The width value is not respected anymore. That´s my prob.
 
 
 
 On 2/8/06, erixtekila [EMAIL PROTECTED] wrote:
 
 
 _xscale and _yscale should be your friends.
 Your approach is good btw.
 
 
 
 I am loading dynamically some images to a emptyClip. The images have
 different width anh height values each one. What i wanted is that my
 Clip
 (or image after loading) had a maximum width of 163
 
 I am using this code at my Clip but it´s not working correctly. Can
 anyone
 help?
 
 onClipEvent (data) {
 maxWidth = 163;
 if (this._width  maxWidth)
 {
 scaleFactor = maxWidth / this._width;
 this._width = Math.floor (this._width * scaleFactor);
 this._height = Math.floor (this._height * scaleFactor);
 }
 }
 
 
 
 ---
 erixtekila
 http://blog.v-i-a.net/
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
 
 
 
 
 --
 
 Mário Jorge
 Icq: 164987050
 Msn + Mail: [EMAIL PROTECTED]
 Web: http://www.beedigital.net
 Blog: http://www.beedigital.net/blog
 ___
 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




--

Mário Jorge
Icq: 164987050
Msn + Mail: [EMAIL PROTECTED]
Web: http://www.beedigital.net
Blog: http://www.beedigital.net/blog
___
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 you extend the _y and _height setters of amovie clip?

2006-02-08 Thread Tyler Wright
No, there is no way to do this by extending the MovieClip class.
Unfortunately the _x and _y are unique beasts, along with all the other
MovieClip properties from the Flash 4 days (such as enabled). You can't
watch them, create getters/setters for them, or even over-ride them. You
have to have a getter/setter x and y and inside those set the _x and _y.

If you're feeling creative and absolutely have to have _x and _y as the
properties to watch, then you're class can't be attached to the actual
sprite. You'd have to have a real sprite-based MovieClip referenced inside
the class that you manipulate. I know that probably doesn't make sense, and
it's a programming project you don't want to undertake, with a lot of
potential for problems and failure (I know). You'll have to use the x and y,
which always looks better anyway.

Tyler


On 2/8/06, Scott Hyndman [EMAIL PROTECTED] wrote:

 You could try watching _y and _height with Object.watch(), and adding the
 extra code in the observing functions.

 Scott

 -Original Message-
 From:   [EMAIL PROTECTED] on behalf of Morten
 Barklund TBWA\Play
 Sent:   Wed 2/8/2006 11:46 AM
 To: Flashcoders mailing list
 Cc:
 Subject:Re: [Flashcoders] Can you extend the _y and _height
 setters of amovie   clip?

 David Lochhead wrote:
  Hi,
 
  I've got a movieclip that can have it's _y and _height properties
  altered by various scripts. Is there a way I can extend the movieclip
  class so that the setter for these properties can be extended so I can
  act when the clip gets updated?
 
  Any advice appreciated.

 I've tried extending the enabled-property without luck. super.enabled
 = my_enabled doesn't really work. It would expect the same from _x and _y.

 I do hope someone can give other advice, but until then, I believe it is
 undoable. :(

 --
 Morten Barklund - Information Architect - TBWA\Play
 Gothersgade 49, 4th floor - DK-1123 Copenhagen K, Denmark
 Phone: +45 7027 2227 - Fax: +45 3369 1174
 ___
 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 you extend the _y and _height setters of amovie clip?

2006-02-08 Thread Ian Thomas
Um - Tyler - as I said in an earlier post, Object.watch _does_ work with
.enabled. Definitely. I use it all the time. MX2004.

So it might be worth trying with _x and _y, too...

Ian

On 2/8/06, Tyler Wright [EMAIL PROTECTED] wrote:

 No, there is no way to do this by extending the MovieClip class.
 Unfortunately the _x and _y are unique beasts, along with all the other
 MovieClip properties from the Flash 4 days (such as enabled). You can't
 watch them, create getters/setters for them, or even over-ride them. You
 have to have a getter/setter x and y and inside those set the _x and _y.


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


RE: [Flashcoders] Can you extend the _y and _height setters of amovieclip?

2006-02-08 Thread Scott Hyndman
Yup. V2 components actually make use of watching enabled too.

I just tested watching _y and _height, and you're right, it doesn't work.

Scott

-Original Message-
From:   [EMAIL PROTECTED] on behalf of Ian Thomas
Sent:   Wed 2/8/2006 1:57 PM
To: Flashcoders mailing list
Cc: 
Subject:Re: [Flashcoders] Can you extend the _y and _height setters of 
amovieclip?

Um - Tyler - as I said in an earlier post, Object.watch _does_ work with
.enabled. Definitely. I use it all the time. MX2004.

So it might be worth trying with _x and _y, too...

Ian

On 2/8/06, Tyler Wright [EMAIL PROTECTED] wrote:

 No, there is no way to do this by extending the MovieClip class.
 Unfortunately the _x and _y are unique beasts, along with all the other
 MovieClip properties from the Flash 4 days (such as enabled). You can't
 watch them, create getters/setters for them, or even over-ride them. You
 have to have a getter/setter x and y and inside those set the _x and _y.


___
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] Xpath4AS2

2006-02-08 Thread Tom Rhodes
yeah other than the docs, I didn't turn up the osflash page in my searches,
I'll check the archives too...

ta.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: 08 February 2006 20:19
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Xpath4AS2

Other than the docs I assume:
http://www.xfactorstudio.com/ActionScript/AS2/XPath/ 

You can ask questions here, several people on the list are pretty
experienced.  Are you wanting to do some advanced searching type things
or just reading in node data?  There have been some threads recently on
the subject with some examples of using it - check the archives.  

There are also a few things on the web if you use Google:

http://osflash.org/xpath4as2


Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com










-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Tom Rhodes
Sent: Wednesday, February 08, 2006 2:18 PM
To: 'Flashcoders mailing list'
Subject: [Flashcoders] Xpath4AS2

hey all,



anyone know of any good tutorials on how to use XPath4AS2? can't seem
to
find much..



ta,



tom.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
NOTICE:
This message is for the designated recipient only and may contain privileged
or confidential information. If you have received it in error, please notify
the sender immediately and delete the original. Any other use of this e-mail
by you is prohibited.
___
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] video weirdness

2006-02-08 Thread quinrou .
John,

The streaming stops when the onRollOut event is invoked which happens when I
rollout of the thumbnail images.
When I noticed that i tried to desable the onRollOut event that i had on the
thumbnail images to see if the same thing was happening with the onRollOver
event.
And yes the same thing is happening... when I rollover a new thumbnail image
the movie stops streaming... Arrrgh... I don't get it

there's nothing in the onRollOut or onRollOver event that trigger anything
on the video. the only thing that they both have in commun is the use of the
delegate class... But I am pretty sure that's not it as I have been using
this class in many project and it always did what it had to do wihtout
messing stuff..

HELP...!



On 2/8/06, John Giotta [EMAIL PROTECTED] wrote:

 Are you holding the mouse down and moving... like a onReleaseOutside
 event is stopping the stream?
 ___
 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] video weirdness

2006-02-08 Thread John Giotta
I wouldn't be the Delegate class.

I'd like to help, but do you have something I can visualize?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] opportunity - paypal flash cart

2006-02-08 Thread stone larsen
I am looking to hire someone for a fully functional apparel based flash cart 
using paypal as the merchant.

Key needs: XML powered, easily updateable.

If interested please hit me back, I'm not looking to spend over $1000.

Best,
S-


-
Relax. Yahoo! Mail virus scanning helps detect nasty viruses!
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] FLVPlayback - ClearOverAll.swf

2006-02-08 Thread Corban Baxter
I guess you are trying to do an autohide?

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Boutin
Sent: Wednesday, February 08, 2006 2:59 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] FLVPlayback - ClearOverAll.swf

Hi Corban,

I  am having this same problem except I cant get the controls to go away 
once they popped up :) But everything works fine when testing locally.

Corban Baxter wrote:

Hey guys I am working with the flash video playback component in flash 8 for 
the first time today and I am having some problems getting the controls to 
show up on line. Everything works fine locally but when I upload it to a 
server the controls will never show up online. It's like the swf won't load 
in. One thing I am doing this on a cold fusion site that uses the old include 
method. Which always throws off the loading of things on a directory 
structure? So I put the ClearOverAll.swf in the two locations that would make 
sense. Does anyone know how that component loads into my file or what is 
causing this?

Corban Baxter  |  rich media designer  |  www.funimation.com


___
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] 1 pixel border issue (not quite an AS issue, slightly OT)

2006-02-08 Thread DP
I've read in my Flash Hacks book that moving the registration point  
can fix this.

Move it into the top left quadrant, so that the x,y values are negative.


On Feb 8, 2006, at 1:16 PM, Mendelsohn, Michael wrote:


Nevermind, flashcoders.  The solution seems to be to just make a shape
and use a bitmap fill with a 1 pixel stroke.

___
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] Q:getter setters vs accessor methods

2006-02-08 Thread bitstreams
Hi
Just wondering if there was a consensus on which use of getter/setters is used 
most often

traditional getter/setters  ie 
public function get Size():Number{}

or accessor methods 
public function getSize():Number{}

Which do you prefer and why...?

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

...all improvisation is life in search of a style.
 - Bruce Mau,'LifeStyle'
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Extract actionscript from .FLA?

2006-02-08 Thread Jim Ault
On 2/7/06 8:49 PM, Josh McDonald [EMAIL PROTECTED]
wrote:

 I agree, but there's no way I'd get the go-ahead for refactoring of that
 size. Lousy bean-counters :( I'm just lucky for the amount of code
 that's already in .as files. Thanks for the link btw :)
  
I use BBEdit to do multi file searching and it will open any file.

Jim Ault
Las Vegas


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


Re: [Flashcoders] opportunity - paypal flash cart

2006-02-08 Thread Rich Rodecker
check out flashkart.



On 2/8/06, stone larsen [EMAIL PROTECTED] wrote:

 I am looking to hire someone for a fully functional apparel based flash
 cart using paypal as the merchant.

 Key needs: XML powered, easily updateable.

 If interested please hit me back, I'm not looking to spend over $1000.

 Best,
 S-


 -
 Relax. Yahoo! Mail virus scanning helps detect nasty viruses!
 ___
 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] Outsourcing

2006-02-08 Thread Ramon Tayag
To all those in developed countries:

Do you outsource your work to developing countries?  Is there such a
high demand for Flash overseas that there is a need to outsource?

Thank you,
--
Ramon Miguel M. Tayag
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] No cue points in On2 pro?

2006-02-08 Thread Troy Rollins


On Feb 8, 2006, at 9:54 PM, Newmediasoup - engaging multimedia wrote:


Would this work?

http://buraks.com/captionate/


Thanks for the link. It appears that tool accepts pre-encoded FLVs  
and injects metadata and cue points. Windows-only is a bit of a pain  
for our production workflow since we encode on Mac, and I'd really  
like to encode the cue points at the same time as encoding, but it  
may be a solution if push comes to shove.


--
Troy
RPSystems, Ltd.
http://www.rpsystems.net


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


Re: [Flashcoders] Q: Speeding up compile and /or launch with many objects

2006-02-08 Thread Mark Winterhalder
 Can anyone suggest speed improvements?

to speed up compile time, use mtasc (http://osflash.org/mtasc), the
second possibly is your initialization, i.e. building the interface or
whatever. you can measure it by putting it all in a function, and do
something like this:

var start:Number = _global.getTimer();
init();
trace( initialization took  + Math.round( ( _global.getTimer - start
) / 1000 ) + s. );

hth,
mark


On 2/9/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hi
 I have a simple 'grid class
 which creates a grid composed of 'cells'

 A 'cell' class extends a 'square' class which in turn extends a 'rectangle' 
 class which extends a 'shape' class. Lots of extending goin on:)

 The 'grid' class references the cells thru composition.

 It works fine but I run into a bottleneck if I creat a grid with more than 
 20-30 columns.

 Not only is there a noticeable delay when I compile in the authoring 
 environment, but even AFTER compiling, if I launch the swf, there is a 
 noticeable delay (several seconds) before the swf even displays.

 Is this latter delay solely due to the time for attachmovie and /or use of 
 the drawing api (I've used both methods to draw the individual 'cells', 
 attachmovie seems faster but there is still a delay.



 Can anyone suggest speed improvements?
 Thanks
 Jim Bachalo

 [e] jbach at bitstream.ca
 [c] 416.668.0034
 [w] www.bitstream.ca
 
 ...all improvisation is life in search of a style.
  - Bruce Mau,'LifeStyle'
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--
http://snafoo.org/
jabber: [EMAIL PROTECTED]
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Outsourcing

2006-02-08 Thread Bjorn Schultheiss
I probably do not speak for all but the common perception is that innovative
work is done in house while the more common jobs are most likely to be
outsourced.

Bjorn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ramon Tayag
Sent: Thursday, 9 February 2006 2:14 PM
To: FlashCoders Programming
Subject: [Flashcoders] Outsourcing

To all those in developed countries:

Do you outsource your work to developing countries?  Is there such a
high demand for Flash overseas that there is a need to outsource?

Thank you,
--
Ramon Miguel M. Tayag
___
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] Outsourcing

2006-02-08 Thread JesterXL
I'm assuming the USA is a developed country.

Yes.  Tons of work is outsourced; it's the same with manufacturing; if the 
same job can be done cheaper in the long run, outsourcing is a good idea. 
There is a high demand for Flash, yes, but a higher demand for Flex is on 
the horizon, mainly because bigger projects are typically done with Flex, 
and as such, companies are needed to take responsibility with those projects 
vs. individuals.

Additionally, there are a ton of companies right now that have no clue what 
the difference between a prototype and a product is, so, even if you know 
just AS1 and Flash 6, you can still make bling producing prototypes that 
really don't function nor are coded with future modications in mind.  A lot 
of people see a prototype as 80% done not realizing.  Same goes for design 
work and interface prototyping as well.

I'd say the future is bright for outsourcing Flex  AJAX.


- Original Message - 
From: Ramon Tayag [EMAIL PROTECTED]
To: FlashCoders Programming flashcoders@chattyfig.figleaf.com
Sent: Wednesday, February 08, 2006 10:13 PM
Subject: [Flashcoders] Outsourcing


To all those in developed countries:

Do you outsource your work to developing countries?  Is there such a
high demand for Flash overseas that there is a need to outsource?

Thank you,
--
Ramon Miguel M. Tayag
___
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] SWF to Image format at runtime.

2006-02-08 Thread hidayath q
Hi guys,

I want to convert the whole SWF file into a jpg format at runtime.will a swf
file be embedded in PDF file? can anyone answer my question.

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


Re: [Flashcoders] No cue points in On2 pro?

2006-02-08 Thread Troy Rollins


On Feb 8, 2006, at 11:06 PM, Newmediasoup - engaging multimedia wrote:

The only downside is if you don't own Sorenson squeeze, it's gonna  
cost ya
about $450 for the compression suite, and then you'll have to pay  
about $150

to get the On2VP6 Pro plugin.

Hope this helps... Or am I missing something?


Aha. That did help. Yes, I have Squeeze... I hadn't realized they  
supported cue points at all. They cleverly hid that function behind  
their clever interface. But it is now revealed.  ;-)


Thanks Joel, I think I'll try that route.

--
Troy
RPSystems, Ltd.
http://www.rpsystems.net


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


Re: Re[4]: [Flashcoders] Q:getter setters vs accessor methods

2006-02-08 Thread Nathan Derksen

The line in the constructor:

this._size = 2;

is calling the setter. Maybe you meant to call this.__size = 2;  
Setters will trigger regardless of whether the property is set by  
code within the class itself or from external code.


Nathan
http://www.nathanderksen.com


On Feb 8, 2006, at 5:31 PM, Iv wrote:


Hello JesterXL,

my test shows anoter result and add new question:
-who called getter in the code?

class Test {
private var __size:Number = 0;
function Test() {
this._size = 2;
}
public function get _size():Number {
trace(get _size);
return this.getSize();
}
public function set _size(new_size:Number):Void {
trace(set _size);
this.setSize(new_size);
trace(end set _size\n);
}
//
private function setSize(new_size:Number):Number {
trace(setSize);
this.__size = new_size;
return new_size;
}
private function getSize():Number {
trace(getSize);
return this.__size;
}
}

fla:
foo = new Test()

output:

set _size
setSize
end set _size

get _size
getSize


J size = 2 does:
J - setter runs
J - getter runs for setter
J - getter runs getSize function
J - getSize function gets value, returns it
J - getter returns value for setter
J - setter changes value



--
Ivan Dembicki
__ 
__
[EMAIL PROTECTED] || http:// 
www.design.ru


___
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: Re[4]: [Flashcoders] Q:getter setters vs accessor methods

2006-02-08 Thread Nathan Derksen

Sorry, ignore me, I misread the question. setter != getter

Nathan
http://www.nathanderksen.com


On Feb 8, 2006, at 9:58 PM, Nathan Derksen wrote:


The line in the constructor:

this._size = 2;

is calling the setter. Maybe you meant to call this.__size = 2;  
Setters will trigger regardless of whether the property is set by  
code within the class itself or from external code.


Nathan
http://www.nathanderksen.com


On Feb 8, 2006, at 5:31 PM, Iv wrote:


Hello JesterXL,

my test shows anoter result and add new question:
-who called getter in the code?

class Test {
private var __size:Number = 0;
function Test() {
this._size = 2;
}
public function get _size():Number {
trace(get _size);
return this.getSize();
}
public function set _size(new_size:Number):Void {
trace(set _size);
this.setSize(new_size);
trace(end set _size\n);
}
//
private function setSize(new_size:Number):Number {
trace(setSize);
this.__size = new_size;
return new_size;
}
private function getSize():Number {
trace(getSize);
return this.__size;
}
}

fla:
foo = new Test()

output:

set _size
setSize
end set _size

get _size
getSize


J size = 2 does:
J - setter runs
J - getter runs for setter
J - getter runs getSize function
J - getSize function gets value, returns it
J - getter returns value for setter
J - setter changes value



--
Ivan Dembicki
_ 
___
[EMAIL PROTECTED] || http:// 
www.design.ru


___
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] Q:getter setters vs accessor methods

2006-02-08 Thread Fumio Nonaka
Right.  And in simple assignment, getter's returned value is returned as 
the assignment formula's value.  According to ECMA-262 (11.13.1), the 
formula's value should be its lefthand expression.


var _mc:MovieClip = this.createEmptyMovieClip(my_mc, 1);
var a:Number = _mc._rotation=270;
trace([a, _mc._rotation]);  // Output: 270,-90 // Good
var o:MyRotation = new MyRotation();
var b:Number = o.rotation=-90;
trace([b, o.rotation]);  // Output: 270,270 // Bad

// ActionScript 2.0 class definition for Testing
class MyRotation {
var _rotation:Number = 0;
// gets the value between 0 and 360
function get rotation():Number {
trace([get, _rotation]);
return (_rotation%360+360)%360;
}
// sets the value between -180 and 180
function set rotation(n:Number):Void {
_rotation = (n%360+540)%360-180;
trace([set, _rotation]);
}
}
_
JesterXL wrote:

Setters call the getters automatically.


Good luck,

Fumio Nonaka
mailto:[EMAIL PROTECTED]
http://www.FumioNonaka.com/
My bookshttp://www.FumioNonaka.com/Books/index.html
Flash communityhttp://F-site.org/

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


Re: [Flashcoders] Q:getter setters vs accessor methods

2006-02-08 Thread Fumio Nonaka
Sorry.  The formula's value should be its assignment expression, i.e. 
righthand side expression.

_
Fumio Nonaka wrote:
Right.  And in simple assignment, getter's returned value is returned as 
the assignment formula's value.  According to ECMA-262 (11.13.1), the 
formula's value should be its lefthand expression.


Good luck,

Fumio Nonaka
mailto:[EMAIL PROTECTED]
http://www.FumioNonaka.com/
My bookshttp://www.FumioNonaka.com/Books/index.html
Flash communityhttp://F-site.org/

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