[flexcoders] RIA: record insert best practices

2007-05-06 Thread arieljake
I am wondering how people like to handle insertion of records in a
RIAs for records that have a unique number field.

Do people determine the unique id on the client side and create the
record, or do they do that server side and return the new ID number
back to the client.

I prefer to do the MAX(id) check on the server in the database within
a transaction, but I am realizing that doing it that way sort of
forces me to block user interaction in the RIA until the ID is
returned lest the user try to do something with that new record that I
cannot support yet.

Thoughts? Thank you.



Re: [flexcoders] Shouldn't this VBox have a scrollbar?

2007-05-06 Thread Manish Jethani
On 5/6/07, Tom Bray [EMAIL PROTECTED] wrote:

 Shouldn't the height of the VBox below end up being 300?  Shouldn't 
 height=100% make it fill up the area allotted to it by it's parent?  
 Instead it ends up having a height of 612 and no scrollbar:

(Former Adobe guy who worked on this stuff...)

Set minWidth=0 on the VBox and now it'll be 100% of the outer Canvas.
See my other post (a few days ago, in response to Ian Skinner) for an
explanation. I'll try to explain this in more detail in a blog post.


Re: [flexcoders] Scrubbing in a MP3-file

2007-05-06 Thread Sebastian Mohr

Thank you Manish,

This should be doable ;)

Cheers,
masu


On 5/6/07, Manish Jethani [EMAIL PROTECTED] wrote:


  On 5/6/07, Sebastian Mohr [EMAIL PROTECTED]sebastian.mohr%40gmail.com
wrote:

 is there anybody who can explain how to
 give a mx:HSlider-component the ability to
 scrub in a MP3-file?

Basically you have to call play() on the Sound object with the new
position as the argument.

Or you can use the SoundPlayer component:

http://mannu.livejournal.com/343918.html

SoundPlayer source=boombastic.mp3 position={slider.value} /
 



[flexcoders] Re: RIA: record insert best practices

2007-05-06 Thread scott_flex

I'm no expert in Flex and RIA development but i have implemented 
creating the ID on the client using the createUUID to generate a GUID 
which by all practible means it will be globally unique.

I found this to work well, plus it saves me ALL the hassle of 
generating a temporary ID and then get the real ID back after i post 
the results to the server.

I'm generating many updates and a lot of times i'm updating parent 
child relatinships so if I don't have the real ID ahead of time it 
would be a large amount of work to get the real parent id then go 
through all the children and update the reference key based on the 
temporary key assigned to it on the client... it's even hard to explain 
in a sentance or two.


Some pureist will think it's crazy to generate the key on the client, 
and I partly agree.  But if it works, it works.

You can also setup a method to request a block of unique IDS on from 
the server if you don't want to create it on the client itself.  This 
keeps your ID generation centrally controlled but you still have the 
benefits of knowing your IDs for particular updates before sending them 
to the server.

Some of it also depends on the ID types in your database.  I actually 
am now using GUIDs in a SQL Server database and not using identity 
increment values.  Even though my primary key indexes are a bit more 
fragmented i have not found a performance loss, just a bit larger 
database since i'm storing  a 16bit id value instead of a 4 bit integer 
value.

In my case i'm trying to build rapid applications and i generally have 
oen app and one database so generating IDs on the client is ok in my 
circumstance... maybe not the best for all.

--Scott



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

 I am wondering how people like to handle insertion of records in a
 RIAs for records that have a unique number field.
 
 Do people determine the unique id on the client side and create the
 record, or do they do that server side and return the new ID number
 back to the client.
 
 I prefer to do the MAX(id) check on the server in the database within
 a transaction, but I am realizing that doing it that way sort of
 forces me to block user interaction in the RIA until the ID is
 returned lest the user try to do something with that new record that I
 cannot support yet.
 
 Thoughts? Thank you.





Re: [flexcoders] Scrubbing in a MP3-file

2007-05-06 Thread mychemic Carlo Gulliani
Excuse me for my English, Whether can this component show ID3 Tags? Also maybe 
do you know how to display cover artwork mp3 file?

- Original Message 
From: Sebastian Mohr [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Sunday, May 6, 2007 4:10:44 PM
Subject: Re: [flexcoders] Scrubbing in a MP3-file









  



Thank you Manish,

This should be doable ;)

Cheers,
masu



On 5/6/07, Manish Jethani manish.jethani@ gmail.com
 wrote:












  



On 5/6/07, Sebastian Mohr sebastian.mohr@ gmail.com wrote:



 is there anybody who can explain how to

 give a mx:HSlider-componen t the ability to

 scrub in a MP3-file?



Basically you have to call play() on the Sound object with the new

position as the argument.



Or you can use the SoundPlayer component:



http://mannu. livejournal. com/343918. html



SoundPlayer source=boombastic.mp3 position={slider.value} /




  




















  







!--

#ygrp-mlmsg {font-size:13px;font-family:arial, helvetica, clean, sans-serif;}
#ygrp-mlmsg table {font-size:inherit;font:100%;}
#ygrp-mlmsg select, input, textarea {font:99% arial, helvetica, clean, 
sans-serif;}
#ygrp-mlmsg pre, code {font:115% monospace;}
#ygrp-mlmsg * {line-height:1.22em;}
#ygrp-text{
font-family:Georgia;
}
#ygrp-text p{
margin:0 0 1em 0;}
#ygrp-tpmsgs{
font-family:Arial;
clear:both;}
#ygrp-vitnav{
padding-top:10px;font-family:Verdana;font-size:77%;margin:0;}
#ygrp-vitnav a{
padding:0 1px;}
#ygrp-actbar{
clear:both;margin:25px 0;white-space:nowrap;color:#666;text-align:right;}
#ygrp-actbar .left{
float:left;white-space:nowrap;}
.bld{font-weight:bold;}
#ygrp-grft{
font-family:Verdana;font-size:77%;padding:15px 0;}
#ygrp-ft{
font-family:verdana;font-size:77%;border-top:1px solid #666;
padding:5px 0;
}
#ygrp-mlmsg #logo{
padding-bottom:10px;}

#ygrp-vital{
background-color:#e0ecee;margin-bottom:20px;padding:2px 0 8px 8px;}
#ygrp-vital #vithd{
font-size:77%;font-family:Verdana;font-weight:bold;color:#333;text-transform:uppercase;}
#ygrp-vital ul{
padding:0;margin:2px 0;}
#ygrp-vital ul li{
list-style-type:none;clear:both;border:1px solid #e0ecee;
}
#ygrp-vital ul li .ct{
font-weight:bold;color:#ff7900;float:right;width:2em;text-align:right;padding-right:.5em;}
#ygrp-vital ul li .cat{
font-weight:bold;}
#ygrp-vital a {
text-decoration:none;}

#ygrp-vital a:hover{
text-decoration:underline;}

#ygrp-sponsor #hd{
color:#999;font-size:77%;}
#ygrp-sponsor #ov{
padding:6px 13px;background-color:#e0ecee;margin-bottom:20px;}
#ygrp-sponsor #ov ul{
padding:0 0 0 8px;margin:0;}
#ygrp-sponsor #ov li{
list-style-type:square;padding:6px 0;font-size:77%;}
#ygrp-sponsor #ov li a{
text-decoration:none;font-size:130%;}
#ygrp-sponsor #nc {
background-color:#eee;margin-bottom:20px;padding:0 8px;}
#ygrp-sponsor .ad{
padding:8px 0;}
#ygrp-sponsor .ad #hd1{
font-family:Arial;font-weight:bold;color:#628c2a;font-size:100%;line-height:122%;}
#ygrp-sponsor .ad a{
text-decoration:none;}
#ygrp-sponsor .ad a:hover{
text-decoration:underline;}
#ygrp-sponsor .ad p{
margin:0;}
o {font-size:0;}
.MsoNormal {
margin:0 0 0 0;}
#ygrp-text tt{
font-size:120%;}
blockquote{margin:0 0 0 4px;}
.replbq {margin:4;}
--







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

Re: [flexcoders] Scrubbing in a MP3-file

2007-05-06 Thread Manish Jethani
On 5/6/07, mychemic Carlo Gulliani [EMAIL PROTECTED] wrote:

 Excuse me for my English, Whether can this component show ID3 Tags? Also
 maybe do you know how to display cover artwork mp3 file?

See the id3 property of the component.

I'm not sure what cover artwork means.


Re: [flexcoders] Problems using Zoom effect.

2007-05-06 Thread Manish Jethani
On 4/30/07, beecee1977 [EMAIL PROTECTED] wrote:

 mx:Zoom id=zoomEffect zoomHeightFrom=0.5
 zoomHeightTo=1 zoomWidthFrom=0.5 zoomWidthTo=1 /
 mx:Image id=im1 source=im1.png
 rollOver=zoomImg(event) rollOut=zoomImg(event)
 scaleX=0.5 scaleY=0.5 x=28 y=10/
[snip]

 The idea is the have a toolbar where as I scroll over the images are
 zoomed (ala Mac toolbar I think).
 I find that when I move the mouse slowly across the images it behaves
 as expected. However if I move the mouse more quickly all the images
 end up getting zoomed.

Use the rollOverEffect and rollOutEffect styles instead of
triggering the zoom manually. The effect styles should take care of
terminating any existing zoom effect and starting a new one when you
roll over/out the image.


Re: [flexcoders] Scrubbing in a MP3-file

2007-05-06 Thread Thijs Triemstra | Collab

Try the ID3Reader component to get the artwork and ID3 tags:

http://blog.benstucki.net/?id=24

Thijs


On May 6, 2007, at 3:28 PM, mychemic Carlo Gulliani wrote:



Excuse me for my English, Whether can this component show ID3 Tags?  
Also maybe do you know how to display cover artwork mp3 file?


- Original Message 
From: Sebastian Mohr [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Sunday, May 6, 2007 4:10:44 PM
Subject: Re: [flexcoders] Scrubbing in a MP3-file

Thank you Manish,

This should be doable ;)

Cheers,
masu



On 5/6/07, Manish Jethani manish.jethani@ gmail.com  wrote:
On 5/6/07, Sebastian Mohr sebastian.mohr@ gmail.com wrote:

 is there anybody who can explain how to
 give a mx:HSlider-componen t the ability to
 scrub in a MP3-file?

Basically you have to call play() on the Sound object with the new
position as the argument.

Or you can use the SoundPlayer component:

http://mannu. livejournal. com/343918. html

SoundPlayer source=boombastic.mp3 position={slider.value} /




Ahhh...imagining that irresistible new car smell?
Check out new cars at Yahoo! Autos.






Re: [flexcoders] Shouldn't this VBox have a scrollbar?

2007-05-06 Thread Tom Bray

Perfect.  Thanks!

On May 6, 2007, at 5:08 AM, Manish Jethani wrote:


On 5/6/07, Tom Bray [EMAIL PROTECTED] wrote:

 Shouldn't the height of the VBox below end up being 300?  
Shouldn't height=100% make it fill up the area allotted to it by  
it's parent? Instead it ends up having a height of 612 and no  
scrollbar:


(Former Adobe guy who worked on this stuff...)

Set minWidth=0 on the VBox and now it'll be 100% of the outer Canvas.
See my other post (a few days ago, in response to Ian Skinner) for an
explanation. I'll try to explain this in more detail in a blog post.






Re: [flexcoders] Scrubbing in a MP3-file

2007-05-06 Thread mychemic Carlo Gulliani
wow, great thanks. Sorry for stupid question, but Album Cover read from 
id3Tag or store in external folder?

- Original Message 
From: Thijs Triemstra | Collab [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Sunday, May 6, 2007 7:33:47 PM
Subject: Re: [flexcoders] Scrubbing in a MP3-file









  



Try the ID3Reader component to get the artwork and ID3 tags:


http://blog. benstucki. net/?id=24


Thijs



On May 6, 2007, at 3:28 PM, mychemic Carlo Gulliani wrote:



Excuse me for my English, Whether can this component show ID3 Tags? Also maybe 
do you know how to display cover artwork mp3 file?

- Original Message 
From: Sebastian Mohr [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Sunday, May 6, 2007 4:10:44 PM
Subject: Re: [flexcoders] Scrubbing in a MP3-file

Thank you Manish,

This should be doable ;)

Cheers,
masu



On 5/6/07, Manish Jethani manish.jethani@ gmail.com  wrote:On 5/6/07, 
Sebastian Mohr sebastian.mohr@ gmail.com wrote:

 is there anybody who can explain how to
 give a mx:HSlider-componen t the ability to
 scrub in a MP3-file?

Basically you have to call play() on the Sound object with the new
position as the argument.

Or you can use the SoundPlayer component:

http://mannu. livejournal. com/343918. html

SoundPlayer source=boombastic.mp3 position={slider.value} /













Ahhh...imagining that irresistible new car smell?
Check out new cars at Yahoo! Autos.









  







!--

#ygrp-mlmsg {font-size:13px;font-family:arial, helvetica, clean, sans-serif;}
#ygrp-mlmsg table {font-size:inherit;font:100%;}
#ygrp-mlmsg select, input, textarea {font:99% arial, helvetica, clean, 
sans-serif;}
#ygrp-mlmsg pre, code {font:115% monospace;}
#ygrp-mlmsg * {line-height:1.22em;}
#ygrp-text{
font-family:Georgia;
}
#ygrp-text p{
margin:0 0 1em 0;}
#ygrp-tpmsgs{
font-family:Arial;
clear:both;}
#ygrp-vitnav{
padding-top:10px;font-family:Verdana;font-size:77%;margin:0;}
#ygrp-vitnav a{
padding:0 1px;}
#ygrp-actbar{
clear:both;margin:25px 0;white-space:nowrap;color:#666;text-align:right;}
#ygrp-actbar .left{
float:left;white-space:nowrap;}
.bld{font-weight:bold;}
#ygrp-grft{
font-family:Verdana;font-size:77%;padding:15px 0;}
#ygrp-ft{
font-family:verdana;font-size:77%;border-top:1px solid #666;
padding:5px 0;
}
#ygrp-mlmsg #logo{
padding-bottom:10px;}

#ygrp-vital{
background-color:#e0ecee;margin-bottom:20px;padding:2px 0 8px 8px;}
#ygrp-vital #vithd{
font-size:77%;font-family:Verdana;font-weight:bold;color:#333;text-transform:uppercase;}
#ygrp-vital ul{
padding:0;margin:2px 0;}
#ygrp-vital ul li{
list-style-type:none;clear:both;border:1px solid #e0ecee;
}
#ygrp-vital ul li .ct{
font-weight:bold;color:#ff7900;float:right;width:2em;text-align:right;padding-right:.5em;}
#ygrp-vital ul li .cat{
font-weight:bold;}
#ygrp-vital a {
text-decoration:none;}

#ygrp-vital a:hover{
text-decoration:underline;}

#ygrp-sponsor #hd{
color:#999;font-size:77%;}
#ygrp-sponsor #ov{
padding:6px 13px;background-color:#e0ecee;margin-bottom:20px;}
#ygrp-sponsor #ov ul{
padding:0 0 0 8px;margin:0;}
#ygrp-sponsor #ov li{
list-style-type:square;padding:6px 0;font-size:77%;}
#ygrp-sponsor #ov li a{
text-decoration:none;font-size:130%;}
#ygrp-sponsor #nc {
background-color:#eee;margin-bottom:20px;padding:0 8px;}
#ygrp-sponsor .ad{
padding:8px 0;}
#ygrp-sponsor .ad #hd1{
font-family:Arial;font-weight:bold;color:#628c2a;font-size:100%;line-height:122%;}
#ygrp-sponsor .ad a{
text-decoration:none;}
#ygrp-sponsor .ad a:hover{
text-decoration:underline;}
#ygrp-sponsor .ad p{
margin:0;}
o {font-size:0;}
.MsoNormal {
margin:0 0 0 0;}
#ygrp-text tt{
font-size:120%;}
blockquote{margin:0 0 0 4px;}
.replbq {margin:4;}
--







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

Re: [flexcoders] Scrubbing in a MP3-file

2007-05-06 Thread mychemic Carlo Gulliani
sorry, i see all)

- Original Message 
From: mychemic Carlo Gulliani [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Sunday, May 6, 2007 8:07:32 PM
Subject: Re: [flexcoders] Scrubbing in a MP3-file









  




wow, great thanks. Sorry for stupid question, but Album Cover read from 
id3Tag or store in external folder?

- Original Message 
From: Thijs Triemstra | Collab [EMAIL PROTECTED] nl
To: [EMAIL PROTECTED] ups.com
Sent: Sunday, May 6, 2007 7:33:47 PM
Subject: Re: [flexcoders] Scrubbing in a MP3-file










Try the ID3Reader component to get the artwork and ID3 tags:


http://blog. benstucki. net/?id=24


Thijs



On May 6, 2007, at 3:28 PM, mychemic Carlo Gulliani wrote:



Excuse me for my English, Whether can this component show ID3 Tags? Also maybe 
do you know how to display cover artwork mp3 file?

- Original Message 
From: Sebastian Mohr [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Sunday, May 6, 2007 4:10:44 PM
Subject: Re: [flexcoders] Scrubbing in a MP3-file

Thank you Manish,

This should be doable ;)

Cheers,
masu



On 5/6/07, Manish Jethani manish.jethani@ gmail.com  wrote:On 5/6/07, 
Sebastian Mohr sebastian.mohr@ gmail.com wrote:

 is there anybody who can explain how to
 give a mx:HSlider-componen t the ability to
 scrub in a MP3-file?

Basically you have to call play() on the Sound object with the new
position as the argument.

Or you can use the SoundPlayer component:

http://mannu. livejournal. com/343918. html

SoundPlayer source=boombastic.mp3 position={slider.value} /













Ahhh...imagining that irresistible new car smell?
Check out new cars at Yahoo! Autos.









  












  Ahhh...imagining that irresistible new car smell?
 Check out
new cars at Yahoo! Autos.


  







!--

#ygrp-mlmsg {font-size:13px;font-family:arial, helvetica, clean, sans-serif;}
#ygrp-mlmsg table {font-size:inherit;font:100%;}
#ygrp-mlmsg select, input, textarea {font:99% arial, helvetica, clean, 
sans-serif;}
#ygrp-mlmsg pre, code {font:115% monospace;}
#ygrp-mlmsg * {line-height:1.22em;}
#ygrp-text{
font-family:Georgia;
}
#ygrp-text p{
margin:0 0 1em 0;}
#ygrp-tpmsgs{
font-family:Arial;
clear:both;}
#ygrp-vitnav{
padding-top:10px;font-family:Verdana;font-size:77%;margin:0;}
#ygrp-vitnav a{
padding:0 1px;}
#ygrp-actbar{
clear:both;margin:25px 0;white-space:nowrap;color:#666;text-align:right;}
#ygrp-actbar .left{
float:left;white-space:nowrap;}
.bld{font-weight:bold;}
#ygrp-grft{
font-family:Verdana;font-size:77%;padding:15px 0;}
#ygrp-ft{
font-family:verdana;font-size:77%;border-top:1px solid #666;
padding:5px 0;
}
#ygrp-mlmsg #logo{
padding-bottom:10px;}

#ygrp-vital{
background-color:#e0ecee;margin-bottom:20px;padding:2px 0 8px 8px;}
#ygrp-vital #vithd{
font-size:77%;font-family:Verdana;font-weight:bold;color:#333;text-transform:uppercase;}
#ygrp-vital ul{
padding:0;margin:2px 0;}
#ygrp-vital ul li{
list-style-type:none;clear:both;border:1px solid #e0ecee;
}
#ygrp-vital ul li .ct{
font-weight:bold;color:#ff7900;float:right;width:2em;text-align:right;padding-right:.5em;}
#ygrp-vital ul li .cat{
font-weight:bold;}
#ygrp-vital a {
text-decoration:none;}

#ygrp-vital a:hover{
text-decoration:underline;}

#ygrp-sponsor #hd{
color:#999;font-size:77%;}
#ygrp-sponsor #ov{
padding:6px 13px;background-color:#e0ecee;margin-bottom:20px;}
#ygrp-sponsor #ov ul{
padding:0 0 0 8px;margin:0;}
#ygrp-sponsor #ov li{
list-style-type:square;padding:6px 0;font-size:77%;}
#ygrp-sponsor #ov li a{
text-decoration:none;font-size:130%;}
#ygrp-sponsor #nc {
background-color:#eee;margin-bottom:20px;padding:0 8px;}
#ygrp-sponsor .ad{
padding:8px 0;}
#ygrp-sponsor .ad #hd1{
font-family:Arial;font-weight:bold;color:#628c2a;font-size:100%;line-height:122%;}
#ygrp-sponsor .ad a{
text-decoration:none;}
#ygrp-sponsor .ad a:hover{
text-decoration:underline;}
#ygrp-sponsor .ad p{
margin:0;}
o {font-size:0;}
.MsoNormal {
margin:0 0 0 0;}
#ygrp-text tt{
font-size:120%;}
blockquote{margin:0 0 0 4px;}
.replbq {margin:4;}
--







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

Re: [flexcoders] Stopping embedded flash in Flex

2007-05-06 Thread Tim Walling

Some recent posts regarding this subject:

http://life.neophi.com/danielr/2007/05/stopping_flash_4_swf_with_soun.html#more

http://www.jessewarden.com/archives/2007/05/controlling_fla.html


Tim


On 5/5/07, Abdul Qabiz [EMAIL PROTECTED] wrote:


  There is no interoperability between AS3 and AS2 apps that means you
can't control or invoke anything in loaded SWF8 ( or less) from a SWF9 or
more..

There are workarounds which use LocalConnection or ExternalInterface to
achieve that. Infact, there are some projects around this problem.

http://www.flashextensions.com/blog/2006/12/11/swfadapter-%E2%80%93-proxy-to-communicating-to-flash-8-swfs-from-flash-9/


-abdul

On 5/3/07, Manish Jethani [EMAIL PROTECTED] wrote:

   On 5/2/07, John [EMAIL PROTECTED] wablam%40gmail.com wrote:
  I have a ViewStack that has a SWFLoader as one of the views.
 
  The problem is when I change views the flash on the first view(as well
  as the audio) is still running in the background. Anyway of
  stopping/pausing the flash when I switch Views?

 You can either unload it by setting the source to  (or null). But I
 found that that doesn't stop the movie playing. So try calling stop()
 on the content.

 loader.content.stop();

 I'm assuming the content will be a MovieClip, etc. Didn't work for me
 with an old Flash 7 SWF.


 





--
Tim
timwalling.com


[flexcoders] SWF Symbol and Changeing Colors

2007-05-06 Thread nodovu
I would like to embed a vector graphic, either from illustrator or
flash and export the symbol into a SWF file...one in swf format I can
import it, but I do not know how to change the color dynamically.

ex : symbol is a red ball, but I want to change it to a blue ball in FLEX.
Is this even possible?
-aly



[flexcoders] Newbie Help OS X

2007-05-06 Thread untz
Hello there,

I download the Flex SDK 2.0.1 for my OS X Tiger based machine.

Added the bin to my PATH variable inside .bash_profile...

Was following the tutorial on the web site and when I tried to  
compile the first example,
it just remained stuck on the line that loads the configuration file!

Here's what I did:

Raven:/Developer/DevResources/Flex/MyFirst untz$ mxmlc --strict=true  
--file-specs MyFirst.mxml
Loading configuration file /Developer/flex_sdk_2/frameworks/flex- 
config.xml

It stuck here! Is there something I am missing?

Plus, is there anyway I can set this up to use on Eclipse (not the  
professional builder product, just the SDK)?

Sincerely yours,

Unnsse


Re: [flexcoders] Re: Datagrid - case-insensitive sort

2007-05-06 Thread Paul Booth

Thanks for the code guys - I've got my grid working now using a
sortCompareFunction based on Iko's.

I just thought that this functionality would be built in as it seems to be
for the Flash datagrid. This appears to have a
DataGridColumn.sortOptionsproperty with values such as
Array.CASEINSENSITIVE and Array.NUMERIC
(see http://www.adobe.com/devnet/flash/quickstart/datagrid_pt2/ )

Cheers,

Paul.



On 05/05/07, iko_knyphausen [EMAIL PROTECTED] wrote:



You could also create a sortCompareFunction, similar to this one

private function sfSortFunction(ob1:Object, ob2:Object) : int
{
var s1 : String = ob1.dataField.toString().toLowerCase();
var s2 : String = ob2.dataField.toString().toLowerCase();
if (s1s2)
return 1;
if (s1  s2)
return -1;
return 0;
}

--- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Manish
Jethani [EMAIL PROTECTED]
wrote:

 On 5/5/07, Paul Booth [EMAIL PROTECTED] wrote:

  I can't find a way to tell the Datagrid (or DatagridColumn) to sort
in a
  case-insensitive manner. Can someone please enlighten me?

 In your headerRelease event handler:

 import mx.collections.*;

 var col:ICollectionView = event.target.dataProvider;
 var s:Sort = col.sort ? col.sort : new Sort();
 var sf:SortField;
 if (col.sort  col.sort.fields) {
 for each (var f:SortField in col.sort.fields)
 if (f.name == event.dataField) {
 sf = f;
 break;
 }
 }
 if (!sf)
 sf = new SortField(event.dataField);
 sf.caseInsensitive = true;
 s.fields = [sf];
 col.sort = s;

 Disclaimer: Might be buggy.


 



[flexcoders] How to using the slider to control VideoDisplay?

2007-05-06 Thread underyang
   hi,all. I'm so tired test my video app.When i click button play or 
button another play,The APP is ok,no problem. But when i drag the 
slider thumb ,the question is coming.The videoDisplay playheadTime 
can't adjusted.  How to solves this problem? Thank you for answer to 
me.
There is a sample example.
 

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=absolute
 
mx:Script
![CDATA[
import mx.controls.videoClasses.VideoError;
import mx.events.SliderEvent;
import mx.events.VideoEvent;
import mx.controls.Alert;

 
private function mover(event:VideoEvent):void{
hs.value = flvideo.playheadTime;
 hs.maximum=flvideo.totalTime;
 
}

private function changeHandler
(event:SliderEvent):void{
flvideo.playheadTime = hs.value;
}
]]
/mx:Script
mx:VideoDisplay id=flvideo playheadUpdate=mover
(event)  x=31 y=36 width=345 height=232/
 
  mx:Button click=flvideo.source='xxx111.flv' x=67.5 y=295 
label=play/
  mx:HSlider  minimum=0  id=hs  change=changeHandler(event)  
x=31 y=275/
  mx:Button x=171 y=295 label=Another Play 
click=flvideo.source='xxx222.flv'/
/mx:Application



[flexcoders] Re: Scrubbing in a MP3-file

2007-05-06 Thread René Sprotte
Hi,

 is there anybody who can explain how to
 give a mx:HSlider-component the ability to
 scrub in a MP3-file?

I use a progress bar for this but you can easy adapt this to a HSlider. The 
progress bar 
visualizes  the play position of the mp3 file. If a user clicks in the progress 
bar the song 
position will be set appropriately. 

Ok, you should already have a soundFactory:Sound and channel:SoundChannel. Set 
the 
new song position by handle the click event of the progress bar (or a similar 
event in the 
case of a HSlider):

[...]
var pausePosition:Number = (soundFactory.length / songProgressBar.width) * 
songProgressBar.mouseX;

channel.stop();
channel = soundFactory.play(pausePosition); 
[...]

hope this helps,

René



[flexcoders] How to uses the slider to control VideoDisplay?

2007-05-06 Thread underyang
HI all,I'm so tired tested a video app.here is a sample.ActionScript 
is:

==
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=absolute
mx:Script
![CDATA[
import mx.events.SliderEvent;
import mx.events.VideoEvent;
 
 
 
private function mover(event:VideoEvent):void{
 trace(flvideo.playheadTime);
 hs.value = flvideo.playheadTime;
 hs.maximum=flvideo.totalTime;
}

private function changeHandler
(event:SliderEvent):void{
flvideo.playheadTime = event.value;
}
]]
/mx:Script
mx:VideoDisplay id=flvideo  playheadUpdate=mover
(event) 
 
 x=31 y=36 width=345 height=232/
 
  mx:Button click=flvideo.source=XXX111.flv' x=67.5 y=295 
label=NO1/
  mx:HSlider  minimum=0  id=hs  change=changeHandler(event)  
x=31 y=275/
  mx:Button x=171 y=295 label=NO2 
click=flvideo.source='XXX222.flv'/
/mx:Application

=
When I click Button to play xxx111.flv, have noquestion.But,When 
i change slider and click another button to play xxx222.flv,the 
question is happen.Slider's value is wrong.How can I solve this 
problem?
sorry for my english.



[flexcoders] bottom=0 bug

2007-05-06 Thread Tadas Ziemys
Hello!

i wanted to make ApplicationControlBar in bottom of my site. It works
well as long as there is no vertical scroll bar. When it appears and i
scroll down ApplicationControlBar  (or anything else with property
bottom=0), doesnt move and appears in middle of application.

Any solutions to this problem?

Thanks in advance
Tadas


[flexcoders] How to map Java abstract classes to AS3 VO?

2007-05-06 Thread Kevin
We have an object model in Java which contains two base abstract  
classes from which the other classes extend.  The model on Java/ 
Hibernate is what we desire, but we need to then mirror it on the  
Actionscript side to use Data Management.  From what I understand  
Actionscript does not allow abstract classes however, is there a way  
to keep our classes in Java but hack the Actionscript to make the VO  
Data Management work?

If it helps to see some code let me know and I can send you an  
example of what we are working on.

Thanks, Kevin




[flexcoders] Re: How to map Java abstract classes to AS3 VO?

2007-05-06 Thread simonjpalmer
What I have done in similar circumstances is create concrete classes
in AS which extend a common base and to connect those to my concrete
classes in Java using the [RemoteClass(alias=x.y.z)].  I have then
made use of interfaces in AS to give me a similar coding pattern in AS
to Java.  

Keywords extends and implements both exist in AS, so even though I
can't have abstract base classes in AS I can get to the same sort of
pattern by implementing interfaces.  You may wind up with a little
more code than you would accept in Java but it works just as well. On
the server side I use Spring to inject the class dependencies when needed.

Another pattern I have employed on the client is to implement an
interface in a separate .as file and include that file into classes
which have common members and implement the interface.  This goes some
way to minimising the amount of code I end up with.

Hope that helps.  If I have understood you correctly, then I think
that what you are doing fits inside the AS/Java model quite well as
long as you are willing to compromise your coding purity very slightly
in AS.  

I'd be interested to know whether you are using the Adobe Hibernate
Assembler or using your own middle tier.

Simon

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

 We have an object model in Java which contains two base abstract  
 classes from which the other classes extend.  The model on Java/ 
 Hibernate is what we desire, but we need to then mirror it on the  
 Actionscript side to use Data Management.  From what I understand  
 Actionscript does not allow abstract classes however, is there a way  
 to keep our classes in Java but hack the Actionscript to make the VO  
 Data Management work?
 
 If it helps to see some code let me know and I can send you an  
 example of what we are working on.
 
 Thanks, Kevin





[flexcoders] Re: bottom=0 bug

2007-05-06 Thread simonjpalmer
Can you send along some abridged fragments of your mx script that
display this behaviour?  It's a bit hard to say what's going on
without being able to see some code.
Simon

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

 Hello!
 
 i wanted to make ApplicationControlBar in bottom of my site. It works
 well as long as there is no vertical scroll bar. When it appears and i
 scroll down ApplicationControlBar  (or anything else with property
 bottom=0), doesnt move and appears in middle of application.
 
 Any solutions to this problem?
 
 Thanks in advance
 Tadas





Re: [flexcoders] How to map Java abstract classes to AS3 VO?

2007-05-06 Thread Jobe Makar
Hi Kevin,

I'm not sure if what I'm about to say answers your question or not, but 
hopefully you might find it useful.

In a current project that we're working on we need to mirror certain 
classes/data structures on both the server and client. There is no way to get 
around actually building this structure on both sides, so we did that. But then 
we extended JSON so that the server-side Java app could serialize and send any 
complex structure using the classes that we both understand. When the client 
receives this data it deserializes it automatically into the right structure. 
We made use of the dynamic class loader stuff. All we really did was add an 
extra property to every object, @ClassName, which is used during 
deserialization to create the appropriate class instance. Then using a 
predefined naming convention we slam the data into the class instances.

Good luck on this project.

Jobe Makar
http://www.electrotank.com
http://www.electro-server.com
phone: 252-627-8026
mobile: 919-609-0408
fax: 919-882-1121

[flexcoders] Wanted - experienced Flex coder

2007-05-06 Thread blacknwhiteinsanitycookie
Wanted - experienced Flex coder to work out of the Gold Coast
Australia (queensland). Must have commercial experience, 12+ month
project. Aside from excellent Flex skills, you should also have good
design ability and good customer facing communication. FDS and
Cairngorm highly regarded. Must be able to work here on the Gold Cost.
Mid-Late June start.

Please email me your resume and availability if interested.

Regards,
Boydlee Pollentine

Zenkey Group Pty Ltd
e. boydlee @ zenkey .com.au
w. www.zenkey.com.au



[flexcoders] Flash CS3 slow scrolling large scripts

2007-05-06 Thread Jobe Makar
Hi guys,

Flash CS3 is annoyingly chuggy/slow when selecting multiple lines of code or 
scrolling through large scripts. And by large, I'm talking about 200 lines or 
so...so not *that* big.

Short of using another editor, is there anything at all that I can do? Like 
unchecking some hidden Needlessy slow down the ActionScript window check box?

Jobe Makar
http://www.electrotank.com
http://www.electro-server.com
phone: 252-627-8026
mobile: 919-609-0408
fax: 919-882-1121

Re: [flexcoders] Re: How to map Java abstract classes to AS3 VO?

2007-05-06 Thread Kevin
yes.  We are using the HibernateAssembler which is another reason we  
need to sync these VO's up as tight as possible so that we can let  
the assembler do the work for us!


I found an example in the Actionscript 3.0 Design patterns book (see  
below) which uses sudo-abstract classes to achieve the abstract  
class goal.  I  am thinking we can use this approach to mirror the  
existing abstract classes on the Java end with faked abstract  
classes on the Actionscript end.  I guess the real question is will  
these map cleanly and allow the same data management that we get with  
simple VO's.


I also don't know if using abstract classes in my VO (Transfer  
Objects) is pushing the VO design pattern a little too far from it's  
intended structure...


Thanks for your thoughts,

Kevin



EXAMPLE:


package com.peachpit.aas3wdp.factoryexample {

   public class AbstractGame {

  // Template Method
  public final function initialize():void {
 createField();
 createTeam(red);
 createTeam(blue);
 startGame();
  }

  public function createField():void {
 throw new Error(Abstract Method!);
 }

  public function createTeam(name:String):void {
 throw new Error(Abstract Method!);
  }

  public function startGame():void {
 throw new Error(Abstract Method!);
  }
   }

}








On May 6, 2007, at 6:23 PM, simonjpalmer wrote:


What I have done in similar circumstances is create concrete classes
in AS which extend a common base and to connect those to my concrete
classes in Java using the [RemoteClass(alias=x.y.z)]. I have then
made use of interfaces in AS to give me a similar coding pattern in AS
to Java.

Keywords extends and implements both exist in AS, so even though I
can't have abstract base classes in AS I can get to the same sort of
pattern by implementing interfaces. You may wind up with a little
more code than you would accept in Java but it works just as well. On
the server side I use Spring to inject the class dependencies when  
needed.


Another pattern I have employed on the client is to implement an
interface in a separate .as file and include that file into classes
which have common members and implement the interface. This goes some
way to minimising the amount of code I end up with.

Hope that helps. If I have understood you correctly, then I think
that what you are doing fits inside the AS/Java model quite well as
long as you are willing to compromise your coding purity very slightly
in AS.

I'd be interested to know whether you are using the Adobe Hibernate
Assembler or using your own middle tier.

Simon

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

 We have an object model in Java which contains two base abstract
 classes from which the other classes extend. The model on Java/
 Hibernate is what we desire, but we need to then mirror it on the
 Actionscript side to use Data Management. From what I understand
 Actionscript does not allow abstract classes however, is there a way
 to keep our classes in Java but hack the Actionscript to make the VO
 Data Management work?

 If it helps to see some code let me know and I can send you an
 example of what we are working on.

 Thanks, Kevin








Re: [flexcoders] Flash CS3 slow scrolling large scripts

2007-05-06 Thread Weyert de Boer
I haven't experienced this problem under MacOSX.


[flexcoders] Troubleshooting Channel.Connect.Failed error

2007-05-06 Thread Kevin

I am trying to run a test FDS connection and I get the following error:

Channel.Connect.Failed error undefined url:'rtmp://localhost:2039

I have tried ports 2037  2038 as well.  I am new to Tomcat  FDS so  
I am looking for some advice on how best to troubleshoot this error.


I have been able to get some of the sample FDS apps working so I know  
it's possible!


Thanks for the help.

- Kevin

[flexcoders] Little review

2007-05-06 Thread Weyert de Boer
Just a little non-scientific survey about web applications. Please, be 
so kind a fill in this survery when you find time:

http://tinyurl.com/29ydgj

Thanks!
Weyert


[flexcoders] pulling in HTML content - looking for ideas

2007-05-06 Thread barry.beattie

I need a more info panel that opens up when required at particular
spots. I'm hoping to keep the more info content as one HTML doc
(that can be edited/replaced by itself) without embedding the content
into the flex app itself, with each section run off named  #anchors. 

at least, that's how I'd do it if it wasn't a Flex app...

The MSWord version of the HTML doc is 55+ pages total although each
more info section is only a paragraph or two.

I've been looking at the HTMLComponent.swc
(http://www.judahfrangipane.com/blog/?p=104) but I don't think it's
going to cut it for the long term. Meanwhile there's no native flex
controls that will do this (unlike Apollo)

so, can anyone suggest another way to do this?
 - I can't use a database
 - the more info content has to be separate from the swf and easily
updatable.
 - it'll have to be HTML since it'll have simple mark-up and links to
images
 - I'll still be able to bind each more info id/anchor to the flex
app's own data

any suggestions?

thanx





[flexcoders] Re: RIA: record insert best practices

2007-05-06 Thread barry.beattie

 I'm no expert in Flex and RIA development but i have implemented 
 creating the ID on the client using the createUUID to generate a GUID 
 which by all practible means it will be globally unique.

unique record identifiers are the domain of the data storage. IMHO,
they should NEVER be generated on the client unless they are place
holders to be thrown away at the first available opportunity and
replaced by the internal data storage ones. and that's only out of
desperation - if you have to generate Id's at all that is.

the only time ID's need to be created are on new records. to be
honest, it should STILL be the back-end systems job to generate it.
sounds like you've got far too much business logic in the presentation
layer and it's only a short step away from your system being a
two-tiered application. 

Heck, why not go all the way and get Flex to generate the SQL for you
to run on the database? (just overstating it to make a point).

it comes down to abstraction, separation of concerns. 

what happens if you've been using UUID's of one format and change the
format (ie to numeric Identities) or change databases? are you going
to re-write the client's UUID generation code and re-compile just
because you've changed from SQLServer to MySQL? My argument is that
you shouldn't have to. Flex should keep it's nose out of where it
doesn't belong.

 Some pureist will think it's crazy to generate the key on the client, 
 and I partly agree.  But if it works, it works.

works for today yes. but what will those needing to expand the app in
two years time think of this?

 In my case i'm trying to build rapid applications and i generally have 
 oen app and one database so generating IDs on the client is ok in my 
 circumstance... maybe not the best for all.

... apart from the fact that the data storage is part of the
application, not tacked-on (and should be factored into the design)...

the large majority of times you'll be able to get away with it but I
can guarantee that some time in the future some of those apps will
cause you to loose your gains.

two-tier applications (like VB client-server apps) or apps with thin
middle tiers work because the clients are tightly bound to the server.
But Flex (and Apollo) are still fundamentally disconnected clients. 

application design is looking at the whole app holistically, not as a
vehicle to cram as much as possible into the view. Flex can help build
 smart UI's that translate workflows to business processes, but IMHO 
Flex is not the whole application.