[flexcoders] DisplayList order problem

2010-05-26 Thread Harbs
I'm trying to implement a tri-state checkbox. I found a previous implementation 
which was way to complicated for my taste. I have the implementation mostly 
done, but there's one issue which I'm having a hard time with:

I created a Sprite which draws the mid-state indicator over the checkbox icon. 
Moving the mouse over the checkbox or away from the checkbox seem to move the 
checkbox icon on top of my Sprite. I was able to handle the Mouse Overs by 
adding an additional MOUSE_OVER event which moves the Sprite back up to the top 
of the stack. For some reason this only works for MOUSE_OVER. I added a 
MOUSE_OUT event listener as well, which did not do anything. The icon still 
appears above the Sprite when the mouse moves away from the checkbox.

Any ideas why?

Thanks,
Harbs

[flexcoders] Re: DataGrid ItemRenderer Problem

2010-05-26 Thread jmfillman
Perfect thanks! Forgot all about outerDocument :-)

--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Try outerDocument
> 
> 
> On 5/25/10 10:16 PM, "jmfillman"  wrote:
> 
> 
> 
> 
> 
> 
> I have an itemRenderer:
> 
> 
>  
> 
>  useHandCursor="true" buttonMode="true" click="trace (parentDocument); 
> parentDocument.removeItem()"/>
> 
>  
> 
> When I first load the state where the DataGrid is, add items to the grid, 
> remove items from the grid, etc., the trace returns the root application 
> (My_Site). When I subsequently change states and then back to the state where 
> the DataGrid is located, the trace returns the container:
> 
> My_Site.ApplicationSkin2._ApplicationSkin_Group1.contentGroup._My_Site_SkinnableContainer1.mainContainer6
> 
> This causes an error, so the question is, how do I call the function 
> regardless.
> 
> 
> 
> 
> 
> 
> --
> Alex Harui
> Flex SDK Team
> Adobe System, Inc.
> http://blogs.adobe.com/aharui
>




[flexcoders] AIR file size limitation

2010-05-26 Thread kevinmacdonald98126
After encountering problems with our 600MB application I came across this post 
http://forums.adobe.com/message/820311, indicating that there is an unresolved 
problem with large AIR files. I was able to package and sign my application 
into a single AIR file, but it fails to install with the same errors 
encountered in that post.

This would appear to dash my hopes of using Adobe's side-car installers for Mac 
and Windows, which leaves me with the task of building installers myself. Ugh. 
Does anyone have thoughts on this? I'm exploring this product - 
http://shu-player.com/ - to see if it holds any promise. Does the AIR runtime 
have any sort of post-routine that can be hooked into to copy files from one or 
more CD/DVDs? 

Thanks

Kevin



[flexcoders] Problem building a very large AIR file

2010-05-26 Thread kevinmacdonald98126
We are building an educational product that is very rich in media. The entire 
product includes almost 25,000 files totally 600MB. Ideally, we want to bundle 
all this content with the AIR application into one big AIR file so that we can 
use Adobe's side-car installers for both Windows and Mac. We are, however, 
hitting a major technical hurdle. FlashBuilder 4 errors out during the Export 
Release Build process. The FlashBuilder log file is shown below.

I have tried increasing memory to the JVM by tweaking parameters in the 
FlashBuilder.ini file, however even giving the JVM the most memory it will 
accept this problem still persists. 

Is there any way to fix this? Should we be bundling our application 
differently? Could we start with a smaller content bundle and then unpack and 
re-pack the AIR file ourselves to include more files?

I think Adobe would want to know about this issue. I'm happy to provide more 
information.

Thanks very much. 

- FlashBuilder log ---
!ENTRY com.adobe.flexbuilder.project 4 43 2010-05-26 15:27:14.290
!MESSAGE Error
!STACK 0
java.lang.reflect.InvocationTargetException
at 
org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:479)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:944)
at 
com.adobe.flexbuilder.exportimport.releaseversion.ui.ExportReleaseVersionWizard.doPackage(ExportReleaseVersionWizard.java:265)
at 
com.adobe.flexbuilder.exportimport.releaseversion.ui.ExportReleaseVersionWizard.performFinish(ExportReleaseVersionWizard.java:105)
at 
org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:752)
at 
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
at 
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at 
com.adobe.flexbuilder.exportimport.releaseversion.ExportReleaseVersionAction$1.run(ExportReleaseVersionAction.java:97)
at 
com.adobe.flexbuilder.exportimport.releaseversion.ExportReleaseVersionAction.run(ExportReleaseVersionAction.java:103)
at 
org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
at 
org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
at 
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at 
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at 
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at 
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at 
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at 
com.adobe.flexbuilder.standalone.FlexBuilderApplication.start(FlexBuilderApplication.java:109)
at 
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at 
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at 
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at 
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at 
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.la

[flexcoders] Re: How to show a hand cursor when mouse over a control ?

2010-05-26 Thread itaid1


Nope, doesn't work.






--- In flexcoders@yahoogroups.com, Fotis Chatzinikos  
wrote:
>
> in flex 3 the hand curson needs mouseChildren = false not true...
> 
> Not sure if it applies to spark thought... give it a try
> 
> On Wed, May 26, 2010 at 11:07 AM, itaid1  wrote:
> 
> >
> >
> > If you mean mouseEnabled="true" (lowercase 'm', with quotations marks
> > around the boolean value) as shown below, then, it doesn't make it work,
> > otherwise please explain where to put 'MouseEnabled=true'.
> >
> >  > id="labelDisplay"
> > left="5"
> > fontSize="16"
> > fontWeight="bold"
> >
> > styleName.up="upStyle"
> > styleName.over="overStyle"
> > styleName.down="downStyle"
> > styleName.disabled="disabledStyle"
> > buttonMode="true"
> > useHandCursor="true"
> > mouseChildren="true"
> > mouseEnabled="true"
> > mouseOver="Mouse.cursor = MouseCursor.HAND;"
> > mouseOut="Mouse.cursor = MouseCursor.ARROW;"
> > />
> >
> > --- In flexcoders@yahoogroups.com , Alex
> > Harui  wrote:
> > >
> > > MouseEnabled=true?
> > >
> > >
> > > On 5/25/10 9:54 AM, "itaid1"  wrote:
> > >
> > >
> > >
> > >
> > >
> > >
> > > Hi
> > >
> > > I'm using this inside a spark skin class, but the mouse does not change
> > when hovering over the control.
> > >
> > > Tnx
> > >
> > > -Itai
> > >
> > >  > > id="labelDisplay"
> > > left="5"
> > > fontSize="16"
> > > styleName.up="upStyle"
> > > styleName.over="overStyle"
> > > styleName.down="downStyle"
> > > styleName.disabled="disabledStyle"
> > > buttonMode="true"
> > > useHandCursor="true"
> > > mouseChildren="true"
> > > mouseOver="Mouse.cursor = MouseCursor.HAND;"
> > > mouseOut="Mouse.cursor = MouseCursor.ARROW;"
> > > />
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Alex Harui
> > > Flex SDK Team
> > > Adobe System, Inc.
> > > http://blogs.adobe.com/aharui
> > >
> >
> >  
> >
>




Re: [flexcoders] How greedy/lazy is the GC?

2010-05-26 Thread Alex Harui
GC is lazy/opportunistic and doesn’t always collect everything.

If you have time read the various posts on my blog dealing with memory leaks 
and memory management.

--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui


On 5/26/10 4:46 PM, "rinogo2"  wrote:






Hi, all!

I've noticed some odd behavior with my flex/flash applications - it seems that 
as program execution continues, the flash runtime requires increasingly more 
memory, even if memory leaks are theoretically eliminated.

An example in one of my applications can be observed here:

http://featurific.com/files/tmp/flashLazyGc.jpg

The yellow line in this image tracks the memory usage of my program.  As you 
can see, at the time of this screenshot, 10 minutes of execution have elapsed 
and the VM is using ~443 Mb of memory*.

(*Note that in this instance, my program was running a 'stress test' designed 
to push the VM and my application to its limits - normal execution isn't nearly 
as memory/processor intensive)

As you can see in this image, the program starts out on the right side of the 
graph with a very small memory footprint.  Memory used steadily increases with 
long periods of overall consistency.  However, eventually, around what must be 
about 8:00 into the test, the memory usage drops significantly and then starts 
to climb again.

Its this final drop and the long periods of overall consistency that make me 
curious.  These characteristics seem to suggest that the memory usage of my 
program is not necessarily increasing due to memory leaks, but according to 
Flash's whims.  In my experience, memory leaks are usually accompanied by a 
*steady*, *unreversing* upward trend in memory usage.  However, in this 
scenario, memory usuage increases inconsistently and even drops (around 8 
minutes in the graph).

This brings me to my question - is this normal for the Flash VM?  My best guess 
for what is happening is that Flash is determining that my program is making 
many requests for memory, and that this memory is readily available (I'm 
developing with 8GB RAM).  So, it allocates memory according to my program's 
requests, and is lazy about freeing this memory when it is no longer in use 
(since memory seems to be abundant on my system).

This seems like a strange way to implement a VM, but then again, I've never 
written a garbage collector, so I'm obviously unqualified.  What do you all 
think is going on here?

Thanks so much in advance!
-Rich








Re: [flexcoders] Re: Update & Insert via DataServices

2010-05-26 Thread Evan Klein
No, Flex does not have DataService out of the box. It is part of LiveCycle
DataServices.

On Wed, May 26, 2010 at 7:37 PM, Stephen  wrote:

>
>
> So is this built into Flex Builder 4 or do I have to download something
> else?
>
>
> --- In flexcoders@yahoogroups.com , Evan
> Klein  wrote:
> >
> > You would use the dataservice.addItem() and dataService.deleteItem()
> > methods. Then, if autoCommit=true is not on you'll need to do a
> > dataService.commit() to send these transactions to the server.
> >
> > You'll need this - LCDS Manual:
> >
> http://help.adobe.com/en_US/LiveCycleDataServicesES/3.1/Developing/index.html
> > <
> http://help.adobe.com/en_US/LiveCycleDataServicesES/3.1/Developing/index.html
> >
> >
> > On Wed, May 26, 2010 at 10:02 AM, Stephen  wrote:
> >
> > >
> > >
> > > If I have list a table in a datagrid using data services in flex 4 how
> do I
> > > update insert or delete in that datagrid/table. Usually I use
> HTTPServices
> > > so have a array collection to work with but there is no array
> collection
> > > this time. all i have is an obj:Object containing the insert or update
> data?
> > >
> > >
> > >
> >
> >
> >
> > --
> > Evan Klein
> >
>
>  
>



-- 
Evan Klein


[flexcoders] How greedy/lazy is the GC?

2010-05-26 Thread rinogo2
Hi, all!

I've noticed some odd behavior with my flex/flash applications - it seems that 
as program execution continues, the flash runtime requires increasingly more 
memory, even if memory leaks are theoretically eliminated.

An example in one of my applications can be observed here:

http://featurific.com/files/tmp/flashLazyGc.jpg

The yellow line in this image tracks the memory usage of my program.  As you 
can see, at the time of this screenshot, 10 minutes of execution have elapsed 
and the VM is using ~443 Mb of memory*.

(*Note that in this instance, my program was running a 'stress test' designed 
to push the VM and my application to its limits - normal execution isn't nearly 
as memory/processor intensive)

As you can see in this image, the program starts out on the right side of the 
graph with a very small memory footprint.  Memory used steadily increases with 
long periods of overall consistency.  However, eventually, around what must be 
about 8:00 into the test, the memory usage drops significantly and then starts 
to climb again.

Its this final drop and the long periods of overall consistency that make me 
curious.  These characteristics seem to suggest that the memory usage of my 
program is not necessarily increasing due to memory leaks, but according to 
Flash's whims.  In my experience, memory leaks are usually accompanied by a 
*steady*, *unreversing* upward trend in memory usage.  However, in this 
scenario, memory usuage increases inconsistently and even drops (around 8 
minutes in the graph).

This brings me to my question - is this normal for the Flash VM?  My best guess 
for what is happening is that Flash is determining that my program is making 
many requests for memory, and that this memory is readily available (I'm 
developing with 8GB RAM).  So, it allocates memory according to my program's 
requests, and is lazy about freeing this memory when it is no longer in use 
(since memory seems to be abundant on my system).

This seems like a strange way to implement a VM, but then again, I've never 
written a garbage collector, so I'm obviously unqualified.  What do you all 
think is going on here?

Thanks so much in advance!
-Rich



[flexcoders] Re: Update & Insert via DataServices

2010-05-26 Thread Stephen
So is this built into Flex Builder 4 or do I have to download something else?

--- In flexcoders@yahoogroups.com, Evan Klein  wrote:
>
> You would use the dataservice.addItem() and dataService.deleteItem()
> methods. Then, if autoCommit=true is not on you'll need to do a
> dataService.commit() to send these transactions to the server.
> 
> You'll need this - LCDS Manual:
> http://help.adobe.com/en_US/LiveCycleDataServicesES/3.1/Developing/index.html
> 
> 
> On Wed, May 26, 2010 at 10:02 AM, Stephen  wrote:
> 
> >
> >
> > If I have list a table in a datagrid using data services in flex 4 how do I
> > update insert or delete in that datagrid/table. Usually I use HTTPServices
> > so have a array collection to work with but there is no array collection
> > this time. all i have is an obj:Object containing the insert or update data?
> >
> >  
> >
> 
> 
> 
> -- 
> Evan Klein
>




[flexcoders] Re: Duplicate Session Detected Error

2010-05-26 Thread Dharmendra
Gregor,  thanks for the reply.what is the best way to tacle this issue without 
affecting the funcnality. 

--- In flexcoders@yahoogroups.com, "Gregor Kiddie"  wrote:
>
> It's to get round a session based issue.
> 
>  
> 
> If you roll BlazeDS back to 3.0.0.544, you'll get the version before the
> duplicate session check went in.
> 
>  
> 
> Be careful to check your sessions though.
> 
>  
> 
> Gk.
> 
>  
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of Dharmendra
> Sent: 22 May 2010 05:58
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Duplicate Session Detected Error
> 
>  
> 
>   
> 
> I need to get in to the bottom of this issue.
> 
> I have two saperate EAR applicaion deployed under two saperate Cluster
> of Weblogic and both application has nothing to do with each other ,
> they just share the same J2EE server.
> 
> I am only using Remoting which invokes sever side java code and returns
> some data in response..
> 
> I could not understang what mistake I am doing which is causing this
> error.
> 
> I appriciate any help on this.
> 
> - Dharmendra
>




Re: [flexcoders] draw an arc

2010-05-26 Thread gabriel montagné
For a more Flexy approach, check this out,
http://gist.github.com/414884

Which uses,
http://github.com/mamapitufo/pistacho/blob/master/src/com/mamapitufo/display/Shapes.as

This one fills the wedge, but you can not do the beginFill / endFill and
instead configure a lineStyle and moveTo / lineTo thing.
Then you can use an AnimateProperty effect on the ratio, for example,

hth,
g.

-- 
gabriel montagné láscaris comneno
http://rojored.com
+44 (0) 7500 709 209


Re: [flexcoders] draw an arc

2010-05-26 Thread Oleg Sivokon
package examples
{
import flash.display.Graphics;
import flash.display.Sprite;
import flash.events.Event;
 [SWF(width="320", height="320", backgroundColor="0x00",
frameRate="31")]
 /**
 * Spiral example.
 * @author wvxvw
 */
public class Main extends Sprite
{
private var _angle:Number = 0;
private var _centerX:int = 160;
private var _centerY:int = 160;
 public function Main()
{
if (super.stage) init();
else super.addEventListener(Event.ADDED_TO_STAGE, this.init);
}
 private function init(event:Event = null):void
{
super.removeEventListener(Event.ADDED_TO_STAGE, this.init);
super.addEventListener(Event.ENTER_FRAME, this.drawSpiral);
}
 private function drawSpiral(event:Event = null):void
{
var radiusA:int = 228;
var radiusB:int = 200;
var angle:Number = this._angle;
var g:Graphics = super.graphics;
var lineAlpha:Number = 1;
var len:Number = Math.PI * 2;
var step:Number = len * 0.125;
g.clear();
g.lineStyle(10, 0xFF8000, lineAlpha);
g.moveTo(this._centerX + Math.cos(angle) * radiusA,
this._centerY + Math.sin(angle) * radiusA);
 for (var i:int = 0; i < 32; i++)
{
angle += step;
radiusA *= 0.9;
radiusB *= 0.9;
g.curveTo( this._centerX + Math.cos(angle) * radiusA,
this._centerY + Math.sin(angle) * radiusA,
this._centerX + Math.cos(angle + step * 0.5) * radiusB,
this._centerY + Math.sin(angle + step * 0.5) * radiusB);
}
this._angle += step;
}
}
}

Have fun :)


Re: [flexcoders] draw an arc

2010-05-26 Thread Jake Churchill
I've seen it done before where the arc is not technically smooth but it's a
bunch of connected straight lines in very short increments (like 4 lines per
degree).  The math is a total pain.  If you end up doing something like
that, get ready to re-learn geometry and trigonometry.

Flex 4 has motionpath animations but I think they are straight line only.
However, you might be able to us that to your advantage to constantly change
the x/y of some object to mimic a curve.

Good luck

On Wed, May 26, 2010 at 12:52 PM, Mark  wrote:

>
>
> I need to draw an animated arc in Flex. So I have 2 points and the arc
> needs to draw over a period of about 1.5 seconds or so. I can't even find a
> good demo for Flash, let alone Flex. Does anyone know how to go about doing
> this?
>
> Thanks,
> Mark
>
>  
>


[flexcoders] draw an arc

2010-05-26 Thread Mark
I need to draw an animated arc in Flex.  So I have 2 points and the arc needs 
to draw over a period of about 1.5 seconds or so.  I can't even find a good 
demo for Flash, let alone Flex.  Does anyone know how to go about doing this?

Thanks,
Mark



[flexcoders] Re: Is it possible to integrate the CTRL+F browser search with flex text?

2010-05-26 Thread valdhor
I would but I would need to break everything out and make it more generic. At 
the moment, I don't have the time. Someday, I will.

--- In flexcoders@yahoogroups.com, Baz  wrote:
>
> valdhor, are you going to open source your solution :) :) :) :) :)
> 
> 
> On Wed, May 26, 2010 at 6:01 AM, valdhor wrote:
> 
> >
> >
> > Basically, yes.
> >
> > What I do is iterate over all the children in the current view
> > (myModule.getChildren). Depending on the type of object, I run different
> > code. For example, if the object is a datagrid I grab the dataprovider and
> > search that. If it's a text field, it is way easier. It can get tricky in
> > some situations (like the data is filtered etc). Then, of course, you need a
> > way to highlight the found text.
> >
> >
> > --- In flexcoders@yahoogroups.com , Baz
> >  wrote:
> > >
> > > Does the search functionality have to be customized for the different
> > > elements and states currently on the screen, or is there a way to
> > generalize
> > > it for any/all visible text? For example if you have an About Us page
> > with
> > > one big text block, it takes different code to search that over the
> > Search
> > > Results page which has an itemrenderer composed of multiple labels.
> > >
> > > Cheers.
> > >
> > > On Tue, May 25, 2010 at 6:01 AM, valdhor wrote:
> >
> > >
> > > >
> > > >
> > > > Yes, openSearchWindow() is my own custom "find" functionality coded in
> > flex
> > > > and manually searches contents on the page.
> > > >
> > > > The browsers search box is part of the browser that has no knowledge of
> > the
> > > > contents of the Flash plug-in.
> > > >
> > > > I also had a different project that has a menu bar system at the top
> > and a
> > > > text field for searching. I set up the CTRL+F listener to set focus to
> > that
> > > > text field. It made it look kinda like the browsers search box (Enough
> > so
> > > > that the users didn't complain).
> > > >
> > > >
> > > > --- In flexcoders@yahoogroups.com 
> > > >  > 40yahoogroups.com>, Baz
> >
> > > >  wrote:
> > > > >
> > > > > I love it. So openSearchWindow() is your own custom "find"
> > functionality
> > > > > coded in flex and manually searches contents on the page, right? You
> > > > haven't
> > > > > found a way to integrate directly with a browser's search box?
> > > > >
> > > > > Baz
> > > > >
> > > > >
> > > > > On Mon, May 24, 2010 at 10:48 AM, valdhor wrote:
> > > > >
> > > > > > openSearchWindow();
> > > > >
> > > >
> > > >
> > > >
> > >
> >
> >  
> >
>




Re: [flexcoders] Re: Security sandbox violation

2010-05-26 Thread Richard Rodseth
That's how I started I out and will most likely end up. But getting the
error while debugging (which has since gone away) and reading the responses
here indicated it shouldn't work.

On Wed, May 26, 2010 at 6:06 AM, valdhor wrote:

>
>
> Why not just keep networking on and access the local file with a local URL?
>
> 
> --- In flexcoders@yahoogroups.com , Richard
> Rodseth  wrote:
> >
> > Thanks. That's good to know about.
> > It seems, though, that one has to choose between allowing local access or
> > network access.
> > Can anyone tell me if it's possible to create a single SWF (plus
> companion
> > wrapper html and config xml that can either be hosted on a web server, or
> > unzipped and run locally? Or would the end user have to use that page you
> > linked to?
> >
> > On Tue, May 25, 2010 at 6:18 AM, valdhor wrote:
>
> >
> > >
> > >
> > > What I do for debugging purposes is to set my debug folder as a trusted
> > > source in
> > >
> http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
> > >
> > > To do this...
> > > Click "Edit Locations->Add Location"
> > > Click "Browse for Folder"
> > > Browse to your bin-debug folder
> > >
> > > This allows you to debug locally - ie. from a
> > > file://location_of_bin-debug_HTML_file. If you have a local server
> running
> > > (Which I do) the you can set your run/debug settings to open the html
> file
> > > on your local server. ie.
> > > http://127.0.0.1/myproject/bin-debug/myproject.html. In this case, you
> > > would need a crossdomain.xml file.
> > >
> > >
> > > --- In flexcoders@yahoogroups.com 
> > >  40yahoogroups.com>, Richard
>
> > > Rodseth  wrote:
> > > >
> > > > Not sure I follow that page, but it appears that the
> -use-network=false
> > > > compiler flag may be helpful for this scenario.
> > > >
> > > > If only FB allowed you to set different compiler options for
> different
> > > > applications within a project.
> > > >
> > > > On Mon, May 24, 2010 at 4:11 PM, Oleg Sivokon  wrote:
> > > >
> > > > >
> > > > >
> > > > > No, it is different. If the SWF is embedded in HTML page, it
> requires
> > > that
> > > > > you specify the trusted locations on your machine, so it could load
> > > > > content:
> > > > >
> > >
> http://macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
> > > > > Read carefully the text in gray under the picture.
> > > > > But, if you launch it in standalone player, then, I reckon, it
> should
> > > be
> > > > > able to access local files.
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> >
>
>  
>


Re: [flexcoders] Re: Is it possible to integrate the CTRL+F browser search with flex text?

2010-05-26 Thread Baz
valdhor, are you going to open source your solution :) :) :) :) :)


On Wed, May 26, 2010 at 6:01 AM, valdhor wrote:

>
>
> Basically, yes.
>
> What I do is iterate over all the children in the current view
> (myModule.getChildren). Depending on the type of object, I run different
> code. For example, if the object is a datagrid I grab the dataprovider and
> search that. If it's a text field, it is way easier. It can get tricky in
> some situations (like the data is filtered etc). Then, of course, you need a
> way to highlight the found text.
>
>
> --- In flexcoders@yahoogroups.com , Baz
>  wrote:
> >
> > Does the search functionality have to be customized for the different
> > elements and states currently on the screen, or is there a way to
> generalize
> > it for any/all visible text? For example if you have an About Us page
> with
> > one big text block, it takes different code to search that over the
> Search
> > Results page which has an itemrenderer composed of multiple labels.
> >
> > Cheers.
> >
> > On Tue, May 25, 2010 at 6:01 AM, valdhor wrote:
>
> >
> > >
> > >
> > > Yes, openSearchWindow() is my own custom "find" functionality coded in
> flex
> > > and manually searches contents on the page.
> > >
> > > The browsers search box is part of the browser that has no knowledge of
> the
> > > contents of the Flash plug-in.
> > >
> > > I also had a different project that has a menu bar system at the top
> and a
> > > text field for searching. I set up the CTRL+F listener to set focus to
> that
> > > text field. It made it look kinda like the browsers search box (Enough
> so
> > > that the users didn't complain).
> > >
> > >
> > > --- In flexcoders@yahoogroups.com 
> > >  40yahoogroups.com>, Baz
>
> > >  wrote:
> > > >
> > > > I love it. So openSearchWindow() is your own custom "find"
> functionality
> > > > coded in flex and manually searches contents on the page, right? You
> > > haven't
> > > > found a way to integrate directly with a browser's search box?
> > > >
> > > > Baz
> > > >
> > > >
> > > > On Mon, May 24, 2010 at 10:48 AM, valdhor wrote:
> > > >
> > > > > openSearchWindow();
> > > >
> > >
> > >
> > >
> >
>
>  
>


[flexcoders] Big surprise! 4-

2010-05-26 Thread Jon Santos
Dear friend,
How are you doing recently?
One of my Japanese friend recommended me a website(snnsn.com),there they have 
all kinds of electronic products,such as computers,phones,cameras,TVs and so 
on,they have very good quality and competative prices,I just bought a sony 
computer,they have a very speeding delivery,and I have received the product 
now,if you are interested in electronic products,you can log on their 
web(www.snnsn.com), I believe you will find the products you like there!And 
share good deals with friends!
Greeting!
y-


  

[flexcoders] Re: Data grid vary column sizes

2010-05-26 Thread valdhor
Ok, got it working the way I want.

I decided to use "Letter Gothic Line" font from
http://www.fontparade.com/index.php?page=theme&cat=29 as it looked
better (To my eye) than Monaco.

At the same time as I send my request for data to the server from Flex,
I also send a request for Column Names And Widths. This functions looks
like this (PHP)...

  $ColumnNamesAndWidths = array();
 if($result->num_rows > 0)
 {
 while($resultObject = $result->fetch_object())
 {
 foreach($resultObject as $key=>$value)
 {
 if(!array_key_exists($key,
$ColumnNamesAndWidths))
 {
 $ColumnNamesAndWidths[$key] =
max(strlen($key), strlen($value));
 }
 else // Already have that object in the
array
 {
 $currentWidth = max(strlen($key),
strlen($value));
 if($currentWidth >
$ColumnNamesAndWidths[$key])
 {
 $ColumnNamesAndWidths[$key] =
$currentWidth;
 }
 }
 }
 }
 }

So, now I get an object back in Flex with the names of the columns as
properties and the max number of characters for each column as values.

In Flex, I iterate through this object and create columns from the
properties and set widths from the values...

var myDataGridColumnsArray:Array = new Array();
var ColumnNamesAndWidths:Object = event.result as Object;
for(var columnName:String in ColumnNamesAndWidths)
{
 var currentColumn:DataGridColumn = new DataGridColumn(columnName);
 currentColumn.setStyle("fontFamily", "LetterGothic");
 currentColumn.setStyle("fontSize", 11);
 currentColumn.setStyle("headerStyleName", "myDataGridHeader");
 currentColumn.headerText = columnName;
 currentColumn.width = (ColumnNamesAndWidths[columnName] as int) * 7
+ 10; // Add 10 pixels to make it look better
 currentColumn.dataField = columnName;
 currentColumn.itemRenderer = new ClassFactory(Text);

 myDataGridColumnsArray.push(currentColumn);
}
myDataGrid.columns = myDataGridColumnsArray;


HTH.




Steve

--- In flexcoders@yahoogroups.com, "valdhor"  wrote:
>
> I never found any examples on the web.
>
> I am trying to do this now and have my own strategy which may or may
not be the best. In my case, my Data Grid has a max of around 30 rows -
I don't think my strategy would work for large data sets.
>
> So, what I am thinking is to use a mono-spaced embedded font for the
data grid (I am using Apple's Monaco TrueType font). Seeing as I know
the font size I will be using and each character uses the same width, I
can safely use a simple calculation to get the width of the column. I
send a separate request to the server that returns an object that
contains the max character length for each of the fields. In FLex I
create columns from this object and set the datagrid's columns to this
array.
>
> Once I have this working, I will post an example.
>
>
>
> --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
> >
> > I don't know of any, but this question has been asked so many times,
there's probably an example if you search the web.
> >
> >
> > On 5/25/10 10:36 AM, "method_air" loudjazz@ wrote:
> >
> >
> >
> >
> >
> >
> > Any 'resize data grid columns to content' code examples?
> >
> > --- In flexcoders@yahoogroups.com
 , Alex Harui  wrote:
> > >
> > > The column has to be the same size for every row, but each column
can have different widths.  It would be rare to set it from the
itemrenderer, usually some other code accesses datagrid.column[i].width.
> > >
> > >
> > > On 5/19/10 11:02 AM, "method_air"  wrote:
> > >
> > >
> > >
> > >
> > >
> > >
> > > How do you vary the data grid column widths? Setting the width
property inside the item renderers to different values is not working.
> > >
> > > Thanks,
> > >
> > > Philip
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Alex Harui
> > > Flex SDK Team
> > > Adobe System, Inc.
> > > http://blogs.adobe.com/aharui
> > >
> >
> >
> >
> >
> >
> >
> > --
> > Alex Harui
> > Flex SDK Team
> > Adobe System, Inc.
> > http://blogs.adobe.com/aharui
> >
>



[flexcoders] Intuitive search UI ideas?

2010-05-26 Thread Nick Middleweek
Hi,

I was wondering if anyone has done any good search UI components? I'm about
to start one for a project but I'm raising questions early about the
handling of date/ numeric ranges and perhaps multiple ranges of fields
values.

Our normal search panels are generally just a bunch of fields that the user
would type values into and then hit search. The standard server search logic
would combine the results using that AND that AND that.

I'm now thinking what if the user wants a more refined search such as ( ( (
sex = "male" ) AND ( age > 25 ) ) OR ( ( sex = "female" ) AND ( age > 20 ) )
) which would return all males above 25 and all females above 20. Now using
a 'standard' search screen, this isn't possible.

Does anyone have any examples or ideas on how to present such custom query
options to the user and keeping it relatively easy and nice :)


Cheers,
Nick



-- 
Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, blog:
http://blog.middleweek.co.uk } );


[flexcoders] Re: Data grid vary column sizes

2010-05-26 Thread stephen_anson
following  link looks like what you need.
Another variation is to use TextMetrics to figure out the size of the text.

hth
cheers  Steve Anson

http://groups.google.com/group/flex_india/browse_thread/thread/7b546ff1cf7f94b8?pli=1

--- In flexcoders@yahoogroups.com, "valdhor"  wrote:
>
> I never found any examples on the web.
> 
> I am trying to do this now and have my own strategy which may or may not be 
> the best. In my case, my Data Grid has a max of around 30 rows - I don't 
> think my strategy would work for large data sets.
> 
> So, what I am thinking is to use a mono-spaced embedded font for the data 
> grid (I am using Apple's Monaco TrueType font). Seeing as I know the font 
> size I will be using and each character uses the same width, I can safely use 
> a simple calculation to get the width of the column. I send a separate 
> request to the server that returns an object that contains the max character 
> length for each of the fields. In FLex I create columns from this object and 
> set the datagrid's columns to this array.
> 
> Once I have this working, I will post an example.
> 
> 
> 
> --- In flexcoders@yahoogroups.com, Alex Harui  wrote:
> >
> > I don't know of any, but this question has been asked so many times, 
> > there's probably an example if you search the web.
> > 
> > 
> > On 5/25/10 10:36 AM, "method_air"  wrote:
> > 
> > 
> > 
> > 
> > 
> > 
> > Any 'resize data grid columns to content' code examples?
> > 
> > --- In flexcoders@yahoogroups.com  , 
> > Alex Harui  wrote:
> > >
> > > The column has to be the same size for every row, but each column can 
> > > have different widths.  It would be rare to set it from the itemrenderer, 
> > > usually some other code accesses datagrid.column[i].width.
> > >
> > >
> > > On 5/19/10 11:02 AM, "method_air"  wrote:
> > >
> > >
> > >
> > >
> > >
> > >
> > > How do you vary the data grid column widths? Setting the width property 
> > > inside the item renderers to different values is not working.
> > >
> > > Thanks,
> > >
> > > Philip
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Alex Harui
> > > Flex SDK Team
> > > Adobe System, Inc.
> > > http://blogs.adobe.com/aharui
> > >
> > 
> > 
> > 
> > 
> > 
> > 
> > --
> > Alex Harui
> > Flex SDK Team
> > Adobe System, Inc.
> > http://blogs.adobe.com/aharui
> >
>




[flexcoders] Re: How to show a hand cursor when mouse over a control ?

2010-05-26 Thread Amy
try mouseChildren="false".

--- In flexcoders@yahoogroups.com, "itaid1"  wrote:
>
> Hi
> 
> I'm using this inside a spark skin class, but the mouse does not change when 
> hovering over the control.
> 
> Tnx
> 
> -Itai
> 
>id="labelDisplay"
>   left="5"
>   fontSize="16"
>   styleName.up="upStyle"
>   styleName.over="overStyle"
>   styleName.down="downStyle"
>   styleName.disabled="disabledStyle"
>   buttonMode="true"
>   useHandCursor="true" 
>   mouseChildren="true"
>   mouseOver="Mouse.cursor = MouseCursor.HAND;"
>   mouseOut="Mouse.cursor = MouseCursor.ARROW;"
>   />
>




Re: [flexcoders] Update & Insert via DataServices

2010-05-26 Thread Evan Klein
You would use the dataservice.addItem() and dataService.deleteItem()
methods. Then, if autoCommit=true is not on you'll need to do a
dataService.commit() to send these transactions to the server.

You'll need this - LCDS Manual:
http://help.adobe.com/en_US/LiveCycleDataServicesES/3.1/Developing/index.html


On Wed, May 26, 2010 at 10:02 AM, Stephen  wrote:

>
>
> If I have list a table in a datagrid using data services in flex 4 how do I
> update insert or delete in that datagrid/table. Usually I use HTTPServices
> so have a array collection to work with but there is no array collection
> this time. all i have is an obj:Object containing the insert or update data?
>
>  
>



-- 
Evan Klein


[flexcoders] Update & Insert via DataServices

2010-05-26 Thread Stephen
If I have list a table in a datagrid using data services in flex 4 how do I 
update insert or delete in that datagrid/table. Usually I use HTTPServices so 
have a array collection to work with but there is no array collection this 
time. all i have is an obj:Object containing the insert or update data?



[flexcoders] Re: Custom keyboard navigation on AdvancedDataGrid

2010-05-26 Thread Paul
That is basically what I came up with for the solution last night. Thank
you!

dataGrid.addEventListener(KeyboardEvent.KEY_DOWN, myKeyDownHandler);

function myKeyDownHandler(event:KeyboardEvent):void {
var position:Number;
if (event.keyCode == Keyboard.RIGHT) {
   position = dataGrid.horizontalScrollPosition + 1
   dataGrid.horizontalScrollPosition = Math.min(position,
columns.length);
}
if (event.keyCode == Keyboard.LEFT) {
   position = dataGrid.horizontalScrollPosition - 1
   dataGrid.horizontalScrollPosition = Math.max(position, 0);
}
}

--- In flexcoders@yahoogroups.com, "valdhor"  wrote:
>
> Try:
>
> switch(event.keyCode)
> {
>  case KeyBoard.RIGHT:
>  myADG.horizontalScrollPosition += 1;
>  break;
>  case KeyBoard.LEFT:
>  myADG.horizontalScrollPosition -= 1;
>  break;
> }
>
>
http://livedocs.adobe.com/flex/3/langref/mx/controls/AdvancedDataGridBas\
\
> eEx.html#horizontalScrollPosition
>
>
> --- In flexcoders@yahoogroups.com, "Paul" paulfischer60@ wrote:
> >
> > I am trying to make the left and right arrows on scroll the columns
on
> AdvancedDataGrids. The default keyboard navigation keys work with
> SHIFT+PAGEDOWN and SHIFT+PAGEUP. But my client would like the
functions
> to work with left and right arrows.
> >
> > I am able to create an event handler for KeyboardEvent.KeyDown and
> check for event.keyCode == KeyBoard.RIGHT and KeyBoard.LEFT. But I
can't
> figure out what code to execute from the handler to scroll the
columns.
> >
> > Does anybody know how to make this work?
> >
> > Thanks,
> > Paul
> >
>



[flexcoders] Re: how to adjust mouse wheel scrolling for custom itemrender?

2010-05-26 Thread valdhor
In my application I have a applicationControlBar at the top of the
screen and a space to load different modules below. In a module that
needs a faster scroll speed, I add an event listener in the init
handler...

 private function onInit():void
 {
 addEventListener(MouseEvent.MOUSE_WHEEL,
onMouseWheelEvent);
 }

Then the code posted previously is called whenever a
MouseEvent.MOUSE_WHEEL event occurs. This works great and my users love
it.

Flex generally has a delta of +5 and -5 depending on direction of the
mousewheel. The code either adds or subtracts fifty depending on the
direction so the delta will now be either -55 or +55 which is a much
larger jump than 5.


HTH.



Steve

--- In flexcoders@yahoogroups.com, dorkie dork from dorktown
 wrote:
>
> where are you adding this? can you supply more details?
>
> On Mon, May 24, 2010 at 8:27 AM, valdhor valdhorli...@...wrote:
>
> >
> >
> > private function
onMouseWheelEvent(event:MouseEvent):void
> > {
> > event.delta += event.delta < 0 ? -50 : 50;
> > }
> >
> >
> >
> > --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
> > >
> > > I'm pretty sure at least one person claimed victory by modifying
the
> > delta of the MouseEvent.
> > >
> > >
> > > On 5/21/10 12:56 PM, "dorkiedorkfromdorktown@"
> > dorkiedorkfromdorktown@ wrote:
> > >
> > >
> > >
> > >
> > >
> > >
> > > I'm having this issue too. Is there any solution?
> > >
> > > On Tue, May 18, 2010 at 3:30 PM, Alex Harui aharui@ wrote:
> > >
> > >
> > >
> > >
> > >
> > > Scrolling speed is a known issue. Some folks have had luck by
modifying
> > the delta property of the MouseEvent before the scroller sees it by
using a
> > capture phase or high priority event handler.
> > >
> > >
> > >
> > > On 5/18/10 11:23 AM, "Baz" lists@  wrote:
> > >
> > >
> > >
> > >
> > >
> > >
> > > I have a skinnabledatacontainer with custom itemrender surrounded
by a
> > scroller and I want to adjust how many records are scrolled when the
> > mouse-wheel is used. Currently it scrolls way to many records. Is
there an
> > easy way to do this? So far, the only way I've found is to extend
the
> > existing scroller, then override the mx_internals "set mouseWheel"
function.
> > The file also has to be AS, because overriding mx_internals
functions
> > doesn't work in mxml . It's a very heavy solution for a
> > relatively simple activity, am I missing something?
> > >
> > > Cheers,
> > > Baz
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Alex Harui
> > > Flex SDK Team
> > > Adobe System, Inc.
> > > http://blogs.adobe.com/aharui
> > >
> >
> >
>



[flexcoders] Re: Custom keyboard navigation on AdvancedDataGrid

2010-05-26 Thread valdhor
Try:

switch(event.keyCode)
{
 case KeyBoard.RIGHT:
 myADG.horizontalScrollPosition += 1;
 break;
 case KeyBoard.LEFT:
 myADG.horizontalScrollPosition -= 1;
 break;
}

http://livedocs.adobe.com/flex/3/langref/mx/controls/AdvancedDataGridBas\
eEx.html#horizontalScrollPosition


--- In flexcoders@yahoogroups.com, "Paul"  wrote:
>
> I am trying to make the left and right arrows on scroll the columns on
AdvancedDataGrids. The default keyboard navigation keys work with
SHIFT+PAGEDOWN and SHIFT+PAGEUP. But my client would like the functions
to work with left and right arrows.
>
> I am able to create an event handler for KeyboardEvent.KeyDown and
check for event.keyCode == KeyBoard.RIGHT and KeyBoard.LEFT. But I can't
figure out what code to execute from the handler to scroll the columns.
>
> Does anybody know how to make this work?
>
> Thanks,
> Paul
>



[flexcoders] Re: Flash Player Detection / ServerSide

2010-05-26 Thread valdhor
I don't use SOAP directly from Flex - I use AMF calls to PHP and PHP to call 
the Web Service.

I can detect an AMF call at the server from the Content-Type header 
(application/x-amf).



--- In flexcoders@yahoogroups.com, "jamesfin"  wrote:
>
> Does anyone have any knowledge of how to detect whether or not a simple REST 
> call to a server (java/php/etc.) is from the Flash Player (flex app)?
> 
> It would appear that "application/x-shockwave-flash" can be detected by the 
> server in the HTTP_ACCEPT header as long as the type is defined in the html 
> wrapper like this...
> 
>width="${width}" height="${height}" 
> name="${application}" align="middle"
>   play="true"
>   loop="false"
>   quality="high"
>   allowScriptAccess="sameDomain"
>   type="application/x-shockwave-flash"
>   
> pluginspage="http://www.adobe.com/go/getflashplayer";>
>   
> 
> 
> 
> Outside of this methodology, is there another approach or perhaps something 
> the flash player sends along with each request?
> 
> 
> I saw this reference as well so any additional comments are welcome.
> 
> The "HTTP_X_FLASH_VERSION" HTTP field, which returns the players
> FLASH version in a server side script, only appears to be available when 
> opening a .swf in Internet Explorer.
> 
> Nothing is returned for HTTP_X_FLASH_VERSION
> when opening the same .swf in Google Chrome
> or Firefox 3+.
>




[flexcoders] Re: AdvancedDataGrid custom drawRowBackground with HierarchicalCollectionView

2010-05-26 Thread valdhor
Have you tried using an item renderer?

--- In flexcoders@yahoogroups.com, "csmarvz"  wrote:
>
> Hi,
> 
> I have to color the nodes shown in my adg. The code below do the job but 
> the performances insanely decrease. Any idea how to improve it please?
> 
> Best regards,
> 
> Henry
> 
> override protected function drawRowBackground(s:Sprite, rowIndex:int,
>   
>   y:Number, height:Number, color:uint, 
> dataIndex:int):void
>   {
>   //default background alpha
>   var alpha:Number = 1.0;
>   if (dataProvider is HierarchicalCollectionView)
>   {
>   
>   var cursor:IViewCursor = 
> dataProvider.createCursor();
>   var index:int=0;
>   // move on the current row
>   while (index < dataIndex)
>   {
>   index++;
>   cursor.moveNext();
>   }
>   // if the current row is a node, then set the 
> color
>   // and the background alpha (the deeper, the 
> darker)
>   
> if(dataProvider.source.canHaveChildren(cursor.current)){
>   color = 0x25e16d;
>   alpha = 
> dataProvider.getNodeDepth(cursor.current) / 10;
>   if (alpha > 1) alpha = 1;
>   }
>   }
>   
>   var background:Shape;
>   if (rowIndex < s.numChildren)
>   {
>   background = Shape(s.getChildAt(rowIndex));
>   }
>   else
>   {
>   background = new FlexShape();
>   background.name = "background";
>   s.addChild(background);
>   }
>   
>   background.y = y;
>   
>   // Height is usually as tall is the items in the row, 
> but not if
>   // it would extend below the bottom of listContent
>   var height:Number = Math.min(height,
>   listContent.height -
>   y);
>   
>   var displayWidth:int = unscaledWidth - 
> viewMetrics.right - viewMetrics.left;
>   var g:Graphics = background.graphics;
>   g.clear();
>   g.beginFill(color, alpha);
>   g.drawRect(0, 0, displayWidth, height);
>   g.endFill();
>   }
>




[flexcoders] Re: ItemRenderer factories, on the fly resetting

2010-05-26 Thread valdhor
Wow, Amy. This is the first time I have seen you top post. Have you been 
assimilated? (Resistance was futile)

--- In flexcoders@yahoogroups.com, "Amy"  wrote:
>
> Check out TileList_withStyle. 
> http://flexdiary.blogspot.com/2008/08/tilelist-with-stylefunction.html.
> 
> I think this will do what you want--you'll just need to shift your approach a 
> bit and move the things that you would normally set in the factory into being 
> styles.
> 
> HTH;
> 
> Amy
> 
> --- In flexcoders@yahoogroups.com, "flexwdw"  wrote:
> >
> > A pattern I am particularly fond of when dealing with TileList(s) that use 
> > complex item renderers is to split my parameters up.  I only pass items in 
> > via the "data" property which are different on a per tile basis.  For items 
> > that need to be passed into the renderer that are the same for each tile, I 
> > pass them in via a ClassFactory instance that is newed up to 
> > MyItemRenderer.  I then set myClassFactory.properties to contain the 
> > properties I wish to set (which are exposed as public properties on the 
> > item renderer class).  Finally, I set the TileList's .itemRenderer property 
> > to myClassFactory.
> > 
> > Typically, I only ever have to set the TileList's itemRenderer property 
> > once.  However, I recently ran into a situation where I have a piece of 
> > "factory" data that changes, but needs to change for all items in the 
> > TileList.  Therefore, resetting the TileList's itemRenderer by creating a 
> > new ClassFactory instance seems to be the most logical way to achieve this. 
> >  Problem is, this causes a "term is undefined and has no properties" error 
> > in TileBase.createItemRenderer [line 1956].  
> > 
> > Is there anything wrong with this approach?  Do I need to null out a data 
> > provider or something to make this work?  I know of many other solutions to 
> > this problem than this, but this pattern is so handy and clean for my 
> > situation that it would be a bummer if this didn't work – I'd like to 
> > understand why.
> > 
> > Thanks for the help!
> > 
> > [note, I am currently targeting Flash 10.0 and using the 3.2 SDK]
> >
>




[flexcoders] Re: Security sandbox violation

2010-05-26 Thread valdhor
Why not just keep networking on and access the local file with a local URL?

 wrote:
>
> Thanks. That's good to know about.
> It seems, though, that one has to choose between allowing local access or
> network access.
> Can anyone tell me if it's possible to create a single SWF (plus companion
> wrapper html and config xml that can either be hosted on a web server, or
> unzipped and run locally? Or would the end user have to use that page you
> linked to?
> 
> On Tue, May 25, 2010 at 6:18 AM, valdhor wrote:
> 
> >
> >
> > What I do for debugging purposes is to set my debug folder as a trusted
> > source in
> > http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
> >
> > To do this...
> > Click "Edit Locations->Add Location"
> > Click "Browse for Folder"
> > Browse to your bin-debug folder
> >
> > This allows you to debug locally - ie. from a
> > file://location_of_bin-debug_HTML_file. If you have a local server running
> > (Which I do) the you can set your run/debug settings to open the html file
> > on your local server. ie.
> > http://127.0.0.1/myproject/bin-debug/myproject.html. In this case, you
> > would need a crossdomain.xml file.
> >
> >
> > --- In flexcoders@yahoogroups.com , Richard
> > Rodseth  wrote:
> > >
> > > Not sure I follow that page, but it appears that the -use-network=false
> > > compiler flag may be helpful for this scenario.
> > >
> > > If only FB allowed you to set different compiler options for different
> > > applications within a project.
> > >
> > > On Mon, May 24, 2010 at 4:11 PM, Oleg Sivokon  wrote:
> > >
> > > >
> > > >
> > > > No, it is different. If the SWF is embedded in HTML page, it requires
> > that
> > > > you specify the trusted locations on your machine, so it could load
> > > > content:
> > > >
> > http://macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
> > > > Read carefully the text in gray under the picture.
> > > > But, if you launch it in standalone player, then, I reckon, it should
> > be
> > > > able to access local files.
> > > >
> > > >
> > >
> >
> >  
> >
>




[flexcoders] Re: Is it possible to integrate the CTRL+F browser search with flex text?

2010-05-26 Thread valdhor
Basically, yes.

What I do is iterate over all the children in the current view 
(myModule.getChildren). Depending on the type of object, I run different code. 
For example, if the object is a datagrid I grab the dataprovider and search 
that. If it's a text field, it is way easier. It can get tricky in some 
situations (like the data is filtered etc). Then, of course, you need a way to 
highlight the found text.

--- In flexcoders@yahoogroups.com, Baz  wrote:
>
> Does the search functionality have to be customized for the different
> elements and states currently on the screen, or is there a way to generalize
> it for any/all visible text? For example if you have an About Us page with
> one big text block, it takes different code to search that over the Search
> Results page which has an itemrenderer composed of multiple labels.
> 
> Cheers.
> 
> On Tue, May 25, 2010 at 6:01 AM, valdhor wrote:
> 
> >
> >
> > Yes, openSearchWindow() is my own custom "find" functionality coded in flex
> > and manually searches contents on the page.
> >
> > The browsers search box is part of the browser that has no knowledge of the
> > contents of the Flash plug-in.
> >
> > I also had a different project that has a menu bar system at the top and a
> > text field for searching. I set up the CTRL+F listener to set focus to that
> > text field. It made it look kinda like the browsers search box (Enough so
> > that the users didn't complain).
> >
> >
> > --- In flexcoders@yahoogroups.com , Baz
> >  wrote:
> > >
> > > I love it. So openSearchWindow() is your own custom "find" functionality
> > > coded in flex and manually searches contents on the page, right? You
> > haven't
> > > found a way to integrate directly with a browser's search box?
> > >
> > > Baz
> > >
> > >
> > > On Mon, May 24, 2010 at 10:48 AM, valdhor wrote:
> > >
> > > > openSearchWindow();
> > >
> >
> >  
> >
>




Re: [flexcoders] Re: How to show a hand cursor when mouse over a control ?

2010-05-26 Thread Fotis Chatzinikos
in flex 3 the hand curson needs mouseChildren = false not true...

Not sure if it applies to spark thought... give it a try

On Wed, May 26, 2010 at 11:07 AM, itaid1  wrote:

>
>
> If you mean mouseEnabled="true" (lowercase 'm', with quotations marks
> around the boolean value) as shown below, then, it doesn't make it work,
> otherwise please explain where to put 'MouseEnabled=true'.
>
>  id="labelDisplay"
> left="5"
> fontSize="16"
> fontWeight="bold"
>
> styleName.up="upStyle"
> styleName.over="overStyle"
> styleName.down="downStyle"
> styleName.disabled="disabledStyle"
> buttonMode="true"
> useHandCursor="true"
> mouseChildren="true"
> mouseEnabled="true"
> mouseOver="Mouse.cursor = MouseCursor.HAND;"
> mouseOut="Mouse.cursor = MouseCursor.ARROW;"
> />
>
> --- In flexcoders@yahoogroups.com , Alex
> Harui  wrote:
> >
> > MouseEnabled=true?
> >
> >
> > On 5/25/10 9:54 AM, "itaid1"  wrote:
> >
> >
> >
> >
> >
> >
> > Hi
> >
> > I'm using this inside a spark skin class, but the mouse does not change
> when hovering over the control.
> >
> > Tnx
> >
> > -Itai
> >
> >  > id="labelDisplay"
> > left="5"
> > fontSize="16"
> > styleName.up="upStyle"
> > styleName.over="overStyle"
> > styleName.down="downStyle"
> > styleName.disabled="disabledStyle"
> > buttonMode="true"
> > useHandCursor="true"
> > mouseChildren="true"
> > mouseOver="Mouse.cursor = MouseCursor.HAND;"
> > mouseOut="Mouse.cursor = MouseCursor.ARROW;"
> > />
> >
> >
> >
> >
> >
> >
> > --
> > Alex Harui
> > Flex SDK Team
> > Adobe System, Inc.
> > http://blogs.adobe.com/aharui
> >
>
>  
>


[flexcoders] Re: Data grid vary column sizes

2010-05-26 Thread valdhor
I never found any examples on the web.

I am trying to do this now and have my own strategy which may or may not be the 
best. In my case, my Data Grid has a max of around 30 rows - I don't think my 
strategy would work for large data sets.

So, what I am thinking is to use a mono-spaced embedded font for the data grid 
(I am using Apple's Monaco TrueType font). Seeing as I know the font size I 
will be using and each character uses the same width, I can safely use a simple 
calculation to get the width of the column. I send a separate request to the 
server that returns an object that contains the max character length for each 
of the fields. In FLex I create columns from this object and set the datagrid's 
columns to this array.

Once I have this working, I will post an example.



--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> I don't know of any, but this question has been asked so many times, there's 
> probably an example if you search the web.
> 
> 
> On 5/25/10 10:36 AM, "method_air"  wrote:
> 
> 
> 
> 
> 
> 
> Any 'resize data grid columns to content' code examples?
> 
> --- In flexcoders@yahoogroups.com  , 
> Alex Harui  wrote:
> >
> > The column has to be the same size for every row, but each column can have 
> > different widths.  It would be rare to set it from the itemrenderer, 
> > usually some other code accesses datagrid.column[i].width.
> >
> >
> > On 5/19/10 11:02 AM, "method_air"  wrote:
> >
> >
> >
> >
> >
> >
> > How do you vary the data grid column widths? Setting the width property 
> > inside the item renderers to different values is not working.
> >
> > Thanks,
> >
> > Philip
> >
> >
> >
> >
> >
> >
> > --
> > Alex Harui
> > Flex SDK Team
> > Adobe System, Inc.
> > http://blogs.adobe.com/aharui
> >
> 
> 
> 
> 
> 
> 
> --
> Alex Harui
> Flex SDK Team
> Adobe System, Inc.
> http://blogs.adobe.com/aharui
>




[flexcoders] Skins in FB4

2010-05-26 Thread Shabir Gilkar
Hi All,

How to use theme created in Flash CS4 in FB4?

I have created my project theme but i dont know how to export it to mak it
usable in FB4.

-- 
With Regards

Shabir Ahmad Gilkar

Srinagar Kashmir J&K

Voice: +91 9419942501
email: shabirgil...@gmail.com
URL:   http://shabirgilkar.wordpress.com
Skype: shabirgilkar
Join "I Feel The Pain" on Facebook By Visiting http://bit.ly/c5tYqB


[flexcoders] Re: How to show a hand cursor when mouse over a control ?

2010-05-26 Thread itaid1
If you mean mouseEnabled="true" (lowercase 'm', with quotations marks around 
the boolean value) as shown below, then, it doesn't make it work, otherwise 
please explain where to put 'MouseEnabled=true'.   

 

--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> MouseEnabled=true?
> 
> 
> On 5/25/10 9:54 AM, "itaid1"  wrote:
> 
> 
> 
> 
> 
> 
> Hi
> 
> I'm using this inside a spark skin class, but the mouse does not change when 
> hovering over the control.
> 
> Tnx
> 
> -Itai
> 
>  id="labelDisplay"
> left="5"
> fontSize="16"
> styleName.up="upStyle"
> styleName.over="overStyle"
> styleName.down="downStyle"
> styleName.disabled="disabledStyle"
> buttonMode="true"
> useHandCursor="true"
> mouseChildren="true"
> mouseOver="Mouse.cursor = MouseCursor.HAND;"
> mouseOut="Mouse.cursor = MouseCursor.ARROW;"
> />
> 
> 
> 
> 
> 
> 
> --
> Alex Harui
> Flex SDK Team
> Adobe System, Inc.
> http://blogs.adobe.com/aharui
>




Re: [flexcoders] Re: how to adjust mouse wheel scrolling for custom itemrender?

2010-05-26 Thread dorkie dork from dorktown
where are you adding this? can you supply more details?

On Mon, May 24, 2010 at 8:27 AM, valdhor wrote:

>
>
> private function onMouseWheelEvent(event:MouseEvent):void
> {
> event.delta += event.delta < 0 ? -50 : 50;
> }
>
>
>
> --- In flexcoders@yahoogroups.com, Alex Harui  wrote:
> >
> > I'm pretty sure at least one person claimed victory by modifying the
> delta of the MouseEvent.
> >
> >
> > On 5/21/10 12:56 PM, "dorkiedorkfromdorkt...@..."
> dorkiedorkfromdorkt...@... wrote:
> >
> >
> >
> >
> >
> >
> > I'm having this issue too. Is there any solution?
> >
> > On Tue, May 18, 2010 at 3:30 PM, Alex Harui aha...@... wrote:
> >
> >
> >
> >
> >
> > Scrolling speed is a known issue. Some folks have had luck by modifying
> the delta property of the MouseEvent before the scroller sees it by using a
> capture phase or high priority event handler.
> >
> >
> >
> > On 5/18/10 11:23 AM, "Baz" li...@...  wrote:
> >
> >
> >
> >
> >
> >
> > I have a skinnabledatacontainer with custom itemrender surrounded by a
> scroller and I want to adjust how many records are scrolled when the
> mouse-wheel is used. Currently it scrolls way to many records. Is there an
> easy way to do this? So far, the only way I've found is to extend the
> existing scroller, then override the mx_internals "set mouseWheel" function.
> The file also has to be AS, because overriding mx_internals functions
> doesn't work in mxml . It's a very heavy solution for a
> relatively simple activity, am I missing something?
> >
> > Cheers,
> > Baz
> >
> >
> >
> >
> >
> >
> > --
> > Alex Harui
> > Flex SDK Team
> > Adobe System, Inc.
> > http://blogs.adobe.com/aharui
> >
>  
>