Re: [Flashcoders] Selective display with XMLConnector, DataSet and DataGrid

2007-02-19 Thread Andrew J Kirkham

Thanks Muzak, that's most useful.

Andy


- Original Message - 
From: Muzak [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Sunday, February 18, 2007 7:08 PM
Subject: Re: [Flashcoders] Selective display with XMLConnector,DataSet and 
DataGrid



There's a few ways you can do this, but here is one, using Bindings 
through the Component Inspector.


First set the columns for the datagrid.
Add the following code to the first frame (where the button code is)

this.menu_dg.columnNames = [name, price, calories];

Add a TextArea component for the description of the selected datagrid item 
to the stage, name it:description_ta
With the TextArea instance selected, set editable to false in the 
Parameters tab.


Next step is to bind the .text property of the TextArea to the 
description field of the XML connector.
You could bind the TextArea to the DataSet, but then you'd have to 
manually create a schema for the DataSet's dataProvider in the Component 
Inspector. Since the XMLConnector already has a Schema defined, we'll use 
that one.


Bind the TextArea's text property to the XMLConnector's description 
property: click the plus (+) sign, select the text:String property, 
click Bound To, click the magnifying glass icon, select XMLConnector, 
then select the description:String property. Select in for the 
direction.


Last thing to do is to tell the TextArea to display the description of the 
selected item of the DataGrid.

However you do this through the XMLConnector..
Select the XMLConnector, select the Bindings tab in the Component 
Inspector.

There should be 2 Bindings

- results.dinner_menu.food
- results.dinner_menu.food.[n].description

The last one is the one we need. Note that it has [n] in the path, 
meaning there's multiple food properties and we now need to tell the 
XMLConnector which one to use.


Select results.dinner_menu.food.[n].description in the Bindings tab, 
click Index for 'food', click the magnifying glass icon, unselect Use 
constant value, which will make the selections at the top available, 
select Datagrid - selectedIndex:Number


Test the movie.

regards,
Muzak



- Original Message - 
From: Andrew Kirkham [EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Sunday, February 18, 2007 6:31 PM
Subject: [Flashcoders] Selective display with XMLConnector,DataSet and 
DataGrid



I am learning about data integration and have completed the elementary 
Dinner Menu exercise at 
http://livedocs.adobe.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004file=0435.html .


The XML has a root node named dinner_menu, containing multiple nodes 
named food, each of which contains nodes named name, price, 
description and calories.


By means of XMLConnector, DataSet and DataGrid, this information is 
displayed in columns labelled name, price, description and 
calories.


So far it is perfectly simple, but what I now want to modify the example 
to display only _selected_ columns in my DataGrid, for instance to read in 
the same XML but display only name, price and calories in my 
DataGrid, omitting description. Nevertheless I don't want to discard 
description; I want to read it in with the other data, store it and make 
it available if the user requests it.


Can anybody suggest how I can do this, or direct me to any examples?

Thanks
Andy


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

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


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

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


Re: [Flashcoders] Transforming a MovieClip instance to monochrome

2007-01-24 Thread Andrew J Kirkham

That looks like it!

Thanks

Andy


- Original Message - 
From: Rákos Attila [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Wednesday, January 24, 2007 11:50 AM
Subject: Re: [Flashcoders] Transforming a MovieClip instance to monochrome




ColorMatrixFilter is your friend :)

 Attila

AK Is there a way of transforming a coloured MovieClip instance to
AK monochrome (specifically grey scale) at run time? I want it to
AK indicate that a control is disabled.

AK It seems a fairly elementary thing to do, so possibly I'm
AK overlooking something quite obvious.

AK The ColorTransform class seems a likely method, but I'm not very
AK knowledgable about the intricacies manipulating RGB values, and
AK although I've spent some time adjusting various values I haven't
AK acheived the result I want.


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

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



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

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


Re: [Flashcoders] Saving out XML direct from Flash?

2007-01-22 Thread Andrew J Kirkham
I managed something like this by embedding my Flash movie in a Director 
movie, which managed the saving of the XML. I'm afraid I no longer have 
access to the files, but I seem to remember it didn't take me very long to 
implement.


Andy


- Original Message - 
From: Henry Cooke [EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Friday, January 19, 2007 5:11 PM
Subject: [Flashcoders] Saving out XML direct from Flash?



'lo all

I'm noodling around with a little app that I'd like to be able to write 
out

some internally generated XML directly to the user's hard disc. Preferably
with a nice FileReference type interface.

But this seems next to impossible. I was hoping it would be possible to 
hack
FileReference to take file conetent from a variable, rather than a URL, 
but
that looks like a no-go. My second idea was to write to a SharedObject, 
then

pass that through FileReference, but I can't find a way of finding out the
path to the SO file within Flash. I've spent the afternoon reading about
MMSave, FSCommand save and ASnative(302, 0) and coming to the conclusion
that they're deprecated as hell and useless to me.

So does anyone have any good suggestions? I'm not averse to dirty hacks, 
but
this is a standalone app, so I can't bounce the file back off a server, 
and

I really don't want to use one of those weird extended projectors if I can
avoid it.

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

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


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

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


Re: [Flashcoders] Override _xscale and _yscale setter in AS2

2007-01-19 Thread Andrew J Kirkham
I've only skimmed the messages and I don't have any practical experience 
with this issue ( so possibly I am talking rubbish) but I don't think anyone 
so far has mentioned super.


I wonder if this approach is of any use.

public function set _yscale( value:Number ):Void
   {
  super._yscale = Number;
   //your code :)
   }

Andy


- Original Message - 
From: Patrick Matte | BLITZ [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Friday, January 19, 2007 12:37 AM
Subject: RE: [Flashcoders] Override _xscale and _yscale setter in AS2


Anybody has any other idea ?

BLITZ | Patrick Matte - 310-551-0200 x214


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Patrick
Matte | BLITZ
Sent: Thursday, January 18, 2007 4:19 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Override _xscale and _yscale setter in AS2

No I've tried that but it doesn't work unfortunately, I've also
overridden the enabled setter before but the _xscale and _yscale setters
seem to be different from the enabled setter.

What I want to do is not scale the movieClip at all and scale redraw a
bitmapData inside of it.

BLITZ | Patrick Matte - 310-551-0200 x214


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of eka
Sent: Thursday, January 18, 2007 3:50 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Override _xscale and _yscale setter in AS2

Hello :)

Yes you can :) Try this code (not tested)


class Test1 extends MovieClip
{

/**
 * Constructor
 */
function Test1()
{

}

   public function get _xscale ():Number
   {
return _xscale_ ;
   }

   public function set _yscale( value:Number ):Void
   {
  __xscale__ = value ;
 // your code :)
   }

   private var _xscale_ = MovieClip.prototype._xscale ;

}

I use this technik in LUnAS the extension of VEGAS my framework
OpenSource
with the enabled property... it's possible it's work with the _xscale
property.

NB 1 : Vegas project : http://vegas.riaforge.org/
NB 2 : the AbstractComponent class in LunAS with this hack over the
enabled
property :
http://svn.riaforge.org/vegas/AS2/trunk/src/lunas/display/components/Abs
tractComponent.as



EKA+ :)




2007/1/19, Patrick Matte | BLITZ [EMAIL PROTECTED]:


In AS2, is it possible to override the _xscale and _yscale setter in a
subclass of MovieClip ?


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

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


[Flashcoders] The Align panel

2006-09-11 Thread Andrew J Kirkham
When aligning a group of objects using the Align panel, is there a way of 
keeping one of the objects static and having all the others align with it?

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

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


[Flashcoders] Arguments always undefined in debugger

2006-07-18 Thread Andrew J Kirkham
I am using Flash 8 Professional on Windows MX.

It seems that in the Locals tab of the debugger, the arguments variable always 
displays undefined in its value field.

Is this an intrinsic and unavoidable defect of the debugger, or is there 
something I can do about it?

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

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


[Flashcoders] Flash MX 2004 Developer Exam - Actionscript versions

2006-06-28 Thread Andrew J Kirkham
I note that the sample questions provided by Macromedia for the MX 2004 
Developer exam 
(http://www.adobe.com/support/training/certified_professional_program/flmx2004_developer.html)
 includes a question about Object.registerClass.

Since I changed over to AS2 I haven't found any need to use 
Object.registerClass, and I am apt to regard it as a redundant relic of AS1. 
Does its inclusion in the exam imply there is still a siginificant amount of 
AS1 stuff in the exam? Or is there a still a legitimate need for 
Object.registerClass in AS2?

And does anyone know if a Flash 8 Developer Exam can be expected in the near 
future?

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

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


[Flashcoders] MX 2004 Developer Exam Actionscript versions

2006-06-28 Thread Andrew J Kirkham
I note that the sample questions provided by Macromedia for the MX 2004 
Developer exam 
(http://www.adobe.com/support/training/certified_professional_program/flmx2004_developer.html)
 includes a question about Object.registerClass.

Since I changed over to AS2 I haven't found any need to use 
Object.registerClass, and I am apt to regard it as a redundant relic of AS1. 
Does its inclusion in the exam imply there is still a siginificant amount of 
AS1 stuff in the exam? Or is there a still a legitimate need for 
Object.registerClass in AS2?

And does anyone know if a Flash 8 Developer Exam can be expected in the near 
future?

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

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


[Flashcoders] Re: Flash MX 2004 Developer Exam - Actionscript versions

2006-06-28 Thread Andrew J Kirkham

Thanks Ian

That's very enlightening. Perhaps my query shows I'm not yet ready to take 
the exam :-(


And sorry about the duplicate posting of my query!

Andy


Date: Wed, 28 Jun 2006 11:54:19 +0100
From: Ian Thomas [EMAIL PROTECTED]
Subject: Re: [Flashcoders] Flash MX 2004 Developer Exam - Actionscript
versions
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Message-ID:
[EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

I use Object.registerClass all the time.

It is very handy when programmatically controlling which class is
associated with a symbol without having to specify a class in the
Linkage dialog in the library, for example (which means you can
associate different classes with the same symbol if you want to - or
at the least you don't have to rely on a graphic artist getting it
right).

It is also useful for Peter Joel's trick to create MovieClip-derived
classes that aren't associated with symbols in the library - see here:
http://www.osflash.org/flashcoders/as2#creating_a_class_instance_based_on_movieclip_without_a_symbol_in_the_library

For that latter usage alone, if I didn't have Object.registerClass in
AS2, I probably couldn't cope. :-)

HTH,
 Ian


On 6/28/06, Andrew J Kirkham [EMAIL PROTECTED] wrote:
I note that the sample questions provided by Macromedia for the MX 2004 
Developer exam 
(http://www.adobe.com/support/training/certified_professional_program/flmx2004_developer.html) 
includes a question about Object.registerClass.


Since I changed over to AS2 I haven't found any need to use 
Object.registerClass, and I am apt to regard it as a redundant relic of 
AS1. Does its inclusion in the exam imply there is still a siginificant 
amount of AS1 stuff in the exam? Or is there a still a legitimate need 
for Object.registerClass in AS2?


And does anyone know if a Flash 8 Developer Exam can be expected in the 
near future?


Andy Kirkham


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

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