Re: Fw: [flexcoders] Function Execution Time

2009-10-30 Thread Arpit Mathur
There is also Grant Skinner's Actionscript performance harness that Lee
Brimelow put up a video on recently

http://www.gotoandlearn.com/play?id=115

-arpit


On Fri, Oct 30, 2009 at 4:09 AM, Krunal Panchal wrote:

>
>
> It is very simple, add trace just before and after the calling function.
> Keep in mind this is the same function which will you using  for data
> fetching.
>
> *
> Regards,
> --
>
> Krunal Panchal
> *
>
>
> - Forwarded Message 
> *From:* kanu kukreja 
> *Sent:* Fri, 30 October, 2009 11:58:55
> *Subject:* [flexcoders] Function Execution Time
>
>
>
> How can I find/get execution time of particular function data?
>
>  
>



-- 
--
Arpit Mathur
twitter: http://twitter.com/arpit
blog: http://arpitonline.com/blog
---


[flexcoders] Best option for implementing a growl like notification system ?

2009-03-09 Thread Arpit Mathur
Hi all,

I had a question regarding an AIR utility class that I am trying to finish.
The class is pretty simple, it is basically an AIR implementation of the Mac
Growl UI (notification windows that pop open on the right edge of the
display). Most AIR applications seem to use some implementation of the
functionality so I decided to write a generic one that I could open source
and let everyone use it.

My question is pretty simple. Like growl, I wanted to bring out a number of
rectangular notification windows that fade out after some time. There are 3
ways I can see this being accomplished:

1) Open new NativeWindow for each notification
2) Open one transparent nativeWindow add children to it calculate its size
based on the number of children being added (notifications), and then place
the window appropriately on the screen's edge
3) Open one transparent nativeWindow to the size of the screen (resolution),
and add notifications to its right edge.

Is there one implementation over another that may have better performance ?
#2 seems it may since it creates one native window of the exact size it
needs, but its the most work.

Any thoughts ?


Re: [flexcoders] Re: Menu direction: layout submenus to the left instead of right ?

2008-02-19 Thread Arpit Mathur
Thanks. Voted.

On Feb 19, 2008 3:18 AM, Ryan Frishberg <[EMAIL PROTECTED]> wrote:

>   There's a bug on this. Unfortunately, this didn't make it for Flex 3.
> Voting on bugs is always helpful to let us know what's useful btw.
>
> https://bugs.adobe.com/jira/browse/SDK-12409
>
> The bug also includes some ideas on how to implement a workaround to
> get it to work.
>
> -Ryan
>
>
> --- In flexcoders@yahoogroups.com , "Arpit
> Mathur" <[EMAIL PROTECTED]> wrote:
> >
> > I have a popup button on the right extreme of an AIR application.
> Its menu
> > is a 2/3 submenu level deep. So right now when I rollover a
> menuitem, its
> > submenu opens on top of it since there is no flash player canvas to the
> > right of the menu. Is there a way to get the submenus to open to the
> left
> > rather than right ?
> > thanks
> >
> > --
> > Arpit Mathur
> > Lead Software Engineer,
> > Comcast Interactive Media
> > ---
> > post your flex tips on
> > http://flextips.corank.com
> >
>
>  
>



-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


[flexcoders] Menu direction: layout submenus to the left instead of right ?

2008-02-18 Thread Arpit Mathur
I have a popup button on the right extreme of an AIR application. Its menu
is a 2/3 submenu level deep. So right now when I rollover a menuitem, its
submenu opens on top of it since there is no flash player canvas to the
right of the menu. Is there a way to get the submenus to open to the left
rather than right ?
thanks

-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


Re: [flexcoders] Performance difference between ArrayCollection.removeAll() and ArrayCollection.source = []

2008-02-16 Thread Arpit Mathur
Hi Alex,

Thanks for responding. Should this be tracked as a bug? I think there may be
a better way of handling this:

On removeAll() you can set a flag like removeEventListenersPending = true,
copy the old elements to a temporary new array and run through the it in
smaller sized increments (removing event listeners from say 40 objects every
enterframe using something like calllater). In the meanwhile if a property
change event is fired, you can see if the flag is set and if so make sure
the item is in the current source array and not the temp array. When all
objects in the temp have had their event listeners removed, set the
removeEventListenersPending = false.

I think the current implementation may be causing a lot of performace issues
since a lot of people may be using ArrayCollections for large data sets
(thats what Flex is great for :) ) and may not know of the penalty of the
removeAll().

thanks
-arpit


On 2/15/08, Alex Harui <[EMAIL PROTECTED]> wrote:

>Because of the way GC works, I still think it is best for us to remove
> the listeners.  GC is only on allocation so again, if someone had a handle
> to an object that got removed and twiddled a value, the notification code
> would run needlessly until GC kicked in.
>
>
>
> However, I think you've come up with a great optimization for folks who
> know they are destroying everything all at once.
>
>
>  --
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Arpit Mathur
> *Sent:* Thursday, February 14, 2008 9:39 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* Re: [flexcoders] Performance difference between
> ArrayCollection.removeAll() and ArrayCollection.source = []
>
>
>
> Hmm, maybe I am missing something here? The only place I see
> addEventListener being called is
>
>
>
>  protected function startTrackUpdates(item:Object):void
> {
> if (item && (item is IEventDispatcher))
> {
> IEventDispatcher(item).addEventListener(
> PropertyChangeEvent.PROPERTY_CHANGE,
> itemUpdateHandler, false, 0,
> true);
> }
> }
>
>
>
> which has the weak-keys boolean flag turned on. Shouldnt that allow
> garbage collection to run without explicitly calling removeEventListener ?
>
>
>
> On Thu, Feb 14, 2008 at 11:54 PM, Alex Harui <[EMAIL PROTECTED]> wrote:
>
> Our code has to look like that otherwise if someone kept a reference to
> one of the objects that got removed, it would keep the ArrayList from being
> GC'd.  We added listeners, so we should remove them.  If the data objects
> are going away too, then you can probably reset the source, but if you see a
> memory leak later, I'd definitely check in that area.
>
>
>  --
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Arpit Mathur
> *Sent:* Thursday, February 14, 2008 8:27 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Performance difference between
> ArrayCollection.removeAll() and ArrayCollection.source = []
>
>
>
> I was trying to debug an issue with the LogBook application we released a
> couple of days back. If you take a look at the interface on the main page at
> http://cimlogbook.googlecode.com (or if you have installed the
> application), you will see a clear logs button. Clicking on that clears an
> ArrayCollection that holds a series of LogObjects by calling a removeAll()
> function. However we got a bug saying the application would almost hang if
> it tried to clear a lot of messages. A quick patch was to reset the source
> like so:  arrayCollection.source = [] . The performance became lightning
> fast.
>
> Looking deeper into the removeAll function and following the hierarchy to
> the ArrayList class, I see that the removeAll loops through the entire
> array, looking at each member to see if its an event dispatcher and if so
> calling a function to remove the propertyChange listener.
> Why is this implemented this way ? Is there any reason I shouldnt just use
> source = [] to reset the array ?
>
> Thanks
>
>
> --
> Arpit Mathur
> Lead Software Engineer,
> Comcast Interactive Media
> ---
> post your flex tips on
> http://flextips.corank.com
>
>
>
>
> --
> Arpit Mathur
> Lead Software Engineer,
> Comcast Interactive Media
> ---
> post your flex tips on
> http://flextips.corank.com
>
> 
>



-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


Re: [flexcoders] Performance difference between ArrayCollection.removeAll() and ArrayCollection.source = []

2008-02-14 Thread Arpit Mathur
Hmm, maybe I am missing something here? The only place I see
addEventListener being called is

 protected function startTrackUpdates(item:Object):void
{
if (item && (item is IEventDispatcher))
{
IEventDispatcher(item).addEventListener(
PropertyChangeEvent.PROPERTY_CHANGE,
itemUpdateHandler, false, 0, true);
}
}

which has the weak-keys boolean flag turned on. Shouldnt that allow garbage
collection to run without explicitly calling removeEventListener ?


On Thu, Feb 14, 2008 at 11:54 PM, Alex Harui <[EMAIL PROTECTED]> wrote:

>Our code has to look like that otherwise if someone kept a reference to
> one of the objects that got removed, it would keep the ArrayList from being
> GC'd.  We added listeners, so we should remove them.  If the data objects
> are going away too, then you can probably reset the source, but if you see a
> memory leak later, I'd definitely check in that area.
>
>
>  --
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Arpit Mathur
> *Sent:* Thursday, February 14, 2008 8:27 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Performance difference between
> ArrayCollection.removeAll() and ArrayCollection.source = []
>
>
>
> I was trying to debug an issue with the LogBook application we released a
> couple of days back. If you take a look at the interface on the main page at
> http://cimlogbook.googlecode.com (or if you have installed the
> application), you will see a clear logs button. Clicking on that clears an
> ArrayCollection that holds a series of LogObjects by calling a removeAll()
> function. However we got a bug saying the application would almost hang if
> it tried to clear a lot of messages. A quick patch was to reset the source
> like so:  arrayCollection.source = [] . The performance became lightning
> fast.
>
> Looking deeper into the removeAll function and following the hierarchy to
> the ArrayList class, I see that the removeAll loops through the entire
> array, looking at each member to see if its an event dispatcher and if so
> calling a function to remove the propertyChange listener.
> Why is this implemented this way ? Is there any reason I shouldnt just use
> source = [] to reset the array ?
>
> Thanks
>
>
> --
> Arpit Mathur
> Lead Software Engineer,
> Comcast Interactive Media
> ---
> post your flex tips on
> http://flextips.corank.com
> 
>



-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


[flexcoders] Performance difference between ArrayCollection.removeAll() and ArrayCollection.source = []

2008-02-14 Thread Arpit Mathur
I was trying to debug an issue with the LogBook application we released a
couple of days back. If you take a look at the interface on the main page at
http://cimlogbook.googlecode.com (or if you have installed the application),
you will see a clear logs button. Clicking on that clears an ArrayCollection
that holds a series of LogObjects by calling a removeAll() function. However
we got a bug saying the application would almost hang if it tried to clear a
lot of messages. A quick patch was to reset the source like so:
arrayCollection.source = [] . The performance became lightning fast.

Looking deeper into the removeAll function and following the hierarchy to
the ArrayList class, I see that the removeAll loops through the entire
array, looking at each member to see if its an event dispatcher and if so
calling a function to remove the propertyChange listener.
Why is this implemented this way ? Is there any reason I shouldnt just use
source = [] to reset the array ?

Thanks


-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


[flexcoders] Performance difference between ArrayCollection.removeAll() and ArrayCollection.source = []

2008-02-14 Thread Arpit Mathur
I was trying to debug an issue with the LogBook application we released a
couple of days back. If you take a look at the interface on the main page at
http://cimlogbook.googlecode.com (or if you have installed the application),
you will see a clear logs button. Clicking on that clears an ArrayCollection
that holds a series of LogObjects by calling a removeAll() function. However
we got a bug saying the application would almost hang if it tried to clear a
lot of messages. A quick patch was to reset the source like so:
arrayCollection.source = [] . The performance became lightning fast.

Looking deeper into the removeAll function and following the hierarchy to
the ArrayList class, I see that the removeAll loops through the entire
array, looking at each member to see if its an event dispatcher and if so
calling a function to remove the propertyChange listener.
Why is this implemented this way ? Is there any reason I shouldnt just use
source = [] to reset the array ?

Thanks


-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


[flexcoders] Released LogBook, an open source AIR app for the Flex Logging framework

2008-02-14 Thread Arpit Mathur
Hi,

I just thought you guys may be interested in knowing that the team at
Comcast Interactive Media yesterday released LogBook, a tool to aid Flex
development. LogBook is released under the MIT license and is hosted at
http://cimlogbook.googlecode.com.

A detailed writeup can be found at http://teamcim.comcast.net/team/flash/

I look forward to hearing your opinions and feature requests /  bug reports
(and if  I am lucky,  patches ;) ).

Cheers.

-arpit


-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


Re: [flexcoders] Can not add a "Loader" object to a container

2007-10-19 Thread Arpit Mathur
this.rawchildren.addChild(loader)

Containers can only add Flex components to the displaylist. Loader is a low
level actionscript object.

Using rawchildren, u can add the loader but you have to be responsible for
the sizing etc.




On 10/19/07, anewgene <[EMAIL PROTECTED]> wrote:
>
>   Hi,
> I am trying to add external swf into my app. Based on the doc at:
>
> http://livedocs.adobe.com/labs/flex3/html/help.html?
> content=Working_with_MovieClips_8.html
>
> I created this minimal test code (as below). But I can not make it
> work (Type Coercion error). The code and the error are pasted here. I
> have tested on both flex3beta2 and flex2hotfix3.
>
> Can someone help me out? Thanks.
>
> Lei
>
> Code:
> =
> 
> http://www.adobe.com/2006/mxml";
> layout="absolute" creationComplete="init()" >
>
> 
> 
> 
>
> 
>
> =
> Error:
>
> [SWF] X:\cvs\test2\bin\loadertest.swf - 516,787 bytes after
> decompression
> TypeError: Error #1034: Type Coercion failed: cannot convert
> flash.display::[EMAIL PROTECTED] to mx.core.IUIComponent.
> at
> mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::addingC
> hild()[E:\dev\flex_3_beta2
> \sdk\frameworks\projects\framework\src\mx\core\Container.as:3288]
> at mx.core::Container/addChildAt()[E:\dev\flex_3_beta2
> \sdk\frameworks\projects\framework\src\mx\core\Container.as:2248]
> at mx.core::Container/addChild()[E:\dev\flex_3_beta2
> \sdk\frameworks\projects\framework\src\mx\core\Container.as:2188]
> at loadertest/init()[X:\cvs\test2\src\loadertest.mxml:14]
> at loadertest/___loadertest_Application1_creationComplete()
> [X:\cvs\test2\src\loadertest.mxml:2]
> at flash.events::EventDispatcher/dispatchEventFunction()
> at flash.events::EventDispatcher/dispatchEvent()
> at mx.core::UIComponent/dispatchEvent()[E:\dev\flex_3_beta2
> \sdk\frameworks\projects\framework\src\mx\core\UIComponent.as:8915]
> at mx.core::UIComponent/set initialized()[E:\dev\flex_3_beta2
> \sdk\frameworks\projects\framework\src\mx\core\UIComponent.as:1118]
> at mx.managers::LayoutManager/doPhasedInstantiation()
> [E:\dev\flex_3_beta2
> \sdk\frameworks\projects\framework\src\mx\managers\LayoutManager.as:69
> 6]
> at Function/http://adobe.com/AS3/2006/builtin::apply()
> at mx.core::UIComponent/callLaterDispatcher2()
> [E:\dev\flex_3_beta2
> \sdk\frameworks\projects\framework\src\mx\core\UIComponent.as:8338]
> at mx.core::UIComponent/callLaterDispatcher()
> [E:\dev\flex_3_beta2
> \sdk\frameworks\projects\framework\src\mx\core\UIComponent.as:8281]
>
> 
>



-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


Re: [flexcoders] Filtering out list items?

2007-10-06 Thread Arpit Mathur
Use ArrayCollection  as the dataProvider and use the filter function. Bind
the List's dataProvider to the output of the filter.


On 10/5/07, Robert Csiki <[EMAIL PROTECTED]> wrote:
>
>Hello,
>
> I have a List using a custom component as item renderer. I want some
> items not to be displayed, based on a criteria that's contained by the cell
> item itself.
>
> 
>
> Playing with the "visible" attribute of the custom cell renderer root
> component did not do the trick. how can make this happen?
>
> Thanks, Robert
>
> 
>



-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


[flexcoders] how do I trigger measure (while laying out UIComponents in actionscript)

2007-10-05 Thread Arpit Mathur
I have tried this code for way too long and am ready to throw in the towel,
so I am really hoping one of you can help me:

I have a custom component based on Canvas that I want to accept a series of
UIComponents as children based on an array of data sent in. So here is how
my code is layed out:

1) I have a set dataProvider() function that accepts an array. If the array
is new, it sets it as an internal variable ( _dataprovider ) and calls
invalidateProperties()

2) In my commitProperties code, I loop through the array and for each member
create an instance of the UIComponent that will represent the data. I also
add them as children calling addChild(). I push all instances created into
another array (called markers).I then call invalidateDisplaylist()

3) In my updateDisplaylist, I check position the instances held on the
markers array.


Here is the clincher: I cant see the instances created since their width and
height is 0. I want to set their width and height based on their
measuredWidth and height. But thats 0. Tracing their initialized status
returns false. How do I trigger them to call their measure()  function???
PLease dont say call invalidateSize()  since I have done that and it doesnt
work. I tried calling validateNow() but that seems to hang my computer.

help !



-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


Re: [Flexcoders]: Flex site not loading in Internet Explorer 6 (IE6)

2007-09-30 Thread Arpit Mathur
Do you have real player installed? Real Player sometimes ends up breaking
Flex applications.



On 9/28/07, devenhariyani <[EMAIL PROTECTED]> wrote:
>
>   Hi guys,
>
> thanks for the feedback so far, I've been trying to debug this issue
> for the last 4 days but I still haven't had any luck. I'm new to
> flex, so I'm not sure what "rsls dependencies" are, but I do have a
> Ruby on Rails with MySQL on the backend. Here is some more info on
> my client environment:
>
> The Client_Machine_A that does not load the flex site has IE 6, and
> this is also my development machine, so loading the flex sites on
> localhost works without any problems
> (http://localhost:3000/bin/myFlexApp.html). I'm using
> Client_Machine_A to build and debug the flex application. However,
> the same site does not work once I deploy to the hosted environment.
>
> The user account I'm using has full Administrator permissions on
> Client_Machine_A, and I also checked that I have Flash player 9.0.47
> installed.
>
> Thanks in advance,
> Deven Hariyani
>
> --- In flexcoders@yahoogroups.com , Sheriff
> <[EMAIL PROTECTED]> wrote:
> >
> >
> > what u need to do is run IE as admin other wise it wont work and
> neither will flash. IE6 and forward
> > - Original Message 
> > From: EECOLOR <[EMAIL PROTECTED]>
> > To: flexcoders@yahoogroups.com 
> > Sent: Friday, September 28, 2007 3:24:35 PM
> > Subject: Re: [Flexcoders]: Flex site not loading in Internet
> Explorer 6 (IE6)
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > We have had strange problems in IE 6 and Flash
> players below 9.0.28.
> >
> >
> > Greetz Erik
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 
> >
> >
> >
> > 
> >
> >
> >
> > 
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> __
> ___
> > Be a better Heartthrob. Get better relationship answers from
> someone who knows. Yahoo! Answers - Check it out.
> > http://answers.yahoo.com/dir/?link=list&sid=396545433
> >
>
>  
>



-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


Re: [flexcoders] flex 3 requirements?

2007-09-25 Thread Arpit Mathur
big warning here:
While Flex 3 may work on 9, there are api's on the flash player
(specifically the addedToStage event) that werent in player 9.0. So you get
code hints for that but if you use that in your app, it will break on player
9.



On 9/26/07, Matt Chotin <[EMAIL PROTECTED]> wrote:
>
>In my What's New article, as well as the System Requirements that are
> part of the release notes I think.
>
>
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *aaron smith
> *Sent:* Tuesday, September 25, 2007 9:53 AM
> *To:* flexcoders@yahoogroups.com
> *Subject:* Re: [flexcoders] flex 3 requirements?
>
>
>
> Thanks Matt! Is that documented anywhere, I probably missed it?
>
> On 9/24/07, *Matt Chotin* <[EMAIL PROTECTED]> wrote:
>
> All versions of Player 9 should work with Flex 3.
>
>
>
> Matt
>
>
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *aaron smith
> *Sent:* Monday, September 24, 2007 11:05 AM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] flex 3 requirements?
>
>
>
> Is there a specific version of the flash player that is required for flex
> 3? Didn't see it on Labs, I was curious as flex 3 has a lot I want to use in
> an upcoming project, but the site needs to run in 9.0. Not a minor
> version.
>
>
>
>   
>



-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


Re: [flexcoders] help! components getting scrollbars in website?

2007-09-25 Thread Arpit Mathur
Use your image as a borderSkin for a canvas container. Do not give the
container any height properties (height or percentHeight) and the container
should grow the contents measured height.

On 9/25/07, grimmwerks <[EMAIL PROTECTED]> wrote:
>
>Yeah, found that after I posted (as always)
>
> I'm trying to understand the scale9 thing: if my component is an image
> (with header, footer and middle) and I've a text area in the middle -- I
> want to keep the header and footer as no scale, but would scale the middle
> area -- however the TextArea in it should NOT scale, but meet the bottom of
> the header and top of the footer - does that make sense?
>
> Would I have to programmitically drop the TextArea in or is there
> something I can set for the TextArea to meet the component's scale9's?
>
>
> On Sep 25, 2007, at 12:23 PM, Alex Harui wrote:
>
> if your comps are based on containers then scrollpolicy should work.
> Otherwise, it may be that the app size is too big
>
>  --
> *From:* flexcoders@yahoogroups.com 
> [mailto:flexcoders@yahoogroups.com]
> *On Behalf Of *grimmwerks
> *Sent:* Tuesday, September 25, 2007 9:08 AM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] help! components getting scrollbars in website?
>
>  I've created my own components in a larger app that is going to the web.
>
> For some users with a lower resolution monitor, these components are
> popping in with their own scrollbars.
>
> My question is twofold:
>
> 1) how can I make sure that the components never show a scroll
> (assuming it's something like horizontalScrollPolicy, etc)
> 2) how can I make these components scale down to fit the larger 'stage'?
>
> It's strange, since the components aren't being used in the starting
> state, when they're 'popped in' - - then the browser's scroll is
> initiated; quite different from Flash.
>
> Thanks
>
>
>  
>



-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


Re: [flexcoders] Are you going to MAX?

2007-09-23 Thread Arpit Mathur
I am there :)



On 9/23/07, Ed Capistrano <[EMAIL PROTECTED]> wrote:
>
>   Okay, I will not be there guys just give my thanks to
> those @ adobe for developing such a nice app..
>
> Ed™
> Proud & Happy Member
> --- flexcoders@yahoogroups.com 
> <[EMAIL PROTECTED]>
> wrote:
> > I will be there!
> >
> > Dimitrios Gianninas
> > Development Team Lead / Moderator
> > Optimal Payments Inc.
> >
> >
> > 
> >
> > From: flexcoders@yahoogroups.com 
> [mailto:flexcoders@yahoogroups.com ] On Beh
> > alf Of ben.clinkinbeard
> > Sent: Friday, September 21, 2007 9:44 AM
> > To: flexcoders@yahoogroups.com 
> > Subject: [flexcoders] Are you going to MAX?
> >
> >
> >
> > Just curious how many people from the list will be
> in Chicago.
> >
> > Ben
> >
> >
> >
> >
> >
> > --
> > WARNING
> > ---
> > This electronic message and its attachments may
> contain confidential, propr
> > ietary or legally privileged information, which is
> solely for the use of th
> > e intended recipient. No privilege or other rights
> are waived by any unint
> > ended transmission or unauthorized retransmission of
> this message. If you
> > are not the intended recipient of this message, or
> if you have received it
> > in error, you should immediately stop reading this
> message and delete it an
> > d all attachments from your system. The reading,
> distribution, copying or
> > other use of this message or its attachments by
> unintended recipients is un
> > authorized and may be unlawful. If you have
> received this e-mail in error,
> > please notify the sender.
> >
> > AVIS IMPORTANT
> > --
> > Ce message électronique et ses pièces jointes
> peuvent contenir des rens
> > eignements confidentiels, exclusifs ou légalement
> privilégiés destin
> > és au seul usage du destinataire visé. L'expéditeur
> original ne reno
> > nce à aucun privilège ou à aucun autre droit si le
> présent message
> > a été transmis involontairement ou s'il est
> retransmis sans son autoris
> > ation. Si vous n'êtes pas le destinataire visé du
> présent message ou
> > si vous l'avez reçu par erreur, veuillez cesser
> immédiatement de le li
> > re et le supprimer, ainsi que toutes ses pièces
> jointes, de votre systè
> > me. La lecture, la distribution, la copie ou tout
> autre usage du présent
> > message ou de ses pièces jointes par des personnes
> autres que le destina
> > taire visé ne sont pas autorisés et pourraient être
> illégaux. Si v
> > ous avez reçu ce courrier électronique par erreur,
> veuillez en aviser l
> > 'expéditeur.
> >
>
> __
> Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated
> for today's economy) at Yahoo! Games.
> http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow
>
> 
>



-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


Re: [flexcoders] JPGEncoder with progress support?

2007-09-23 Thread Arpit Mathur
on using timer for screen updates: Is there any advantage (or disadvantage)
of that vs. callLater ?



On 9/23/07, Gordon Smith <[EMAIL PROTECTED]> wrote:
>
>   > the corelib version
> This class is now an official part of Flex 3:
> mx.graphics.codec.JPEGEncoder.
>
> - Gordon
>
>  --
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Jon Bradley
> *Sent:* Saturday, September 22, 2007 11:03 AM
> *To:* flexcoders@yahoogroups.com
> *Subject:* Re: [flexcoders] JPGEncoder with progress support?
>
>
>
> Sure does Doug! Thanks for the tips.
>
> I'm actually re-writing the corelib version now to make it more efficient
> for larger images. Right now encoding a 2k image takes much longer than I'm
> happy with. :)
>
>
> I was doing a bit more research and will be breaking it up into 'chunks'
> with progress events, hopefully.
>
>
> If I get a good result I'll post back the code to the corelib project.
>
>
> peace,
>
>
> jon
>
>
>
>  On Sep 22, 2007, at 1:38 PM, Doug McCune wrote:
>
> This is doable, but requires a little more work than you probably think.
> To do this you would modify JPEGEncoder, if you're using Moxie take a look
> at the JPEGEncoder class around line 121. You'll see this double for loop:
>
> for (var ypos:int = 0; ypos < height; ypos += 8)
> {
> for (var xpos:int = 0; xpos < width; xpos += 8)
> {
> RGB2YUV(source, xpos, ypos, width, height);
> DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);
> DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);
> DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);
> }
> }
>
> As far as I can tell that's where the bulk of the processing happens. What
> you're going to want to do is add progress events dispatching in there. But
> simply dispatching progress events isn't going to be enough. That would
> effectively give you notifications for progress of encoding, but since flash
> player is single threaded, your display won't ever have time to update while
> those for loops are running.
>
> So you'll need to split the processing up into smaller tasks and insert
> idle times between them. You'll want to use the Timer class to make your
> code wait for a given period (I've found that even just a few milliseconds
> is enough for the display to update).
>
> I would split up the algorithm to process one row at a time (so basically
> that inner for loop gets turned into its own function). Then have the
> function that processes a row start a timer once it's completed, and once
> that timer completes, then run the function for the next row and so on until
> you finish. That was you can dispatch a progress event for each row and the
> display will have time to update.
>
> Hope some of that makes sense.
>
> Doug
>
>
>
>
>  
>



-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


Re: [flexcoders] Memory usage by flex

2007-09-23 Thread Arpit Mathur
without knowing what you are doing, there may not be much that anyone can
point to.

One thing that does that is if you have drawing routines on the graphic
object in some updateDisplaylist handler. I did that on two occasions and am
much more sensitive to that now than before. Are you using any dynamic
drawing like lineTo, fills, etc?





On 9/23/07, mohneeshs <[EMAIL PROTECTED]> wrote:
>
>   Hi
>
> I am new to flex. I came across a behavior of flex memory usage for
> which i am not able to find any explanation . When i open my app in the
> browser the memory usage by the browser increases without performing
> any event on the app. I have all my listeners registered with weak
> references. I have seen this thing happening on Flex version 2, IE 6
> and firefox 2.
>
> Any pointers about what all can be the factors which will cause this?
>
> Thanks and Regards
>
> 
>



-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


Re: [flexcoders] Re: Real size of components

2007-09-22 Thread Arpit Mathur
Would this work?

component.percentWidth = 50
component.percentHeight = 50
component.validateSize()
trace(component.measuredWidth)

I have never really used the validation thing so I am curious. Its how I
would imagine it would work.



On 9/21/07, Gordon Smith <[EMAIL PROTECTED]> wrote:
>
>It sounds like you are expecting to set percentWidth and immediately
> have the width change. Flex visual components don't work like this.
> Typically when you set properties, the component enters a kind of "invalid"
> state until the LayoutManager updates it. If you wait until the component
> dispatches an updateComplete event, the width should then be correct.
>
> - Gordon
>
>
>  --
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Sandeep Malik
> *Sent:* Friday, September 21, 2007 6:57 AM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Re: Real size of components
>
>
>
> I guess you should use getExplicitOrMeasuredWidth() and
> getExplicitOrMeasuredHeight().
>
> Regards,
> Sandeep
>
> --- In flexcoders@yahoogroups.com , "
> ben.clinkinbeard"
> <[EMAIL PROTECTED]> wrote:
> >
> > measuredWidth and measuredHeight I think.
> >
> >
> > --- In flexcoders@yahoogroups.com ,
> "Daniel"  wrote:
> > >
> > > Hey guys...
> > >
> > > I'm setting the size of a panel through the percentWidth property, but
> > > when I ask for the width of the component it doesn't give me the real
> > > size... How can I know the real size when I set width and height
> > > through percentage?
> > >
> > > Thanx,
> > > DaNooB.
> > >
> >
>
> 
>



-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


Re: [flexcoders] image item renderer

2007-09-20 Thread Arpit Mathur
You dont have an updateDisplayList function where the you need to set the
image's sizes based on the unscaledWidth and unscaledHeight

override protected function updateDisplaylist(uw:Number, uh:Number):void{
super.updateDisplaylist(uw,uh)
image.width = uw;
image.height = uh
}


On 9/20/07, Dimitrios Gianninas <[EMAIL PROTECTED]>
wrote:
>
>Hi,
>
> Was wondering if someone knew the quick answer. In the attached item
> renderer code, it works if I extend Box...meaning I see the appropriate
> image display in my DG. However if I extend UIComponent, I see nothing.
> What plumbing code am I missing?
>
> *Dimitrios Gianninas*
> *Development Team Lead*
> *Optimal Payments Inc.*
>
>
> *AVIS IMPORTANT*
>
> *WARNING*
>
> Ce message électronique et ses pièces jointes peuvent contenir des
> renseignements confidentiels, exclusifs ou légalement privilégiés destinés
> au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun
> privilège ou à aucun autre droit si le présent message a été transmis
> involontairement ou s'il est retransmis sans son autorisation. Si vous
> n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu
> par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi
> que toutes ses pièces jointes, de votre système. La lecture, la
> distribution, la copie ou tout autre usage du présent message ou de ses
> pièces jointes par des personnes autres que le destinataire visé ne sont pas
> autorisés et pourraient être illégaux. Si vous avez reçu ce courrier
> électronique par erreur, veuillez en aviser l'expéditeur.
>
> This electronic message and its attachments may contain confidential,
> proprietary or legally privileged information, which is solely for the use
> of the intended recipient. No privilege or other rights are waived by any
> unintended transmission or unauthorized retransmission of this message. If
> you are not the intended recipient of this message, or if you have received
> it in error, you should immediately stop reading this message and delete it
> and all attachments from your system. The reading, distribution, copying or
> other use of this message or its attachments by unintended recipients is
> unauthorized and may be unlawful. If you have received this e-mail in error,
> please notify the sender.
>
> 
>
>


-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


[flexcoders] addChildAction and creationCompleteEffect

2007-09-19 Thread Arpit Mathur
I am using the states and transitions for the first time and have most
of it nailed down. One thing I cant get working is addChildAction.

When my application reaches a state that has a new component that
needs adding, I use the addChildAction tag in my transition tag, but
my Fade effect set as the creationCompleteEffect is not triggered. Is
there some other way I should be using it ?

-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


Re: [flexcoders] nulling primitive data types

2007-09-18 Thread Arpit Mathur
I forget the case for boolean but the null equivalent (ie declared but no
value) of Number is NaN. Wouldnt that work for you ?



On 9/18/07, Samuel R. Neff <[EMAIL PROTECTED]> wrote:
>
>
> We use xxx.MIN_VALUE to represent null on both client and server (.NET).
> We've been doing it in .NET for several years and now with Flex
> integration
> it works very well. Of course everyone needs to recognize that MIN_VALUE
> is
> being used this way and if you actually had to store MIN_VALUE then you
> have
> a problem, but we've never had the need.
>
> Of course this doesn't work for Boolean, so for Boolean if you need
> nullable
> then declare as int instead and use int.MIN_VALUE for null, 0 for false,
> everything else for true.
>
> .NET itself now has nullable types which would be more elegant but they
> have
> performance implications and would not provide as good interoperability
> with
> Flex.
>
> HTH,
>
> Sam
>
> ---
> We're Hiring! Seeking a passionate developer to join our team building
> Flex
> based products. Position is in the Washington D.C. metro area. If
> interested
> contact [EMAIL PROTECTED] 
>
> -Original Message-
> From: flexcoders@yahoogroups.com  [mailto:
> flexcoders@yahoogroups.com ] On
> Behalf Of merelypixels
> Sent: Tuesday, September 18, 2007 1:16 PM
> To: flexcoders@yahoogroups.com 
> Subject: [flexcoders] nulling primitive data types
>
> Hello All,
> I've been running into a rather frustrating issue with flex: namely
> that although data types are supposedly implemented as AS classes, you
> cannot null variables of primitive data types e.g.
>
> var blah:int = null; //blah == 0
> var blah:Number = null; //blah == 0
> var blah:Boolean = null; //blah == false
>
> admittedly we can define -1 as null for non-Boolean types, but what if
> a negative number becomes a logical value in some case?
>
> now this wouldn't be a problem if we didn't have to communicate with a
> SQL back-end, but sometimes I need to be able to pass a null value to
> the db either to signify that the current value shouldn't be changed
> or to specify that information is not currently known for the value.
>
> ...
>
> Thanks for your time,
> Pixels
>
> 
>



-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


Re: [flexcoders] Fill outline of a Sprite

2007-09-15 Thread Arpit Mathur
var s:Sprite = mysprite;
s.graphics.lineStyle(1);
s.graphics.drawRect(0,0,s.width, s.height)

that would work to get the bounds(rectangle)

If you just want an outline of the actual sprite itself, you may consider
using a 1pixel outer glow filter.



On 9/14/07, Jon Bradley <[EMAIL PROTECTED]> wrote:
>
>
>  On Sep 14, 2007, at 12:32 PM, Troy Gilbert wrote:
>
> You're missing his point: he's got a shape (probably created in Flash)
> exported as an SWF, but its just an outline, and he wants to fill it.
>
> The answer: sorry, can't do it. You can't modify vector information
> exported out of Flash as an SWF. The vectors are all stored in MorphShapes
> which cannot be created at the ActionScript level and are relatively opaque.
>
>
> The only way you'd be able to do this would be to render the shape to a
> bitmap then do a flood fill (and hope that your shape is closed). So,
> something like this:
>
>
>
>
> Or read in a shape as an SWF file and figure out where the shape data is
> stored - parsing it out of a ByteArray.
>
>
> I'm working on trying to figure that out right now. Taking some serious
> diving in to the SWF spec to see how things are written into the file. It
> *should* be entirely possible to regenerate saved vector data from an SWF
> file (filling it back in once you have the path data).
>
>
> If I have success with reading vector data out of an SWF then I'll be a
> happy camper...
>
>
> - j
>
> 
>



-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


Re: [flexcoders] Getting two tooltips on same label ?

2007-09-05 Thread Arpit Mathur
Set your horizontalList's toolTip property to null (or "", I forget
which). Then the only tips that should be seen will be the ones you
explicitly create. Also if you are using an itemRenderer, set its
toolTip property to null as well.

On 9/2/07, Alex Harui <[EMAIL PROTECTED]> wrote:
> Hard to say without seeing your code.  Did you turn on datatips?
>
> 
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of arpan srivastava
> Sent: Sunday, September 02, 2007 1:51 AM
> To: Flex Coders
> Subject: [flexcoders] Getting two tooltips on same label ?
>
>
>
> Hi All,
>
> I have created a ticker type application in which I scroll labels
> inside a HorizontalList. When I enter a long text in the label like of
> 200 words, and I move my mouse over that label I get two same tooltips,
> one after another. The other tooltip shows after the time set in
> showDelay property and shows up at a slightly different position. I am
> manually creating tootip using ToolTipManager.createToolTip(). I have
> checked my code and the function where I am creating tooltip is called
> only once. Can you tell where the problem is and how to solve ?
>
> Thanks
> Arpan
>
>
> 
>
> Building a website is a piece of cake.
> Yahoo! Small Business gives you all the tools to get online.
> <http://us.rd.yahoo.com/evt=48251/*http://smallbusiness.yahoo.com/webhos
> ting/?p=PASSPORTPLUS>
>
>
>


-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


[flexcoders] Recovering from videodisplay errors?

2007-09-05 Thread Arpit Mathur
We have an online video player application that uses the VideoDisplay
component and plays a series of videos one after another. The videos
could be coming from diverse rtmp or progressive download servers.

Every once in a while the VideoDisplay goes into a disconnected state
or a ConnectionError state. The player becomes unresponsive then and
clicking on the next video doesnt play the next video either. How do I
recover from such situations?

-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


Re: [flexcoders] filterFunction on ArrayCollection

2007-08-26 Thread Arpit Mathur
make sure you have a crossdomain.xml file on ur server

On 8/26/07, Tracy Spratt <[EMAIL PROTECTED]> wrote:
>
>"Works local but not on server" often indicates a security issue.  Are
> you sure you are getting your data?
>
>
>
> Also, this is probably not the best thing:
>
> playlist=userRequest.lastResult.videolink.video
>
>
>
> Use a result handler function to assign the event.result(don't use
> lastResult, it is intended for binding espressions) to a local variable.
> The result handler will also let you verify that/when your data result is
> returned.
>
>
>
> Tracy
>
>
>  --
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Ary
> *Sent:* Sunday, August 26, 2007 6:07 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* RE: [flexcoders] filterFunction on ArrayCollection
>
>
>
> Hi Alex, thx for replying, yes i thought so too...but
> if it is...it won't work on local either..but it works
> on localhost...
>
> here's the code
> private function startFilter(toFilter:String):void {
> categoryString=toFilter;
> tabSwitch(toFilter);
> playlist=userRequest.lastResult.videolink.video
> playlist.filterFunction=processFilter;
> playlist.refresh();
> dgUserRequest.selectedIndex=0;
> }
>
> private function processFilter(item:Object):Boolean
> {
> var result:Boolean=false;
> if (!item.videocategory.length ||
> item.videocategory.toUpperCase().indexOf(categoryString)
> >= 0){
> result=true;
> }
> return result;
> }
>
> and here is the httpservice, trigerred on
> creationComplete app. userRequest.send();
>  useProxy="false" method="POST"
> result="playlist=userRequest.lastResult.videolink.video"
> >
>
> thanks!
> ary
>
> --- Alex Harui <[EMAIL PROTECTED] > wrote:
>
> > please post some code. Sounds like you might be
> > filtering before the
> > results come back from the server.
>
> __
> Need a vacation? Get great deals
> to amazing places on Yahoo! Travel.
> http://travel.yahoo.com/
>
>  
>



-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


Re: [flexcoders] Flex 3 fractional scroll on List?

2007-06-14 Thread Arpit Mathur

i would just accept it as a feature that works ONLY for fixed row height
lists.



On 6/14/07, Matt Chotin <[EMAIL PROTECTED]> wrote:


   Yeah, turns out my article was occasionally a little "forward-thinking"
:-)

 --
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Alex Harui
*Sent:* Thursday, June 14, 2007 1:12 PM
*To:* flexcoders@yahoogroups.com
*Subject:* RE: [flexcoders] Flex 3 fractional scroll on List?



 Still planned, not committed, not in this beta.

 --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Jon Bradley
*Sent:* Thursday, June 14, 2007 1:09 PM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] Flex 3 fractional scroll on List?

  OK ... I can absolutely find zero information on this, either in the
documentation or on the release notes.

The only mention of it was in Matt Chotin's article on 
Adobe.com<http://adobe.com/>
.

I'm actually more interested in finding out whether or not Adobe
added fractional / smooth scrolling to not only the List and DataGrid
but the TileList as well.

Anyone with an idea of these new implementations? I can't stand the
current List functionality and would love to find a way around the
cell-level scrolling if I can without re-writing a ton of code of
course :).

Right now I'm stuck with Tile and Repeater, which works but lacks a
lot of functionality.

cheers,

jon

  





--
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


Re: [flexcoders] Re: Show incremental numeric index in a List

2007-06-14 Thread Arpit Mathur

I had to implement this for a project.
Check out:
http://www.arpitonline.com/blog/?p=42<http://www.arpitonline.com/blog/downloads/numberedList2/>

On 6/14/07, Alex Harui <[EMAIL PROTECTED]> wrote:


   updateDisplayList is for updating all visuals including the text in
labels.  I think I would call itemRendererToIndex in updateDisplayList and
modify the text at that time.  Actually, I'd probably have a separate label
just for the number and modify that.


 --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *williamkusumo
*Sent:* Thursday, June 14, 2007 12:44 PM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] Re: Show incremental numeric index in a List



Thanks for the feedback, guys!

I implemented IDropInListItemRenderer and got ahold of listData.owner.
You are right, itemRendererToIndex(...) will get you the correct index.

The trouble now is how do I bind the result of itemRendererToIndex to
a label inside the itemRenderer so that it automatically updates when
the dataProvider is changed?

You mentioned overriding updateDisplayList(), isn't that function
related more to updating the styles?

Thanks again!

--- In flexcoders@yahoogroups.com , "Alex
Harui" <[EMAIL PROTECTED]> wrote:
>
> You can implement IDropInListItemRenderer in your HBox if you want.
>
>
>
> You can also assume that "owner" is the List and call
> itemRendererToIndex in an override of updateDisplayList().
>
>
>
> 
>
> From: flexcoders@yahoogroups.com  [mailto:
flexcoders@yahoogroups.com ] On
> Behalf Of williamkusumo
> Sent: Wednesday, June 13, 2007 5:53 PM
> To: flexcoders@yahoogroups.com 
> Subject: [flexcoders] Re: Show incremental numeric index in a List
>
>
>
> A quick note: The itemRenderer is based on HBox. So it does not
> implement IDropInListItemRenderer, thus I don't have reference to
> listData.
>
> --- In flexcoders@yahoogroups.com 40yahoogroups.com>
> , "williamkusumo" 
> wrote:
> >
> > Hi!
> >
> > I have a List bounded to a dataProvider and an itemRenderer. Could
> > anyone advice me on how I can insert an incremental numeric index in
> > each list item (1, 2, 3, and so on)? This list can be re-arranged via
> > drag-n-drop, so I can't put the index as part of the data.
> >
> > Any help will be greatly appreciated.
> >
> > Thanks!
> >
>

 





--
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


Re: [flexcoders] Re: Deleting an Item from a List

2007-06-14 Thread Arpit Mathur

In your renderer, on the close action, add the following code:


var list:List = this.owner as List;
 var dataIndex:Number = list.itemRendererToIndex(this)

list.dataProvider.removeItemAt(dataIndex);

Let me know if this works.



-a



On 6/14/07, sreeni_r <[EMAIL PROTECTED]> wrote:



Here is a sample I wrote doing the deletion.



























The idea is to use the data object passed to a itemRenderer. This data
represents a item in the data provider. You can use the IList APIs on
the dataProvider to find the index and remove the item.

As I defined the itemRenderer inline I am using the outerDocument
property to access the list parent.

Let me know if it works for you.

-Sreenivas

--- In flexcoders@yahoogroups.com ,
"williamkusumo" <[EMAIL PROTECTED]>
wrote:
>
> Hi!
>
> I have a List (populated via a dataProvider) and in each of the list
> items, I have a "Close" button. What is the best way to remove the
> item when the "Close" button is clicked? I understand I must remove
> the data from the dataProvider instead of just deleting the list item,
> but how do you get the index of the list item based on which button is
> clicked?
>
> I have tried using the list's selectedIndex, but that's not really how
> you want to do it because the list item won't necessarily be the one
> selected when the "close" button is clicked (it'll screw up if you use
> keyboard to navigate to the button)
>
> I have tried getting the list by using thebutton.parent.parent and
> then do a getChildIndex(...) passing in thebutton.parent. But all I
> got is the number "2" all the time no matter which item I clicked on.
>
> Any help will be greatly appreciated.
>
> Thanks!
>







--
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


Re: [flexcoders] Automated UI Testing for FLEX (Help!)

2007-06-09 Thread Arpit Mathur
we were thinking some kind of integration with selenium (the
javascript testing suite) using the Flex AJAX bridge.

-arpit


On 6/8/07, Karl Johnson <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
>
>
>
> Mercury Quick Test Pro (works with FDS's Automation API). Or you could write
> your own :-)
>
>
>
> FlexUnit is not really an automated UI testing solution, it unit tests the
> code.
>
>
>
> Karl
>
>
>
>
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Persaud, Anthony
>  Sent: Friday, June 08, 2007 2:53 PM
>  To: flexcoders@yahoogroups.com
>  Subject: [flexcoders] Automated UI Testing for FLEX (Help!)
>
>
>
>
>
>
>
>
> Other than FlexUnit, are there any other methods to perform automated UI
> testing for Flash/Flex applications?
>
>
>
> Thanks,
>
>
>
> Anthony
>
>
>
>
>
>
>  


[flexcoders] new site for flex tips and gotchas: flextips.corank.com

2007-06-09 Thread Arpit Mathur
Not to spam everyone here, but I have started a new site to archive
tips for flex developers: http://flextips.corank.com.  As we get our
questions answered on this mailing list I would appreciate if we could
post the answers on a blog or something and link to it from that site.
This way other developers can check that site for solutions and not
have to go through the pain a second time.

If you dont have a blog, please email me and I will put up the tip on
my blog and link to it crediting you with the story of course.

thanks
arpit


Re: [flexcoders] Making a flex app pretty

2007-06-09 Thread Arpit Mathur
Application.application.makeUgly = false;

lol...just kidding,

1) Use the style explorer as mentioned above to see what css styles
you can change (colors, cornerRadius, etc)

2) Import graphic elements from photoshop/flash and set them as skins
on the components

3) Use programmatic skins to create custom skins for your components

4) Use a skin developed by other people as a custom skin. There are a
few at scalenine.com



On 6/8/07, Joan Lafferty <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
>
>
>
> You can play with the Flex Style Explorer to mess with various styles on
> different components to see what you like. Then, copy the css that is
> generated to style your app.
>
>
>
> http://examples.adobe.com/flex2/consulting/styleexplorer/Flex2StyleExplorer.html
>
>
>
>  
>
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Michael Schmalle
>  Sent: Friday, June 08, 2007 12:54 PM
>  To: flexcoders@yahoogroups.com
>  Subject: Re: [flexcoders] Making a flex app pretty
>
>
>
>
>
>
> Imagination
>
>  Peace, Mike
>
>
> On 6/8/07, Christopher Olsen <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> What tool would one use to make a flex apps interface pretty?
>
>  -christopher
>
>
>
>
>  --
>  Teoti Graphix
>  http://www.teotigraphix.com
>
>  Blog - Flex2Components
>  http://www.flex2components.com
>
>  You can find more by solving the problem then by 'asking the question'.
>
>
>
>  


Re: [flexcoders] Bring To Front

2007-06-09 Thread Arpit Mathur
// get the window on the highest depth:

var topChild:DisplayObject = getChildAt(this.numChildren-1)
this.swapChildren(theWindowIWantToBringToTop, topChild)



On 6/9/07, Matthew Dahl <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
> I have a application I am creating that contains a few TitleWindows
>  that I have made draggable. Now I would like to make it so that when a
>  TitleWindow is clicked it is brought to the front. Does anyone know
>  how to achieve this. On one site they did Win.orderToFront(); but
>  orderToFront doesn't actually seem to be defined and no where in there
>  code did they define it. Thanks in advance,
>  Matt
>
>  


[flexcoders] as2 swf load flex 2 swf?

2007-06-07 Thread Arpit Mathur

This is downright weird. I cant seem to do a loadmovie on an flex 2 swf from
an as2 swf, even though the as2 swf is running on flash player 9. Is this a
known behavior?


Re: [flexcoders] mx:List: How do you get rid of the 1 pixel gap between item renderers?

2007-06-07 Thread Arpit Mathur

that works SWEET!! thanks.

On 6/7/07, Alex Harui <[EMAIL PROTECTED]> wrote:


   paddingTop/paddingBottom


 --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Arpit Mathur
*Sent:* Wednesday, June 06, 2007 9:45 PM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] mx:List: How do you get rid of the 1 pixel gap
between item renderers?



This has been asked in the group before but I havent seen an answer. Does
anyone know how to get rid of the 1 pixel gap between item renderers in a
list ? I think Flex is trying to ensure the highlighting (or rollover or
selected) works but I dont need the highlighting since the renderer itself
has a highlight look.

 



Re: [flexcoders] Re: ArrayCollection not working? Pulling out my HAIR!!!

2007-06-07 Thread Arpit Mathur

Would using an XMLListCollection help?
http://livedocs.adobe.com/flex/201/langref/mx/collections/XMLListCollection.html


On 6/7/07, Jason Ervin <[EMAIL PROTECTED]> wrote:


  If I can just get my xml into an array that would be great. I guess I
am going to have to skip ArrayUtil and hand code this as before with
proxyObject. Sure wish Adobe would update the arrayutil in Flex 3, or
better yet make importing data a drag and drop operation. Would make
this much simpiliar. Dragging in certain nodes from XML into an array
would ease the pain.

J

--- In flexcoders@yahoogroups.com , "Alex
Harui" <[EMAIL PROTECTED]> wrote:
>
> I don't think ArrayUtil is as smart as you wish it was. You may have to
> write your own conversion.
>
>
>
> 
>
> From: flexcoders@yahoogroups.com  [mailto:
flexcoders@yahoogroups.com ] On
> Behalf Of Jason Ervin
> Sent: Wednesday, June 06, 2007 6:50 PM
> To: flexcoders@yahoogroups.com 
> Subject: [flexcoders] Re: ArrayCollection not working? Pulling out my
> HAIR!!!
>
>
>
> Well I am using one data source via the singleton pattern as I have
> approx. 20 screen feeding of the xml data. I am sure xml will work
> with that. I wanted to use an Array or Arraycollection because I am
> going to be using several hsliders to splice the data in arrays.
>
> I think it would be easier with an array than xml. Do you have an
> example of how to splice up the data with xml rather than an array?
>
> Thanks in advance for any help.
>
> J
>
> --- In flexcoders@yahoogroups.com 40yahoogroups.com>

> , "Brendan Meutzner" 
> wrote:
> >
> > Any reason you're going through the trouble of converting to an
> > ArrayCollection? The following will work with your XML data just
> fine...
> >
> >  > showDataTips="true" paddingLeft="5" paddingRight="5" width="100%"
> > height="100%">
> > 
> > 
> > 
> > 
> >  xField="@account"
> > yField="electricitybillamount" />
> >  > yField="gasbillamount" />
> >  > yField="waterbillamount" />
> > 
> > 
> >
> >
> > Brendan
> >
> >
> >
> > On 6/6/07, Jason Ervin  wrote:
> > >
> > > Hey everyone I am having issues with using an arraycollection as a
> > > dataprovider. I start with an xml variable (see below) then I
> convert
> > > it to an ArrayCollection using ArrayUtil.toArray and I use the
> result
> > > as a dataprovider. If I trace the dataprovider it prints out the xml
> > > data, but my chart is empty. Can you use ArrayUtil on xml data with
> > > this many nodes? I have spent way to much time on this.
> > >
> > > Here is what I have starting with my XML file.
> > >
> > > XML CODE START
> > >
> > > public var billData:XML =
> > > 
> > > 
> > > May-05
> > > true
> > > 60.00
> > > 45.00
> > > 15.00
> > > 120.00
> > > 500
> > > 71.4
> > > 200
> > > 18.00
> > > 9.00
> > > 2.00
> > > 29.00
> > > 4.00
> > > 2.00
> > > 1.00
> > > 7.00
> > > 2.00
> > > 1.00
> > > .50
> > > 3.50
> > > 0.00
> > > 33
> > > 5/01/2007
> > > 155.00
> > > manual
> > > 152868
> > > 
> > > 
> > > Apr-05
> > > true
> > > 88.88
> > > 50.00
> > > 15.00
> > > 115.00
> > > 300
> > > 62.9
> > > 189
> > > 15.00
> > > 6.00
> > > 3.00
> > > 24.00
> > > 4.50
> > > 2.50
> > > 1.25
> > > 8.25
> > > 2.10
> > > 1.90
> > > .50
> > > 4.50
> > > 0.00
> > > 28
> > > 3/29/2007
> > > 155.00
> > > amr
> > > 150008
> > > 
> > > 
> > > Mar-05
> > > true
> > > 62.00
> > > 45.10
> > > 10.00
> > > 118.10
> > > 300
> > > 50.4
> > > 210
> > > 13.00
> > > 7.00
> > > 1.00
> > > 21.00
> > > 5.00
> > > 2.20
> > > 1.10
> > > 8.30
> > > 2.20
> > > 1.70
> > > .50
> > > 4.40
> > > ccoenraets@ 
> > > 0.00
> > > 30
> > > 3/01/2007
> > > 155.00
> > > manual
> > > 146968
> > > 
> > > 
> > > /* starting another xml document */
> > >
> > > /* public var billData2:XML =
> > > 
> > > 
> > > 
> > > true
> > > 60.00
> > > 45.00
> > > 15.00
> > > 120.00
> > > 500
> > > 71.4
> > > 200
> > > 18.00
> > > 9.00
> > > 2.00
> > > 29.00
> > > 4.00
> > > 2.00
> > > 1.00
> > > 7.00
> > > 2.00
> > > 1.00
> > > .50
> > > 3.50
> > > 0.00
> > > 33
> > > 5/01/2007
> > > 155.00
> > > manual
> > > 152868
> > > 
> > > 
> > > true
> > > 50.44
> > > 23.77
> > > 15.12
> > > 115.11
> > > 300
> > > 62.9
> > > 189
> > > 15.00
> > > 6.00
> > > 3.00
> > > 24.00
> > > 4.50
> > > 2.50
> > > 1.25
> > > 8.25
> > > 2.10
> > > 1.90
> > > .52
> > > 4.50
> > > 0.00
> > > 28
> > > 3/29/2007
> > > 155.00
> > > amr
> > > 150008
> > > 
> > > 
> > > true
> > > 62.00
> > > 45.10
> > > 10.00
> > > 118.10
> > > 300
> > > 50.4
> > > 210
> > > 13.00
> > > 7.00
> > > 1.00
> > > 21.00
> > > 5.00
> > > 2.20
> > > 1.10
> > > 8.30
> > > 2.20
> > > 1.70
> > > .50
> > > 4.40
> > > ccoenraets@ 
> > > 0.00
> > > 30
> > > 3/01/2007
> > > 155.00
> > > manual
> > > 146968
> > > 
> > > 
> > > 
> > > 
> > > true
> > > 12.34
> > > 45.00
> > > 15.00
> > > 120.00
> > > 500
> > > 71.4
> > > 200
> > > 18.00
> > > 9.00
> > > 2.00
> > > 29.00
> > > 4.00
> > > 2.00
> > > 1.00
> > > 7.00
> > > 2.00
> > > 1.00
> > > .50
> > > 3.50
> > > 0.00
> > > 33
> > > 5/01/2007
> > > 155.00
> > > manual
>

[flexcoders] mx:List: How do you get rid of the 1 pixel gap between item renderers?

2007-06-07 Thread Arpit Mathur

This has been asked in the group before but I havent seen an answer. Does
anyone know how to get rid of the 1 pixel gap between item renderers in a
list ? I think Flex is trying to ensure the highlighting (or rollover or
selected) works but I dont need the highlighting since the renderer itself
has a highlight look.


Re: [flexcoders] f2 b3 Sound busted ?

2006-05-09 Thread arpit mathur


Is it something I am doing wrong ? The sound class completely doesnt work for me anymore. I can see the sound loading but it doesnt play. The beta 3 sound example at http://livedocs.macromedia.com/labs/1/flex20beta3/langref//flash/media/Sound.html is not working for me.- Original Message From: Simeon Bateman <[EMAIL PROTECTED]>To: flexcoders@yahoogroups.comSent: Tuesday, May 9, 2006 10:33:41 AMSubject: Re: [flexcoders] cf flex intergration


Hey John,I posted on my blog about how I use ANT to compile flex 2.0 scripts for my mac.  I also have a post about setting up so remoting works here:
http://www.simb.net/blog/index.cfm/2006/3/1/Compiling-Mystic-Compatible-SWFs-with-AntIf you have any questions about getting that set up feel free to post them here or on the flexcf.net
 forums.Good Luck,simeonOn 5/9/06, JB <[EMAIL PROTECTED]> wrote:



Hi,
Does anybody know of any examples explaining
coldfusion & flex intergration? I was just able to
download Mystic on the Mac, but I am pretty lost on
how to intergrate the two.

Thank you very much for any help,
John

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt

Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com









  
  
SPONSORED LINKS
  
  
  


Web site design development
  
  

Computer software development
  
  

Software design and development
  
  



Macromedia flex
  
  

Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 

   To unsubscribe from this group, send an email to: 
[EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
.



  

















--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  












--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  








Re: [flexcoders] reading id3 tags off external mp3 files?

2006-05-08 Thread arpit mathur


Can anyone send me a quick example of how to read id3s on mp3s?...my code doesnt work and i am not sure waht i am doing wrong

-arpit\

- Original Message From: arpit mathur <[EMAIL PROTECTED]>To: flexcoders@yahoogroups.comSent: Sunday, May 7, 2006 6:27:18 AMSubject: [flexcoders] reading id3 tags off external mp3 files?hi allI have been trying to read id3 tags off an mp3 file but have been unable to do so. My code fires the ID3 handler unction but when at that moment i try to parse the id3 array of the sound object, it comes up as 0. its really frustrating. Is it something i am doing wrong ? Here is my code :                                     Any help would be
 appreciatedthanksarpit





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  












--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  








[flexcoders] reading id3 tags off external mp3 files?

2006-05-07 Thread arpit mathur


hi allI have been trying to read id3 tags off an mp3 file but have been unable to do so. My code fires the ID3 handler unction but when at that moment i try to parse the id3 array of the sound object, it comes up as 0. its really frustrating. Is it something i am doing wrong ? Here is my code :                                     Any help would be
 appreciatedthanksarpit





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.