[flexcoders] quality=autoLow Cutting off Labels

2009-12-30 Thread kenny14390
To help boost performance of a large Flex app, I set the quality of the 
application to autoLow. I'm aware of the trade-off between performance and 
graphics, but one Label in particular is sometimes being cut off length-wise.

I'd like to keep the quality setting where it is, but is there an attribute I 
can set on the Label that will consistently display it properly? I set 
cacheAsBitmap, but I don't know if that's relevant to this problem.


Thanks!



[flexcoders] HTTP request error #2032

2009-12-21 Thread kenny14390
Hi,

I am using the HTTPService to send POST data to a PHP page in a widely 
distributed application. To catch HTTP errors with the fault parameter, I am 
assigning a method that takes a FaultEvent as its argument. (this is all 
standard).

That fault method writes to a file any time it is entered so as to log the 
error. I should also note that I have about 10 of these HTTPServices with 
corresponding result and fault methods.

I am noticing in the log file that only one HTTPService is faulting in 
particular. Over several hundred thousand (successful) calls to this 
HTTPService, a small handful of them are consistently passing the following 
FaultEvent message:

(mx.messaging.messages::ErrorMessage)#0
  body = (Object)#1
  clientId = DirectHTTPChannel0
  correlationId = A0C1443E-F9E2-61D7-7FAB-ADD18D4B0675
  destination = 
  extendedData = (null)
  faultCode = Server.Error.Request
  faultDetail = Error: [IOErrorEvent type=ioError bubbles=false 
cancelable=false eventPhase=2 text=Error #2032]. URL: {url here}
  faultString = HTTP request error
  headers = (Object)#2
  messageId = A04FD0F5-8732-1B3B-E253-ADD2572BE01E
  rootCause = (flash.events::IOErrorEvent)#3
bubbles = false
cancelable = false
currentTarget = (flash.net::URLLoader)#4
  bytesLoaded = 0
  bytesTotal = 0
  data = 
  dataFormat = text
eventPhase = 2
target = (flash.net::URLLoader)#4
text = Error #2032
type = ioError
  timestamp = 0
  timeToLive = 0


I've researched this error and I've gotten many different results. Some say 
that it's a bad URL or the URL is too long -- not this case because the 
HTTPService succeeds 95% of the time. I've heard other suggestions that the 
server itself is to blame -- but the other 9 HTTPServices that call the same 
server (even ones that are more heavily used throughout the app) are all doing 
fine.


Does anyone know of a reasonable explanation to receive this error #2032? The 
way Flex describes this error is completely useless to debug.


Thanks in advance for the help!




[flexcoders] Embedded Assets: SWF or Image?

2009-07-14 Thread kenny14390
When would it be appropriate to embed graphical assets as SWFs? Does it 
increase/decrease file size or load time?

Would it be better to convert the SWF to a PNG or something?



[flexcoders] PHP $_POST Array with HTTPService

2009-07-13 Thread kenny14390
Hi,

We all know about PHP's ability to send an array through the $_POST
variable, in a form for example:

[form method=POST action=]
[text type=input name=data[name]/]
...
[/form]

But how can I achieve that through Flex's HTTPService?

If I were to print_r($_POST) in the PHP page, this is would I would like
to see:


Array
(
 [data] = Array
 (
 [-1] = A
 [0] = B
 [1] = C
 )

)

I have tried this programmatically while calling the send(params:Object)
method of the HTTPService, with the Object containing {data:
{'-1':'A','0':'B','1':'C'}} but the result is more like [data] =
[object Object]


Any ideas how to mimic PHP's ability to POST an array?


Note: I can achieve this easily with GET, by appending
data[-1]=Adata[0]=Bdata[1]=C to the URL, but my problem requires
POST.



Thanks.



[flexcoders] Re: how to set a layout object's height to 100%?

2009-07-08 Thread kenny14390
percentHeight is probably what you want, but another way to achieve 100% height 
is so set top=0 and bottom=0. This is the natural way to achieve 100% in the 
design mode of Flex Builder.

--- In flexcoders@yahoogroups.com, coder3 rrhu...@... wrote:

 
 Hi All
 
 I create an object as Grid, and i need to set the height to 100%. how to do
 it in script?
 
 for example:
 
 var grid:Grid = new Grid();
 
 for(..)
 {
   var gridrow:GridRow = new GridRow();
   
   grid.addChild(gridrow);
 }
 
 //now how to set grid.height = 100% instead of grid.height=222???
 
 
 -- 
 View this message in context: 
 http://www.nabble.com/how-to-set-a-layout-object%27s-height-to-100---tp24386393p24386393.html
 Sent from the FlexCoders mailing list archive at Nabble.com.





[flexcoders] Re: Continuous Multi-colored Line Chart

2009-07-07 Thread kenny14390
That's perfect. Thank you very much for your help, Tim.


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

 
 That one is a little tricky.  But, here's one way that you can do it:
 
 http://www.timothyhoff.com/projects/LineRendererSample/LineRendererSampl\
 e.html
 http://www.timothyhoff.com/projects/LineRendererSample/LineRendererSamp\
 le.html
 (right click to view source)
 
 -TH
 
 --- In flexcoders@yahoogroups.com, kenny14390 kenny14390@ wrote:
 
  Hi all. It's been a year since my last question and this one seems
 like an interesting problem.
 
  First to give you some background, I'm making a stats page for a game.
 The game consists of three rounds and each round consists of five
 clicks. Each click can either add or subtract points from your score. So
 after each round I'd like to show a line chart to plot out the value of
 the users' points (y axis) against each click (x axis). Since the second
 round starts with the points from the first and the third from the
 second, the graph of the entire game (all three rounds) is continuous.
 
  In order to graphically distinguish which clicks came from a certain
 round, I would really like to have the line be broken up into three
 colored segments.
 
  I couldn't find a good solution so I tried to hack my own by simply
 drawing three individual segments head to tail. However, this doesn't
 work for two reasons: the line needs to be continuous and it needs to
 show data tips. The three segments at a glance appear to be continuous,
 but I set the line to be curved so it's smooth. Back-to-back lines
 don't curve corners and all of a sudden a smooth line has a sharp angle.
 Secondly, since the ending point of the first or second round is the
 starting point of the next round, hovering over that point on the chart
 displays two data tips; one for each round (displaying the same point
 values).
 
 
  Does anyone know of anything built in to simply say starting at
 x-value X change line color to #xx?
 
 
  Thanks!
 





[flexcoders] Continuous Multi-colored Line Chart

2009-07-06 Thread kenny14390
Hi all. It's been a year since my last question and this one seems like an 
interesting problem.

First to give you some background, I'm making a stats page for a game. The game 
consists of three rounds and each round consists of five clicks. Each click can 
either add or subtract points from your score. So after each round I'd like to 
show a line chart to plot out the value of the users' points (y axis) against 
each click (x axis). Since the second round starts with the points from the 
first and the third from the second, the graph of the entire game (all three 
rounds) is continuous.

In order to graphically distinguish which clicks came from a certain round, I 
would really like to have the line be broken up into three colored segments.

I couldn't find a good solution so I tried to hack my own by simply drawing 
three individual segments head to tail. However, this doesn't work for two 
reasons: the line needs to be continuous and it needs to show data tips. The 
three segments at a glance appear to be continuous, but I set the line to be 
curved so it's smooth. Back-to-back lines don't curve corners and all of a 
sudden a smooth line has a sharp angle. Secondly, since the ending point of the 
first or second round is the starting point of the next round, hovering over 
that point on the chart displays two data tips; one for each round (displaying 
the same point values).


Does anyone know of anything built in to simply say starting at x-value X 
change line color to #xx?


Thanks!



Re:Re: [flexcoders] Bring forward something in flex

2009-07-06 Thread kenny14390
Here's an easy fix:

parent.setChildIndex(obj,i);

Where parent is the container (can be this), obj is the child object you want 
to re-order, and i is the stack index of the position amongst the parent's 
children. The higher i is, the closer to the front it is. i cannot be higher 
than the number of children.




--- In flexcoders@yahoogroups.com, j2me_soul j2me_s...@... wrote:

 It very useful to me. Thanks Jeffry!
 
 
 
 ÔÚ2009-07-03£¬Jeffry Houser j...@... дµÀ£º
 
 
 
 
 
 
   The initial layout is related tot he order you declare things in MXML, but 
 that doesn't help him move children around by clicking on something in the 
 background.
 
  Take a look at SwapChildren and/or SwampChildrenAt:  
 http://livedocs.adobe.com/flex/3/langref/flash/display/DisplayObjectContainer.html#swapChildren()
 http://livedocs.adobe.com/flex/3/langref/flash/display/DisplayObjectContainer.html#swapChildrenAt()
 
 claudiu ursica wrote: 
 
 It is related to the order that you declare component in your mxml ... The 
 latter the better. 
 
 C
 
 
 
 From: j2me_soul j2me_s...@...
 To: flexcoders flexcoders@yahoogroups.com
 Sent: Friday, July 3, 2009 11:36:20 AM
 Subject: [flexcoders] Bring forward something in flex
 
 
 I have a lot titlewindow in the application. But the main panel which wrote 
 by mxml is always covered by some titlewindow. How can I bring the main panel 
 forward when I clicked it ?
 
 
 
 
 
 200 ÍòÖÖÉÌÆ·,×îµÍ¼Û¸ñ,·è¿ñÓÕ»óÄã
 
 
 
 
 -- 
 Jeffry Houser, Technical Entrepreneur
 Adobe Community Expert: 
 http://tinyurl.com/684b5hhttp://www.twitter.com/reboog711  | Phone: 
 203-379-0773
 --
 Easy to use Interface Components for Flex Developers
 http://www.flextras.com?c=104
 --
 http://www.theflexshow.comhttp://www.jeffryhouser.com
 --
 Part of the DotComIt Brain Trust





[flexcoders] Smooth Manual setProgress

2009-07-06 Thread kenny14390
Hey. I'm using a manual ProgressBar to display progress towards a goal. As the 
amount increases or decreases, the setProgress method updates the progress 
accordingly but jumpy. Is there a way to smooth out the graphic of the progress 
transition?

Thanks!



[flexcoders] Re: Styling Chart Selection Square

2009-07-06 Thread kenny14390
You can change the rollover/selection color from the default 0x009dff, but I 
don't know about styles.


--- In flexcoders@yahoogroups.com, kidl33t kidl...@... wrote:

 Hello,
 
 I have a cartesian chart and I would like to style the blue box that 
 highlights data when you click and drag.  It is the one that is enabled when 
 you set selectionMode=multiple.  I have searched the Adobe docs and I 
 cannot find it.  Is this even possible?
 
 Background Information:  I have my own double chart in which the bottom chart 
 shows the total range of information, and a top chart which shows the 
 information in a 'window' on the bottom chart.  Moving around the top chart 
 can be done either by moving the window on the bottom chart, or by dragging 
 around gridlines in the background of the top chart.  I also require the 
 ability to highlight certain data points on the top chart to display summary 
 information.  The trouble is that moving the top chart by clicking and 
 dragging the background is also how you select.  I have solved this by 
 stopping the panning action when either they start dragging on a data point 
 or when they hold shift and drag.  The trouble is is that when 
 selectionMode=multiple you always get the blue rectangle, so even though my 
 chart properly disables the panning when required, the rectangle shows up.  
 Switching the selection mode on the fly doesn't seem to work.  My thought was 
 to style the selection box such it is clear until I want a selection then I 
 Will make it visible.  
 
 Thanks,





[flexcoders] Smooth Marquee

2008-07-22 Thread kenny14390
I tried to scroll images from right to left using DHTML, but the
scrolling was choppy and it didn't look right. I want to do this in
Flex, but I'm not sure where to start. The application needs to;

- take a list of images (maybe in an HBox)
- smoothly scroll from right to left
- repeat the loop after the entire list has been scrolled

This application will be a Flex equivalent of the deprecated marquee
HTML tag.

Has anyone does this before? Any resources online that you could
direct me to? Any tips to get started? Thanks!



[flexcoders] Debug Mode Prematurely Terminating

2008-07-20 Thread kenny14390
In both Eclipse and Flex Builder 3, the Debug mode prematurely
terminates. I have an error in my code, which isn't being picked up by
the compiler, so it's hard to debug. Regardless of break points, the
debugger will launch the app in the browser and then immediately
terminate, not checking for any errors even though I'm getting them.

Also, upon pressing the Debug button, the IDE used to automatically
switch to Debug mode but not anymore. My code couldn't possibly screw
up Eclipse's debugging mode, right? If both Eclipse and Flex Builder
have this save behavior, is it even worth reinstalling?



[flexcoders] Re: Debug Mode Prematurely Terminating

2008-07-20 Thread kenny14390
I'm glad to hear I'm not the only one with this weird problem. How do
you change the html template?

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

 I had a problem like this when I moved to my new computer last week.
 Inexplicably, changing the html template to include the parameter
wmode =
 opaque fixed it.  I agree this doesn't make any sense, but
according to
 googling it has worked for other people and it worked for me.
 
 - Daniel Freiman
 
 On Sun, Jul 20, 2008 at 2:43 AM, kenny14390 [EMAIL PROTECTED] wrote:
 
In both Eclipse and Flex Builder 3, the Debug mode prematurely
  terminates. I have an error in my code, which isn't being picked up by
  the compiler, so it's hard to debug. Regardless of break points, the
  debugger will launch the app in the browser and then immediately
  terminate, not checking for any errors even though I'm getting them.
 
  Also, upon pressing the Debug button, the IDE used to automatically
  switch to Debug mode but not anymore. My code couldn't possibly screw
  up Eclipse's debugging mode, right? If both Eclipse and Flex Builder
  have this save behavior, is it even worth reinstalling?
 
   
 





[flexcoders] Image Marquee

2008-07-08 Thread kenny14390
Does anyone know how to create an image marquee in Flex? See
http://fishbowl.com for an example.



[flexcoders] Re: crossdomain with picasa

2008-06-30 Thread kenny14390
I don't know how to fix this problem, but I do know of the way to work
around it. Simply use HTTPService to call a file on your server (still
in your sandbox), which then calls Picasa and does whatever magic it
needs to get your data. Even though this is outside of your sandbox,
Flex has no idea where your file gets its data from and so it doesn't
care about the sandbox violation. For example, you can use a PHP file
to connect with Picasa then get whatever data it needs. Then
print/echo that data to the PHP page as XML and set the resultFormat
parameter of HTTPService to e4x.

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

 Hello,
 
 I did a website that gets xml data from picasa website.
 Locally worked perfect, but it complains about security when i
upload the site to my server.
 
 I heard something about the crossdomain.xml file...but...i just read
that the file should be in the destiny server, not mine, so does that
meant that i will never be able to access picasa??
 
 Please, hope i dont have to just throw all my work cause a reason
like this (T__T)
 
 thnx a lot to everyone!
 
 
 
   __ 
 Enviado desde Correo Yahoo! La bandeja de entrada más inteligente.





[flexcoders] Re: XMLList - XML Spontaneous Error

2008-06-28 Thread kenny14390
Thank you Tracy! That worked. I have no idea why it decided not to
anymore, but it does now! 

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

 Surprised this didn't error before.
 
  
 
 All e4x expressions reuturn an XMLList, even if there is only one node.
 So you have to do:
 
 x = srv.lastResult.Term.Department.(@id==cDept).Course.(@num==cCrs)[0];
 //to get the one and only XML node
 
 Tracy
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of kenny14390
 Sent: Friday, June 27, 2008 7:54 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] XMLList - XML Spontaneous Error
 
  
 
 Code that I haven't touched in months is now giving me errors at
 runtime. It's compiling without even a warning, but when the
 application is run, I get unexpected results. When I run the app in
 debug mode, all breakpoints are ignored (news to me) so it's difficult
 to find exactly what's wrong. I get the following error:
 
 TypeError: Error #1034: Type Coercion failed: cannot convert
 [EMAIL PROTECTED] to XML.
 at Schedule/setWorkingCourse()[C:\Documents and Settings\Ricky\My
 Documents\CS\Flex Projects\DDVSB2\src\Schedule.mxml:1286]...
 
 So I went to that line and I found absolutely nothing wrong:
 
 x = srv.lastResult.Term.Department.(@id==cDept).Course.(@num==cCrs);
 
 x is defined a few lines up as x:XML. srv is the HTTPService that is
 called upon creationComplete, and it is working just fine with the
 rest of the application. cDept and cCrs are working fine as well.
 Here's an example of the code that I'm trying to assign to x:
 
 Course dept=ARTH j=4 num=287A name=Topics In Modern Art
 credits=4.000 gened=W Writing (Harpur Req)
 Section id=01 dept=ARTH select= num=287A crn=92468
 days=MW time=15:30-16:55 instr=TBA place=FA 258 capacity=84
 ConfigDiscussion/Config
 /Section
 length1/length
 /Course
 
 That looks like valid XML to me! Apparently, it's an XMLList and that
 is unable to be coerced to type XML. It's only been doing that for the
 past few months with no problem. What could be the problem? Why is
 Flex being so weird?





[flexcoders] Re: over pixelated scaled images

2008-06-27 Thread kenny14390
I had this problem a couple days ago. See this site:
http://www.actionsnip.com/snippets/vixiom/how-to-get-smooth-image-scaling-in-flex

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

 Hello,
 
 I'm showing some pics in a gallery, and they are showing smaller
than real size. The problem is that they appear OverPixelated.
 
 I've been searching on the properties of the image tag and couldn't
find something to take that annoying pixlation out.
 
 someone can help me?
 
 thnx a lot :)
 
 
 
   __ 
 Enviado desde Correo Yahoo! La bandeja de entrada más inteligente.





[flexcoders] XMLList - XML Spontaneous Error

2008-06-27 Thread kenny14390
Code that I haven't touched in months is now giving me errors at
runtime. It's compiling without even a warning, but when the
application is run, I get unexpected results. When I run the app in
debug mode, all breakpoints are ignored (news to me) so it's difficult
to find exactly what's wrong. I get the following error:

TypeError: Error #1034: Type Coercion failed: cannot convert
[EMAIL PROTECTED] to XML.
at Schedule/setWorkingCourse()[C:\Documents and Settings\Ricky\My
Documents\CS\Flex Projects\DDVSB2\src\Schedule.mxml:1286]...

So I went to that line and I found absolutely nothing wrong:

x = srv.lastResult.Term.Department.(@id==cDept).Course.(@num==cCrs);

x is defined a few lines up as x:XML. srv is the HTTPService that is
called upon creationComplete, and it is working just fine with the
rest of the application. cDept and cCrs are working fine as well.
Here's an example of the code that I'm trying to assign to x:

Course dept=ARTH j=4 num=287A name=Topics In Modern Art
credits=4.000 gened=W Writing (Harpur Req)
  Section id=01 dept=ARTH select= num=287A crn=92468
days=MW time=15:30-16:55 instr=TBA place=FA 258 capacity=84
ConfigDiscussion/Config
  /Section
  length1/length
/Course

That looks like valid XML to me! Apparently, it's an XMLList and that
is unable to be coerced to type XML. It's only been doing that for the
past few months with no problem. What could be the problem? Why is
Flex being so weird?



[flexcoders] Resizing Images

2008-06-25 Thread kenny14390
Hi. I have a space that is 175x100 and I am loading images into it on
the fly. I am loading images that are as big as 200x115 and I need to
shrink them to fit but also preserve their quality. If I don't specify
the Image component's height and width, the image retains its quality,
but it also retains its own unique height and width, and could spill
outside of my 175x100 box. I then turned on the scaleContent property
and set the horizontal and vertical align to center/middle. This
solves the resizing problem, but not the image quality. The image
looks jagged and smooth lines now look broken. Does anyone know of a
way to keep an image within my constraints and retain image quality?



[flexcoders] Re: Resizing Images

2008-06-25 Thread kenny14390
I don't think I can do server-side work on the images. Flex should be
able to handle this sort of trivial task, but for some reason it isn't
doing it for me. And what is snap to pixel? That sounds like a Flash
thing instead of Flex.

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

 Perhaps making sure that the resizing snaps to pixels. I have the same  
 issue on mine and I'm trying to find a solution too. I'm thinking of  
 using server-side resizing to get it to work neatly.
 
 
 On 25 Jun 2008, at 15:20, kenny14390 wrote:
 
 Hi. I have a space that is 175x100 and I am loading images into it on
 the fly. I am loading images that are as big as 200x115 and I need to
 shrink them to fit but also preserve their quality. If I don't specify
 the Image component's height and width, the image retains its quality,
 but it also retains its own unique height and width, and could spill
 outside of my 175x100 box. I then turned on the scaleContent property
 and set the horizontal and vertical align to center/middle. This
 solves the resizing problem, but not the image quality. The image
 looks jagged and smooth lines now look broken. Does anyone know of a
 way to keep an image within my constraints and retain image quality?





[flexcoders] Re: Resizing Images

2008-06-25 Thread kenny14390
This looked like it should work (posted last week):

http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetailsproductId=2postId=9409

However, I got a sandbox violation when the image was loading because
of the checkPolicyFile flag. The SuperImage page (previously linked)
mentioned something about that, but it's buried in ActionScript and I
don't know if that will work with the method I just posted. Any
suggestions? 

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

 Yes, I think SuperImage does that, and I've seen other blog posts
 address this. Example from Googling flex image smoothing:
 
 http://weblogs.macromedia.com/mc/archives/2006/09/enable_smoothin.html
 
 Hope this helps.
 
 On Wed, Jun 25, 2008 at 9:02 AM, Jim Hayes [EMAIL PROTECTED] wrote:
  There is a .smoothing property that you can apply to
bitmaps/bitmapData,
  which is probably what you're looking for.
 
  On a quick check it looks like the Image component doesn't expose
it (Ely
  Greenfields superImage component might?), and offhand I'm not
sure if you
  can just apply it to the source bitmap (if that's what you're using).
 
  Sorry I don't have the whole answer just at the moment (I don't
use the
  image component, in general), but hopefully it might set you on
the right
  track for a google.
 
 
 
 
 
  -Original Message-
  From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
  Behalf Of Chris Ivens
  Sent: 25 June 2008 15:49
  To: flexcoders@yahoogroups.com
  Subject: Re: [flexcoders] Resizing Images
 
 
 
  Perhaps making sure that the resizing snaps to pixels. I have the
same issue
  on mine and I'm trying to find a solution too. I'm thinking of using
  server-side resizing to get it to work neatly.
 
 
 
 
 
  On 25 Jun 2008, at 15:20, kenny14390 wrote:
 
  Hi. I have a space that is 175x100 and I am loading images into it on
  the fly. I am loading images that are as big as 200x115 and I need to
  shrink them to fit but also preserve their quality. If I don't specify
  the Image component's height and width, the image retains its quality,
  but it also retains its own unique height and width, and could spill
  outside of my 175x100 box. I then turned on the scaleContent property
  and set the horizontal and vertical align to center/middle. This
  solves the resizing problem, but not the image quality. The image
  looks jagged and smooth lines now look broken. Does anyone know of a
  way to keep an image within my constraints and retain image quality?
 
 
 
  __
  This communication is from Primal Pictures Ltd., a company
registered in
  England and Wales with registration No. 02622298 and registered
office: 4th
  Floor, Tennyson House, 159-165 Great Portland Street, London, W1W
5PA, UK.
  VAT registration No. 648874577.
 
  This e-mail is confidential and may be privileged. It may be read,
copied
  and used only by the intended recipient. If you have received it
in error,
  please contact the sender immediately by return e-mail or by
telephoning
  +44(0)20 7637 1010. Please then delete the e-mail and do not
disclose its
  contents to any person.
  This email has been scanned for Primal Pictures by the MessageLabs
Email
  Security System.
  __
 





[flexcoders] Re: Flex Efficiency

2008-06-23 Thread kenny14390
I know that if you try to add the same component to one container
after another, it will remove it from the previous container and add
it to the next. To achieve what you're looking for, you need to clone
it then add it. You might have already known this, but that sounds
like the problem to me. 

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

 Thanks, Alex. Unfortunately that is the main problem as I let users add
 graphics on the fly to create their artwork. And graphics are small swf
 animations, really simple ones. How is adding swf's different in
this regard
 than adding jpegs, gifs or png's on the fly? Also is there a limit set?
 Because after adding lots of them, some of them just start to
disappear and
 all I do is stack them with addChild(). Can we expect same performance
 issues when adding lots of visual objects such as buttons, canvases,
etc...?
 If I add 100 simple swfs and 100 button controls, will it behave the
same?
 
 
 
 
 On Sun, Jun 22, 2008 at 3:37 AM, Alex Harui [EMAIL PROTECTED] wrote:
 
 There are no workarounds.  Good design for Flash minimizes use of
  resources.  The profiler can help you tune things, but if you use
lots of
  SWFs you're going to pay a price.  However, that may not be your main
  problem, and the profiler can help you determine that.
 
 
   --
 
  *From:* flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] *On
  Behalf Of *Alen Balja
  *Sent:* Saturday, June 21, 2008 3:57 AM
  *To:* flexcoders@yahoogroups.com
  *Subject:* Re: [flexcoders] Flex Efficiency
 
 
 
  Alex, do you have any more info on the subject, especially what
are the
  workarounds? I  too am using lots of really tiny and simple
external swf
  animations and performance is really really bad. If I remember
correctly
  it's much worse than Flash Player 7.
 
 
 
  The profiler will help you find inefficiencies in your app.
 
 
 
  Loading lots of SWFs is, of course, going to eat resources.
 
 
 
 
 
   
 





[flexcoders] Re: Flex Efficiency

2008-06-23 Thread kenny14390
Yes, I see a lot of red. What does this mean? How can it be fixed?

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

 Right click on the app and show your redraw regions. is there a
solid red
 rectangle around the entire application? If so - the entire stage is
getting
 re-circulated in redraw cycles. If the small swfs/areas are getting
hammered
 then you'll see that as well. 
 
  
 
 Rick Winscot
 
  
 
  
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Josh McDonald
 Sent: Saturday, June 21, 2008 2:51 AM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Flex Efficiency
 
  
 
 It's possible that your background SWFs are doing something that
makes the
 player's filter code nervous, and so either  drop shadow, or the blur
 background filter is having to be re-run every frame, which will
own your
 CPU since it's not accelerated (afaik).
 
 Just an idea, but could be somewhere to start your investigations :)
 
 -Josh
 
 On Sat, Jun 21, 2008 at 3:25 PM, Alex Harui [EMAIL PROTECTED] wrote:
 
 The profiler will help you find inefficiencies in your app.
 
  
 
 Loading lots of SWFs is, of course, going to eat resources.
 
  
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of kenny14390
 Sent: Friday, June 20, 2008 9:44 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Flex Efficiency
 
  
 
 I'm making a simple game in Flex and I'm noticing a lot of performance
 issues. The game is very easy and simple: you have 25 tiles and you
 need to click them one at a time to reveal the prize (or no prize)
 behind them - match three like prizes and win. Getting everything on
 the screen and coding it together wasn't bad, but I'm noticing a
 considerable lack in performance when the game is running.
 
 To be honest, I have a lot of SWF files in there, and I'm making heavy
 use of the Move transition (usually for each of the 25 tiles to
 animate them). Some of the SWFs are on an infinite loop and those are
 probably eating up a good amount of the resources.
 
 Another thing that was surprising was the CPU usage eaten up when I
 added a PopUp to the application. The browser page seems to freeze
 while it's open and only after I close the PopUp does the page resume
 its task. I guess I can get away without it, but it was odd how that
 happened.
 
 Is this common to have such monstrous applications, while using the
 features I mentioned? Is there something wrong with my programming
 instead? If I run the game in Firefox 3, it is using well over 150M of
 memory and 50% of my CPU. When the PopUp is open, that spikes to 95%!
 What can I do to alleviate this stress on the computer?
 
 
 
 
 -- 
 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: Flex Efficiency

2008-06-21 Thread kenny14390
What could be in the SWFs that would do that?

Also, my PopUp is not modal so it does not do the blur thing. For that
reason, I suppose it would be more efficient to just use a static
Canvas because it does not have to be dragged around the screen
(originally it was, so I used a PopUp).

Thanks for the help!

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

 It's possible that your background SWFs are doing something that
makes the
 player's filter code nervous, and so either  drop shadow, or the blur
 background filter is having to be re-run every frame, which will
own your
 CPU since it's not accelerated (afaik).
 
 Just an idea, but could be somewhere to start your investigations :)
 
 -Josh
 
 On Sat, Jun 21, 2008 at 3:25 PM, Alex Harui [EMAIL PROTECTED] wrote:
 
   The profiler will help you find inefficiencies in your app.
 
 
 
  Loading lots of SWFs is, of course, going to eat resources.
 
 
   --
 
  *From:* flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] *On
  Behalf Of *kenny14390
  *Sent:* Friday, June 20, 2008 9:44 PM
  *To:* flexcoders@yahoogroups.com
  *Subject:* [flexcoders] Flex Efficiency
 
 
 
  I'm making a simple game in Flex and I'm noticing a lot of performance
  issues. The game is very easy and simple: you have 25 tiles and you
  need to click them one at a time to reveal the prize (or no prize)
  behind them - match three like prizes and win. Getting everything on
  the screen and coding it together wasn't bad, but I'm noticing a
  considerable lack in performance when the game is running.
 
  To be honest, I have a lot of SWF files in there, and I'm making heavy
  use of the Move transition (usually for each of the 25 tiles to
  animate them). Some of the SWFs are on an infinite loop and those are
  probably eating up a good amount of the resources.
 
  Another thing that was surprising was the CPU usage eaten up when I
  added a PopUp to the application. The browser page seems to freeze
  while it's open and only after I close the PopUp does the page resume
  its task. I guess I can get away without it, but it was odd how that
  happened.
 
  Is this common to have such monstrous applications, while using the
  features I mentioned? Is there something wrong with my programming
  instead? If I run the game in Firefox 3, it is using well over 150M of
  memory and 50% of my CPU. When the PopUp is open, that spikes to 95%!
  What can I do to alleviate this stress on the computer?
 
  
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





[flexcoders] Flex Efficiency

2008-06-20 Thread kenny14390
I'm making a simple game in Flex and I'm noticing a lot of performance
issues. The game is very easy and simple: you have 25 tiles and you
need to click them one at a time to reveal the prize (or no prize)
behind them - match three like prizes and win. Getting everything on
the screen and coding it together wasn't bad, but I'm noticing a
considerable lack in performance when the game is running.

To be honest, I have a lot of SWF files in there, and I'm making heavy
use of the Move transition (usually for each of the 25 tiles to
animate them). Some of the SWFs are on an infinite loop and those are
probably eating up a good amount of the resources.

Another thing that was surprising was the CPU usage eaten up when I
added a PopUp to the application. The browser page seems to freeze
while it's open and only after I close the PopUp does the page resume
its task. I guess I can get away without it, but it was odd how that
happened.

Is this common to have such monstrous applications, while using the
features I mentioned? Is there something wrong with my programming
instead? If I run the game in Firefox 3, it is using well over 150M of
memory and 50% of my CPU. When the PopUp is open, that spikes to 95%!
What can I do to alleviate this stress on the computer?



[flexcoders] Re: Making Y-Axis Invisible on LineChart

2008-06-10 Thread kenny14390
I actually think that axes should be drawn as the default case. In
most cases, I would think that you'd want them. This invisible-axis
case seems to be less frequent than those when you'd want them.

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

 The default behavior of charts is that, if no axis renderers are
specified, it draws its own, If you feel that an axis need not be
drawn if nothing is specified, can you pls. file an enhancement at
bugs.adobe.com/flex and vote for it.
 
 Thanks
 -Sunil
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Richard Rodseth
 Sent: Monday, June 09, 2008 2:35 AM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Making Y-Axis Invisible on LineChart
 
 
 You can use the visible property on AxisRenderer
 
 mx:verticalAxisRenderers
 
 mx:AxisRenderer placement=right axis={myAxis}
 visible={showAxis} includeInLayout={showAxis}/
 /mx:verticalAxisRenderers
 
 Unfortunately, includeInLayout doesn't seem to work here. The
 invisible axis still talkes up space.
 
 On Sun, Jun 8, 2008 at 1:28 PM, kenny14390
[EMAIL PROTECTED]mailto:kenny14390%40yahoo.com wrote:
  I've got a graph and I'd like to remove the y-axis. I still want to
  see the actual line graph, but just not the y-axis.
 
 





[flexcoders] Making Y-Axis Invisible on LineChart

2008-06-08 Thread kenny14390
I've got a graph and I'd like to remove the y-axis. I still want to
see the actual line graph, but just not the y-axis.



[flexcoders] Re: hslider and binding to values

2008-06-05 Thread kenny14390
Binding is curly braces {} not square brackets []


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

 I have an hslider with two tabs.
 
 I am trying to create a label next to the hslider to display the
 values it has set.
 
 We access the values of the hslider using the values array. But we
 can't bind when using square brackets.
 
 what do we do?





[flexcoders] Using TitleWindow

2008-06-05 Thread kenny14390
If I just have a TitleWindow component in my application, is there a
way to allow it to be draggable as if it was a popup? I'm not using
PopupManager to display the TitleWindow because I want to apply a
transition to it so that it slides in. Is there a way to apply this
transition to a popup so that I won't have to worry about the dragging
thing?



[flexcoders] Re: Using TitleWindow

2008-06-05 Thread kenny14390
Tried using a transition on the IFlexDisplayObject popup, but I get
the following warning:

Data binding will not be able to detect assignments to popup.

and the transition will not run. I tried casting popup to the class of
the TitleWindow (PrizePopup), but that gave the same errors.

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

 If you don't use PopUp, it could slide under other components in its
 parent container.  You can always apply an effect to the popup so it
 slides in.
 
  
 
 However, if you set isPopUp=true, it should allow the TW to be dragged.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of kenny14390
 Sent: Thursday, June 05, 2008 10:21 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Using TitleWindow
 
  
 
 If I just have a TitleWindow component in my application, is there a
 way to allow it to be draggable as if it was a popup? I'm not using
 PopupManager to display the TitleWindow because I want to apply a
 transition to it so that it slides in. Is there a way to apply this
 transition to a popup so that I won't have to worry about the dragging
 thing?





[flexcoders] Pausing / Waiting During Execution

2008-06-02 Thread kenny14390
In my code, I'd like to wait about 5 seconds before executing the next
line. The implementation is this:

- show notification
- wait 5 seconds
- hide notification

I tried to use mx:Pause dynamically in the ActionScript, but I had
trouble executing it. The pause component id is wait:

wait.play([wait]);

What's the best way to do this?



[flexcoders] Re: Replaying an Embedding SWF

2008-05-30 Thread kenny14390
I tried your first suggestion about reinstantiating the SWFLoader, but
that doesn't seem to work. Here is my code in the init() function that
gets called every time I want the SWF to replay:

tileFront = new SWFLoader();
tileFront.source = tile_Front;
//(tileFront.content as MovieClip).gotoAndPlay(1);

The commented line generates a Cannot access a property or method of
a null object reference error, even though I clearly define its
source on the previous line.

I looked into your ByteArray method but I couldn't find enough
documentation online to show how to do it. Any tips?

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

 If you embed the whole swf file, it will probably of type MovieClip.
I am
 not sure how you embed it, but once you make an instance of it, it will
 remember its state. In order to get it into the start state you
would have
 to re-instantiate it.
 
 Another option is to embed the swf as a ByteArray. You could then
use the
 loader.loadBytes method to load it. This way you can reload the swf
as much
 as you want.
 
 
 Greetz Erik
 
 On 5/29/08, kenny14390 [EMAIL PROTECTED] wrote:
 
  I've got a SWF file that is embedded in the Flex app. When the SWF is
  clicked, it does an animation and fades away. How can I get the SWF to
  revert to its default state? I've tried resetting the source of the
  SWFLoader to the same SWF file, but it does not load. I've also tried
  creating a second SWFLoader with the same source, but there must be
  something preventing the same file from being loaded more than once.
  The only way the SWF starts over is when the entire app is reloaded.
  What can I do? I could modify the FLA itself or the Flex
implementation.
 





[flexcoders] Re: Flex Freelancers please apply

2008-05-30 Thread kenny14390
You should use flexjobs instead. This is more for technical help than
job postings.

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

 We are developing a product and need help on some of the items we have
 not been able to solve while we could post here we prefer to work one
 on one with someone to get the answers we need.
 
 if your interested in applying please contact us including 
 
 hourly rate 
 location
 email 
 phone if possible
 
 
 thanks
 
 Jason





[flexcoders] Re: Replaying an Embedding SWF

2008-05-30 Thread kenny14390
Also, SWFLoader component cannot toggle visible correctly. I'm using
visible=true and visible=false but nothing happens.

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

 I tried your first suggestion about reinstantiating the SWFLoader, but
 that doesn't seem to work. Here is my code in the init() function that
 gets called every time I want the SWF to replay:
 
 tileFront = new SWFLoader();
 tileFront.source = tile_Front;
 //(tileFront.content as MovieClip).gotoAndPlay(1);
 
 The commented line generates a Cannot access a property or method of
 a null object reference error, even though I clearly define its
 source on the previous line.
 
 I looked into your ByteArray method but I couldn't find enough
 documentation online to show how to do it. Any tips?
 
 --- In flexcoders@yahoogroups.com, EECOLOR eecolor@ wrote:
 
  If you embed the whole swf file, it will probably of type MovieClip.
 I am
  not sure how you embed it, but once you make an instance of it, it
will
  remember its state. In order to get it into the start state you
 would have
  to re-instantiate it.
  
  Another option is to embed the swf as a ByteArray. You could then
 use the
  loader.loadBytes method to load it. This way you can reload the swf
 as much
  as you want.
  
  
  Greetz Erik
  
  On 5/29/08, kenny14390 kenny14390@ wrote:
  
   I've got a SWF file that is embedded in the Flex app. When the
SWF is
   clicked, it does an animation and fades away. How can I get the
SWF to
   revert to its default state? I've tried resetting the source of the
   SWFLoader to the same SWF file, but it does not load. I've also
tried
   creating a second SWFLoader with the same source, but there must be
   something preventing the same file from being loaded more than once.
   The only way the SWF starts over is when the entire app is reloaded.
   What can I do? I could modify the FLA itself or the Flex
 implementation.
  
 





[flexcoders] Re: Replaying an Embedding SWF

2008-05-30 Thread kenny14390
PROBLEM SOLVED:

tileFront.source = new tile_Front();

I forgot that when Embedding the SWF, you store it as a Class. So to
reinstatiate, you use the new keyword to get another instance of it.
Thanks to all that helped.

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

 I tried your first suggestion about reinstantiating the SWFLoader, but
 that doesn't seem to work. Here is my code in the init() function that
 gets called every time I want the SWF to replay:
 
 tileFront = new SWFLoader();
 tileFront.source = tile_Front;
 //(tileFront.content as MovieClip).gotoAndPlay(1);
 
 The commented line generates a Cannot access a property or method of
 a null object reference error, even though I clearly define its
 source on the previous line.
 
 I looked into your ByteArray method but I couldn't find enough
 documentation online to show how to do it. Any tips?
 
 --- In flexcoders@yahoogroups.com, EECOLOR eecolor@ wrote:
 
  If you embed the whole swf file, it will probably of type MovieClip.
 I am
  not sure how you embed it, but once you make an instance of it, it
will
  remember its state. In order to get it into the start state you
 would have
  to re-instantiate it.
  
  Another option is to embed the swf as a ByteArray. You could then
 use the
  loader.loadBytes method to load it. This way you can reload the swf
 as much
  as you want.
  
  
  Greetz Erik
  
  On 5/29/08, kenny14390 kenny14390@ wrote:
  
   I've got a SWF file that is embedded in the Flex app. When the
SWF is
   clicked, it does an animation and fades away. How can I get the
SWF to
   revert to its default state? I've tried resetting the source of the
   SWFLoader to the same SWF file, but it does not load. I've also
tried
   creating a second SWFLoader with the same source, but there must be
   something preventing the same file from being loaded more than once.
   The only way the SWF starts over is when the entire app is reloaded.
   What can I do? I could modify the FLA itself or the Flex
 implementation.
  
 





[flexcoders] Replaying an Embedding SWF

2008-05-29 Thread kenny14390
I've got a SWF file that is embedded in the Flex app. When the SWF is
clicked, it does an animation and fades away. How can I get the SWF to
revert to its default state? I've tried resetting the source of the
SWFLoader to the same SWF file, but it does not load. I've also tried
creating a second SWFLoader with the same source, but there must be
something preventing the same file from being loaded more than once.
The only way the SWF starts over is when the entire app is reloaded.
What can I do? I could modify the FLA itself or the Flex implementation.



[flexcoders] Re: launching flex with arguments

2008-05-29 Thread kenny14390
This method does not validate XHTML, though.

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

 Take a look at the default html wrapper that is produced by Flex. You'll
 see where the flashVars are set.  Depending on what web application
 platform you're on, you can dynamically pass in url parameters to the
 application by dynamically altering a custom wrapper at runtime.
 Another approach would be to use SWFObject
 (http://blog.deconcept.com/swfobject/#examples).  I'm sure there are
 others as well.
 
 Jeff
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of netdeep
 Sent: Thursday, May 29, 2008 11:28 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: launching flex with arguments
 
 
 Jeff, thanks for the quick reply.  Could you give me an example of
 passing say a single 
 string?
 
 Is it something like the way the debugger works where you tack args on
 to the end of the 
 url:
 
 http://localhost:/home/myApp.html?debug=true
 
 
 --- In flexcoders@yahoogroups.com, Battershall, Jeff
 jeff.battershall@ wrote:
 
  Yes, you can pass variables to the Flex app via flashVars. These then 
  can be accessed via Application.application.parameters.myVarName in 
  your application.
  
  This would mean that you'd have to modify the default html wrapper, 
  which is easy to do.
  
  Jeff
  
  -Original Message-
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
  On Behalf Of netdeep
  Sent: Thursday, May 29, 2008 10:59 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] launching flex with arguments
  
  
  Is there a way to launch a flex app and pass it arguments similar to 
  java's
  
  public static void main(String [ ] args)  ?
  
  
  
  
  --
  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 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: Replaying an Embedding SWF

2008-05-29 Thread kenny14390
I searched this topic and actually found your blog post about it. It's
still a bit unclear how to access the timeline. Do you get the content
property of the SWFLoader instance, cast that to a MovieClip, then
access the MC's root property? I cannot access the timeline in this way.

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

 Once the SWF has been loaded you can access its root timeline
through the loader's content. 
 Having the root timeline will let you execute the function:
gotoAndPlay(1) - making the SWF 
 move the playhead back to the first frame and start playing it again.
 --peter
 
 --- In flexcoders@yahoogroups.com, kenny14390 kenny14390@ wrote:
 
  I've got a SWF file that is embedded in the Flex app. When the SWF is
  clicked, it does an animation and fades away. How can I get the SWF to
  revert to its default state? I've tried resetting the source of the
  SWFLoader to the same SWF file, but it does not load. I've also tried
  creating a second SWFLoader with the same source, but there must be
  something preventing the same file from being loaded more than once.
  The only way the SWF starts over is when the entire app is reloaded.
  What can I do? I could modify the FLA itself or the Flex
implementation.
 





[flexcoders] Re: Replaying an Embedding SWF

2008-05-29 Thread kenny14390
I got the AS: 

(tileFront.content as MovieClip).gotoAndPlay(1);

However, the SWF is still not visible after it has already run.


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

 I searched this topic and actually found your blog post about it. It's
 still a bit unclear how to access the timeline. Do you get the content
 property of the SWFLoader instance, cast that to a MovieClip, then
 access the MC's root property? I cannot access the timeline in this way.
 
 --- In flexcoders@yahoogroups.com, peterent pent@ wrote:
 
  Once the SWF has been loaded you can access its root timeline
 through the loader's content. 
  Having the root timeline will let you execute the function:
 gotoAndPlay(1) - making the SWF 
  move the playhead back to the first frame and start playing it again.
  --peter
  
  --- In flexcoders@yahoogroups.com, kenny14390 kenny14390@ wrote:
  
   I've got a SWF file that is embedded in the Flex app. When the
SWF is
   clicked, it does an animation and fades away. How can I get the
SWF to
   revert to its default state? I've tried resetting the source of the
   SWFLoader to the same SWF file, but it does not load. I've also
tried
   creating a second SWFLoader with the same source, but there must be
   something preventing the same file from being loaded more than once.
   The only way the SWF starts over is when the entire app is reloaded.
   What can I do? I could modify the FLA itself or the Flex
 implementation.
  
 





[flexcoders] Re: Replaying an Embedding SWF

2008-05-29 Thread kenny14390
I didn't make it but I have the .FLA file. The first frame is just a
movie clip with a button in it. When the button is pressed, the movie
clip plays. Do I need to set the movie clips timeline to 1? How can I
access this specific component? I tried to embed the symbol using...

[Embed(source=assets/Tile_Flip_Front.swf, symbol=button_mc_break)]

...but I get a couple of errors. Is there a valid way to do this?

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

 Do you know if the animation is in fact done via timeline?  If it is
 not, gotoAndPlay(1) isn't going to do you much good.
 
 Jeff
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of kenny14390
 Sent: Thursday, May 29, 2008 2:23 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Replaying an Embedding SWF
 
 
 I got the AS: 
 
 (tileFront.content as MovieClip).gotoAndPlay(1);
 
 However, the SWF is still not visible after it has already run.
 
 
 --- In flexcoders@yahoogroups.com, kenny14390 kenny14390@ wrote:
 
  I searched this topic and actually found your blog post about it. It's
 
  still a bit unclear how to access the timeline. Do you get the content
 
  property of the SWFLoader instance, cast that to a MovieClip, then 
  access the MC's root property? I cannot access the timeline in this 
  way.
  
  --- In flexcoders@yahoogroups.com, peterent pent@ wrote:
  
   Once the SWF has been loaded you can access its root timeline
  through the loader's content.
   Having the root timeline will let you execute the function:
  gotoAndPlay(1) - making the SWF
   move the playhead back to the first frame and start playing it 
   again. --peter
   
   --- In flexcoders@yahoogroups.com, kenny14390 kenny14390@ wrote:
   
I've got a SWF file that is embedded in the Flex app. When the
 SWF is
clicked, it does an animation and fades away. How can I get the
 SWF to
revert to its default state? I've tried resetting the source of 
the SWFLoader to the same SWF file, but it does not load. I've 
also
 tried
creating a second SWFLoader with the same source, but there must 
be something preventing the same file from being loaded more than 
once. The only way the SWF starts over is when the entire app is 
reloaded. What can I do? I could modify the FLA itself or the Flex
  implementation.
   
  
 
 
 
 
 
 
 --
 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: Replaying an Embedding SWF

2008-05-29 Thread kenny14390
Yes, the movie clip has its own timeline. It's AS3.

I thought the movie clip is a symbol and I can just embed it as the
livedocs show: ...symbol='movieClipName')]. I guess since the MC is
the first frame of the scene, and that's the only frame of the scene,
gotoAndPlay(1) doesn't do anything because the MC's timeline is still
at the end. So the issue now is changing the MC timeline.

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

 Sounds like you need to dig a little deeper into the .fla file to find
 out what script is executing when the button is pressed. That movie clip
 may have its own timeline that you need to access. What AS version is
 being used?
 
 Jeff
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of kenny14390
 Sent: Thursday, May 29, 2008 2:38 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Replaying an Embedding SWF
 
 
 I didn't make it but I have the .FLA file. The first frame is just a
 movie clip with a button in it. When the button is pressed, the movie
 clip plays. Do I need to set the movie clips timeline to 1? How can I
 access this specific component? I tried to embed the symbol using...
 
 [Embed(source=assets/Tile_Flip_Front.swf, symbol=button_mc_break)]
 
 ...but I get a couple of errors. Is there a valid way to do this?
 
 --- In flexcoders@yahoogroups.com, Battershall, Jeff
 jeff.battershall@ wrote:
 
  Do you know if the animation is in fact done via timeline?  If it is 
  not, gotoAndPlay(1) isn't going to do you much good.
  
  Jeff
  
  -Original Message-
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
  On Behalf Of kenny14390
  Sent: Thursday, May 29, 2008 2:23 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: Replaying an Embedding SWF
  
  
  I got the AS:
  
  (tileFront.content as MovieClip).gotoAndPlay(1);
  
  However, the SWF is still not visible after it has already run.
  
  
  --- In flexcoders@yahoogroups.com, kenny14390 kenny14390@ wrote:
  
   I searched this topic and actually found your blog post about it. 
   It's
  
   still a bit unclear how to access the timeline. Do you get the 
   content
  
   property of the SWFLoader instance, cast that to a MovieClip, then
   access the MC's root property? I cannot access the timeline in this 
   way.
   
   --- In flexcoders@yahoogroups.com, peterent pent@ wrote:
   
Once the SWF has been loaded you can access its root timeline
   through the loader's content.
Having the root timeline will let you execute the function:
   gotoAndPlay(1) - making the SWF
move the playhead back to the first frame and start playing it
again. --peter

--- In flexcoders@yahoogroups.com, kenny14390 kenny14390@ 
wrote:

 I've got a SWF file that is embedded in the Flex app. When the
  SWF is
 clicked, it does an animation and fades away. How can I get the
  SWF to
 revert to its default state? I've tried resetting the source of
 the SWFLoader to the same SWF file, but it does not load. I've 
 also
  tried
 creating a second SWFLoader with the same source, but there must
 be something preventing the same file from being loaded more
 than 
 once. The only way the SWF starts over is when the entire app is
 
 reloaded. What can I do? I could modify the FLA itself or the
 Flex
   implementation.

   
  
  
  
  
  
  
  --
  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 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: Replaying an Embedding SWF

2008-05-29 Thread kenny14390
Instead of using symbol=... in the Embed, I tried the shorthand #
notation instead, but I get the same error. Perhaps the Flex app
doesn't recognize the symbol? Is there a way to access the specific
instance of the flash application in Flex?

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

 Yes, the movie clip has its own timeline. It's AS3.
 
 I thought the movie clip is a symbol and I can just embed it as the
 livedocs show: ...symbol='movieClipName')]. I guess since the MC is
 the first frame of the scene, and that's the only frame of the scene,
 gotoAndPlay(1) doesn't do anything because the MC's timeline is still
 at the end. So the issue now is changing the MC timeline.
 
 --- In flexcoders@yahoogroups.com, Battershall, Jeff
 jeff.battershall@ wrote:
 
  Sounds like you need to dig a little deeper into the .fla file to find
  out what script is executing when the button is pressed. That
movie clip
  may have its own timeline that you need to access. What AS version is
  being used?
  
  Jeff
  
  -Original Message-
  From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
  Behalf Of kenny14390
  Sent: Thursday, May 29, 2008 2:38 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: Replaying an Embedding SWF
  
  
  I didn't make it but I have the .FLA file. The first frame is just a
  movie clip with a button in it. When the button is pressed, the movie
  clip plays. Do I need to set the movie clips timeline to 1? How can I
  access this specific component? I tried to embed the symbol using...
  
  [Embed(source=assets/Tile_Flip_Front.swf, symbol=button_mc_break)]
  
  ...but I get a couple of errors. Is there a valid way to do this?
  
  --- In flexcoders@yahoogroups.com, Battershall, Jeff
  jeff.battershall@ wrote:
  
   Do you know if the animation is in fact done via timeline?  If
it is 
   not, gotoAndPlay(1) isn't going to do you much good.
   
   Jeff
   
   -Original Message-
   From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] 
   On Behalf Of kenny14390
   Sent: Thursday, May 29, 2008 2:23 PM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] Re: Replaying an Embedding SWF
   
   
   I got the AS:
   
   (tileFront.content as MovieClip).gotoAndPlay(1);
   
   However, the SWF is still not visible after it has already run.
   
   
   --- In flexcoders@yahoogroups.com, kenny14390 kenny14390@ wrote:
   
I searched this topic and actually found your blog post about it. 
It's
   
still a bit unclear how to access the timeline. Do you get the 
content
   
property of the SWFLoader instance, cast that to a MovieClip, then
access the MC's root property? I cannot access the timeline in
this 
way.

--- In flexcoders@yahoogroups.com, peterent pent@ wrote:

 Once the SWF has been loaded you can access its root timeline
through the loader's content.
 Having the root timeline will let you execute the function:
gotoAndPlay(1) - making the SWF
 move the playhead back to the first frame and start playing it
 again. --peter
 
 --- In flexcoders@yahoogroups.com, kenny14390 kenny14390@ 
 wrote:
 
  I've got a SWF file that is embedded in the Flex app. When the
   SWF is
  clicked, it does an animation and fades away. How can I
get the
   SWF to
  revert to its default state? I've tried resetting the
source of
  the SWFLoader to the same SWF file, but it does not load.
I've 
  also
   tried
  creating a second SWFLoader with the same source, but
there must
  be something preventing the same file from being loaded more
  than 
  once. The only way the SWF starts over is when the entire
app is
  
  reloaded. What can I do? I could modify the FLA itself or the
  Flex
implementation.
 

   
   
   
   
   
   
   --
   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 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: The High Score Problem

2008-05-27 Thread kenny14390
  There is no such thing as Flash application security? 
 
 Against what ? 
 How much is the value of the prize ? 
 Who is attacking you ? Why ?

The prizes are pretty big, so there is a justified concern for
security. The attackers would be facebook users, so they will
usually be 18-25.

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

 On Tuesday 27 May 2008, kenny14390 wrote:
  Is the simple conclusion that Flash applications are inherently
  transparent?
 
 Yes, same as a HTML application, in a sense. This is the bane of
client/server 
 computing, and *banks* haven't cracked it yet either.
 However, there are less people with the skills to decompile a Flex
app than a 
 JavaScript one. But maybe all they need to do is sniff the network
traffic...
 
  Does SSL patch any of these risks?
 
 No, because the user can configure an SSL proxy and see the plain
text of the 
 session. But, again, less people will be able to do this.
 
  There is no such thing as Flash application security? 
 
 Against what ? 
 How much is the value of the prize ? 
 Who is attacking you ? Why ?
 
 Until you answer those questions, how can you evaluate any of the
various 
 mitigation's ?
 For instance, if your attackers are all under 10 (because your app
is used in 
 a closed environment, i.e. a school class room, and the login is
tied to the 
 attendance list and O/S logged in user) then you probably don't need
to do 
 anything else.
 
  How can a high score problem be overcome?
 
 Some sort of CAPTCHA type test should prove there is a user sat at the 
 computer, but I'm not aware of anyway to verify they're using your
client and 
 not another one they built themselves.
 Given they can intercept your 'calculateChecksumOfYourself()' (or
whatever) 
 and just send back the 'right' answer. 
 
 A lot of the time, raising the bar fairly high (require login, SSL) is 
 probably good enough.
 In your case, I'd probably want to require unique, verified email
address too. 
 Maybe postal too as people tend to have fewer throw away postal
address' that 
 actually work :-)
 
 -- 
 Tom Chiverton
 
 
 
 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] Flex Control Over Embedded Flash

2008-05-22 Thread kenny14390
I know that there is a bridge between Flex and Flash, and Flash SWF
and SWC's can be embedded inside of a Flex app. How much control does
Flex have over the Flash movie? Let's say I have a component in Flash
that has an image in it and a border with a certain color around the
component. Is there a way for Flex to dynamically change the color of
the border and the source of the image? 



[flexcoders] Populating Datagrid from Database

2008-05-22 Thread kenny14390
I am calling a PHP page, which reads my entire database and formats it
to output as valid XML. How can I set this as the data provider for a
Datagrid component? I know what the columns are, but not the number of
rows nor the data (obviously).

Thanks.



[flexcoders] Dynamic HTTPService Request

2008-05-21 Thread kenny14390
If I have a variable number of things to POST to a PHP page using
HTTPService, I need to use mx:request to get those things over. Is
there a way to do this dynamically?

Here's the static way:

mx:HTTPService
..mx:request
var1value/var1
var2value/var2
varNvalue/varN
../mx:request
/mx:HTTPService

Is there a way to just iterate through a list of values and append it
to a list of things to request? I'm trying to POST the flashvars, but
there could be many parameters in them and I won't know how many. I
need to pass all of them to the PHP page. The way I'm doing it now is
to just concatenate them all together, delimited by , and pass the
one big string to the PHP page. Can I pass each parameter individually?


Ricky



[flexcoders] Re: Securely Interfacing Between Flex and Databases

2008-05-20 Thread kenny14390
So the bottom line is to use an algorithm like RSA? To take a much
simpler example, if the Flex app receives the encrypted data 1234
and it wishes to use that data, it must first decrypt it. So it
performs the decryption in some AS and now you have the decrypted data
that you wanted. My question now is, if someone decompiles your app
they can see your decryption method and thus decode the data on their
own. Nothing is private in the Flex app due to the decompilation concern.

Regarding SSL, I suppose this is out of the question if we're talking
about a Facebook application. I don't have much control over their
security.

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

 I think you're confusing simple secret key encryption (DES, AES,
 etc..) with public/private key encryption (RSA).
 
 In secret-key encryption if an attacker steals the data and guesses or
 brute forces the secret key, they can see the data.
 
 In public/private key encryption, a message you send to the server is
 encrypted by a public key and can ONLY be decrypted by a private key
 known only to the webserver (the certificate you bought from verisign,
 thawte, etc...)  This is how when you sign onto paypal or some other
 site over https, you don't have to worry about your credit-card being
 stolen in transmission.  Sitting in some DB at the company where
 employees can get at it, you should worry, but during transmission,
 it's unlikely to get cracked.
 
 -Andrew





[flexcoders] Re: Securely Interfacing Between Flex and Databases

2008-05-19 Thread kenny14390
Well the concern is that no matter how you choose to encrypt/decrypt
information, a Flash movie can always be decompiled and your
decryption method is caught with its pants down, allowing users to
find out how to view sensitive material that they're not supposed to
be looking at. So how are we supposed to move this kind of data in and
out of a Flex application without the worry? Does SSL even help? The
concern is not the forging of data, but rather the interception and
decryption of it.

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

 Simply having SSL (https) enabled on your php webserver will help. 
 Another methodology for accessing DB data is using AMFPHP (although I
 haven't used it myself).
 
 -Andrew





[flexcoders] Re: Securely Interfacing Between Flex and Databases

2008-05-18 Thread kenny14390
I ask because security is not only a concern for my personal project,
but also my employment responsibilities for my summer internship, so I
want to hear how others deal with this issue. If you can help, I'd
really appreciate the information.

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

 I've been using the following method for accessing databases in Flex:
 
 -HTTPService component connects to a PHP page on the same server and
 sends any appropriate data values via the POST or GET method.
 
 -PHP page sets up a MySQL connection and performs the necessary
 operations.
 
 -PHP writes any appropriate output values to the page in XML format.
 
 -HTTPService component follows up with the result by calling an
 appropriate ActionScript function, passing in the ResultEvent for easy
 XML parsing.
 
 This method works for me, but is there an easier way? More
 importantly, is there a SECURER way? I fear that having these PHP
 files is not only redundant but it also poses a security risk for SQL
 injections or a sniffing man-in-the-middle attack. The data I'm
 sending back and forth is not all that important compared to banking
 information or something, but I'm still worried about security and it
 would be good to know the proper way to do a task like this.
 
 Is this the only way to connect to a database? Is there a more secure
 way? Thanks!





[flexcoders] Securely Interfacing Between Flex and Databases

2008-05-15 Thread kenny14390
I've been using the following method for accessing databases in Flex:

-HTTPService component connects to a PHP page on the same server and
sends any appropriate data values via the POST or GET method.

-PHP page sets up a MySQL connection and performs the necessary
operations.

-PHP writes any appropriate output values to the page in XML format.

-HTTPService component follows up with the result by calling an
appropriate ActionScript function, passing in the ResultEvent for easy
XML parsing.

This method words for me, but is there an easier way? More
importantly, is there a SECURER way? I fear that having these PHP
files is not only redundant but it also poses a security risk for SQL
injections or a sniffing man-in-the-middle attack. The data I'm
sending back and forth is not all that important compared to banking
information or something, but I'm still worried about security and it
would be good to know the proper way to do a task like this.

Is this the only way to connect to a database? Is there a more secure
way? Thanks!



[flexcoders] Securely Interfacing Between Flex and Databases

2008-05-15 Thread kenny14390
I've been using the following method for accessing databases in Flex:

-HTTPService component connects to a PHP page on the same server and
sends any appropriate data values via the POST or GET method.

-PHP page sets up a MySQL connection and performs the necessary
operations.

-PHP writes any appropriate output values to the page in XML format.

-HTTPService component follows up with the result by calling an
appropriate ActionScript function, passing in the ResultEvent for easy
XML parsing.

This method works for me, but is there an easier way? More
importantly, is there a SECURER way? I fear that having these PHP
files is not only redundant but it also poses a security risk for SQL
injections or a sniffing man-in-the-middle attack. The data I'm
sending back and forth is not all that important compared to banking
information or something, but I'm still worried about security and it
would be good to know the proper way to do a task like this.

Is this the only way to connect to a database? Is there a more secure
way? Thanks!




[flexcoders] Built with Flex Icon

2008-04-18 Thread kenny14390
Is there any kind of STANDARD Built with Flex icon I can stick on my
site? I know people have been making their own, which I found in many
Google results, but I've yet to find a standard one endorsed by Adobe.
Is such a thing available? Otherwise, what's everyone else using?



[flexcoders] Re: Flash/Flex Compatibility with 64bit OS

2008-04-17 Thread kenny14390
Is anybody even aware of such an issue? Should I be worried?

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

 I got this email from a user of my Flex applications...
 
 --
 
 Heh, I tried to log in today and it didn't work. I think I know what the
 problem is.
 It worked before when I was logging in with my laptop with runs 32bit
 XP. I
 run a 64 bit OS on my desktop and it doesn't work on it.
 It probably has to do with some compatibility issue with the 64 bit
flash
 player plugin.
 
 --
 
 Does anyone have any idea if there are any compatibility issues with a
 64bit OS and flash player? Any solutions?
 
 This person emailed me several times because he was having trouble
 registering an account through my Flex app. The problem seemingly went
 away after I registered his account for him, but now the errors are
 coming back - evidently because of hardware incompatibilities.





[flexcoders] Re: Flash/Flex Compatibility with 64bit OS

2008-04-17 Thread kenny14390
What's interesting is that this person was actually able to view the
application and interact with many of the components in it. The
problem he encountered was when he tried to register an account and an
HTTPService was sent. Could this be a compatibility bug?

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

 I got this email from a user of my Flex applications...
 
 --
 
 Heh, I tried to log in today and it didn't work. I think I know what the
 problem is.
 It worked before when I was logging in with my laptop with runs 32bit
 XP. I
 run a 64 bit OS on my desktop and it doesn't work on it.
 It probably has to do with some compatibility issue with the 64 bit
flash
 player plugin.
 
 --
 
 Does anyone have any idea if there are any compatibility issues with a
 64bit OS and flash player? Any solutions?
 
 This person emailed me several times because he was having trouble
 registering an account through my Flex app. The problem seemingly went
 away after I registered his account for him, but now the errors are
 coming back - evidently because of hardware incompatibilities.





[flexcoders] Flash/Flex Compatibility with 64bit OS

2008-04-13 Thread kenny14390
I got this email from a user of my Flex applications...

--

Heh, I tried to log in today and it didn't work. I think I know what the
problem is.
It worked before when I was logging in with my laptop with runs 32bit
XP. I
run a 64 bit OS on my desktop and it doesn't work on it.
It probably has to do with some compatibility issue with the 64 bit flash
player plugin.

--

Does anyone have any idea if there are any compatibility issues with a
64bit OS and flash player? Any solutions?

This person emailed me several times because he was having trouble
registering an account through my Flex app. The problem seemingly went
away after I registered his account for him, but now the errors are
coming back - evidently because of hardware incompatibilities.



[flexcoders] Re: RadioButtonGroup numRadioButtons never changing

2008-04-13 Thread kenny14390
What would be the differences?

In the example case that I posted, should I have used...

rb.group = Lec;

or

rb.group = Lec;


Thanks

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

 Note, use of groupName in AS is not the way of the light so to
speak.  Use
 rb.group = refToRadioButtonGrp
 
 DK
 
 On Fri, Apr 11, 2008 at 10:21 PM, kenny14390 [EMAIL PROTECTED] wrote:
 
I have a canvas consisting of 5 different radio button groups: Lec,
  Dis, Ind, Sem, and Act. In my Script I have the following:
 
  var rb:RadioButton;
  rb.label = (L) +l.dataProvider.source[m];
  rb.name = l.dataProvider.source[m];
  rb.groupName = Lec;
  rb.x = x;
  rb.y = y;
  y+=15;
  sectRadioCanvas.addChild(rb);
 
  This is done a variable number of times, depending on the list l.
  The radio buttons act as if they are in a group (only one of them is
  selectable at a time) but when I check the group's numRadioButtons
  field, it is always set to 0. What I wanted to do was later check the
  names of each radio button in the group and if it matches a given
  name, then change the radio button to be selected. This seems to be
  the best and only way to make a radio button be selected given only
  its name and group. Any ideas on how to circumvent this problem?
 
   
 
 
 
 
 -- 
 Douglas Knudsen
 http://www.cubicleman.com
 this is my signature, like it?





[flexcoders] Re: Link Inside of TextBox

2008-04-13 Thread kenny14390
Is there a way to avoid using font with CSS? I tried and searched
the documentation, but information about it appears to be scant.

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

 I've done this recently using the htmlText property of the Label
 component and using a regular a tag. Flex doesn't style it to look
 like a normal link ( blue underlined ) but you can do that with a
 font tag. What's cool is you can use an event instead of a url (
 something like a href='event:click' ) and handle the the event in
 your Flex app to do some more complicated stuff.
 
 Jamie
 
 On Mon, Mar 31, 2008 at 5:46 PM, kenny14390 [EMAIL PROTECTED] wrote:
 
 
 
 
 
 
  Is there a way to place a link (either LinkButton or just a plan
   hyperlink) inside of a TextBox component?
 
 





[flexcoders] Re: RadioButtonGroup numRadioButtons never changing

2008-04-12 Thread kenny14390
When would be the correct time to validate the buttons? I tried the
following but got the same errors...

rb.validateNow();
sectRadioCanvas.addChild(rb); 

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

 Radiobuttons don't actually get assigned to the group until validated.
 You can call validateNow on the buttons or wait a frame.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of kenny14390
 Sent: Friday, April 11, 2008 7:22 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] RadioButtonGroup numRadioButtons never changing
 
  
 
 I have a canvas consisting of 5 different radio button groups: Lec,
 Dis, Ind, Sem, and Act. In my Script I have the following:
 
 var rb:RadioButton;
 rb.label = (L) +l.dataProvider.source[m];
 rb.name = l.dataProvider.source[m];
 rb.groupName = Lec;
 rb.x = x;
 rb.y = y;
 y+=15;
 sectRadioCanvas.addChild(rb);
 
 This is done a variable number of times, depending on the list l.
 The radio buttons act as if they are in a group (only one of them is
 selectable at a time) but when I check the group's numRadioButtons
 field, it is always set to 0. What I wanted to do was later check the
 names of each radio button in the group and if it matches a given
 name, then change the radio button to be selected. This seems to be
 the best and only way to make a radio button be selected given only
 its name and group. Any ideas on how to circumvent this problem?





[flexcoders] RadioButtonGroup numRadioButtons never changing

2008-04-11 Thread kenny14390
I have a canvas consisting of 5 different radio button groups: Lec,
Dis, Ind, Sem, and Act. In my Script I have the following:

var rb:RadioButton;
rb.label = (L) +l.dataProvider.source[m];
rb.name = l.dataProvider.source[m];
rb.groupName = Lec;
rb.x = x;
rb.y = y;
y+=15;
sectRadioCanvas.addChild(rb);

This is done a variable number of times, depending on the list l.
The radio buttons act as if they are in a group (only one of them is
selectable at a time) but when I check the group's numRadioButtons
field, it is always set to 0. What I wanted to do was later check the
names of each radio button in the group and if it matches a given
name, then change the radio button to be selected. This seems to be
the best and only way to make a radio button be selected given only
its name and group. Any ideas on how to circumvent this problem?



[flexcoders] Custom PopUp TitleWindow Sending Status Back to Main App

2008-04-04 Thread kenny14390
I made a custom TitleWindow to log a user in or register them and I
invoke it from the main application using:

this.helpWindow = PopUpManager.createPopUp(canvas3, login, false);

canvas3 is just the Canvas that I want the PopUp to be centered in,
and login is the name of my custom component. I have no idea why I
need false there, I copied the code from the documentation.

Inside of login I have two HTTPServices; one for logging in and the
other for registering. When either gets a result, it dispatches a
custom Event. The problem is that I want the main app to listen for
the event and update some of its labels and fields accordingly. I have
the following code in my init method:

this.addEventListener(LoginEvent.TYPE, checkLogin, false, 0, true);
this.addEventListener(RegEvent.TYPE, checkReg, false, 0 ,true);

Somebody wrote the skeleton for this code for me, so again, I don't
know what falso, 0, true is for.

The problem is that checkLogin and checkReg are never being called.
Any idea on how to pass back information from the popup back to the
main app?



[flexcoders] Re: Custom PopUp TitleWindow Sending Status Back to Main App

2008-04-04 Thread kenny14390
Thanks! I just had to move the listener from init to the method that
instantiates helpWindow - or else it would be setting it to a null object.

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

 Are you dispatching the LoginEvent.TYPE, etc event from the PopUp?
 
  
 
 Oh, also, unless those events are set to bubble, you don't want to add
 your listeners to this.  instead, you want to do:
 
 helpWindow.addEventListener(LoginEvent.TYPE, checkLogin);
 
  
 
 Also, remove those last three args and use the defaults.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of kenny14390
 Sent: Friday, April 04, 2008 7:10 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Custom PopUp TitleWindow Sending Status Back to
 Main App
 
  
 
 I made a custom TitleWindow to log a user in or register them and I
 invoke it from the main application using:
 
 this.helpWindow = PopUpManager.createPopUp(canvas3, login, false);
 
 canvas3 is just the Canvas that I want the PopUp to be centered in,
 and login is the name of my custom component. I have no idea why I
 need false there, I copied the code from the documentation.
 
 Inside of login I have two HTTPServices; one for logging in and the
 other for registering. When either gets a result, it dispatches a
 custom Event. The problem is that I want the main app to listen for
 the event and update some of its labels and fields accordingly. I have
 the following code in my init method:
 
 this.addEventListener(LoginEvent.TYPE, checkLogin, false, 0, true);
 this.addEventListener(RegEvent.TYPE, checkReg, false, 0 ,true);
 
 Somebody wrote the skeleton for this code for me, so again, I don't
 know what falso, 0, true is for.
 
 The problem is that checkLogin and checkReg are never being called.
 Any idea on how to pass back information from the popup back to the
 main app?





[flexcoders] Reloading too quickly raising errors with HTTPService

2008-03-31 Thread kenny14390
I have an application with an HTTPService on my main page and if the
page is reloaded too quickly, ugly error messages pop up, which is
definitely something I want to conceal. I surrounded the service's
send() method with a try catch but that's not helping. Any ideas on
how to fix it or just to conceal any error messages?



[flexcoders] Re: Reloading too quickly raising errors with HTTPService

2008-03-31 Thread kenny14390
Thanks for the help, guys. I researched Fault Handlers and found an
Adobe article that looked like it should work, but apparently not.
Here's what I added...

(to init():)
exceptionService = new RemoteObject( GenericDestination );
exceptionService.source = Remoting.Examples.ExceptionsTest;
exceptionService.addEventListener( FaultEvent.FAULT, gotError ); 

(new function:)
private function gotError():void{
srv.cancel();
}

I'm guessing that I'm missing something?

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

 HTTPService implements its own try/catch in a way.  Setup a fault event
 handler to see what's going on/catch faults.
 
 DK
 
 On Mon, Mar 31, 2008 at 6:16 AM, kenny14390 [EMAIL PROTECTED] wrote:
 
I have an application with an HTTPService on my main page and if the
  page is reloaded too quickly, ugly error messages pop up, which is
  definitely something I want to conceal. I surrounded the service's
  send() method with a try catch but that's not helping. Any ideas on
  how to fix it or just to conceal any error messages?
 
   
 
 
 
 
 -- 
 Douglas Knudsen
 http://www.cubicleman.com
 this is my signature, like it?





[flexcoders] Link Inside of TextBox

2008-03-31 Thread kenny14390
Is there a way to place a link (either LinkButton or just a plan
hyperlink) inside of a TextBox component? 



[flexcoders] Custom Component and Parent Communication

2008-03-30 Thread kenny14390
How can I make the custom component tell the parent when it was
clicked? I can't figure out how to make them communicate except for
the parent making a new custom component and setting its properties.
I'd like to get an event or a function call when the component is
clicked (mouseDown). Thanks.



[flexcoders] Re: Custom Component and Parent Communication

2008-03-30 Thread kenny14390
Wow, this is exactly what I needed. Thank you very very much!

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

 Kenny -
 
 Your component needs to be an EventDispatcher... if it is extending an 
 existing DisplayObjects, then it already is.  If not, you can just 
 extend EventDispatcher yourself.  Then your component can notify
parents 
 etc. by creating an event of the appropriate type and dispatching.  For 
 instance here is an event you could dispatch on change:
 
 //create a change event and notify...
 var evt:Event = new Event(Event.CHANGE, true, false);
 this.dispatchEvent(evt);
 
 Note: You may or may not want the event to bubble... that will
depend on 
 whether or not the listener is attached directly to your component (or 
 one of its ancestors).
 
 
 
 If you want to send data out with the click you can create a new custom 
 event (extend Event) and add your data property... then instantiate
your 
 custom event type and dispatch one of those instead.  Example:
 
 public class MyEvent extends Event
 {
 public static const TYPE:String = myEvent;
 public var eventData:Object = null; 
 
 public function MyEvent(data:Object, bubbles:Boolean = false, 
 cancellable:Boolean = false)
 {
 super(MyEvent.TYPE, bubbles, cancellable);
 this.eventData = data;
 }
 }
 
 and in your click handler:
 
 var evt:MyEvent = new MyEvent(myData, true);
 this.dispatchEvent(evt);
 
 The code that listens for this custom event can just do something like:
 
 //attach to the component and listen for a MyEvent type event
 myComponent.addEventListener(MyEvent.TYPE, handleMyEvent, false, 0,
true);
 
 public function handleMyEvent(event:MyEvent):void
 {
//handle the event...
 }
 
 hth
 Scott
 
 Scott Melby
 Founder, Fast Lane Software LLC
 http://www.fastlanesw.com
 http://blog.fastlanesw.com
 
 
 
 kenny14390 wrote:
  How can I make the custom component tell the parent when it was
  clicked? I can't figure out how to make them communicate except for
  the parent making a new custom component and setting its properties.
  I'd like to get an event or a function call when the component is
  clicked (mouseDown). Thanks.
 
 
 





[flexcoders] Read Contents of a Web Page

2008-03-28 Thread kenny14390
Hi. I'm trying to get the contents of a web page to read and parse and
return a certain value on that page. The URL looks something like this:

https://longaddress?something=aaother=CRN

The CRN value at the end is variable and changing it will lead to a
different web page. So I want the user to specify the CRN and then I'd
make a connection to the page, read it, find the value I'm looking
for, and then display it.

Are there sandbox issues with this? Can I just use the HTTPService
tag? What are the parameters, such as method and resultFormat?

Thanks



[flexcoders] Re: Read Contents of a Web Page

2008-03-28 Thread kenny14390
After some research, I think I found my answer. Yes, there are sandbox
issues because of the different domains. It's unlikely that the other
domain will grant me access to it, but I found this trick to get
around the sandbox:

Server-side Proxy Script

proxy.php
?php
fpassthru($_POST[proxy_url]);
?

From the Flex application, just call
proxy.php?proxy_url=http://otherdomain.com

Since the proxy.php file is in the local domain, it is in the sandbox
and PHP is doing all of the out-of-the-sandbox work, not Flash. 


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

 Hi. I'm trying to get the contents of a web page to read and parse and
 return a certain value on that page. The URL looks something like this:
 
 https://longaddress?something=aaother=CRN
 
 The CRN value at the end is variable and changing it will lead to a
 different web page. So I want the user to specify the CRN and then I'd
 make a connection to the page, read it, find the value I'm looking
 for, and then display it.
 
 Are there sandbox issues with this? Can I just use the HTTPService
 tag? What are the parameters, such as method and resultFormat?
 
 Thanks





[flexcoders] Adding RadioButtons Dynamically

2008-03-28 Thread kenny14390
I'm adding RadioButtons dynamically and it works fine when I run it
locally, but when I upload it to my server, the radios never show up.
I can't debug because it actually works when I run it. The problem is
that the exported project runs differently, somehow.

Any ideas on what might be going on? Source code can be provided if
necessary.



[flexcoders] Re: Setting a label to be the length of a List component

2008-03-27 Thread kenny14390
alex, i realized that i put the link to my site in this thread and now
the thread is coming up in search results for my site. i deleted all
of my posts to keep them out of the search, but your post quotes mine.
would you mind deleting it?

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

 Are you sure you want to use length and not length() ?
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of kenny14390
 Sent: Saturday, March 22, 2008 11:53 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Setting a label to be the length of a List
 component
 
  
 
 sorry, the URL is http://bingbuilder.com/bin-release/CourseSelector.html
 http://bingbuilder.com/bin-release/CourseSelector.html





[flexcoders] Re: Setting a label to be the length of a List component

2008-03-27 Thread kenny14390
alex, i realized that i put the link to my site in this thread and now
the thread is coming up in search results for my site. i deleted all
of my posts to keep them out of the search, but your post quotes mine.
would you mind deleting it?

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

 Are you sure you want to use length and not length() ?
 
  


 



[flexcoders] Drag and Drop for Variable Custom Component

2008-03-26 Thread kenny14390
Hi. I've read the documentation about drag and drop and I've read up
on custom components, but my case is a little different. I'm never
directly invoking my custom component, but rather conditionally
invoking it (if a condition is true). So I don't write the tags for
the component, I'm just adding it as a child to a Canvas component to
make it show up. I feel like this complicates drag and drop support,
but I want to see what you guys think about it before I go over my head.

Here's the link to the page with the application in question:
http://75.125.60.10/~bingbuil/feature2.php

I'm working on the details like overlapping classes, but I scrapped
this together quickly to test out the Canvas children thing.

So my question basically is how would I implement Drag and Drop on the
oval elements that get appended to the Canvases? I've messed around
with the component itself, but I can't figure out how to have it
communicate with the main MXML application, to tell it to call a
function. If the source code would help, I'd be glad to provide it.
Thanks.



[flexcoders] Re: Drag and Drop for Variable Custom Component

2008-03-26 Thread kenny14390
Would it be easier to make the draggable elements in Flash then import
it into Flex? This way I can control the mouseOver/Down/Release events
in the (easier to use) Flash environment. Does this facilitate the
drag and drop process at all?

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

 Hi. I've read the documentation about drag and drop and I've read up
 on custom components, but my case is a little different. I'm never
 directly invoking my custom component, but rather conditionally
 invoking it (if a condition is true). So I don't write the tags for
 the component, I'm just adding it as a child to a Canvas component to
 make it show up. I feel like this complicates drag and drop support,
 but I want to see what you guys think about it before I go over my head.
 
 Here's the link to the page with the application in question:
 http://75.125.60.10/~bingbuil/feature2.php
 
 I'm working on the details like overlapping classes, but I scrapped
 this together quickly to test out the Canvas children thing.
 
 So my question basically is how would I implement Drag and Drop on the
 oval elements that get appended to the Canvases? I've messed around
 with the component itself, but I can't figure out how to have it
 communicate with the main MXML application, to tell it to call a
 function. If the source code would help, I'd be glad to provide it.
 Thanks.





[flexcoders] Adding Children to Canvases

2008-03-25 Thread kenny14390
I have 7 Canvases, one for each day of the week. When the user wants
to add something to the weekly schedule, it could have multiple days
(Monday and Wednesday, for example). The days to add are in a string
like this: UMTWRFS, where each letter represents a corresponding day
of the week. If the days are just Monday, Wednesday, and Friday, the
string would look like this: MWF.

Here's my problem, I wrote ActionScript to check if a day is in the
string and if so, add it to its corresponding canvas via addChild().
Here is my code:

if (days.search(M)!=-1){
mon.addChild(item);
}
if (days.search(T)!=-1){
tues.addChild(item);
}
if (days.search(W)!=-1){
wed.addChild(item);
}
if (days.search(R)!=-1){
thurs.addChild(item);
}
if (days.search(F)!=-1){
fri.addChild(item);
}
if (days.search(S)!=-1){
sat.addChild(item);
}
if (days.search(U)!=-1){
sun.addChild(item);
}

My problem is that if days is multiple days, only the last day is
added to its canvas. This is very strange since I am using 7
independent if statements. I debugged and I saw the code execute
correctly for all of the days in the string, but only the last one
showed up visually in the canvas. Am I doing something wrong? Any help
is appreciated.



[flexcoders] Re: Adding Children to Canvases

2008-03-25 Thread kenny14390
I tried using for loops to iterate through the days string, but that
will not even display any of the days or none will display correctly.

Interestingly, if I reverse the order of the if statements, like this:

if (days.search(U)!=-1){
sun.addChild(item);
}
if (days.search(S)!=-1){
sat.addChild(item);
}
if (days.search(F)!=-1){
fri.addChild(item);
}
if (days.search(R)!=-1){
thurs.addChild(item);
}
if (days.search(W)!=-1){
wed.addChild(item);
}
if (days.search(T)!=-1){
tues.addChild(item);
}
if (days.search(M)!=-1){
mon.addChild(item);
}

then I get the opposite problem and only the first day in the string
is displayed and the last ones are ignored. If there is only one day
in the string, then it displays fine. Help!



[flexcoders] Re: Adding Children to Canvases

2008-03-25 Thread kenny14390
Thank you, Gordon! That did the trick. Here is the clone() method I wrote:

public function clone():ScheduleElement{
var clone:ScheduleElement = new ScheduleElement();
clone.setLabels(this.crsDeptLbl,this.crsNumLbl);
clone.x = this.x;
clone.width = this.width;
return clone;
}

One thing to note is that I didn't have to specify override for this
function.

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

 A child DisplayObject can only have one parent, so you can't add 'item'
 to more than one Canvas. When you add it to the second one it gets
 removed from the first, etc.
 
  
 
 You need to implement a clone() method to make copies of your items.
 
  
 
 Gordon Smith
 
 Adobe Flex SDK Team
 
  
 



[flexcoders] Re: Using the hovered index of a List to define a ToolTip

2008-03-24 Thread kenny14390
So how can I tell it to make the content of the datatip to be some
data requiring the index of the item that is being hovered over?

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

 If you are using the default renderer, set showDataTips=true
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of kenny14390
 Sent: Sunday, March 23, 2008 4:40 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Using the hovered index of a List to define a
 ToolTip
 
  
 
 I searched the livedocs and couldn't find suitable documentation. Is
 there a quick and painless way of doing this that you know of?
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  dataTips show the full text.
  
  
  
  If you need to bake your own, start with itemRollOver event.
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of kenny14390
  Sent: Saturday, March 22, 2008 12:37 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Using the hovered index of a List to define a
  ToolTip
  
  
  
  I have a list whose data is variable, so the application must know the
  index of the item in the list that the user selects. I know clicking
  on an item will set several of the List's fields, but what about
  hovering the mouse over that item?
  
  I want to use tooltips to display the full version of the abbreviated
  text in the List. Since the user has not made a selection, I cannot
  use selectedIndex. How can I detect the index of the item over which
  the user's cursor is hovering?
  
  If a Listener is the only solution, how does it need to be done? I'm
  not familiar with making Listeners.
  
  Thanks!
 





[flexcoders] Re: Setting a label to be the length of a List component

2008-03-23 Thread kenny14390
I'm getting some trouble from my application. The length of the last
element in the second list is not being computed, even though it is
written in the XML to do so. If you click on the last element of the
second list, the length of the third list is empty. Then if you click
on the next item in the first list and click on the first item in the
second list, then the length of the third list actually includes the
length of the previous third list. It may sound confusing, but here's
the URL of the app with View Source activated. Check out
assets/BRAINoutput.xml for the file used as input. There are a few
mxml files in my src folder, but CourseSelector is the relevant one.

Can someone take a look at these files and try to see why I'm getting
this peculiar error?

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

 This may be functionally the same thing as you did (but easier
semantically to understand) but I did the following (at least as close
as I can remember typing this from my BlackBerry)
 
 arColl = {srv.lastResult.tags.to.desried.elements}
 var num:int = arColl.length
 
 
 
 Sent via BlackBerry from T-Mobile
 
 -Original Message-
 From: kenny14390 [EMAIL PROTECTED]
 
 Date: Sat, 22 Mar 2008 09:42:32 
 To:flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Setting a label to be the length of a List
component
 
 
 I solved the problem in a brute force method of counting iteratively
  during the process of compiling the XML file and writing out the
  length tag before each major closing tag. This is actually a nifty
  technique because accessing the size of a cluster of elements works
  just like OOP convention of (something).length - though length is
  sometimes followed by empty parenthesis.
  
  --- In [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com
ups.com, kenny14390 kenny14390@ wrote:
  
   The id of my HTTPService is srv and I get errors on the line that I
   write:
   
   srv.lastResult.length()
   
   My XML tree looks somewhat like this:
   
   Schedule
   - Info
   - Term
   --Department
   ---Course
   Section
   --Department
   ...
   
   It pretty much goes on and on in the Department, Course, Section
   elements. I'm trying to find out how many Department elements there
   are in the Term, and how many Course elements there are for a given
   Department.
   
   Check out http://bingbuilder. http://bingbuilder.com com for
how it looks now. I'd like to
   display the length of each list under the List component. Is there
   anything else that I can try?
   
   Thanks for your help
   
   --- In [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com
ups.com, Alex Harui aharui@ wrote:
   
Get the HTTPService lastResult.length()

   
  





[flexcoders] Re: Setting a label to be the length of a List component

2008-03-23 Thread kenny14390
sorry, the URL is http://bingbuilder.com/bin-release/CourseSelector.html



[flexcoders] Re: Using the hovered index of a List to define a ToolTip

2008-03-23 Thread kenny14390
I searched the livedocs and couldn't find suitable documentation. Is
there a quick and painless way of doing this that you know of?

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

 dataTips show the full text.
 
  
 
 If you need to bake your own, start with itemRollOver event.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of kenny14390
 Sent: Saturday, March 22, 2008 12:37 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Using the hovered index of a List to define a
 ToolTip
 
  
 
 I have a list whose data is variable, so the application must know the
 index of the item in the list that the user selects. I know clicking
 on an item will set several of the List's fields, but what about
 hovering the mouse over that item?
 
 I want to use tooltips to display the full version of the abbreviated
 text in the List. Since the user has not made a selection, I cannot
 use selectedIndex. How can I detect the index of the item over which
 the user's cursor is hovering?
 
 If a Listener is the only solution, how does it need to be done? I'm
 not familiar with making Listeners.
 
 Thanks!





[flexcoders] Re: Setting a label to be the length of a List component

2008-03-22 Thread kenny14390
The id of my HTTPService is srv and I get errors on the line that I
write:

srv.lastResult.length()

My XML tree looks somewhat like this:

Schedule
- Info
- Term
--Department
---Course
Section
--Department
...

It pretty much goes on and on in the Department, Course, Section
elements. I'm trying to find out how many Department elements there
are in the Term, and how many Course elements there are for a given
Department.

Check out http://bingbuilder.com for how it looks now. I'd like to
display the length of each list under the List component. Is there
anything else that I can try?

Thanks for your help

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

 Get the HTTPService lastResult.length()
 
  



[flexcoders] Using the hovered index of a List to define a ToolTip

2008-03-22 Thread kenny14390
I have a list whose data is variable, so the application must know the
index of the item in the list that the user selects. I know clicking
on an item will set several of the List's fields, but what about
hovering the mouse over that item?

I want to use tooltips to display the full version of the abbreviated
text in the List. Since the user has not made a selection, I cannot
use selectedIndex. How can I detect the index of the item over which
the user's cursor is hovering?

If a Listener is the only solution, how does it need to be done? I'm
not familiar with making Listeners.

Thanks!



[flexcoders] Re: Setting a label to be the length of a List component

2008-03-22 Thread kenny14390
I solved the problem in a brute force method of counting iteratively
during the process of compiling the XML file and writing out the
length tag before each major closing tag. This is actually a nifty
technique because accessing the size of a cluster of elements works
just like OOP convention of (something).length - though length is
sometimes followed by empty parenthesis.

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

 The id of my HTTPService is srv and I get errors on the line that I
 write:
 
 srv.lastResult.length()
 
 My XML tree looks somewhat like this:
 
 Schedule
 - Info
 - Term
 --Department
 ---Course
 Section
 --Department
 ...
 
 It pretty much goes on and on in the Department, Course, Section
 elements. I'm trying to find out how many Department elements there
 are in the Term, and how many Course elements there are for a given
 Department.
 
 Check out http://bingbuilder.com for how it looks now. I'd like to
 display the length of each list under the List component. Is there
 anything else that I can try?
 
 Thanks for your help
 
 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  Get the HTTPService lastResult.length()
  
 





[flexcoders] Setting a label to be the length of a List component

2008-03-21 Thread kenny14390
I'm using HTTPService to connect to an XML file and use that as a
dataProvider to a mx:List component. I'd like to display somewhere in
the app the number of items in the List. I've tried everything obvious
and I'm stumped. Any help?



[flexcoders] Re: Using an XML file as a dataProvider and accessing its data

2008-01-14 Thread kenny14390
That was very helpful, thank you! Two follow up questions. 

What are the similarities/differences advantages/disadvantages of
using multiple Lists instead of DataGrid? For example, if the data of
the second column depends on the selection in the first column, I
found it easier to just make each column into a List and use the index
of the selected Item in the list as an index into the XML file's
elements and then populate the second List with the new Array.


Secondly, an XML file is already essentially in a tree structure, but
how can you use the file as a dataProvider for the Tree component in
Flex? The method outlined in the previous question of sequentially
populating Lists is basically just a makeshift Tree, but I'd like to
find out how to actually use the XML file as a provider for the Tree.


Thanks again to whoever can help answer these questions.


-Ricky

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

 You can do both.  Bottom line, the DataGrid requires a list of items.
 This can be an XMLList or Array, ONLY if you are certain you will not
 need to update the data items individually.  Best practice is to use an
 XMLListCollection, which is a collection of XML nodes, or an
 ArrayCollection of item value objects.  Each item in the collection
 produces a row.
 
  
 
 Given such a list of data items, each row of the DataGrid gets a
 reference to the data item producing it. You specify which property or
 attribute in the item goes in which column using the DataGridColumn
 object.  If the value you want is in a top-level property of the item
 (an attribute or first level child node of an XML item, or a top-level
 property of the item object) you can specify the dataField.  It the
 value you want is nested deeper in the item object, use labelFunction().
 
  
 
 There are many examples available.
 
  
 
 Tracy
 
  
 



[flexcoders] Horizontal Scrolling List

2008-01-14 Thread kenny14390
Hi. I've had the idea to have a horizontally scrolling list, but I'm
not sure how to make it using the Flex components. I guess another way
to describe it would be like a marquee or a ticker (like stocks on
MSNBC). The elements are arranged horizontally and they slide both
left and right-ward. Another idea/complication involves a
speed/direction control by hovering the mouse over the ends of the
list. Does anyone have an idea of how this can be constructed?



[flexcoders] Using an XML file as a dataProvider and accessing its data

2008-01-13 Thread kenny14390
I started with Flex a couple days ago and I'm just learning the
basics. This shouldn't be too hard to answer, but getting me to
understand it would be the hard part! If I have an XML file with
parents, children, and siblings (see the example below), how can I
link say a DataGrid to a child element, but access its children? Refer
to the sample XML file below. Let's call it test.xml

?xml version=1.0 encoding=utf-8?
Schedule
 Semester id='Spring08'
  Department id='ACCT' name='Accounting'
   Course id='211' name='Financial Accounting'
Section id='DIS01' limit='150' enroll='71'
 Section id='ACT50' limit='25' enroll='8'/
 Section id='ACT51' limit='25' enroll='12'/
/Section
Section id='DIS02' limit='41' enroll='23'
 Section id='ACT56' limit='41' enroll='23'/
/Section
   /Course
   Course 
Section ...
 
/Section
   /Course
   ...
  /Department
  ...
 /Semester
 ...
/Schedule



From what I understand, one way to get this document into the DataGrid
is to create an HTTPService that connects to the XML file and give it
an id, we'll call it 'file'. So in the DataGrid we would say
dataProvider='file.Schedule.Semester.Department.Course.Section'? If
this is the case, how does the DataGrid know what attributes to pull
out of the elements and how is this displayed?

Let's say I want to do some OOP and make an object for every Semester,
Department, Course, and Section. How would I read this data and create
the objects? Fields of the objects would be equivalent to the
attributes to the elements. 

Thank you all for the support