[flexcoders] Renaming crossdomain.xml file

2010-01-04 Thread toofah_gm
I have a remote server from which my Flex app accesses data through a REST api. 
 I am unable to access the data without placing a crossdomain.xml file in the 
root of my remote server.  If I try really hard and fight with my IIS server 
web.config file, I can sometimes get my server to serve up the crossdomain.xml 
file and then my Flex app works great.  

The problem is that my remote server is setup to filter off any XML file 
requests and handle them as part of my REST api implementation, so unless I 
fudge my web.config file, all of my requests for the crossdomain.xml file end 
up going to the wrong handler, the one for the REST api.  So far I have been 
unable to setup my web.config file to serve up the crossdomain.xml file as text 
and send all other XML requests to the REST api handler.

So, I am wondering if it is possible to rename the crossdomain.xml file to 
something else, like crossdomain.txt.  I tried doing this and calling 
Security.loadPolicyFile, which seems to load the crossdomain.txt file 
correctly, however, the crossdomain.xml file is also still being requested and 
failing and the remote calls to this server are still not working.

Is is possible to do what I am trying?  Can I rename the crossdomain.xml file 
and tell my flex application to load it differently, or am I forced to load a 
crossdomain.xml file from the root of my remote server?

Thanks for your help!

Gary



[flexcoders] Embedding SWF or images in CSS

2009-11-13 Thread toofah_gm
How can I load an image from a CSS file at runtime?  I can see how this is done 
for the background image of the Application, but what if I have an image on a 
canvas and just want to set the source differently based on which CSS I load.

Example:
Image sits on a canvas.
For CSS1, image should be brand 1 logo.
For CSS2, image should be brand 2 logo.

I can't figure out how to set source for image based on stylesheet.

Can this be done?

Thanks!



[flexcoders] Re: DateField.selectedDate being set to null on focusOut??

2009-09-17 Thread toofah_gm
Thanks for this post.  This saved me.  Looks like a nasty bug with the 
DateField control.  Has this been logged for Adobe to fix?


--- In flexcoders@yahoogroups.com, Josh McDonald dzn...@... wrote:

 Figured this out for anybody who has the same problem in the future - if you
 use a labelFunction, make damn sure you supply a custom parseFunction, or
 set parseFunction to null!
 
 A pretty ugly silent failure tho methinks.
 
 -J
 
 On Mon, Apr 14, 2008 at 2:33 PM, Josh McDonald j...@... wrote:
 
  No, it's being set to null, and I can't see how. As in when I click on
  another field in the form, I'm getting a CalendarLayoutChangeEvent from the
  DateField, with newDate as null, and at that time
  innerDateField.selectedDate is null. Interestingly enough, it doesn't call
  the labelFunction either, so it looks like there's still a value there, but
  if you bring up the popup again, it's not selected.
 
  -J
 
 
  On Mon, Apr 14, 2008 at 2:21 PM, aceoohay pa...@... wrote:
 
 Are you sure it is being set to null? I have seen a problem where if
   the dateField is editable, and the width of the box is a bit too
   small, it will display the date, but when editing/exiting it causes
   it to display an empty box.
  
   I found that expanding the width ever so slightly made the problem go
   away.
  
   Paul
  
   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh
   McDonald dznuts@ wrote:
   
Hi,
   
I've been getting mystery nulls, and it seems that for some reason
   when my
embedded DateField component loses focus, its selectedDate is reset
   to null.
Anybody have *any* idea why? I've got breakpoints on set
   selectedDate
inside mx:DateField and it's not being called...
   
Sometimes I feel like such an incompetent prick :)
   
-J
   
--
Therefore, send not to know For whom the bell tolls, It tolls for
   thee.
   
:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: josh@
   
  

  
 
 
 
  --
  Therefore, send not to know For whom the bell tolls, It tolls for thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: j...@...
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls, It tolls for thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: j...@...





[flexcoders] Re: Full flex site or not

2009-08-21 Thread toofah_gm
If you are a competitor of mine, build a full flex site, otherwise HTML is the 
way to go for SEO. ;)


--- In flexcoders@yahoogroups.com, christophe_jacquelin 
christophe_jacque...@... wrote:

 Hello, 
 
 Is it better to make a full flex site or is it better to add some html pages 
 with flex to have a better position in Google ? 
 
 Thank you,
 Christopher,





[flexcoders] Re: Image Loader COMPLETE event wont fire for some images

2009-07-11 Thread toofah_gm
But why do images with transparency in them differ from this rule...they seem 
to exceed the maximum size earlier than those images that do not have 
transparency.  I understand that they are bigger because of the alpha channel, 
but would like to know the exact rule about their max size if there is one.

Gary

--- In flexcoders@yahoogroups.com, quattos quat...@... wrote:

 I think this explains it -
 From 
 http://livedocs.adobe.com/flex/gumbo/langref/flash/display/BitmapData.html:
 
 In AIR 1.5 and Flash Player 10, the maximum size for a BitmapData object is 
 8,191 pixels in width or height, and the total number of pixels cannot exceed 
 16,777,215 pixels. (So, if a BitmapData object is 8,191 pixels wide, it can 
 only be 2,048 pixels high.) In Flash Player 9 and earlier and AIR 1.1 and 
 earlier, the limitation is 2,880 pixels in height and 2,880 in width.
 
 -Lance
 
 
 --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote:
 
  Tim,
  
  Thanks for your help on this.  I feel like I am getting a little closer, 
  but would like to get full understanding so that I can make a good decision 
  on how to proceed.
  
  The 2880 limit seems to be related to the problem, however it is 
  interesting that this limit only seems to affect transparent images, or at 
  least I haven't hit a limit yet for non transparent images.
  
  Also, I am using FP10, which is supposed to have higher limits.  Do you 
  know if this is dependent on the SDK that the app is compiled with?
  
  If I change the image to 
  http://www.mangumfamily.org/pedigreeLargeBook.png;, which is 3764 x 2610 
  with transparency...it doesn't load.
  
  http://www.mangumfamily.org/pedigreeLargeBook2.png;, which is the same 
  image, saved at 2880 x 1997 with transparency...loads great.
  
  http://www.mangumfamily.org/pedigreeLargeBook3.png;, which is the same 
  image, saved at 2885 x 2000 with transparency...does not load.
  This seems to prove that there is some sort of 2880 limit still with 
  transparent images.
  
  Interesting thing is that 
  http://www.mangumfamily.org/backgroundOriginal.jpg;, which is much larger, 
  4200 x 3188, but has no transparency, loads just fine.
  
  Does anybody have some good understanding on this issue? or can you point 
  me to some better documentation on such?
  
  Thanks!
  
  Gary
  
  
  
  --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
  
   
   Well, probably a question better answered by Alex.  I suspect that the
   transparency is adding to the file size and hitting the size limit. 
   But, at this point, it's just a guess.  Try cropping the image down to
   see if you get to a point that it works.
   
   -TH
   
   --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote:
   
I tried this as well...I think that the original file is actually a
   PNG and not a JPG...unfortunately, this does not make a difference
   either.
   
Gary
   
   
--- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:


 What happens if you convert the jpg to a png with transparency? I
   seem
 to remember a problem with the alphas for a jpg.

 -TH

 --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote:
 
  TH,
 
  Thanks for the quick response. If the image is too wide, why does
 http://www.mangumfamily.org/bar3.jpg; work? It has the same
   dimensions,
 just no transparency.
 
  Gary
 
  --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
  
  
   Hi Gary,
  
   There is a 2880 pixel limit for images. Your image is too wide.
  
   -TH
  
   --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote:
   
I am seeing cases when the image loader COMPLETE event will
   not
 fire.
   Does anyone know why this is the case? I wonder if there is
 something
   wrong with some of my images that causes a bug in FLEX.
   
Here is an example:
   
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
   layout=absolute applicationComplete=init()
mx:Script
![CDATA[
private function init():void
{
myImage.addEventListener(ProgressEvent.PROGRESS,
   progressEventHandler);
myImage.addEventListener(Event.COMPLETE,
   completeEventHandler);
myImage.addEventListener(Event.UNLOAD, unloadEventHandler);
   
reload();
}
   
private function reload():void
{
//
 myImage.load(http://www.google.com/intl/en_ALL/images/logo.gif;);
myImage.load(http://www.mangumfamily.org/bar.jpg;);
}
   
private function progressEventHandler(evt:ProgressEvent):void
{
trace(PROGRESS: bytesLoaded=+evt.bytesLoaded+,
   bytesTotal=+evt.bytesTotal);
}
   
private function completeEventHandler(evt:Event):void
{
trace(COMPLETE

[flexcoders] Re: Image Loader COMPLETE event wont fire for some images

2009-07-10 Thread toofah_gm
Tim,

Thanks for your help on this.  I feel like I am getting a little closer, but 
would like to get full understanding so that I can make a good decision on how 
to proceed.

The 2880 limit seems to be related to the problem, however it is interesting 
that this limit only seems to affect transparent images, or at least I haven't 
hit a limit yet for non transparent images.

Also, I am using FP10, which is supposed to have higher limits.  Do you know if 
this is dependent on the SDK that the app is compiled with?

If I change the image to http://www.mangumfamily.org/pedigreeLargeBook.png;, 
which is 3764 x 2610 with transparency...it doesn't load.

http://www.mangumfamily.org/pedigreeLargeBook2.png;, which is the same image, 
saved at 2880 x 1997 with transparency...loads great.

http://www.mangumfamily.org/pedigreeLargeBook3.png;, which is the same image, 
saved at 2885 x 2000 with transparency...does not load.
This seems to prove that there is some sort of 2880 limit still with 
transparent images.

Interesting thing is that http://www.mangumfamily.org/backgroundOriginal.jpg;, 
which is much larger, 4200 x 3188, but has no transparency, loads just fine.

Does anybody have some good understanding on this issue? or can you point me to 
some better documentation on such?

Thanks!

Gary



--- In flexcoders@yahoogroups.com, Tim Hoff timh...@... wrote:

 
 Well, probably a question better answered by Alex.  I suspect that the
 transparency is adding to the file size and hitting the size limit. 
 But, at this point, it's just a guess.  Try cropping the image down to
 see if you get to a point that it works.
 
 -TH
 
 --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote:
 
  I tried this as well...I think that the original file is actually a
 PNG and not a JPG...unfortunately, this does not make a difference
 either.
 
  Gary
 
 
  --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
  
  
   What happens if you convert the jpg to a png with transparency? I
 seem
   to remember a problem with the alphas for a jpg.
  
   -TH
  
   --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote:
   
TH,
   
Thanks for the quick response. If the image is too wide, why does
   http://www.mangumfamily.org/bar3.jpg; work? It has the same
 dimensions,
   just no transparency.
   
Gary
   
--- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:


 Hi Gary,

 There is a 2880 pixel limit for images. Your image is too wide.

 -TH

 --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote:
 
  I am seeing cases when the image loader COMPLETE event will
 not
   fire.
 Does anyone know why this is the case? I wonder if there is
   something
 wrong with some of my images that causes a bug in FLEX.
 
  Here is an example:
 
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute applicationComplete=init()
  mx:Script
  ![CDATA[
  private function init():void
  {
  myImage.addEventListener(ProgressEvent.PROGRESS,
 progressEventHandler);
  myImage.addEventListener(Event.COMPLETE,
 completeEventHandler);
  myImage.addEventListener(Event.UNLOAD, unloadEventHandler);
 
  reload();
  }
 
  private function reload():void
  {
  //
   myImage.load(http://www.google.com/intl/en_ALL/images/logo.gif;);
  myImage.load(http://www.mangumfamily.org/bar.jpg;);
  }
 
  private function progressEventHandler(evt:ProgressEvent):void
  {
  trace(PROGRESS: bytesLoaded=+evt.bytesLoaded+,
 bytesTotal=+evt.bytesTotal);
  }
 
  private function completeEventHandler(evt:Event):void
  {
  trace(COMPLETE);
  }
 
  private function unloadEventHandler(evt:Event):void
  {
  trace(UNLOAD);
  }
  ]]
  /mx:Script
  mx:Image id=myImage/
  mx:Button label=Reload Image y=308 click=reload()/
  /mx:Application
 
  Notice that COMPLETE never gets called. If you copy the URL
 into a
   web
 browser it loads fine.
 
  If you change the url in the code to the Google one, it loads
   fine.
 
  What is wrong with my image? Maybe I need to log a bug to
 FLEX.
 
  Thanks for your help!
 
  Gary
 

   
  
 




[flexcoders] Image Loader COMPLETE event wont fire for some images

2009-07-09 Thread toofah_gm
I am seeing cases when the image loader COMPLETE event will not fire.  Does 
anyone know why this is the case?  I wonder if there is something wrong with 
some of my images that causes a bug in FLEX.

Here is an example:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute 
applicationComplete=init()
mx:Script
![CDATA[
private function init():void
{

myImage.addEventListener(ProgressEvent.PROGRESS, progressEventHandler);
myImage.addEventListener(Event.COMPLETE, 
completeEventHandler);
myImage.addEventListener(Event.UNLOAD, 
unloadEventHandler);

reload();
}

private function reload():void
{
//  
myImage.load(http://www.google.com/intl/en_ALL/images/logo.gif;);

myImage.load(http://www.mangumfamily.org/bar.jpg;);
}

private function 
progressEventHandler(evt:ProgressEvent):void
{
trace(PROGRESS: 
bytesLoaded=+evt.bytesLoaded+, bytesTotal=+evt.bytesTotal);
}

private function completeEventHandler(evt:Event):void
{
trace(COMPLETE);
}

private function unloadEventHandler(evt:Event):void
{
trace(UNLOAD);
}
]]
/mx:Script
mx:Image id=myImage/
mx:Button label=Reload Image y=308 click=reload()/  
/mx:Application

Notice that COMPLETE never gets called.  If you copy the URL into a web browser 
it loads fine.

If you change the url in the code to the Google one, it loads fine.

What is wrong with my image?  Maybe I need to log a bug to FLEX.

Thanks for your help!

Gary



[flexcoders] Re: Image Loader COMPLETE event wont fire for some images

2009-07-09 Thread toofah_gm
TH, 

Thanks for the quick response.  If the image is too wide, why does 
http://www.mangumfamily.org/bar3.jpg; work?  It has the same dimensions, just 
no transparency.

Gary

--- In flexcoders@yahoogroups.com, Tim Hoff timh...@... wrote:

 
 Hi Gary,
 
 There is a 2880 pixel limit for images.  Your image is too wide.
 
 -TH
 
 --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote:
 
  I am seeing cases when the image loader COMPLETE event will not fire.
 Does anyone know why this is the case? I wonder if there is something
 wrong with some of my images that causes a bug in FLEX.
 
  Here is an example:
 
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute applicationComplete=init()
  mx:Script
  ![CDATA[
  private function init():void
  {
  myImage.addEventListener(ProgressEvent.PROGRESS,
 progressEventHandler);
  myImage.addEventListener(Event.COMPLETE, completeEventHandler);
  myImage.addEventListener(Event.UNLOAD, unloadEventHandler);
 
  reload();
  }
 
  private function reload():void
  {
  // myImage.load(http://www.google.com/intl/en_ALL/images/logo.gif;);
  myImage.load(http://www.mangumfamily.org/bar.jpg;);
  }
 
  private function progressEventHandler(evt:ProgressEvent):void
  {
  trace(PROGRESS: bytesLoaded=+evt.bytesLoaded+,
 bytesTotal=+evt.bytesTotal);
  }
 
  private function completeEventHandler(evt:Event):void
  {
  trace(COMPLETE);
  }
 
  private function unloadEventHandler(evt:Event):void
  {
  trace(UNLOAD);
  }
  ]]
  /mx:Script
  mx:Image id=myImage/
  mx:Button label=Reload Image y=308 click=reload()/
  /mx:Application
 
  Notice that COMPLETE never gets called. If you copy the URL into a web
 browser it loads fine.
 
  If you change the url in the code to the Google one, it loads fine.
 
  What is wrong with my image? Maybe I need to log a bug to FLEX.
 
  Thanks for your help!
 
  Gary
 





[flexcoders] Re: Image Loader COMPLETE event wont fire for some images

2009-07-09 Thread toofah_gm
I tried this as well...I think that the original file is actually a PNG and not 
a JPG...unfortunately, this does not make a difference either.

Gary


--- In flexcoders@yahoogroups.com, Tim Hoff timh...@... wrote:

 
 What happens if you convert the jpg to a png with transparency?  I seem
 to remember a problem with the alphas for a jpg.
 
 -TH
 
 --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote:
 
  TH,
 
  Thanks for the quick response. If the image is too wide, why does
 http://www.mangumfamily.org/bar3.jpg; work? It has the same dimensions,
 just no transparency.
 
  Gary
 
  --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
  
  
   Hi Gary,
  
   There is a 2880 pixel limit for images. Your image is too wide.
  
   -TH
  
   --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote:
   
I am seeing cases when the image loader COMPLETE event will not
 fire.
   Does anyone know why this is the case? I wonder if there is
 something
   wrong with some of my images that causes a bug in FLEX.
   
Here is an example:
   
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
   layout=absolute applicationComplete=init()
mx:Script
![CDATA[
private function init():void
{
myImage.addEventListener(ProgressEvent.PROGRESS,
   progressEventHandler);
myImage.addEventListener(Event.COMPLETE, completeEventHandler);
myImage.addEventListener(Event.UNLOAD, unloadEventHandler);
   
reload();
}
   
private function reload():void
{
//
 myImage.load(http://www.google.com/intl/en_ALL/images/logo.gif;);
myImage.load(http://www.mangumfamily.org/bar.jpg;);
}
   
private function progressEventHandler(evt:ProgressEvent):void
{
trace(PROGRESS: bytesLoaded=+evt.bytesLoaded+,
   bytesTotal=+evt.bytesTotal);
}
   
private function completeEventHandler(evt:Event):void
{
trace(COMPLETE);
}
   
private function unloadEventHandler(evt:Event):void
{
trace(UNLOAD);
}
]]
/mx:Script
mx:Image id=myImage/
mx:Button label=Reload Image y=308 click=reload()/
/mx:Application
   
Notice that COMPLETE never gets called. If you copy the URL into a
 web
   browser it loads fine.
   
If you change the url in the code to the Google one, it loads
 fine.
   
What is wrong with my image? Maybe I need to log a bug to FLEX.
   
Thanks for your help!
   
Gary
   
  
 





[flexcoders] re-passing variable arguments?

2008-12-29 Thread toofah_gm
I have a method that accepts variable arguments like this:

public function doSomethingThenContinue(continueFunction:Function, 
...args)
{
   // execute some code that does important stuff

   // call the continue function now that we are done passing the 
original args to that function
   continueFunction(args);
}

Is it possible to pass the variable arguments on to the generic 
continueFunction in this manner?  I don't really want the args to be 
passed in a single Array, but want to call the continueFunction with 
the arguments split out like this dynamically 
continueFunction(args[0], args[1], etc.) depending on how many were 
passed in and depending on how many parameters the continueFunction 
accepts.

Is this possible to do somehow?

Thanks,

Gary



[flexcoders] Method variable scoping problem with Flex compiler

2008-12-04 Thread toofah_gm
I came across another scoping issue today that scared me.  I sure wish 
that the scoping in the ActionScript language worked the same way C++, 
C#, Java, and others work!

Here's the code:

for each (var o:Object in myArray)
{
  var myProblemObject:ProblemObject;
  if (some condition)
  {
myProblemObject = new ProblemObject();
... more code here ...
  }
  ... still more code here...

  if (myProblemObject)
  {
... do some stuff ...
  }
}

In this code myProblemObject is NULL when things start out...great!  
The problem comes after an instance of myProblemObject gets created.  
Every time through the loop after this myProblemObject is no longer 
NULL.  This is not consistent with any other language that I have 
worked with and is therefore not obvious to the developer working with 
the code.  

Why is myProblemObject not reset each time through the loop?  It is a 
variable declaration.

Gary



--- In flexcoders@yahoogroups.com, toofah_gm [EMAIL PROTECTED] wrote:

 It seems to me and my co-workers that the Flex compiler is broken 
when
 it comes to local variable scoping within methods.
 
 For example:
 
 for (var i:int=0; icount; i++)
 {
// do something
 }
 
 for (var i:int=0; icount; i++)
 {
// do something else
 }
 
 This gives a compiler warning stating that 'i' is already defined. 
 But in every other language that I have used, this is completely
 valid.  Yes 'i' was defined above, but 'i' should only be scoped
 within the 'for' loop and should be invalid outside of it.
 
 
 
 Another example:
 
 if (x)
 {
var myArray:Array = new Array();
// do more stuff
 }
 
 myArray.push(some data);
 
 This one compiles, when I believe that it shouldn't.  myArray should
 only be defined within the 'if' statement.  If you don't go into the
 'if' statement you have a problem here.
 
 
 Does anyone understand why the Flex compiler allows this?  Is this
 just a BUG with the compiler?
 
 Anyway, this is just driving me a little crazy. ;)
 
 Gary






[flexcoders] Re: Method variable scoping problem with Flex compiler

2008-12-04 Thread toofah_gm
That is scary! ;)

--- In flexcoders@yahoogroups.com, Michael Prescott 
[EMAIL PROTECTED] wrote:

 *Why* it's different I can't tell you, but if you're being regularly
 surprised, it sounds like you might benefit from skimming through 
the
 language reference.  This behavior is described on the
 Variableshttp://livedocs.adobe.com/flex/3/html/help.html?
content=03_Language_and_Syntax_07.html#118946page
 of help resource center, under 'Understanding variable scope'.
 
 From there (this may scare you even more!):
 
 *ActionScript variables, unlike variables in C++ and Java, do not 
have
 block-level scope. ... An interesting implication of the lack of 
block-level
 scope is that you can read or write to a variable before it is 
declared, as
 long as it is declared before the function ends. This is because of 
a
 technique called hoisting, which means that the compiler moves all 
variable
 declarations to the top of the function.*
 
 On Thu, Dec 4, 2008 at 5:31 PM, toofah_gm [EMAIL PROTECTED] wrote:
 
I came across another scoping issue today that scared me. I sure 
wish
  that the scoping in the ActionScript language worked the same way 
C++,
  C#, Java, and others work!
 
  Here's the code:
 
  for each (var o:Object in myArray)
  {
  var myProblemObject:ProblemObject;
  if (some condition)
  {
  myProblemObject = new ProblemObject();
  ... more code here ...
  }
  ... still more code here...
 
  if (myProblemObject)
  {
  ... do some stuff ...
  }
  }
 
  In this code myProblemObject is NULL when things start 
out...great!
  The problem comes after an instance of myProblemObject gets 
created.
  Every time through the loop after this myProblemObject is no 
longer
  NULL. This is not consistent with any other language that I have
  worked with and is therefore not obvious to the developer working 
with
  the code.
 
  Why is myProblemObject not reset each time through the loop? It is 
a
  variable declaration.
 
  Gary
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
  toofah_gm garym@ wrote:
  
   It seems to me and my co-workers that the Flex compiler is 
broken
  when
   it comes to local variable scoping within methods.
  
   For example:
  
   for (var i:int=0; icount; i++)
   {
   // do something
   }
  
   for (var i:int=0; icount; i++)
   {
   // do something else
   }
  
   This gives a compiler warning stating that 'i' is already 
defined.
   But in every other language that I have used, this is completely
   valid. Yes 'i' was defined above, but 'i' should only be scoped
   within the 'for' loop and should be invalid outside of it.
  
  
  
   Another example:
  
   if (x)
   {
   var myArray:Array = new Array();
   // do more stuff
   }
  
   myArray.push(some data);
  
   This one compiles, when I believe that it shouldn't. myArray 
should
   only be defined within the 'if' statement. If you don't go into 
the
   'if' statement you have a problem here.
  
  
   Does anyone understand why the Flex compiler allows this? Is 
this
   just a BUG with the compiler?
  
   Anyway, this is just driving me a little crazy. ;)
  
   Gary
  
 
   
 






[flexcoders] Button Rounded Corners TL, BR

2008-08-25 Thread toofah_gm
Is there a simple way to create a button with rounded corners on only
the top left and bottom right?  Or can this only be done with a skin?

I'm thinking some sort of style where you could set TL, BR, etc. or
something like that, similar to the focusRoundedCorners style on a
TextInput control.

Thanks!



[flexcoders] Method variable scoping problem with Flex compiler

2008-08-15 Thread toofah_gm
It seems to me and my co-workers that the Flex compiler is broken when
it comes to local variable scoping within methods.

For example:

for (var i:int=0; icount; i++)
{
   // do something
}

for (var i:int=0; icount; i++)
{
   // do something else
}

This gives a compiler warning stating that 'i' is already defined. 
But in every other language that I have used, this is completely
valid.  Yes 'i' was defined above, but 'i' should only be scoped
within the 'for' loop and should be invalid outside of it.



Another example:

if (x)
{
   var myArray:Array = new Array();
   // do more stuff
}

myArray.push(some data);

This one compiles, when I believe that it shouldn't.  myArray should
only be defined within the 'if' statement.  If you don't go into the
'if' statement you have a problem here.


Does anyone understand why the Flex compiler allows this?  Is this
just a BUG with the compiler?

Anyway, this is just driving me a little crazy. ;)

Gary



[flexcoders] Scale 9 on an Image?

2008-06-16 Thread toofah_gm
Is it possible to get an Image control to scale using scale 9 without
embedding the source bitmap?

If I embed the source bitmap and set scaleGridTop/scaleGridBottom/etc.
the Image control scales properly.

If I try to set scale9grid,
http://livedocs.adobe.com/flex/2/langref/flash/display/DisplayObject.html#scale9Grid,
 I get errors that seem to indicate that I am passing invalid parameters.

I really need a way to load an image dynamically and have slice nine
work for that image.  Is this possible without writing my own custom code?

Thanks!



[flexcoders] ContextMenu submenus

2008-06-13 Thread toofah_gm
Is there really no support for sub menus in the customitems of the
ContextMenu?  That's seems to be what I am finding and reading in the
forums.  Can someone verify this?



[flexcoders] Re: null pointer closing PopUpButton

2008-05-29 Thread toofah_gm
In order to get around this one, we ended up taking the PopUpButton
class code and making our own version of it...too many parts of it
were private and extending it to get rid of the problem was impossible.

If I get a second, I will try to upload some sample code to reproduce
the problem.  In my case I am popping up a menu.  The problem occurred
when I the popup closed after a menu click.


--- In flexcoders@yahoogroups.com, dbronk [EMAIL PROTECTED] wrote:

 Not sure how to get by this one.  I have a TileList with a custom item
 renderer.  The item renderer shows a type of business card ui.  One of
 the controls in this renderer is a PopUpButton.  The popup menu comes
 up just fine, but when the user clicks somewhere else I get a null
 pointer error in PopUpButton.as line 772:
 
 point = _popUp.parent.globalToLocal(point);
 
 _popUp.parent is null.  I'm sure it has something to do with being in
 an itemRenderer and the renderers being reused, but I'm at a loss on
 how to handle this.
 
 Suggestions?
 
 Thanks,
 Dale





[flexcoders] How do I change transparency of BitmapData to BLACK?

2008-05-09 Thread toofah_gm
OK, I figure this is easy, but just can't seem to get it right.

Anyone know how to take a loaded BitmapData object and make all of the
transparent areas in it black?



[flexcoders] Re: How do I change transparency of BitmapData to BLACK?

2008-05-09 Thread toofah_gm
I figured out how to get what I wanted using BitmapData.threshold:

image.bitmapData.threshold(image.bitmapData,
image.getRect(image), new Point(), , 0xFF00, 0xFF00,
0xFF00);


--- In flexcoders@yahoogroups.com, toofah_gm [EMAIL PROTECTED] wrote:

 OK, I figure this is easy, but just can't seem to get it right.
 
 Anyone know how to take a loaded BitmapData object and make all of the
 transparent areas in it black?





[flexcoders] Re: FlexPrintJob: print image AND text [SOLVED]

2008-05-08 Thread toofah_gm
Thanks for your response!

I made some breakthroughs this morning...we'll see if it is a fluke,
or if my changes really fix the problem for me. ;)

Essentially, we have been using our own FlexPrintJob class so that we
can better control portrait/landscape settings for our needs.  The
problems that I have been having hav existed in an older version of
the FlexPrintJob code that we had essentially copied because it did
not expose enough properties and methods to make it possible to extend
it properly.

I think that the new version of FlexPrintJob has the code that really
fixed the previously mentioned bug, not the Flash Player.  The
differences are the addition of calls to prepareForPrinting and
finishPrinting methods, which call the prepare and finish methods on
the object that is being printed and it's parent chain.  This code
seems to cause the objects on my page to be the correct sizes and
assure that they are ready for printing when they are added to the
print job.





--- In flexcoders@yahoogroups.com, Frederico Garcia [EMAIL PROTECTED]
wrote:

 Hi,
 
 I forgot posting that I'd found the reason to my problems. After some 
 hours struggling with my code trying to understand why sometimes images 
 got printed and sometimes they didn't I've found that the issue was in 
 Flash Player (got to the same bug report you mention).
 
 I believe the only solution is make users  update Flash.
 
 Kind Regards,
 
 Frederico Garcia
 
 toofah_gm escreveu:
  It seems that I am seeing the same problems described in this bug:
 
  http://bugs.adobe.com/jira/browse/SDK-7698
 
  I am using the latest FlashPlayer: 9,0,115.
 
  --- In flexcoders@yahoogroups.com, Frederico Garcia fmotagarcia@
  wrote:

  mitek17 escreveu:
  
  Hi Frederico,
 
  printAsBitmap is not related to the problem, as
images/charts/whatever
  simply don't have enough time to be rendered.
 
  You should add event listeners to all your images/charts and
wait for
  the creationComplete  updateComplete events.
 
  Cheers,
  Dmitri.
 
 
   
 
  --- In flexcoders@yahoogroups.com, Frederico Garcia fmotagarcia@
  wrote:


  Hi,
 
  I'm trying to print Image and Text, and I want the text to be
  
  clear, so 

  I set printAsBitmap = false. The problem is, sometimes it
prints the 
  images, sometimes it doesn't.
 
  Any help?
 
  Regards,
 
  Frederico Garcia
 
  
  
 
 
  --
  Flexcoders Mailing List
  FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:

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

  Yahoo! Groups Links
 
 
 
 
  __ NOD32 2787 (20080112) Information __
 
  This message was checked by NOD32 antivirus system.
  http://www.eset.com
 
 
 


  Hi,
 
  This was due to a player bug. Updating to version 9.0.r115 solved
the 
  problem.
 
  http://bugs.adobe.com/jira/browse/SDK-7698
 
  Regards,
 
  Frederico Garcia
 
  
 
 
 
  
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
Links
 
 
 
 
  __ NOD32 3085 (20080508) Information __
 
  This message was checked by NOD32 antivirus system.
  http://www.eset.com
 
 
 
 





[flexcoders] Re: FlexPrintJob: print image AND text [SOLVED]

2008-05-08 Thread toofah_gm
Just an update.  Some of my images are still not being printed, but
the text is no longer cutting off.  I'll have to keep working on the
images, maybe they are not finished loading sometimes.

--- In flexcoders@yahoogroups.com, toofah_gm [EMAIL PROTECTED] wrote:

 Thanks for your response!
 
 I made some breakthroughs this morning...we'll see if it is a fluke,
 or if my changes really fix the problem for me. ;)
 
 Essentially, we have been using our own FlexPrintJob class so that we
 can better control portrait/landscape settings for our needs.  The
 problems that I have been having hav existed in an older version of
 the FlexPrintJob code that we had essentially copied because it did
 not expose enough properties and methods to make it possible to extend
 it properly.
 
 I think that the new version of FlexPrintJob has the code that really
 fixed the previously mentioned bug, not the Flash Player.  The
 differences are the addition of calls to prepareForPrinting and
 finishPrinting methods, which call the prepare and finish methods on
 the object that is being printed and it's parent chain.  This code
 seems to cause the objects on my page to be the correct sizes and
 assure that they are ready for printing when they are added to the
 print job.
 
 
 
 
 
 --- In flexcoders@yahoogroups.com, Frederico Garcia fmotagarcia@
 wrote:
 
  Hi,
  
  I forgot posting that I'd found the reason to my problems. After some 
  hours struggling with my code trying to understand why sometimes
images 
  got printed and sometimes they didn't I've found that the issue
was in 
  Flash Player (got to the same bug report you mention).
  
  I believe the only solution is make users  update Flash.
  
  Kind Regards,
  
  Frederico Garcia
  
  toofah_gm escreveu:
   It seems that I am seeing the same problems described in this bug:
  
   http://bugs.adobe.com/jira/browse/SDK-7698
  
   I am using the latest FlashPlayer: 9,0,115.
  
   --- In flexcoders@yahoogroups.com, Frederico Garcia fmotagarcia@
   wrote:
 
   mitek17 escreveu:
   
   Hi Frederico,
  
   printAsBitmap is not related to the problem, as
 images/charts/whatever
   simply don't have enough time to be rendered.
  
   You should add event listeners to all your images/charts and
 wait for
   the creationComplete  updateComplete events.
  
   Cheers,
   Dmitri.
  
  

  
   --- In flexcoders@yahoogroups.com, Frederico Garcia fmotagarcia@
   wrote:
 
 
   Hi,
  
   I'm trying to print Image and Text, and I want the text to be
   
   clear, so 
 
   I set printAsBitmap = false. The problem is, sometimes it
 prints the 
   images, sometimes it doesn't.
  
   Any help?
  
   Regards,
  
   Frederico Garcia
  
   
   
  
  
   --
   Flexcoders Mailing List
   FAQ:
 http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
   Search Archives:
 
   http://www.mail-archive.com/flexcoders%40yahoogroups.com 
 
   Yahoo! Groups Links
  
  
  
  
   __ NOD32 2787 (20080112) Information __
  
   This message was checked by NOD32 antivirus system.
   http://www.eset.com
  
  
  
 
 
   Hi,
  
   This was due to a player bug. Updating to version 9.0.r115 solved
 the 
   problem.
  
   http://bugs.adobe.com/jira/browse/SDK-7698
  
   Regards,
  
   Frederico Garcia
  
   
  
  
  
   
  
   --
   Flexcoders Mailing List
   FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
   Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
 Links
  
  
  
  
   __ NOD32 3085 (20080508) Information __
  
   This message was checked by NOD32 antivirus system.
   http://www.eset.com
  
  
  
  
 





[flexcoders] Vector printing and transparency - consistency problem

2008-05-08 Thread toofah_gm
OK, I've got most of my vector printing working and looking really
nice except for transparency.

I sure wish that I could print images with transparency while still
doing Vector printing, but understand that there is currently no way
to do this right now.  Will this be offered in the future?

The problem that I am still having is consistency.  Pretend that I
have a page with 5 images on it, each one has some transparency in it.
 If I print this same page over and over I will get different results
each time.  Sometimes the page will only print images #1, #3, and #4.
 The next time it might only print images #2, #3, and #5.  The next
time it might print all 5 images.  The results seem to be random.  The
images have all been pre-loaded before printing and it doesn't seem to
be a loading problem.  The problem ONLY exists for images with
transparency in them.  Any picture that doesn't have transparency in
it will print correctly every time without fail.

Does anyone have any ideas what is happening?  I sure would like some
consistency so that I will know what customers can expect.

Thanks!



[flexcoders] vector printing missing text/bitmaps

2008-05-07 Thread toofah_gm
When I print using the vector option (printAsBitmap=false) I sometimes
see TextAreas with missing text at the bottom.  I also see that
sometimes images are missing from the pages.  Does anyone have any
ideas about what is happening or how to fix it?  The components are
loaded and in tact on the visible page object that gets passed to the
printer.

Thanks!



[flexcoders] Re: Help! - certain portions of text disappear when printing from Flex App

2008-05-07 Thread toofah_gm
I am frustrated with the same problem!

--- In flexcoders@yahoogroups.com, Mike Anderson [EMAIL PROTECTED] wrote:

 Hello All, this is one of the most frustrating problems I think I ever
 had to deal with...
 
 Instead of creating an invisible container which properly lays out all
 my printable elements, I went and created a WYSIWYG mock-up of the final
 elements to be printed.  This way, once the user is satisfied with what
 he/she sees on the screen, they can be confident that this will be what
 comes out on the printer.  For ease of use, I placed my PrintControl
 inside of a drag able  sizeable TitleWindow - so the user can Pan and
 Zoom the content around.
 
 With that said, I am experiencing some issues with my Text disappearing
 - specifically at certain Zoom Levels.  And it's ALWAYS the last Word in
 a Sentence.  I am not sure why this is happening, and why it only
 happens at certain Zoom Levels, but it's becoming increasingly
 frustrating for me and my users.
 
 Quick FYI, I am using the mx:Text/ control to display my text.  I am
 considering using a different control, and rendering it all as HTML - so
 I don't have to create all these unique Styles, due to the text being so
 different in so many places.
 
 Just in case my problems had to do with Fonts, and any related issues
 that go along with Fonts, I went ahead and embedded all my Fonts as well
 as turning on the FlashType option.
 
 I have my Anti-Aliasing settings set to maximum, and I tried both
 Pixel and Sub-Pixel settings in hopes of that having a positive
 effect.  In addition to this, I tried playing with all the
 FlexPrintJobScaleType settings in case that was messing with my text.
 
 Still, I get sporadic results - as well as getting different results on
 *different computers*.
 
 Could somebody please offer any words of wisdom as to why this may be
 happening?
 
 Thank you in advance for any help you can offer,
 
 Mike





[flexcoders] Re: FlexPrintJob not printing multiple formatted lines successf

2008-05-07 Thread toofah_gm
I am seeing the same problem...I am using embedded fonts and turning
anti-aliasing off...the last line of text is often cut off.

--- In flexcoders@yahoogroups.com, John Mark Hawley [EMAIL PROTECTED] wrote:

 In order for Flash to know how much room it needs to print an
autosized text field, the font must be embedded. There's no way 'round
it. The _height of an autosized text field without embedded fonts will
not be correct (for printing).
 
 
  
  From: scott_flex [EMAIL PROTECTED]
  Date: 2007/05/01 Tue AM 08:19:08 CDT
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: FlexPrintJob not printing multiple
formatted lines successfully
  
  
  Geneva, Tahoma and Verdana are 3 problematic fonts i have isolated to 
  not print correctly.  I never get the last line of text to print.
  
  These 3 fonts are installed on my pc.
  
  The height of my text area is not set, it grows with the amount of 
  html text and this has worked very well.  Always showing all text on 
  screen but these 3 fonts never want to print the last line.
  
  However, for these 3 fonts if I set the height of my text control to 
  2 pixels larger that what it would normally grow to when the height 
  is not set, everything prints out ok... but I can't set the height of 
  my text controls because I don't know ahead of time how much text 
  they will contain.
  
  At this time i plan to remove these 3 fonts from my selection list. 
  It's odd since these are pretty common fonts.
  
  Maybe i need to embed the fonts in the app itself, probably the 
  safest since other users may not have the same font list as I but 
  that's why i was sticking with common fonts.
  
  Any other insight would be helpful
  
  --Scott
  
  
  
  
  --- In flexcoders@yahoogroups.com, scott_flex skrause@ wrote:
  
   
   Well i have determined that it really doesn't matter what font 
   family or size it is it just won't print the last line even 
   though all lines appear on screen with no scroll bars.
   
   The html text of my mx:text object is:
   TEXTFORMAT LEADING=2P ALIGN=LEFTFONT FACE=Verdana 
   SIZE=12 COLOR=#00 LETTERSPACING=0 KERNING=0When i try 
  to 
   print this text from a mx:text control and the text wraps to more 
   than one line, the last line will not print.  It just prints a 
  white 
   blank line intstead.  My mx:text component is set to 400 width 
  which 
   is inside a grid item which inside a grid row which is inside  
  mx:gid 
   object./FONT/P/TEXTFORMAT
   
   The width of my mx:text object is set to 400... and even though the 
   first few lines print they don't line break exactly as they do on 
   screen... just thought that was odd but probably has something to 
  do 
   with the scaling when it prints.  I just want it to print the last 
   line.
   
   
   Any help would be greatly appreciated... i'm desperate for ideas of 
   what might be the issue.
   
   --Scott
   
   
   --- In flexcoders@yahoogroups.com, scott_flex skrause@ wrote:
   

I have a text control displayed with multiple lines of wrapped 
   text , 
no scroll bars, all text is completely displayed on screen.  When 
  i 
send this text to the printer only the first line is printed.

The text control is displaying html formatted text.  This only 
   happens 
to certain font/size combinations.  Verdana 11 prints first line 
   only, 
second and 3rd lines don't print, even though they are on screen 
   ok.  
Verdana 12 prints just fine, 2nd and following lines print ok.

I've set the print object to NOT print as bitmap 
   (printAsBitmap=false) 
and the scale type for each object added to the print job is set 
  to 
show all.

Haven't figured out why this happens for some font/size 
   combonations... 
any ideas?
   
  
  
  
  
  
 
 --
 John Mark Hawley
 The Nilbog Group
 773.968.4980 (cell)





[flexcoders] Re: PNG transparencies no longer work, when printing as Vector

2008-05-07 Thread toofah_gm
This is  very frustrating.  I need vector printing on some portions of
my print so that my text can look great.  I need raster printing so
that my transparency works.  Sure wish I could set some portions to
vector and other portions to raster withing the same page of a print job.



--- In flexcoders@yahoogroups.com, Mike Anderson [EMAIL PROTECTED] wrote:

 Hello All,
 
 When sending my FlexPrintJobs to the printer as a Vector
 (printAsBitmap=false), any thing that was previously transparent on the
 image shows up as Black on the printout.
 
 This sort of defeats the purpose of Alpha Channels don't ya think??
 
 Although sending the PrintJob as a Bitmap fixes the transparency issues,
 it degrades the output quality so badly, that printing as a Bitmap no
 longer has any use to me.
 
 Does anybody have any suggestions on how I can address this issue?
 
 Thanks in advance for any help offered.
 
 Mike





[flexcoders] Re: FlexPrintJob: print image AND text [SOLVED]

2008-05-07 Thread toofah_gm
It seems that I am seeing the same problems described in this bug:

http://bugs.adobe.com/jira/browse/SDK-7698

I am using the latest FlashPlayer: 9,0,115.

--- In flexcoders@yahoogroups.com, Frederico Garcia [EMAIL PROTECTED]
wrote:

 mitek17 escreveu:
  Hi Frederico,
 
  printAsBitmap is not related to the problem, as images/charts/whatever
  simply don't have enough time to be rendered.
 
  You should add event listeners to all your images/charts and wait for
  the creationComplete  updateComplete events.
 
  Cheers,
  Dmitri.
 
 
   
 
  --- In flexcoders@yahoogroups.com, Frederico Garcia fmotagarcia@
  wrote:

  Hi,
 
  I'm trying to print Image and Text, and I want the text to be
clear, so 
  I set printAsBitmap = false. The problem is, sometimes it prints the 
  images, sometimes it doesn't.
 
  Any help?
 
  Regards,
 
  Frederico Garcia
 
  
 
 
 
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
  Yahoo! Groups Links
 
 
 
 
  __ NOD32 2787 (20080112) Information __
 
  This message was checked by NOD32 antivirus system.
  http://www.eset.com
 
 
 

 Hi,
 
 This was due to a player bug. Updating to version 9.0.r115 solved the 
 problem.
 
 http://bugs.adobe.com/jira/browse/SDK-7698
 
 Regards,
 
 Frederico Garcia





[flexcoders] vector print text cut off

2008-04-28 Thread toofah_gm
I am working on printing for my application.  I noticed that when I
use vector printing (printAsBitmap=false) text is sometimes cut off
and not printing.  

On one page if I have a text box too high on the page it will not
print, or only the bottom portion will print...if I move it down, the
text box prints just fine.

Anybody know what is happening?  The text that is being cut off is not
really close to any 'margin' area, just higher on the page.

Thanks.





[flexcoders] Re: printAsBitmap true vs. false

2008-04-27 Thread toofah_gm
I'm not sure what happens underneath the printing API, but sure would
be nice if they improved the API to let us set vector/raster on a
component by component basis...this would really work well for me
instead of having to set it for the entire object added to the print
job.  Is it worth writing up a bug with this sort of suggestion?

BTW, we have used ImageSnapshot as well.  It allows us to create
prints of effects, like drop shadows, etc. which don't show up at all
otherwise...but it seems to have the same results as
printAsBitmap=true, text looks much worse than vector printed text.

Can't I just have the best of both worlds from Adobe?


--- In flexcoders@yahoogroups.com, Frederico Garcia [EMAIL PROTECTED]
wrote:

 Just another annoyance from the not so great Flash printing API. 
 You're not missing anything, you actually have to choose between vector 
 text or transparency. printAsBitmap=false can also give some unpleasant 
 surprises since in some versions of Flash Player images just don't show 
 at all.
 For FlexReport the choice was obvious... Reports are mostly text, and 
 it's not a big deal not being able to use transparent backgrounds. If 
 you really need transparency you'll have to live with crappy text.
 By the way, why do you need the transparency... there are some 
 workarounds you can try (such as getting a imagesnapshot of the 
 container holding the image)
 
 Kind Regards,
 
 Frederico Garcia
 
 Dmitri Girski escreveu:
  And? 
 
  It sets printAsBitmap = false.
  So what? It does not answer the question.
 
 
 
  --- In flexcoders@yahoogroups.com, nathanpdaniel ndaniel@ wrote:

  Have you looked into FlexReport?  http://code.google.com/p/flexreport
 
  --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote:
  
  I am working on printing for my application.  It seems that if I
  choose raster printing by setting 'printAsBitmap=true' then my text
  looks terrible, but my images with transparency print correctly.
 
  If I choose vector printing by setting 'printAsBitmap=false' then my
  text looks great...even with very very small fonts, but the
  transparency on my images turns completely BLACK, which is totally
  unacceptable.
 
  Am I missing something here that could give me the best of both
  worlds?  I hate to be forced to offer two printing options, both of
  which are not very good.  It is also not an option for us to give 

  the
  
  user a PDF or JPEG.
 
  Thanks!
 

 
 
 
  
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
Links
 
 
 
 
  __ NOD32 3056 (20080426) Information __
 
  This message was checked by NOD32 antivirus system.
  http://www.eset.com
 
 
 
 





[flexcoders] printAsBitmap true vs. false

2008-04-25 Thread toofah_gm
I am working on printing for my application.  It seems that if I
choose raster printing by setting 'printAsBitmap=true' then my text
looks terrible, but my images with transparency print correctly.

If I choose vector printing by setting 'printAsBitmap=false' then my
text looks great...even with very very small fonts, but the
transparency on my images turns completely BLACK, which is totally
unacceptable.

Am I missing something here that could give me the best of both
worlds?  I hate to be forced to offer two printing options, both of
which are not very good.  It is also not an option for us to give the
user a PDF or JPEG.

Thanks!




[flexcoders] Re: Allow Flex apps to live outside the sandbox

2008-04-05 Thread toofah_gm
Rick,  Thanks for the great response...I see what you are saying.

It's a delicate balance.  If users responsibly read and answered a
trust dialog with a signed certificate, this would not be an issue.
 If the user says that they trust you, why not have access to their
system.  This is what any other 'installed' application can do.

However, if users don't react responsibly and just trust these dialogs
willy nilly there could be wide spread panic that Flash apps are no
longer to be trusted, etc, etc.

Just thinking that Flex apps could be even cooler if we could get past
this problem somehow.

Gary



--- In flexcoders@yahoogroups.com, Rick Winscot [EMAIL PROTECTED]
wrote:

 Gary - anything is possible with a little creativity! Keep in mind
that the
 Flash sandbox doesn't 'lock you down' in any way shape or form. It
is merely
 a mechanism to restrict domain/port access to resources. I see where
you are
 going with this. but hang with me -
 
  
 
 If you were to add, say, file system access to Flex. you would
inherit all
 the overhead of a framework that supports file system access. How do you
 control access rights to files? Could I, from a Flex app search your
hard
 drive? Delete all your system files? Examine your browser history?
Once you
 think of the implications of granting someone this kind of power. it
makes a
 great deal of sense by default to deny access to all but limited
read only
 operations (i.e. URLLoader). How do you think Internet users would
react if
 they knew that any website or email with a 1px by 1px flash movie
embedded
 in it could do this kind of thing? Absolute power corrupts absolutely. 
 
  
 
 If you _need_ to touch the local file system or similar. then moving
to AIR
 is your next choice. But realize that this is _not_ a carte blanche
ticket
 to access. I highly recommend you read the April Flash Player Security
 Update leaf. AIR adds many cool local features - but still has to
play nice
 with Flash security. 
 
  
 
 Rick Winscot
 
  
 
  
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of toofah_gm
 Sent: Friday, April 04, 2008 10:29 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Allow Flex apps to live outside the sandbox
 
  
 
 I totally understand the sandbox issues associated with Flex apps,
 but wonder why Adobe doesn't provide a secure way to allow apps to get
 outside this sandbox with a Flex app.
 
 Obviously this can be accomplished in an AIR app, but what if I want
 to keep things simple? It seems a lot simpler for customers to use my
 Flex app inside of my web page than to 'install' an AIR app, something
 that they are not familiar with.
 
 Since Adobe has the technology and now has the API to allow AIR apps
 to be outside of the sandbox, why not expose this in Flex? Allow
 developers to sign their Flex app. Then provide the user with a
 certificate and ask them to trust the app, if they do, let the app
 play outside the sandbox. This is kind of what can be done in a java
 applet.
 
 What do you think? Am I out in left field?
 
 Gary





[flexcoders] Allow Flex apps to live outside the sandbox

2008-04-04 Thread toofah_gm
I totally understand the sandbox issues associated with Flex apps,
but wonder why Adobe doesn't provide a secure way to allow apps to get
outside this sandbox with a Flex app.

Obviously this can be accomplished in an AIR app, but what if I want
to keep things simple?  It seems a lot simpler for customers to use my
Flex app inside of my web page than to 'install' an AIR app, something
that they are not familiar with.

Since Adobe has the technology and now has the API to allow AIR apps
to be outside of the sandbox, why not expose this in Flex?  Allow
developers to sign their Flex app.  Then provide the user with a
certificate and ask them to trust the app, if they do, let the app
play outside the sandbox.  This is kind of what can be done in a java
applet.

What do you think?  Am I out in left field?

Gary



[flexcoders] compile CSS to SWF using Ant

2008-03-31 Thread toofah_gm
Does anyone know how to compile a CSS into a SWF using Ant?  The Flex
Ant Tasks seem to indicate that it is possible with the mxmlc task,
but I am having trouble getting it to compile.

Thanks!



[flexcoders] Re: compile CSS to SWF using Ant

2008-03-31 Thread toofah_gm
You're right...that worked...I was not including dependent
library-paths last time I tried this and thought it was the mxmlc file
attribute not accepting a CSS file option...fixed my dependencies and
works great!

Thanks for your help!

--- In flexcoders@yahoogroups.com, Gaurav. Jain [EMAIL PROTECTED] wrote:

 What error are you getting? 
 
 Theoretically the mxmlc call should be similar to the one used for mxml
 compilation. 
 
 Like:
 mxmlc file=styles.css output=${swf.output}/styles.swf /
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of toofah_gm
 Sent: Monday, March 31, 2008 11:19 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] compile CSS to SWF using Ant
 
 Does anyone know how to compile a CSS into a SWF using Ant?  The Flex
 Ant Tasks seem to indicate that it is possible with the mxmlc task,
 but I am having trouble getting it to compile.
 
 Thanks!
 
 
 
 
 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
 Links





[flexcoders] Re: flex ant compc include-file tags

2008-03-27 Thread toofah_gm
Is anyone else using 'compc' and Ant?  How are you including asset files?

--- In flexcoders@yahoogroups.com, toofah_gm [EMAIL PROTECTED] wrote:

 I am creating an Ant script to compile my flex project.
 
 In my compc task is there a way to give a directory for the
 include-file tags instead of listing out each individual asset and
 css file that I want to include?  I have used pathconvert to build
 my 'include-classes' property dynamically. 
 
 There must be a way to do this since it would be very unwieldy to
 always have to update the script every time you add a new resource.
 
 Thanks,
 
 Gary





[flexcoders] flex ant compc include-file tags

2008-03-26 Thread toofah_gm
I am creating an Ant script to compile my flex project.

In my compc task is there a way to give a directory for the
include-file tags instead of listing out each individual asset and
css file that I want to include?  I have used pathconvert to build
my 'include-classes' property dynamically. 

There must be a way to do this since it would be very unwieldy to
always have to update the script every time you add a new resource.

Thanks,

Gary



[flexcoders] Re: Automate build for large apps?

2008-03-25 Thread toofah_gm
Does anyone have an answer for this?

--- In flexcoders@yahoogroups.com, flexinator2 [EMAIL PROTECTED] wrote:

 We have a very large Flex2 application with several hundred classes
 and around a dozen RSL (swc files). We've been using the flex2 eclipse
 IDE to do builds but would like to automate it and throw it in our
 CruiseControl server. I'm using nant to perform the build.
 
 I've been using the command line compilers -- compc.exe to build the
 .swc files. I am using config xml files with the -load-config
parameter. 
 
 I don't see any other way to build .swc files without having to
 manually tell compc .exe which classes to include (among other things).
 
 Beyond this being tedious, every time a new class is added, removed or
 renamed, the hard coded build script will blow up or at least won't
 include what it should. Perhaps I'm missing something, but I didn't
 see any way to have the command line compilers read the already
 existing project files such as .actionScriptProperties and
 .flexLibProperties that already have all the information I need to
 build a .swc file.
 
 Now I could build my own executable that reads these project files and
 build new config  xml files on the fly for compc. This way I can make
 a truly automated build that will read any changes made to the flex
 projects.
 
 Is there a better way to accomplish an automated build for large Flex2
 apps?
 
 Thanks,
 Tim





[flexcoders] Installing Ant Plugin for FB3 StandAlone

2008-03-25 Thread toofah_gm
How do you install the regular eclipse ant plugins into FB3 StandAlone
product?



[flexcoders] Re: Installing Ant Plugin for FB3 StandAlone

2008-03-25 Thread toofah_gm
I was able to get the Ant Plugins by installing the JDT from the
updates tool.

--- In flexcoders@yahoogroups.com, toofah_gm [EMAIL PROTECTED] wrote:

 How do you install the regular eclipse ant plugins into FB3 StandAlone
 product?





[flexcoders] compc java.lang.OutOfMemoryError: Java heap space

2008-03-25 Thread toofah_gm
I am now trying to build using Ant and keep getting the following error:

[compc] Loading configuration file C:\Program Files\Adobe\Flex
Builder 3\sdks\3.0.0\frameworks\flex-config.xml
[compc] Error: Java heap space
[compc] java.lang.OutOfMemoryError: Java heap space


Does anyone know how to fix it?  I've tried increasing the java memory
vm parameters.  I've also added fork=true to the compc task.  I
can't find a solution.

Thanks,

Gary



[flexcoders] Re: mxmlc running out of heap space...

2008-03-25 Thread toofah_gm
Thanks venkat.

Where do I set ANT_OPTS?  Can I set it within FlexBuilder? or in my
ant build.xml file anywhere?

Gary


--- In flexcoders@yahoogroups.com, rueter007 [EMAIL PROTECTED] wrote:

 set the following environment variable before the build depending on
 your platform.
 
 set ANT_OPTS=-Xmx500M 
   or
 set ANT_OPTS=-Xmx500M ; export ANT_OPTS
 
 - venkat
 
 --- In flexcoders@yahoogroups.com, ivo cervantes_vive@ wrote:
 
  I have a machine with 4GB of memory on which I develop an app using
 Flex Builder 3 with no problems. Whenever I try to build the project
 from the command-line thru an Ant task tho I get a:
  
  [mxmlc] Error: Java heap space
  [mxmlc] java.lang.OutOfMemoryError: Java heap space
  
  I edited the file flex3sdk_be_121207/bin/jvm.config so that the heap
 space is increased to 1GB but I still keep getting this error.
  
  Does anyone have any suggestions on how can I address this? I am
 trying to make builds outside of Flex Builder so they can be automated.
  
  Thanks,
  
  - Ivo
 





[flexcoders] Flex 2 to Flex 3 migration

2008-03-24 Thread toofah_gm
We are finally migrating from Flex 2 to Flex 3.

Most of our code migrated without issue, but there are a few UI issues
that I am chasing:

 - Some of my skinned buttons are stretched.  I have the following
button skin defined:
.nextPageBtn
{
up-skin: Embed(source='assets/images/nextPageBtn.png');
over-skin: Embed(source='assets/images/nextPageBtn.png');
down-skin: Embed(source='assets/images/nextPageBtn.png');
disabled-skin: Embed(source='assets/images/nextPageBtn-disabled.png');
}

In Flex 2 I could simply use the skin with the following line:
mx:Button styleName=nextPageBtn verticalCenter=0 right=5/

It seems that I need to specify width and height in Flex 3.  Why
do I need to specify size information on this button.  Nothing in the
button layout tells it to stretch...if I specify size information
for the button I can get it to look right, but if I update the skin
later I will need to re-adjust the size.  This does not seem
right...seems like something is not working correctly here.



Another problem is with a Gradient style that I am applying to a
Canvas using SimpleGradientBorder (you can google it).  This style
works great still in most areas of my product.  But does not apply for
some reason a Canvas which is the root of a PopUpButton Popup.  I
can't see anything that I am doing differently in this case and it
worked correctly in Flex 2.  I changed HaloBorder to PanelSkin, but
this did not seem to make a difference.



There are a couple of other things that I am chasing, but I need to
look into them more.


Thanks for any help on completing this migration!

Gary





[flexcoders] DragEvent propagation

2008-03-06 Thread toofah_gm
I have two objects on a canvas...both of which are Drag listeners and
can accept various Drops.  These objects overlap one another.

If I drag an object over the two objects, only the one at the top of
the Z-order, (TextArea), gets the Drag events.  It is blocking the
object underneath from getting these events, even though the object
underneath is viewable through it.  If the TextArea on top does not
accept the Drop, can I have the DragEvent somehow propogated down to
the object underneath it so that it also has a chance to accept the drop?

Thanks!





[flexcoders] New SDK with FB3?

2008-02-25 Thread toofah_gm
I just installed the release of FB3...I installed it side by side with
my old milestone version for not...and I noticed that the available
SDKs are still 2.01 Hotfix 3 and Flex 3 Beta 3.

Was there supposed to be a new SDK installed?  Is this a separate install?

Thanks.



[flexcoders] Re: New SDK with FB3?

2008-02-25 Thread toofah_gm
I installed the standalone version and did not uninstall the old
version first because I wanted to be cautious :I.

If I uninstall and re-install will I still have a 2.01 Hotfix SDK
option available?  I'm not ready to move to SDK 3 yet.

Thanks!


--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED]
wrote:

 On Monday 25 Feb 2008, toofah_gm wrote:
  I just installed the release of FB3...I installed it side by side with
  my old milestone version for not..
 
 Plugin or standalone ?
 Did you uninstall the old version first ?
 
 -- 
 Tom Chiverton
 Helping to vitalistically reintermediate performance-oriented
convergence
 on: http://thefalken.livejournal.com
 
 
 
 This email is sent for and on behalf of Halliwells LLP.
 
 Halliwells LLP is a limited liability partnership registered in
England and Wales under registered number OC307980 whose registered
office address is at Halliwells LLP, 3 Hardman Square, Spinningfields,
Manchester, M3 3EB.  A list of members is available for inspection at
the registered office. Any reference to a partner in relation to
Halliwells LLP means a member of Halliwells LLP.  Regulated by The
Solicitors Regulation Authority.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named above
and may be confidential or legally privileged.  If you are not the
addressee you must not read it and must not use any information
contained in nor copy it nor inform any person other than Halliwells
LLP or the addressee of its existence or contents.  If you have
received this email in error please delete it and notify Halliwells
LLP IT Department on 0870 365 2500.
 
 For more information about Halliwells LLP visit www.halliwells.com.





[flexcoders] Re: New SDK with FB3?

2008-02-25 Thread toofah_gm
Uninstalling and re-installing fixed the problem!

--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED]
wrote:

 On Monday 25 Feb 2008, toofah_gm wrote:
  If I uninstall and re-install will I still have a 2.01 Hotfix SDK
  option available?  I'm not ready to move to SDK 3 yet.
 
 Yes.
 You can always add additional SDK's in the properties of
Eclipse/Builder.
 
 -- 
 Tom Chiverton
 Helping to competently leverage second-generation platforms
 on: http://thefalken.livejournal.com
 
 
 
 This email is sent for and on behalf of Halliwells LLP.
 
 Halliwells LLP is a limited liability partnership registered in
England and Wales under registered number OC307980 whose registered
office address is at Halliwells LLP, 3 Hardman Square, Spinningfields,
Manchester, M3 3EB.  A list of members is available for inspection at
the registered office. Any reference to a partner in relation to
Halliwells LLP means a member of Halliwells LLP.  Regulated by The
Solicitors Regulation Authority.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named above
and may be confidential or legally privileged.  If you are not the
addressee you must not read it and must not use any information
contained in nor copy it nor inform any person other than Halliwells
LLP or the addressee of its existence or contents.  If you have
received this email in error please delete it and notify Halliwells
LLP IT Department on 0870 365 2500.
 
 For more information about Halliwells LLP visit www.halliwells.com.





[flexcoders] Error #1034: Type Coercion failed in EventDispatcher/dispatchEventFunction()

2008-02-05 Thread toofah_gm
I am seeing a very strange problem that I am unable to track down.

I have a custom Event class called ControllerEvent.  Essentially it
wraps Event and hangs onto some custom data for me.

I've been using it without issue for a long time...now today in one
case in my code when I call dispatchEvent with my ControllerEvent it
throws the following error:

TypeError: Error #1034: Type Coercion failed: cannot convert
mr.mvc.controller::[EMAIL PROTECTED] to Array.
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()

I don't understand what is happening here.  The event that is being
passed in is no different than any other instance that I have
previously passed in.  It's like something else is EventDispatcher is
in a bad state in this case or something.  Sure wish there was a way
to see inside of the flash.events.EventDispatcher code so that I could
debug this.

Any ideas?

Thanks!



[flexcoders] Re: Error #1034: Type Coercion failed in EventDispatcher/dispatchEventFunction()

2008-02-05 Thread toofah_gm
Ok, as suspected this was something really dumb...

There was a listener for the event being dispatched which had an
incorrect parameter...it was trying to convert the event parameter to
the invalid Array!

Hope this moment of stupidity helps someone else. ;)


--- In flexcoders@yahoogroups.com, toofah_gm [EMAIL PROTECTED] wrote:

 I am seeing a very strange problem that I am unable to track down.
 
 I have a custom Event class called ControllerEvent.  Essentially it
 wraps Event and hangs onto some custom data for me.
 
 I've been using it without issue for a long time...now today in one
 case in my code when I call dispatchEvent with my ControllerEvent it
 throws the following error:
 
 TypeError: Error #1034: Type Coercion failed: cannot convert
 mr.mvc.controller::[EMAIL PROTECTED] to Array.
   at flash.events::EventDispatcher/dispatchEventFunction()
   at flash.events::EventDispatcher/dispatchEvent()
 
 I don't understand what is happening here.  The event that is being
 passed in is no different than any other instance that I have
 previously passed in.  It's like something else is EventDispatcher is
 in a bad state in this case or something.  Sure wish there was a way
 to see inside of the flash.events.EventDispatcher code so that I could
 debug this.
 
 Any ideas?
 
 Thanks!





[flexcoders] Re: getRect returns rectangle that includes children's bounds, is there an alter

2008-01-25 Thread toofah_gm
The problem is that I am getting hits on parts of the objects that are
masked. :(

Thanks again for your help.

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 I'm not sure what problem you're having with hitTestObject.  If the
 objects are visible (not masked) they should be hittable.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of toofah_gm
 Sent: Friday, January 25, 2008 10:45 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: getRect returns rectangle that includes
 children's bounds, is there an alter
 
  
 
 I was hoping to take advantage of the translation to the
 targetCoordinateSpace that is being done underneath the covers of
 getRect()...if I need to use the width/height of the parent component,
 I will need to do this translation myself. I can do this, but was
 hoping that I was just missing something here.
 
 Any idea how this problem relates to the hitTestObject() matches?
 
 Thanks again for your quick response!!!
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  Properly designed UIComponent subclasses report a measuredWidth/Height
  (and measuredMinWidth/MinHeight) via the measure() method, and are
  subsequently given a size by their parent which may not be those sizes
  in updateDisplayList() where they draw graphics and/or size place
  children. Those children may extend outside the bounds and may be
  masked if needed. However, the width and height properties of the
  UIComponent will be the size given by the parent while getRect will
  return the bounding box of the children
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of toofah_gm
  Sent: Friday, January 25, 2008 10:29 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] getRect returns rectangle that includes
 children's
  bounds, is there an alternate
  
  
  
  I want to use getRect to get the bounds of my UIComponent.
  
  I just noticed that if my UIComponent has children that extend beyond
  the X/Y/Width/Height of my parent UIComponent, the rect returned
  extends to the boundaries of the largest child.
  
  Is there an alternate method that I could use? My hack to get around
  this is to override getRect and have it use another child that I force
  to be the size of the parent, whose size I am interested in.
  
  Thanks!
  
  Another problem that I see seems related. The hitTestObject method
  seems to have the same problem. It seems to be finding matches even
  though the parent UIComponent is clearly not a match. It must also be
  using boundaries of the children.
  
  Any thoughts?
  
  Thanks!
 





[flexcoders] getRect returns rectangle that includes children's bounds, is there an alternate

2008-01-25 Thread toofah_gm
I want to use getRect to get the bounds of my UIComponent.

I just noticed that if my UIComponent has children that extend beyond
the X/Y/Width/Height of my parent UIComponent, the rect returned
extends to the boundaries of the largest child.

Is there an alternate method that I could use?  My hack to get around
this is to override getRect and have it use another child that I force
to be the size of the parent, whose size I am interested in.

Thanks!

Another problem that I see seems related.  The hitTestObject method
seems to have the same problem.  It seems to be finding matches even
though the parent UIComponent is clearly not a match.  It must also be
using boundaries of the children.

Any thoughts?

Thanks!



[flexcoders] Re: getRect returns rectangle that includes children's bounds, is there an alter

2008-01-25 Thread toofah_gm
I was hoping to take advantage of the translation to the
targetCoordinateSpace that is being done underneath the covers of
getRect()...if I need to use the width/height of the parent component,
I will need to do this translation myself.  I can do this, but was
hoping that I was just missing something here.

Any idea how this problem relates to the hitTestObject() matches?

Thanks again for your quick response!!!


--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 Properly designed UIComponent subclasses report a measuredWidth/Height
 (and measuredMinWidth/MinHeight) via the measure() method, and are
 subsequently given a size by their parent which may not be those sizes
 in updateDisplayList() where they draw graphics and/or size place
 children.  Those children may extend outside the bounds and may be
 masked if needed.  However, the width and height properties of the
 UIComponent will be the size given by the parent while getRect will
 return the bounding box of the children
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of toofah_gm
 Sent: Friday, January 25, 2008 10:29 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] getRect returns rectangle that includes children's
 bounds, is there an alternate
 
  
 
 I want to use getRect to get the bounds of my UIComponent.
 
 I just noticed that if my UIComponent has children that extend beyond
 the X/Y/Width/Height of my parent UIComponent, the rect returned
 extends to the boundaries of the largest child.
 
 Is there an alternate method that I could use? My hack to get around
 this is to override getRect and have it use another child that I force
 to be the size of the parent, whose size I am interested in.
 
 Thanks!
 
 Another problem that I see seems related. The hitTestObject method
 seems to have the same problem. It seems to be finding matches even
 though the parent UIComponent is clearly not a match. It must also be
 using boundaries of the children.
 
 Any thoughts?
 
 Thanks!





[flexcoders] Event after ScrollEvent?

2007-12-20 Thread toofah_gm
The scroll event fires when scrolling occurs, but before the child
content has shifted.  Here is the documentation:

'At the time when this event is dispatched, the scrollbar has been
updated to the new position, but the container's child objects have
not been shifted to reflect the new scroll position.'

What events are available to listen to so that I will know that the
content has shifted?  I have tried listening to the UPDATE_COMPLETE
event at various levels, but this doesn't seem to work for me all the
time either.  I am immediately calling getRect() on one of the child
objects to get it's position relative to objects higher in my
application.  At the time I make this call, the returned rect is not
always the updated rect that reflects the scroll that has just occurred.

Thanks,
Gary



[flexcoders] Re: Event after ScrollEvent?

2007-12-20 Thread toofah_gm
I am trying to update another control that must be redrawn precisely
to line up with elements that are within the scrollable area.  When I
get the scroll events or other events I use getRect() to get
coordinates or my scrollable area relative my main application. 
Unfortunately, the results of getRect() do not line up yet, causing me
to draw at the incorrect position on the outer control.


--- In flexcoders@yahoogroups.com, rueter007 [EMAIL PROTECTED] wrote:

 what exactly are you trying to do after the scroll event?
 
 --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote:
 
  The scroll event fires when scrolling occurs, but before the child
  content has shifted.  Here is the documentation:
  
  'At the time when this event is dispatched, the scrollbar has been
  updated to the new position, but the container's child objects have
  not been shifted to reflect the new scroll position.'
  
  What events are available to listen to so that I will know that the
  content has shifted?  I have tried listening to the UPDATE_COMPLETE
  event at various levels, but this doesn't seem to work for me all the
  time either.  I am immediately calling getRect() on one of the child
  objects to get it's position relative to objects higher in my
  application.  At the time I make this call, the returned rect is not
  always the updated rect that reflects the scroll that has just
occurred.
  
  Thanks,
  Gary
 





[flexcoders] Spacing wrong with embedded fonts and htmlText -- please help

2007-12-06 Thread toofah_gm
I am seeing some terrible problems when attempting to make my html
text look nice in a TextArea component that uses embedded fonts.  

It seems that my br/ tags and my spaces are not being respected.

Here is some sample code that shows it all.  I have embedded arial.ttf
font in this example since it would be simple for anyone to get this
ttf and compile the code:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute creationComplete=init() xmlns:local=*
mx:Script
![CDATA[
[Embed(source=../assets/arial.ttf, fontName=Arial)]
public static var arialFont:Class;

private function init():void
{
// register arial font
Font.registerFont(arialFont);

inHTML.text = font color='#00' size='12' 
Jack Frost -
ib. 1948/i/fontbr /font color='#00' size='12'  Suzy
Snowflake - ib. 1948, m. 1970/i/fontbr /br /  font
color='#00' size='10'#8226; Nicholas Claus - ib.
1971/i/fontbr /   font color='#695e49' size='10'iSpouse/i
 - Mrs. Claus - ib. 1973, m. 1993/i/fontbr /;
inHTML2.text = font face='Arial' color='#00' 
size='12'
Jack Frost - ib. 1948/i/fontbr /font face='Arial'
color='#00' size='12'  Suzy Snowflake - ib. 1948, m.
1970/i/fontbr /br / font face='Arial' color='#00'
size='10'#8226; Nicholas Claus - ib. 1971/i/fontbr /  font
face='Arial' color='#695e49' size='10'iSpouse/i  - Mrs. Claus
- ib. 1973, m. 1993/i/fontbr /;
}   
]]
/mx:Script
mx:RichTextEditor id=editor x=10 y=395 title=Title/
local:CustomTextArea id=outHTML x=353 y=0 width=383
height=333 editable=false htmlText={editor.htmlText}/
mx:TextArea id=outText x=353 y=362 width=383 height=333
editable=false text={editor.htmlText}/
mx:TextArea id=inHTML x=10 y=10 width=314 height=161
editable=true/
mx:TextArea id=inHTML2 x=10 y=179 width=314 height=145
editable=true/
mx:Button x=10 y=352 label=IN click=editor.htmlText =
inHTML.text/
mx:Button x=58 y=352 label=IN-2 click=editor.htmlText =
inHTML2.text/
mx:Button x=118 y=352 label=OUT click=outHTML.htmlText =
editor.htmlText; outText.text = editor.htmlText/
/mx:Application

And here is my CustomTextArea component:
?xml version=1.0 encoding=utf-8?
mx:TextArea xmlns:mx=http://www.adobe.com/2006/mxml;
creationComplete=init()
mx:Script
![CDATA[
private function init():void
{
this.textField.embedFonts = true;
}
]]
/mx:Script
/mx:TextArea


Click on the IN-2 button to put the HTML in the second box into the
RTE and the box on the right.  You will notice that the RTE, which
does not use the embedded font, will display with correct
formatting...the CustomTextArea on the right, which is setup to use
the embeded font will not display correctly.

If you push the IN button, the HTML from the first box will get
pushed in...it does not have font face defined...in this case none
of the text shows up...IMHO it should show the text anyway with some
sort of default font.

What am I doing incorrectly?  I need HTML formatting to work correctly
with my embedded fonts.

Thanks,
Gary






[flexcoders] Re: RightClick Event

2007-11-12 Thread toofah_gm
Did anyone see this post?  Is there really no trigger to use?


--- In flexcoders@yahoogroups.com, toofah_gm [EMAIL PROTECTED] wrote:

 Is there an event that I can use to know that the ContextMenu is about
 to pop up when the user Right Clicks?  I would like to run some code
 to enable/disable some of my custom context menu items.
 
 Thanks!
 
 Gary





[flexcoders] Re: RightClick Event

2007-11-12 Thread toofah_gm
Thanks for the response!

The trouble is that I need to do a lookup that can't really be
databound in order to determine whether or not to enable the menu
item.  I really need to update it just before the context menu comes up.

--- In flexcoders@yahoogroups.com, johantrax [EMAIL PROTECTED]
wrote:

 Well, if I recall correctly, the right-click-event doesn't exist in
 Flash. 
 
 However you can alter the contextMenu.customItems (Array) of a
 component at any time, being even when it's not visible. And you can
 even use data-binding on it's items.
 
 Good luck,
 --jeetee
 
 --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote:
 
  Did anyone see this post?  Is there really no trigger to use?
  
  
  --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote:
  
   Is there an event that I can use to know that the ContextMenu is
about
   to pop up when the user Right Clicks?  I would like to run some code
   to enable/disable some of my custom context menu items.
   
   Thanks!
   
   Gary
  
 





[flexcoders] Re: RightClick Event

2007-11-12 Thread toofah_gm
I just found my answer:
http://livedocs.adobe.com/flex/15/flex_docs_en/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flex_Documentationfile=1276.htm

The ContextMenu has an event: ContextMenuEvent.MENU_SELECT




--- In flexcoders@yahoogroups.com, toofah_gm [EMAIL PROTECTED] wrote:

 Thanks for the response!
 
 The trouble is that I need to do a lookup that can't really be
 databound in order to determine whether or not to enable the menu
 item.  I really need to update it just before the context menu comes up.
 
 --- In flexcoders@yahoogroups.com, johantrax johan.temmerman@
 wrote:
 
  Well, if I recall correctly, the right-click-event doesn't exist in
  Flash. 
  
  However you can alter the contextMenu.customItems (Array) of a
  component at any time, being even when it's not visible. And you can
  even use data-binding on it's items.
  
  Good luck,
  --jeetee
  
  --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote:
  
   Did anyone see this post?  Is there really no trigger to use?
   
   
   --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote:
   
Is there an event that I can use to know that the ContextMenu is
 about
to pop up when the user Right Clicks?  I would like to run
some code
to enable/disable some of my custom context menu items.

Thanks!

Gary
   
  
 





[flexcoders] Getting outside the sandbox

2007-11-09 Thread toofah_gm
Is there a way for a Flex application to get outside the sandbox by
asking the user to trust it or something similar?

I would like my Flex application to be able to read from the system
Clipboard.

I understand the security issues at stake, but know that other
technologies like java applets can be signed and then trusted by the
user, allowing them to get outside of the sandbox.

Does Flex have this capability?

Thanks!

Gary



[flexcoders] Re: Getting outside the sandbox

2007-11-09 Thread toofah_gm
Alex,

I would also like to write to the clipboard.  It might also be
useful to save information on the hard drive to be used next time the
app starts.

I just discovered the SharedObject...maybe this will give me what I am
looking for...I didn't know that it existed.

This functionality may be something to consider for the future of
Flash apps...allow Flash apps to be trusted so that they can have
the same capabilities available to the new AIR apps...I don't think
that my customer base is ready for AIR yet, but if the app can live
inside of the web browser and load just like a web page, that would be
perfect.

Thanks!

Gary




--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 There is no API to read the clipboard in Flash, so I think you have a
 different issue than a sandbox issue.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of toofah_gm
 Sent: Friday, November 09, 2007 12:38 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Getting outside the sandbox
 
  
 
 Is there a way for a Flex application to get outside the sandbox by
 asking the user to trust it or something similar?
 
 I would like my Flex application to be able to read from the system
 Clipboard.
 
 I understand the security issues at stake, but know that other
 technologies like java applets can be signed and then trusted by the
 user, allowing them to get outside of the sandbox.
 
 Does Flex have this capability?
 
 Thanks!
 
 Gary





[flexcoders] Re: Getting outside the sandbox

2007-11-09 Thread toofah_gm
As a side note, how is Buzzword doing Ctrl+C/Ctrl+X/Ctrl+V?  IE eats
these events for us unless we are inside of a text area.

--- In flexcoders@yahoogroups.com, Samuel R. Neff [EMAIL PROTECTED]
wrote:

 I believe Buzzword uses JavaScript for clipboard interaction for this
 reason...
  
 ---
 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]
   
  
 
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Alex Harui
 Sent: Friday, November 09, 2007 5:09 PM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Getting outside the sandbox
 
 
 
 There is no API to read the clipboard in Flash, so I think you have a
 different issue than a sandbox issue.
 
  
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of toofah_gm
 Sent: Friday, November 09, 2007 12:38 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Getting outside the sandbox
 
  
 
 Is there a way for a Flex application to get outside the sandbox by
 asking the user to trust it or something similar?
 
 I would like my Flex application to be able to read from the system
 Clipboard.
 
 I understand the security issues at stake, but know that other
 technologies like java applets can be signed and then trusted by the
 user, allowing them to get outside of the sandbox.
 
 Does Flex have this capability?
 
 Thanks!
 
 Gary





[flexcoders] RightClick Event

2007-11-09 Thread toofah_gm
Is there an event that I can use to know that the ContextMenu is about
to pop up when the user Right Clicks?  I would like to run some code
to enable/disable some of my custom context menu items.

Thanks!

Gary



[flexcoders] Re: AFEFontManager

2007-11-08 Thread toofah_gm
Thanks to some excellent support from Adobe on this one we have been
able to work through this issue for now.  For details on this problem,
 refer to the bug: http://bugs.adobe.com/jira/browse/SDK-13352

Thanks Adobe!!!

--- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote:

 AFEFontManager uses the Adobe Font Engine which is our Java library for
 working with fonts.  The Managers are what the compiler uses to embed
 fonts.  We believe the AFEFontManager is a better implementation than
 Batik and handles more than JRE.  For example, this is the engine we
 need to support OpenType font embedding.  It was introduced as part of
 Flex 3.  So I would recommend trying to use AFEFontManager over the
 others.  We've even considered removing the Batik version but decided to
 leave it in just in case.
 
  
 
 Matt
 
  
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of toofah_gm
 Sent: Wednesday, November 07, 2007 2:05 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] AFEFontManager
 
  
 
 I logged the following bug about fonts rendering incorrectly:
 http://bugs.adobe.com/jira/browse/SDK-13352
 
 I got this response:
 This problem only happens with BatikFontManager. The fonts show up 
 correctly for both JREFontManager and AFEFontManager.
 
 I have tried Googling AFEFontManager as well as just trying to use
 it on my commandline, but have not had success. I have successfully
 used JREFontManager and it seems to fix the problem, but at what
 expense?
 
 Can anyone tell me more about this AFEFontManager and about
 FontManagers in general?
 
 I have a book building and rendering application and am very nervous
 about switching the FontManager that is being used. We need 100%
 consistency between what the customer sees when they click to order
 the book and what they see in the finished product. 
 
 If I switch FontManagers to fix the problems seen in European
 characters with BatikFontManager will I find other problems that I
 can't live with in the JREFontManager? And what is this
 AFEFontManager and how does it compare.
 
 Thanks for listening.
 
 Gary





[flexcoders] AFEFontManager

2007-11-07 Thread toofah_gm
I logged the following bug about fonts rendering incorrectly:
http://bugs.adobe.com/jira/browse/SDK-13352

I got this response:
This problem only happens with BatikFontManager. The fonts show up 
correctly for both JREFontManager and AFEFontManager.

I have tried Googling AFEFontManager as well as just trying to use
it on my commandline, but have not had success.  I have successfully
used JREFontManager and it seems to fix the problem, but at what expense?

Can anyone tell me more about this AFEFontManager and about
FontManagers in general?

I have a book building and rendering application and am very nervous
about switching the FontManager that is being used.  We need 100%
consistency between what the customer sees when they click to order
the book and what they see in the finished product.  

If I switch FontManagers to fix the problems seen in European
characters with BatikFontManager will I find other problems that I
can't live with in the JREFontManager?  And what is this
AFEFontManager and how does it compare.

Thanks for listening.

Gary



[flexcoders] Re: Problems with European characters in embedded fonts

2007-11-06 Thread toofah_gm
Has anyone been able to reproduce this problem with my sample code?  I
can send my TTF file if that would help.

Thanks!

--- In flexcoders@yahoogroups.com, toofah_gm [EMAIL PROTECTED] wrote:

 Here is a simple app that shows this problem.  I'd be glad to send you
 my TTF file if you need it in order to reproduce the problem.
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute creationComplete=init()
   mx:Style
 @font-face 
 {
 src: url(../assets/Barbedor-Regular.ttf);
 fontFamily: Barbedor;
 }
 .myFont{fontFamily:Barbedor;}
 /mx:Style
   mx:Script
   ![CDATA[
   private function init():void
   {
   txt.htmlText=FONT FACE='Barbedor' 
 SIZE='72'Éloïse/FONT;
   }   
   ]]
   /mx:Script
   mx:TextArea styleName=myFont id=txt top=25 left=0
 width=500 height=500 editable=false selectable=false
 verticalScrollPolicy=off horizontalScrollPolicy=off/
 /mx:Application
 
 
 
 
 
 
 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  Can you create a simple test case?
  
   
  
  
  
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
 On Behalf Of toofah_gm
  Sent: Thursday, November 01, 2007 8:49 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Problems with European characters in embedded
 fonts
  
   
  
  I am embedding TTF fonts into my application. We have included most
  of the European character sets in these fonts.
  
  Now the problem. The fonts show up correctly in MS Office and other
  windows applications. But when some of the European characters are
  typed into my Flex application, the top portion of some of the
  European characters is shifted to the right. I wish I could show a
  picture of this. This includes things like Diaeresis, Acute,
  Circumflex, etc. 
  
  An example word is: Éloïse
  In this word, the marks above the É and the ï are shifted to the
  right so that the markings end up almost above the l and the s
  characters.
  
  This only seems to be a problem with the Flex app. The problem is not
  seen with the same TTF files in all other apps.
  
  Does anybody know what might be happening here? Am I missing some
  simple option when embedding the fonts into my app? My embed
  statements look like this:
  [Embed(source=assets/Opus-BoldItalic.ttf, fontName=Opus,
  fontWeight=bold, fontStyle=italic)]
  
  Could there be a problem with the TTF files themselves? Is there a
  setting that might be causing this?
  
  Thanks for your help!
 





[flexcoders] Re: Problems with European characters in embedded fonts

2007-11-06 Thread toofah_gm
Sometimes I feel like I am talking to myself, answering my own
questions. :)

This time I don't have any answers yet.

There seems to be a BUG in flex with the way that it handles European
characters in embedded fonts.  Can anyone confirm this?  I wonder if I
need to write up a bug.

Anyway, you can see my simple code below and try this out with any of
the fonts found in windows.  I just tried Arial.ttf myself.  In Arial
the marking of the i character of Eloise is shifted, but the one of
the E does not shift.

I also noticed that the Arial font does not look clean at all.  I
had noticed this on my own fonts when they were blown up large, but
had thought that this was a problem with my fonts.  Look at the
round characters in the word Eloise.  You will notice that the o
is cut off a little on the outside and padded a little on the inside.
 You also see this on the e.  If you use the same font in MS Word
you will notice that this does not happen.

Am I going crazy, or is there a problem in Flex here?

Thanks!

Gary

--- In flexcoders@yahoogroups.com, toofah_gm [EMAIL PROTECTED] wrote:

 Has anyone been able to reproduce this problem with my sample code?  I
 can send my TTF file if that would help.
 
 Thanks!
 
 --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote:
 
  Here is a simple app that shows this problem.  I'd be glad to send you
  my TTF file if you need it in order to reproduce the problem.
  
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  layout=absolute creationComplete=init()
  mx:Style
  @font-face 
  {
  src: url(../assets/Barbedor-Regular.ttf);
  fontFamily: Barbedor;
  }
  .myFont{fontFamily:Barbedor;}
  /mx:Style
  mx:Script
  ![CDATA[
  private function init():void
  {
  txt.htmlText=FONT FACE='Barbedor' 
  SIZE='72'Éloïse/FONT;
  }   
  ]]
  /mx:Script
  mx:TextArea styleName=myFont id=txt top=25 left=0
  width=500 height=500 editable=false selectable=false
  verticalScrollPolicy=off horizontalScrollPolicy=off/
  /mx:Application
  
  
  
  
  
  
  --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
  
   Can you create a simple test case?
   

   
   
   
   From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
  On Behalf Of toofah_gm
   Sent: Thursday, November 01, 2007 8:49 AM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] Problems with European characters in embedded
  fonts
   

   
   I am embedding TTF fonts into my application. We have included most
   of the European character sets in these fonts.
   
   Now the problem. The fonts show up correctly in MS Office and other
   windows applications. But when some of the European characters are
   typed into my Flex application, the top portion of some of the
   European characters is shifted to the right. I wish I could show a
   picture of this. This includes things like Diaeresis, Acute,
   Circumflex, etc. 
   
   An example word is: Éloïse
   In this word, the marks above the É and the ï are shifted to the
   right so that the markings end up almost above the l and the s
   characters.
   
   This only seems to be a problem with the Flex app. The problem
is not
   seen with the same TTF files in all other apps.
   
   Does anybody know what might be happening here? Am I missing some
   simple option when embedding the fonts into my app? My embed
   statements look like this:
   [Embed(source=assets/Opus-BoldItalic.ttf, fontName=Opus,
   fontWeight=bold, fontStyle=italic)]
   
   Could there be a problem with the TTF files themselves? Is there a
   setting that might be causing this?
   
   Thanks for your help!
  
 





[flexcoders] Re: Problems with European characters in embedded fonts

2007-11-06 Thread toofah_gm
I logged the following bug: https://bugs.adobe.com/jira/browse/SDK-13352

I guess we'll see what happens to it.  It has some screenshots
attached to it so that you can see what I am talking about.

--- In flexcoders@yahoogroups.com, toofah_gm [EMAIL PROTECTED] wrote:

 Sometimes I feel like I am talking to myself, answering my own
 questions. :)
 
 This time I don't have any answers yet.
 
 There seems to be a BUG in flex with the way that it handles European
 characters in embedded fonts.  Can anyone confirm this?  I wonder if I
 need to write up a bug.
 
 Anyway, you can see my simple code below and try this out with any of
 the fonts found in windows.  I just tried Arial.ttf myself.  In Arial
 the marking of the i character of Eloise is shifted, but the one of
 the E does not shift.
 
 I also noticed that the Arial font does not look clean at all.  I
 had noticed this on my own fonts when they were blown up large, but
 had thought that this was a problem with my fonts.  Look at the
 round characters in the word Eloise.  You will notice that the o
 is cut off a little on the outside and padded a little on the inside.
  You also see this on the e.  If you use the same font in MS Word
 you will notice that this does not happen.
 
 Am I going crazy, or is there a problem in Flex here?
 
 Thanks!
 
 Gary
 
 --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote:
 
  Has anyone been able to reproduce this problem with my sample code?  I
  can send my TTF file if that would help.
  
  Thanks!
  
  --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote:
  
   Here is a simple app that shows this problem.  I'd be glad to
send you
   my TTF file if you need it in order to reproduce the problem.
   
   ?xml version=1.0 encoding=utf-8?
   mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
   layout=absolute creationComplete=init()
 mx:Style
   @font-face 
   {
   src: url(../assets/Barbedor-Regular.ttf);
   fontFamily: Barbedor;
   }
   .myFont{fontFamily:Barbedor;}
   /mx:Style
 mx:Script
 ![CDATA[
 private function init():void
 {
 txt.htmlText=FONT FACE='Barbedor' 
   SIZE='72'Éloïse/FONT;
 }   
 ]]
 /mx:Script
 mx:TextArea styleName=myFont id=txt top=25 left=0
   width=500 height=500 editable=false selectable=false
   verticalScrollPolicy=off horizontalScrollPolicy=off/
   /mx:Application
   
   
   
   
   
   
   --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
   
Can you create a simple test case?

 



From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED]
   On Behalf Of toofah_gm
Sent: Thursday, November 01, 2007 8:49 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Problems with European characters in
embedded
   fonts

 

I am embedding TTF fonts into my application. We have included
most
of the European character sets in these fonts.

Now the problem. The fonts show up correctly in MS Office and
other
windows applications. But when some of the European characters are
typed into my Flex application, the top portion of some of the
European characters is shifted to the right. I wish I could show a
picture of this. This includes things like Diaeresis, Acute,
Circumflex, etc. 

An example word is: Éloïse
In this word, the marks above the É and the ï are shifted
to the
right so that the markings end up almost above the l and the s
characters.

This only seems to be a problem with the Flex app. The problem
 is not
seen with the same TTF files in all other apps.

Does anybody know what might be happening here? Am I missing some
simple option when embedding the fonts into my app? My embed
statements look like this:
[Embed(source=assets/Opus-BoldItalic.ttf, fontName=Opus,
fontWeight=bold, fontStyle=italic)]

Could there be a problem with the TTF files themselves? Is there a
setting that might be causing this?

Thanks for your help!
   
  
 





[flexcoders] Problems with European characters in embedded fonts

2007-11-01 Thread toofah_gm
I am embedding TTF fonts into my application.  We have included most
of the European character sets in these fonts.

Now the problem.  The fonts show up correctly in MS Office and other
windows applications.  But when some of the European characters are
typed into my Flex application, the top portion of some of the
European characters is shifted to the right.  I wish I could show a
picture of this.  This includes things like Diaeresis, Acute,
Circumflex, etc.  

An example word is: Éloïse
In this word, the marks above the É and the ï are shifted to the
right so that the markings end up almost above the l and the s
characters.

This only seems to be a problem with the Flex app.  The problem is not
seen with the same TTF files in all other apps.

Does anybody know what might be happening here?  Am I missing some
simple option when embedding the fonts into my app?  My embed
statements look like this:
[Embed(source=assets/Opus-BoldItalic.ttf, fontName=Opus,
fontWeight=bold, fontStyle=italic)]

Could there be a problem with the TTF files themselves?  Is there a
setting that might be causing this?

Thanks for your help!




[flexcoders] Re: Problems with European characters in embedded fonts

2007-11-01 Thread toofah_gm
Here is a simple app that shows this problem.  I'd be glad to send you
my TTF file if you need it in order to reproduce the problem.

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute creationComplete=init()
mx:Style
@font-face 
{
src: url(../assets/Barbedor-Regular.ttf);
fontFamily: Barbedor;
}
.myFont{fontFamily:Barbedor;}
/mx:Style
mx:Script
![CDATA[
private function init():void
{
txt.htmlText=FONT FACE='Barbedor' 
SIZE='72'Éloïse/FONT;
}   
]]
/mx:Script
mx:TextArea styleName=myFont id=txt top=25 left=0
width=500 height=500 editable=false selectable=false
verticalScrollPolicy=off horizontalScrollPolicy=off/
/mx:Application






--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 Can you create a simple test case?
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of toofah_gm
 Sent: Thursday, November 01, 2007 8:49 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Problems with European characters in embedded
fonts
 
  
 
 I am embedding TTF fonts into my application. We have included most
 of the European character sets in these fonts.
 
 Now the problem. The fonts show up correctly in MS Office and other
 windows applications. But when some of the European characters are
 typed into my Flex application, the top portion of some of the
 European characters is shifted to the right. I wish I could show a
 picture of this. This includes things like Diaeresis, Acute,
 Circumflex, etc. 
 
 An example word is: Éloïse
 In this word, the marks above the É and the ï are shifted to the
 right so that the markings end up almost above the l and the s
 characters.
 
 This only seems to be a problem with the Flex app. The problem is not
 seen with the same TTF files in all other apps.
 
 Does anybody know what might be happening here? Am I missing some
 simple option when embedding the fonts into my app? My embed
 statements look like this:
 [Embed(source=assets/Opus-BoldItalic.ttf, fontName=Opus,
 fontWeight=bold, fontStyle=italic)]
 
 Could there be a problem with the TTF files themselves? Is there a
 setting that might be causing this?
 
 Thanks for your help!





[flexcoders] Re: Custom Drag Cursors

2007-10-16 Thread toofah_gm
Alex,

Setting the cursor on mouseMove is not the problem...I get the correct
cursor during mouseMove...the cursor comes from the move-cursor style
of the DragManager.  I am attempting to use these styles to get the
functionality that I need.

If I don't use the DragManager styles and attempt to set all of the
cursors manually I can almost get it working.  If I do it this way I
have to turn off the cursor when the user ends the drag.  This is
simple if the user drops where I expect the drop to occur.  But if the
user drops to one of the many many unallowed areas I am not sure where
to put the code that will remove my custom cursor without putting
mouseUp listeners everywhere.  Maybe there is a simple way to do this
differently?  If I use the DragManager's styles this happens
automatically for me, plus I get the bonus of allowing the DragManager
to show reject-cursor and others, which I do not want to change manually.

So the problem for me right now is to show the correct cursor between
mouseDown, which calls startDrag(), and mouseMove when the DragManager
seems to take over and use it's stylesheet cursors.  I tried setting
my own cursor in mouseDown and then removing it in mouseMove, but this
seems to mess up the DragManager and cause it to no longer use the
custom cursors setup in it's stylesheet.


--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 I'm not sure why you say you can't use setCursor() on mouseMove?
 
  
 
 Anyway, everything described in the original email seems ok.  What is
 the mouseDown target?  Did you try setting a cursor then?
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Sheriff
 Sent: Monday, October 15, 2007 10:39 PM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Custom Drag Cursors
 
  
 
 Are you using the cursorManager or just when a drag happens? u cant just
 use cursorManager.setCursor(...whatever u want) on mouse move
 
 - Original Message 
 From: toofah_gm [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Monday, October 15, 2007 5:35:07 PM
 Subject: [flexcoders] Custom Drag Cursors
 
 I am trying to use my own custom cursor for drag and drop
 functionality and having a little trouble. 
 
 I have added my own cursor to mouseOver on the object that is
 draggable... this is to indicate that the object is draggable.
 
 I have setup css style for all of the DragManager cursors like this:
 DragManager
 {
 copy-cursor: Embed(source= /assets/ images/copy. png);
 link-cursor: Embed(source= /assets/ images/link. png);
 move-cursor: Embed(source= /assets/ images/move. png);
 reject-cursor: Embed(source= /assets/ images/reject. png);
 }
 
 Now the trouble.
 When I hover I see my custom cursor.
 When I mouseDown I see the default cursor...this is the problem.
 When I start dragging I see my custom cursors.
 
 How do I see my custom cursor during the entire process? 
 
 During mouseDown event I call DragManager. startDrag( ). If I do not
 clear my hover cursor, or if I set a different cursor, the custom drag
 cursors never show up. It seems that any set cursor overrides the
 drag ones.
 
 If I clear my hover cursor before I call startDrag(), the custom drag
 cursors do not show up until the first mouseMove. There is a window
 between mouseDown and mouseMove where I have no custom cursor.
 
 Any ideas? Am I missing something here? I guess that I can override
 the mouseMove event if I need to and clear it there if I have to.
 
 Thanks.
 
  
 
  
 
 
 
 Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user
 panel
 http://us.rd.yahoo.com/evt=48516/*http:/surveylink.yahoo.com/gmrs/yahoo
 _panel_invite.asp?a=7%20  and lay it on us.





[flexcoders] Re: Custom Drag Cursors

2007-10-16 Thread toofah_gm
Here is some sample code that illustrates what I am doing.  The
commented out lines are some things that I have been trying that also
do not help.

Application:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute xmlns:ns1=*
mx:Style
DragManager
{
move-cursor: 
Embed(source=/assets/images/handDown.png);
reject-cursor: 
Embed(source=/assets/images/handReject.png);
}
/mx:Style
mx:List x=85 y=63 itemRenderer=dragObject
mx:dataProvider
mx:Object/
mx:Object/
mx:Object/
mx:Object/
mx:Object/
mx:Object/
mx:Object/
/mx:dataProvider
/mx:List
/mx:Application

Renderer:
?xml version=1.0 encoding=utf-8?
mx:Button xmlns:mx=http://www.adobe.com/2006/mxml; width=20
height=10 mouseDown=onMouseDown(event)
mouseMove=onMouseMove(event) mouseOver=onMouseOver(event)
mouseOut=onMouseOut(event)
mx:Script
![CDATA[
import mx.managers.CursorManager;
import mx.core.DragSource;
import mx.managers.DragManager;

[Embed(source=/assets/images/hand.png)] private var
handCursor:Class; 
[Embed(source=/assets/images/handDown.png)] private 
var
handDownCursor:Class; 

private function onMouseDown(event:MouseEvent):void
{
CursorManager.removeAllCursors();
//  CursorManager.setCursor(handDownCursor);
DragManager.doDrag(this, new DragSource(), 
event);
}
private function onMouseMove(event:MouseEvent):void
{
//  if (DragManager.isDragging)
//  {
//  CursorManager.removeAllCursors();
//  }
}
private function onMouseOver(event:MouseEvent):void
{
CursorManager.removeAllCursors();
CursorManager.setCursor(handCursor);
}
private function onMouseOut(event:MouseEvent):void
{
if (!DragManager.isDragging)
{
CursorManager.removeAllCursors();
}
}
]]
/mx:Script
/mx:Button


--- In flexcoders@yahoogroups.com, toofah_gm [EMAIL PROTECTED] wrote:

 Alex,
 
 Setting the cursor on mouseMove is not the problem...I get the correct
 cursor during mouseMove...the cursor comes from the move-cursor style
 of the DragManager.  I am attempting to use these styles to get the
 functionality that I need.
 
 If I don't use the DragManager styles and attempt to set all of the
 cursors manually I can almost get it working.  If I do it this way I
 have to turn off the cursor when the user ends the drag.  This is
 simple if the user drops where I expect the drop to occur.  But if the
 user drops to one of the many many unallowed areas I am not sure where
 to put the code that will remove my custom cursor without putting
 mouseUp listeners everywhere.  Maybe there is a simple way to do this
 differently?  If I use the DragManager's styles this happens
 automatically for me, plus I get the bonus of allowing the DragManager
 to show reject-cursor and others, which I do not want to change
manually.
 
 So the problem for me right now is to show the correct cursor between
 mouseDown, which calls startDrag(), and mouseMove when the DragManager
 seems to take over and use it's stylesheet cursors.  I tried setting
 my own cursor in mouseDown and then removing it in mouseMove, but this
 seems to mess up the DragManager and cause it to no longer use the
 custom cursors setup in it's stylesheet.
 
 
 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  I'm not sure why you say you can't use setCursor() on mouseMove?
  
   
  
  Anyway, everything described in the original email seems ok.  What is
  the mouseDown target?  Did you try setting a cursor then?
  
   
  
  
  
  From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
  Behalf Of Sheriff
  Sent: Monday, October 15, 2007 10:39 PM
  To: flexcoders@yahoogroups.com
  Subject: Re: [flexcoders] Custom Drag Cursors
  
   
  
  Are you using the cursorManager or just when a drag happens? u
cant just
  use cursorManager.setCursor(...whatever u

[flexcoders] Custom Drag Cursors

2007-10-15 Thread toofah_gm
I am trying to use my own custom cursor for drag and drop
functionality and having a little trouble.  

I have added my own cursor to mouseOver on the object that is
draggable...this is to indicate that the object is draggable.

I have setup css style for all of the DragManager cursors like this:
DragManager
{
 copy-cursor: Embed(source=/assets/images/copy.png);
 link-cursor: Embed(source=/assets/images/link.png);
 move-cursor: Embed(source=/assets/images/move.png);
 reject-cursor: Embed(source=/assets/images/reject.png);
}

Now the trouble.
When I hover I see my custom cursor.
When I mouseDown I see the default cursor...this is the problem.
When I start dragging I see my custom cursors.

How do I see my custom cursor during the entire process?  

During mouseDown event I call DragManager.startDrag().  If I do not
clear my hover cursor, or if I set a different cursor, the custom drag
cursors never show up.  It seems that any set cursor overrides the
drag ones.

If I clear my hover cursor before I call startDrag(), the custom drag
cursors do not show up until the first mouseMove.  There is a window
between mouseDown and mouseMove where I have no custom cursor.

Any ideas?  Am I missing something here?  I guess that I can override
the mouseMove event if I need to and clear it there if I have to.

Thanks.



[flexcoders] Re: Mouse Wheel over TextArea

2007-10-03 Thread toofah_gm
Thanks...that worked great!

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 I would subclass TextArea, override mouseWheelHandler and just have it
 return without doing anything.
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of toofah_gm
 Sent: Tuesday, October 02, 2007 3:46 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Mouse Wheel over TextArea
 
 
 
 I have a Canvas with a number of TextArea components, Images, Sprites,
 etc, on top of it. The Canvas itself is a scrollable area. When I
 use the Mouse Wheel over most parts of the Canvas, it scrolls up and
 down. If my mouse is on top of one of my TextAreas, the Canvas does
 not scroll when I use the Mouse Wheel. This is the case even though
 my TextAreas are not editable nor selectable.
 
 Is there a way to get my Mouse Wheel to scroll my Canvas even when it
 is over my TextArea components?





[flexcoders] Mouse Wheel over TextArea

2007-10-02 Thread toofah_gm
I have a Canvas with a number of TextArea components, Images, Sprites,
etc, on top of it.  The Canvas itself is a scrollable area.  When I
use the Mouse Wheel over most parts of the Canvas, it scrolls up and
down.  If my mouse is on top of one of my TextAreas, the Canvas does
not scroll when I use the Mouse Wheel.  This is the case even though
my TextAreas are not editable nor selectable.

Is there a way to get my Mouse Wheel to scroll my Canvas even when it
is over my TextArea components?