[Flashcoders] Tree component icons

2006-07-26 Thread Grant Davies
Is it possible to mark a tree node as Special so I can apply different
icons ?

I have a tree that has the hierarchy

Groups
  |__Roles
 |_ Permissions

An I want each level to have a different icon.  Can this be done, and
do I have to do a custom tree renderer ?

Grant
___
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] Disable a menu with MM V2 Menu component.

2006-06-28 Thread Grant Davies
I'm adding authorization to my application and I've manged to disable menu 
items within a menu by setting the enabled property to false.  In some case the 
entire menu needs to be disabled, but it appears to be ignoring my 
enabled=false or setEnabled(false).
 
e,.g.
 
myAccountMenu = menuBar.addMenu(MyAccount, myAccountXML);
  
  myAccountMenu.setEnabled(false);
 
The menu is still active, looks active and works, even though I'd expect it to 
be grey and inactive.
 
anyone have a clue or should I start hacking the MM v2 menu code ?
 
Grant.
___
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] Movie clip loader onLoadError not called in firefox

2006-06-19 Thread Grant Davies
 
I've been doing some googling and found a lot of people complaining about the 
onLoadError method of your listener object passed to the MovieClipLoader does 
not get called when the movie cannot be loaded when run inside firefox.
 
Before I go writing a timeout class to catch this, is there a simple work 
around?  I need to support firefox users.
 
thanks,
Grant
___
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] How does remoting access class members ?

2006-03-04 Thread Grant Davies
I'm trying to remember how remoting accesses class members when
translating and object for serialization over AMF

I know it can access the private variables of a class, but will it use
get/set methods if they are present, for example :


class com.somecompany.domain
{
private var eventId:Number;
private var title:String;

public function get EventId():Number
{
return eventId;
}

public function set EventId(eventId:Number):Void
{

this.eventId = eventId; 
}

public function get Title():String
{
return this.title;  
}

public function set Title(title:String):Void
{
this.title = title; 
}
}

Will the remoting library in flash use the get / set methods here if
I've defined Title and EventId on the remote object or will it bypass
those methods and attempt to use the private variables eventId and title
?

Cheers
Grant
___
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] Z sorting multiple overlapping movie clips

2006-03-01 Thread Grant Davies
Problem with that is if the item you click on is under other items and
it swaps depths with the top item, the top item then appears under
things it wasn't.  I did it this way first and it looked very weird.

I ended up just writing a depth sorter, each of the objects that are
added to the screen dispatch a registration event and the depth sorter
adds them to a list and stores a sorted depths list, when an item wants
to be on top I figure out where it is in the Z order and then swap it
with the item above it and then the next, and next and next until I get
to the top, that way the Z order is preserved just like in a windowing
system.

Cheers,
Grant 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Karthik
Sent: Wednesday, March 01, 2006 4:27 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Z sorting multiple overlapping movie clips

On 01/03/06, Byron Canfield [EMAIL PROTECTED] wrote:
 You can make it a lot easier by doing some of the prep work for that 
 architecture in the for loop that you use to first create and assign 
 depths to those movieclips.

It might be a lot simpler to just do something like:

// Untested.
// Assuming clips are given depths based on ID var highest_depth:Number
= clips_array.length;

// click handler
function click_handler(e:Object):Void {
  if (e.target.getDepth() != (highest_depth)) {
e.target.swapDepths(++highest_depth);
  }
}

---
This should be fine for IIRC 2 billion+ clicks, with some caveats for
depths greater than 1M..

My 10p,
-K
___
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] Z sorting multiple overlapping movie clips

2006-03-01 Thread Grant Davies
Ok so you are doing it with the item just below the top, how does that
put your selected item on the top ?

Grant 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ramon
Miguel M. Tayag
Sent: Thursday, March 02, 2006 12:26 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Z sorting multiple overlapping movie clips

why not mc.swapDepths(getNextHighestDepth() ) ?  Do you have that many
movieclips?


On 3/2/06, Karthik [EMAIL PROTECTED] wrote:

 On 02/03/06, Grant Davies [EMAIL PROTECTED] wrote:
  Problem with that is if the item you click on is under other items 
  and it swaps depths with the top item, the top item then appears 
  under things it wasn't.  I did it this way first and it looked very
weird.

 Not really - I'm swapping with (the depth of the topmost item + 1).

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




--
Ramon Miguel M. Tayag
Managing Director
Quirkworks
___
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] Z sorting multiple overlapping movie clips

2006-03-01 Thread Grant Davies
I thought you could only swap depths with movieclips, get night higest
depths just returns what depth would be the next highest, it doesn't
actually create the depth.

Gran 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ramon
Miguel M. Tayag
Sent: Thursday, March 02, 2006 12:26 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Z sorting multiple overlapping movie clips

why not mc.swapDepths(getNextHighestDepth() ) ?  Do you have that many
movieclips?


On 3/2/06, Karthik [EMAIL PROTECTED] wrote:

 On 02/03/06, Grant Davies [EMAIL PROTECTED] wrote:
  Problem with that is if the item you click on is under other items 
  and it swaps depths with the top item, the top item then appears 
  under things it wasn't.  I did it this way first and it looked very
weird.

 Not really - I'm swapping with (the depth of the topmost item + 1).

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




--
Ramon Miguel M. Tayag
Managing Director
Quirkworks
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


[Flashcoders] Z sorting multiple overlapping movie clips

2006-02-27 Thread Grant Davies
Does anyone have a an algorithm for Z sorting multiple overlapping
clips...

I have an array of clips and when one is clicked I want it to come to
the top, but I want the other overlapping items to also shift
appropriately...

So

Item [1] at depth 10
Item [2] at depth 9
Item [3] at depth 8
Item [4] at depth 7

If you click item [4], it would go to depth 10, and the other would
shift down 1

Item [4] depth 10
Item [1] depth 9
Item [2] depth 8
Item [3] depth 7

But if any of those items are overlaping other items, they also need to
be Z sorted.

I'd rather not re-invent the wheel.

Thanks
Grant
___
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