[flexcoders] Invoking Javascripts from within an embedded HTML page in an iFrame from Flex 3

2008-05-28 Thread Shun Chu
This question is a mouthful... so I'll try to be brief:

SETUP:
HTML Page Wrapper
   Flex SWF with iFrame
  HTML Page
 SWF File (SCORM Object)
  /HTML Page
   /Flex SWF with iFrame
/HTML Page Wrapper

PROBLEM:
Is it possible to make a Javascript call from the embedded HTML page
within Flex 3 to the HTML Page Wrapper? For example, an event happens
within the SWF SCORM file; upon ending of the event, the HTML Page
should be informed; at this point, a Javascript would be fired off to
the HTML Page Wrapper for additional actions.

Is this possible?

Thanks.



[flexcoders] Keeping certain attributes of the updateDisplayList while extending Label

2008-05-15 Thread Shun Chu
Hi,

I have extended the Label class by overriding the protected method
updateDisplayList. The purpose was to allow showing different cell
colors in a dataGrid by checking the value of each dataField (if x 
10, fill with green... etc).

Now, the problem is, by overriding the updateDisplayList method, I
lost the ability to scale the height of each a row when there's more
data than the width allows. Or is there another way to do this without
affecting the ability to scale?

I am relatively new to Flex, so any useful comments are appreciated.
Thank you.



[flexcoders] Re: Keeping certain attributes of the updateDisplayList while extending Label

2008-05-15 Thread Shun Chu
Thanks for your suggestion. I did call the
super.updateDisplayList(). Specifically, I am implementing what's
beeing shown here:
http://butterfliesandbugs.wordpress.com/2007/07/11/using-an-itemrenderer-to-change-the-background-of-a-datagrid-cell/

I am guessing that the itemRenderer is being overridden with the the
unscaledWidth and unscaledHeight arguments in the g.drawRect
method. And it's drawing with the unscaled numbers. Is there a way to
somehow catch the resized height/width and pass those as arguments
instead?

Thanks.

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

 You need to call super.updateDisplayList() in your override.
 
 Ben
 
 
 --- In flexcoders@yahoogroups.com, Shun Chu shun.chu@ wrote:
 
  Hi,
  
  I have extended the Label class by overriding the protected method
  updateDisplayList. The purpose was to allow showing different cell
  colors in a dataGrid by checking the value of each dataField (if x 
  10, fill with green... etc).
  
  Now, the problem is, by overriding the updateDisplayList method, I
  lost the ability to scale the height of each a row when there's more
  data than the width allows. Or is there another way to do this without
  affecting the ability to scale?
  
  I am relatively new to Flex, so any useful comments are appreciated.
  Thank you.
 





[flexcoders] Re: Keeping certain attributes of the updateDisplayList while extending Label

2008-05-15 Thread Shun Chu
Thanks again.

Yeah, I tried that as well. But it doesn't return the resized height
but a uniformed height of 18 pixels instead.

Is there no other way to capture the height after it's been drawn? I
have done the following:

var grid1:DataGrid = DataGrid(DataGridListData(listData).owner);
trace(grid1.getExplicitOrMeasuredHeight());

It returns the height of the datagrid.

trace(getExplicitOrMeasuredHeight());

It returns the 18 px height I mentioned earlier and truncates whatever
data that is beyond the 1st line.

I have also tried various other get and measure methods to no avail.

I may be naive, but is there a way to capture grid1.[height of each
data cell] and pass that as argument?

Thanks.

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

 Maybe try 
getExplicitOrMeasuredWidth/Heighthttp://livedocs.adobe.com/flex/3/langref/mx/core/UIComponent.html#getExplicitOrMeasuredHeight%28%29()
 in drawRect()
 
 Ben
 
 
 
 On Thu, May 15, 2008 at 4:10 PM, Shun Chu [EMAIL PROTECTED] wrote:
 
Thanks for your suggestion. I did call the
  super.updateDisplayList(). Specifically, I am implementing what's
  beeing shown here:
 
 
http://butterfliesandbugs.wordpress.com/2007/07/11/using-an-itemrenderer-to-change-the-background-of-a-datagrid-cell/
 
  I am guessing that the itemRenderer is being overridden with the the
  unscaledWidth and unscaledHeight arguments in the g.drawRect
  method. And it's drawing with the unscaled numbers. Is there a way to
  somehow catch the resized height/width and pass those as arguments
  instead?
 
  Thanks.
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
  ben.clinkinbeard
 
  ben.clinkinbeard@ wrote:
  
   You need to call super.updateDisplayList() in your override.
  
   Ben
  
  
   --- In flexcoders@yahoogroups.com
flexcoders%40yahoogroups.com, Shun
  Chu shun.chu@ wrote:
   
Hi,
   
I have extended the Label class by overriding the protected method
updateDisplayList. The purpose was to allow showing
different cell
colors in a dataGrid by checking the value of each dataField
(if x 
10, fill with green... etc).
   
Now, the problem is, by overriding the updateDisplayList
method, I
lost the ability to scale the height of each a row when
there's more
data than the width allows. Or is there another way to do this
without
affecting the ability to scale?
   
I am relatively new to Flex, so any useful comments are
appreciated.
Thank you.
   
  
 
   
 





[flexcoders] Re: set breakpoint does not work

2008-05-08 Thread Shun Chu
Thanks for this quick debug player tip. I made sure my Flash player
was the latest as well as the debug version in my case... Still no luck.

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

 There used to be a URL where you could point your browser and it'd
tell you
 off the bat whether or not you're using the debug player, is that still
 available somewhere? It's something I could probably use from time
to time
 when dealing with giving people work in progress SWFs as well as
to help
 people having these sort of problems on the list.
 
 -J
 
 On Thu, May 8, 2008 at 2:53 PM, Alex Harui [EMAIL PROTECTED] wrote:
 
 Make sure you didn't accidentally upgrade to a non-debugger player.
 
 
   --
 
  *From:* flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] *On
  Behalf Of *Shun Chu
  *Sent:* Wednesday, May 07, 2008 3:16 PM
  *To:* flexcoders@yahoogroups.com
  *Subject:* [flexcoders] set breakpoint does not work
 
 
 
  Hi,
 
  Just out of the blue, FlexBuilder 3(.0.194161) now doesn't stop at
  breakpoints anymore (Mac OSX Leopard 10.5.2 on MBP). It was working
  when FlexBuilder was initially setup. I have read and tried everything
  in the flexcodersFAQ.txt message that's been floating around with no
  success. I have also reinstalled Flex, junk all preferences... etc. to
  no avail.
 
  Any recommendation is appreciated.
 
   
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





[flexcoders] Re: set breakpoint does not work [SOLVED]

2008-05-08 Thread Shun Chu
It turns out Firefox 3pre nightly is to blame. It broke Flash (I
think). I have been using Minefield versions, and I guess the
particular nightly build I was using broke Flash. Asking FlexBuilder
to send builds to, say Safari or Camino, put breakpoints right back
to work as expected.

Cheers...

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

 Hi,
 
 Just out of the blue, FlexBuilder 3(.0.194161) now doesn't stop at
 breakpoints anymore (Mac OSX Leopard 10.5.2 on MBP). It was working
 when FlexBuilder was initially setup. I have read and tried everything
 in the flexcodersFAQ.txt message that's been floating around with no
 success. I have also reinstalled Flex, junk all preferences... etc. to
 no avail.
 
 Any recommendation is appreciated.





[flexcoders] set breakpoint does not work

2008-05-07 Thread Shun Chu
Hi,

Just out of the blue, FlexBuilder 3(.0.194161) now doesn't stop at
breakpoints anymore (Mac OSX Leopard 10.5.2 on MBP). It was working
when FlexBuilder was initially setup. I have read and tried everything
in the flexcodersFAQ.txt message that's been floating around with no
success. I have also reinstalled Flex, junk all preferences... etc. to
no avail.

Any recommendation is appreciated.