Re: [flexcoders] Vertical scroll bar not reseting

2009-06-02 Thread Manish Jethani
On Tue, Jun 2, 2009 at 8:39 AM, al-al :D vin_ke...@yahoo.com wrote:

 I have an application with a ViewStack and binded LinkBar, which has 2 views, 
 a DataGrid on the first, and the Form on the second. Clicking an item in the 
 DataGrid transfers the user to the Form view.

 I have a problem regarding the scroll bar not reseting to its original 
 position, which is at the top most. The Form on the second view is too long 
 for the Canvas it sits on, so naturally it has a scroll bar. So when I click 
 a record from the DataGrid for the first time, the Form view appears just 
 fine, with the scroll bar on top. When I scroll down, navigate to the first 
 view via the LinkBar, and select another record, the Form view appears with 
 the scroll position right where I left it. How do I do this? I have tried 
 using scrollPosition set to 0 but to no effect.

You have to set the second container's verticalScrollPosition to 0 in
the change event of the ViewStack object.

Example:

?xml version=1.0?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  xmlns=*
  mx:ViewStack width=400 height=400 id=vs
change=vb2.verticalScrollPosition = 0
mx:VBox
  mx:Button click=vs.selectedIndex = 1 label=1 /
/mx:VBox
mx:VBox id=vb2
  mx:Button click=vs.selectedIndex = 0 label=2 height=600 /
/mx:VBox
  /mx:ViewStack
/mx:Application

Manish


Re: [flexcoders] How does one implement IBitmapDrawable

2009-06-02 Thread Manish Jethani
On Tue, Jun 2, 2009 at 7:52 AM, Stephen More stephen.m...@gmail.com wrote:
 The docs do not say much about IBitmapDrawable:
 http://livedocs.adobe.com/flex/3/langref/flash/display/IBitmapDrawable.html

 In your example lets say I create:
    MyUIComponet extends UIComponet

 What method do I need to write in MyUIComponet such that I can respond
 back with an embeded image instead of  the rendering of the children
 of UIComponet when IBitmapDrawable is called ?

IBitmapDrawable is a marker interface. It doesn't actually have any
methods that you can implement.

Basically BitmapData.draw() will just capture the object as it would
appear on the screen. I don't believe that the IBitmapDrawable object
gets any sort of notification when it is being drawn. You can of
course notify it yourself so it can redraw itself a different way
before calling BitmapData.draw().

Manish


[flexcoders] Re: Problem reading XML returned from Webservice

2009-06-02 Thread Claudio M. E. Bastos Iorio
Thanks for your response.
It seems like my problem is that my xml code is using the 
xmlns='http://mydomainname.com/' every time and this is included in the xml 
definition.

I tried:
var ns:Namespace = new Namespace(bs);
myXML.setNamespace(ns);
trace(myXML.namespace()); //returns bs, ok. But:
//I receive an error on:
trace(Name:   + myXML..Fund[0].Name); //A term is undefined and has no 
properties

Also tried,
default xml namespace = new Namespace(http://anotherdomain.com/;);
//and also tried default xml namespace = new Namespace(somethingelsehere);
trace(myXML.namespace()); //always return http://mydomain.com/, why?
//I also receive an error on:
trace(Name:   + myXML..Fund[0].Name); //A term is undefined and has no 
properties

Is there any way to copy to other xml/lose the namespace that is giving me 
problems?? How?

Thanks.

_
Claudio M. E. Bastos Iorio
http://www.blumersolutions.com




Re: [flexcoders] Re: Problem reading XML returned from Webservice

2009-06-02 Thread Manish Jethani
On Tue, Jun 2, 2009 at 12:15 PM, Claudio M. E. Bastos Iorio
selecter...@gmail.com wrote:

 trace(Name:   + myXML..Fund[0].Name); //A term is undefined and has no 
 properties

Okay, I'm no expert in E4X, but apparently you have to qualify with a
namespace if you're using the .. notation.

So this works:

  var ns:Namespace = xml.namespace();
  trace(xml..ns::Fund[0].ns::Name);

But this won't work:

  default xml namespace = xml.namespace();
  trace(xml..Fund[0].Name);

I don't know how to explain that.

Manish


Re: [flexcoders] Is this list declining?

2009-06-02 Thread Tom Chiverton
On Tuesday 02 Jun 2009, Jeffry Houser wrote:
  I'd argue that the e-mail support of the new forums is not there yet,
 though.

Have they unbroken the subject lines and started including the correct headers 
yet ?

-- 
Helping to widespreadedly maintain clicks-and-mortar best-of-breed enterprise 
mission-critical products as part of the IT team of the year, '09 and '08

Tom Chiverton
Developer
Tel: +44 0161 618 5032
Fax: +44 0161 618 5099 
tom.chiver...@halliwells.com
3 Hardman Square, Manchester, M3 3EB
www.Halliwells.com



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of 
members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners. We use the word 
?partner? to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. 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.
 

Re: [flexcoders] Is this list declining?

2009-06-02 Thread Tom Chiverton
On Monday 01 Jun 2009, luvfotography wrote:
 What's your opinion?

Total messages per unit time is a pointless measure of the usefulness of a 
resource ?

-- 
Helping to conveniently iterate high-end clusters as part of the IT team of 
the year, '09 and '08

Tom Chiverton
Developer
Tel: +44 0161 618 5032
Fax: +44 0161 618 5099 
tom.chiver...@halliwells.com
3 Hardman Square, Manchester, M3 3EB
www.Halliwells.com



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of 
members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners. We use the word 
?partner? to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. 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.
 

Re: [flexcoders] Datagrid intialization problem?

2009-06-02 Thread Tom Chiverton
On Monday 01 Jun 2009, vikrant choudhary wrote:
 Thanks,Vikrant

http://catb.org/esr/faqs/smart-questions.html#intro and in particular 
http://catb.org/esr/faqs/smart-questions.html#code

-- 
Helping to authoritatively extend second-generation solutions as part of the 
IT team of the year, '09 and '08

Tom Chiverton
Developer
Tel: +44 0161 618 5032
Fax: +44 0161 618 5099 
tom.chiver...@halliwells.com
3 Hardman Square, Manchester, M3 3EB
www.Halliwells.com



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of 
members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners. We use the word 
?partner? to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. 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.
 

Re: [flexcoders] Is this list declining?

2009-06-02 Thread Paul Hastings
Tom Chiverton wrote:
 Have they unbroken the subject lines and started including the correct 
 headers
 yet ?

it appears yes (if you mean grouping/threading). filtering sub-categories via 
[subject] seems to work so far.


[flexcoders] case sensitive hard drive formatting

2009-06-02 Thread Johannes Nel
this is actually a problem for the whole cs4 suite, but i was amazed that
its the same for catalyst (as its built on eclipse). If you format your hard
drive case sensitive you cannot install catalyst (nor flash, photoshop...)
why?

-- 
j:pn
\\no comment


[flexcoders] LCDS problems using refreshCollection(value:ListCollectionView)

2009-06-02 Thread Kevin
Is anyone out there using the feature of LCDS that allows you to  
refresh a managed collection (see below)?  I am able to get the  
collection to refresh, but I can't seem to get any of the event  
handlers to fire, thus I can't listen for the result of the fill using  
(myDataService.addEventListener(ResultEvent.RESULT,handleResult). I  
have traced the result in my logs and I know I am attaching the  
listener to the correct dataService.  I am wondering if this is a  
known bug or if it's something I am doing wrong.

I am interested if anyone is having the same problem.  Thanks, Kevin

  /**
  * Refreshes an array collection previously filled with the fill  
method or managed as
  * a managed association.  This method makes a request to the  
server, fetches the new
  * version of any resident items in the collection using the fill  
parameters original used
  * with this collection or by fetching the property from the  
parent item.
  * If any changes are found, they merged into the collection in  
an incremental fashion.
  *
  *  @return AsyncToken You can use this token to register one or  
more callback
  *functions to receive result or fault events from  
this refresh operation.
  *Null is returned if there is nothing to refresh for  
a paged collection.
  *This token is also returned in the codecall/ 
code property of
  *the codeResultEvent.RESULT/code or in the
  *codeFaultEvent.FAULT/code.
  *Custom data can be attached to this object and  
inspected later
  *during the event handling phase.
  */
 public function  
refreshCollection(value:ListCollectionView):AsyncToken


[flexcoders] Re: Is this list declining?

2009-06-02 Thread grg_blls
I have to totally agree with Tom. The number of posts is one thing, sunstancial 
communication is another. 
By this I mean that even if I only raised a small number of questions to this 
forum, I got excellent help in replies.. 
These replies helped me in building up solutions that otherwise might have 
taken a long time to resolve, if ever..!

Another nice aspect to this forum is the extensive accumaulated knowledge from 
previous threads.. I usually don't have to post more new questions as by 
searching the forum, I usually find a very good answer already there.. Somebody 
having already asked in the past and got the right answer.

All in all many thanks to the people contributing to this very active forum.. 
George


--- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiver...@... wrote:

 On Monday 01 Jun 2009, luvfotography wrote:
  What's your opinion?
 
 Total messages per unit time is a pointless measure of the usefulness of a 
 resource ?
 
 -- 
 Helping to conveniently iterate high-end clusters as part of the IT team of 
 the year, '09 and '08
 
 Tom Chiverton
 Developer
 Tel: +44 0161 618 5032
 Fax: +44 0161 618 5099 
 tom.chiver...@...
 3 Hardman Square, Manchester, M3 3EB
 www.Halliwells.com
 
 
 
 This email is sent for and on behalf of Halliwells LLP.
 
 Halliwells LLP is a limited liability partnership registered in England and 
 Wales under registered number OC307980 whose registered office address is at 
 Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list 
 of members is available for inspection at the registered office together with 
 a list of those non members who are referred to as partners. We use the word 
 ?partner? to refer to a member of the LLP, or an employee or consultant with 
 equivalent standing and qualifications. Regulated by the Solicitors 
 Regulation Authority.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named above and may 
 be confidential or legally privileged. If you are not the addressee you must 
 not read it and must not use any information contained in nor copy it nor 
 inform any person other than Halliwells LLP or the addressee of its existence 
 or contents. If you have received this email in error please delete it and 
 notify Halliwells LLP IT Department on 0870 365 2500.
 
 For more information about Halliwells LLP visit www.Halliwells.com.





[flexcoders] Re: childrenField in AdvancedDataGrid

2009-06-02 Thread Mark
I'm still in need for some help on this if anyone knows how I can do it.

Also - I cleaned up the XML from the first post.

Thanks


--- In flexcoders@yahoogroups.com, Mark mark.pusat...@... wrote:

 Hi my XML has been set up pretty basic but it does have a few levels.  This 
 is shortend, but it basically looks like this:
projects
  project
pName/
pKey/
deliverables
  deliverable
dName/
comptencies
  competency
name/
date/
  /competency
  competency
name/
date/
  /competency
/comptencies
  /deliverable
  deliverable
dName/
comptencies
  competency
name/
date/
  /competency
  competency
name/
date/
  /competency
/comptencies
  /deliverable
/deliverables
  /project
/projects
 
 Is there a way to get the advancedDataGrid to display the competencies as 
 well as the deliverables in a tree structure?  The childrenField only accpets 
 one.  How can this be done?  Or do I need to rename some of my XML nodes?
 
 Thank,
 Mark





[flexcoders] Issue with the font size in Flex Application

2009-06-02 Thread beni_it2003
Hi Flexcoders,

 I have got a very strange issue with the font size in my flex 
application. The issue is, a text with a specific font size in Flex Application 
looks so smaller than the text with the same size in Windows Applications. 

 For example, i have set the font size of some text to 20 and the font 
name is Times New Roman in Flex application as well as in the Windows 
Applications (MS word). In flex app, this text looks so smaller  than the MS 
word text.

 This seems the common issue across the Browser based applications and 
the windows based application.

Could you share me some pointers or solutions on this issue.

Thanks in Advance.




[flexcoders] Flash Builder, Catalyst, and Flash IDE study question

2009-06-02 Thread jcharlesberry
Adobe reps or anyone else here, I wanted to ask about the future of the  
Flash IDE. Will Catalyst and Builder be the only two options now or will  
there still be a next Flash IDE? Will Builder replace it, will the  
collaboration abilities for developers and designers on Catalyst replace  
the Flash IDE, or will there be 3 products now? Sorry if this is so basic.  
Thanks in advance.


[flexcoders] Re: LCDS problems using refreshCollection(value:ListCollectionView)

2009-06-02 Thread rahul_bindu
Kevin,
This is a quick fix, you could listen to the CollectionEvent.COLLECTION_CHANGE 
on the managed collection. If you could post more code, I would be in a better 
position to solve the issue.

Rahul.
--- In flexcoders@yahoogroups.com, Kevin li...@... wrote:

 Is anyone out there using the feature of LCDS that allows you to  
 refresh a managed collection (see below)?  I am able to get the  
 collection to refresh, but I can't seem to get any of the event  
 handlers to fire, thus I can't listen for the result of the fill using  
 (myDataService.addEventListener(ResultEvent.RESULT,handleResult). I  
 have traced the result in my logs and I know I am attaching the  
 listener to the correct dataService.  I am wondering if this is a  
 known bug or if it's something I am doing wrong.
 
 I am interested if anyone is having the same problem.  Thanks, Kevin
 
   /**
   * Refreshes an array collection previously filled with the fill  
 method or managed as
   * a managed association.  This method makes a request to the  
 server, fetches the new
   * version of any resident items in the collection using the fill  
 parameters original used
   * with this collection or by fetching the property from the  
 parent item.
   * If any changes are found, they merged into the collection in  
 an incremental fashion.
   *
   *  @return AsyncToken You can use this token to register one or  
 more callback
   *functions to receive result or fault events from  
 this refresh operation.
   *Null is returned if there is nothing to refresh for  
 a paged collection.
   *This token is also returned in the codecall/ 
 code property of
   *the codeResultEvent.RESULT/code or in the
   *codeFaultEvent.FAULT/code.
   *Custom data can be attached to this object and  
 inspected later
   *during the event handling phase.
   */
  public function  
 refreshCollection(value:ListCollectionView):AsyncToken





[flexcoders] Re: Mx:Http Service Refresh Issue

2009-06-02 Thread rahul_bindu
The CreationComplete event is only fired once, so if you are getting the data 
in the creation complete handler, the call will be made just once.
You need to listen to some different event which can be fired when you need to 
get data again

Rahul.

--- In flexcoders@yahoogroups.com, guess what myworld10...@... wrote:

 
 I am running into a stupid  Problem .
 
 I have a Flex Data grid Constructed from mx:HttpService 
 
 mx:HTTpService url=somethin.do 
 
 The result is an xml file . I am calling the HttpService on the mxmls 
 creationComplete .
 the First time I call the html file [ the actual flex html ] it works fine . 
 The next time I call it actually does not hit my Controller method. It just 
 populates the data grid from the cache or  shows the same Data .
 
 if I close the browser and open again it works fine .
 
 Can anyone let me know the solution for this .
 
 
 Thanks





Re: [flexcoders] Re: LCDS problems using refreshCollection(value:ListCollectionView)

2009-06-02 Thread Johannes Nel
this even however fires a lot if you use that collection to manipulate data

On Tue, Jun 2, 2009 at 2:38 PM, rahul_bindu rahul_bi...@yahoo.com wrote:



 Kevin,
 This is a quick fix, you could listen to the
 CollectionEvent.COLLECTION_CHANGE on the managed collection. If you could
 post more code, I would be in a better position to solve the issue.

 Rahul.

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Kevin
 li...@... wrote:
 
  Is anyone out there using the feature of LCDS that allows you to
  refresh a managed collection (see below)? I am able to get the
  collection to refresh, but I can't seem to get any of the event
  handlers to fire, thus I can't listen for the result of the fill using
  (myDataService.addEventListener(ResultEvent.RESULT,handleResult). I
  have traced the result in my logs and I know I am attaching the
  listener to the correct dataService. I am wondering if this is a
  known bug or if it's something I am doing wrong.
 
  I am interested if anyone is having the same problem. Thanks, Kevin
 
  /**
  * Refreshes an array collection previously filled with the fill
  method or managed as
  * a managed association. This method makes a request to the
  server, fetches the new
  * version of any resident items in the collection using the fill
  parameters original used
  * with this collection or by fetching the property from the
  parent item.
  * If any changes are found, they merged into the collection in
  an incremental fashion.
  *
  * @return AsyncToken You can use this token to register one or
  more callback
  * functions to receive result or fault events from
  this refresh operation.
  * Null is returned if there is nothing to refresh for
  a paged collection.
  * This token is also returned in the codecall/
  code property of
  * the codeResultEvent.RESULT/code or in the
  * codeFaultEvent.FAULT/code.
  * Custom data can be attached to this object and
  inspected later
  * during the event handling phase.
  */
  public function
  refreshCollection(value:ListCollectionView):AsyncToken
 

  




-- 
j:pn
\\no comment


[flexcoders] Re: Is this list declining?

2009-06-02 Thread Amy
--- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote:

 There is a lot of traffic (100 posts/day) on the Flex forum at
 
 http://forums.adobe.com/community/flex/flex_general_discussion
 
 The Adobe forums now support email.

How's the nntp support coming?



[flexcoders] Flash builder on linux

2009-06-02 Thread thomas parquier
Hi,

Has anybody succeed in installing flash builder 4 on a linux station using
wine ?

thomas
---
http://www.web-attitude.fr/
msn : thomas.parqu...@web-attitude.fr
softphone : sip:webattit...@ekiga.net sip%3awebattit...@ekiga.net
téléphone portable : +33601 822 056


Re: [flexcoders] Flash Builder, Catalyst, and Flash IDE study question

2009-06-02 Thread Jeffry Houser


I would be beyond shocked if Catalyst and Flash Builder replace Flash 
Professional.


They are really different tools for different purposes. 


jcharlesbe...@gmail.com wrote:



Adobe reps or anyone else here, I wanted to ask about the future of 
the Flash IDE. Will Catalyst and Builder be the only two options now 
or will there still be a next Flash IDE? Will Builder replace it, will 
the collaboration abilities for developers and designers on Catalyst 
replace the Flash IDE, or will there be 3 products now? Sorry if this 
is so basic. Thanks in advance.





--
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl.com/684b5h
http://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.com
http://www.jeffryhouser.com
--
Part of the DotComIt Brain Trust



[flexcoders] Re: Custom Actionscript component data-binding question

2009-06-02 Thread Keith Hughitt
Hi Valdhor,

Thanks for the suggestion, that is a very good idea and something I hadn't 
thought of. I'll certainly try that out, however, I'm still uncertain as to how 
to pass in / accept data in custom AS classes. For instance, when I specify 
things as MXML parameters, are they available in the class constructors, or are 
they set sometime after the constructor is called via setters?

Thanks,
Keith

--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 Why are you trying to bind a datagrid? That is a display object.
 
 A far better way is to pass in the arraycollection the datagrid is based on. 
 Then just create the datagrid in your custom component.




[flexcoders] Generate XML file

2009-06-02 Thread christophe_jacquelin
Hello, 

How to generate an xml file from a flex application, and then send it by email 
? 

Thank you,
Christophe, 




Re: [flexcoders] Generate XML file

2009-06-02 Thread Paul Andrews
Use a HTTP service and POST to send the XML text to a PHP (or other 
scripting language)  email script on a remote server.

- Original Message - 
From: christophe_jacquelin christophe_jacque...@yahoo.fr
To: flexcoders@yahoogroups.com
Sent: Tuesday, June 02, 2009 3:56 PM
Subject: [flexcoders] Generate XML file


 Hello,

 How to generate an xml file from a flex application, and then send it by 
 email ?

 Thank you,
 Christophe,




 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups 
 Links






[flexcoders] Flex 4 beta and iFrame

2009-06-02 Thread markgoldin_2000
A quick run from new Flash Builder unvealed a problem with using iFrame. The 
message is:
Error: Error #2067: The ExternalInterface is not available in this container. 
ExternalInterface requires Internet Explorer ActiveX, Firefox, Mozilla 1.7.5 
and greater, or other browsers that support NPRuntime.
at Error$/throwError()
at flash.external::ExternalInterface$/call()
at IFrame/set visible()[D:\projects\sfcs\UFDPortal\src\IFrame.as:776]
at 
mx.containers::ViewStack/childAddHandler()[E:\dev\beta1\frameworks\projects\framework\src\mx\containers\ViewStack.as:1328]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at 
mx.core::UIComponent/dispatchEvent()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\UIComponent.as:11260]
at 
mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:3875]
at 
mx.core::Container/addChildAt()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:2541]
at 
mx.core::Container/addChild()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:2459]
at 
mx.core::Container/createComponentFromDescriptor()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:4275]
at 
mx.containers::ViewStack/createComponentsFromDescriptors()[E:\dev\beta1\frameworks\projects\framework\src\mx\containers\ViewStack.as:1067]
at 
mx.core::Container/createChildren()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:3120]
at 
mx.core::UIComponent/initialize()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\UIComponent.as:6510]
at 
mx.core::Container/initialize()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:3053]
at 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\UIComponent.as:6402]
at 
mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:3879]
at 
mx.core::Container/addChildAt()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:2541]
at 
mx.core::Container/addChild()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:2459]
at 
mx.core::Container/createComponentFromDescriptor()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:4275]
at 
mx.core::Container/createComponentsFromDescriptors()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:4082]
at 
mx.core::Container/createChildren()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:3120]
at 
mx.core::UIComponent/initialize()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\UIComponent.as:6510]
at 
mx.core::Container/initialize()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:3053]
at 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\UIComponent.as:6402]
at 
mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:3879]
at 
mx.core::Container/addChildAt()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:2541]
at 
mx.core::Container/addChild()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:2459]
at 
mx.core::Container/createComponentFromDescriptor()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:4275]
at 
mx.core::Container/createComponentsFromDescriptors()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:4082]
at 
mx.core::Container/createChildren()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:3120]
at 
mx.core::UIComponent/initialize()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\UIComponent.as:6510]
at 
mx.core::Container/initialize()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:3053]
at 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\UIComponent.as:6402]
at 
mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:3879]
at 
mx.core::Container/addChildAt()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:2541]
at 
mx.core::Container/addChild()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:2459]
at 
mx.core::Container/createComponentFromDescriptor()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:4275]
   

Re: [flexcoders] Generate XML file

2009-06-02 Thread claudiu ursica
the generation of the file is quite trivial, however for the email part it 
depends on how you want ot do it... it ionvolves some backend work if you want 
not to use the classic href=mailto ...

http://www.tdotblog.info/?q=node/6

C





From: christophe_jacquelin christophe_jacque...@yahoo.fr
To: flexcoders@yahoogroups.com
Sent: Tuesday, June 2, 2009 5:56:29 PM
Subject: [flexcoders] Generate XML file





Hello, 

How to generate an xml file from a flex application, and then send it by email 
? 

Thank you,
Christophe, 


   


  

[flexcoders] Re: LCDS problems using refreshCollection(value:ListCollectionView)

2009-06-02 Thread Kevin
The code is pretty simple. This is all I am trying to do:

var ds:DataService = new DataService(myDataService);
ds.addEventListener(ResultEvent.RESULT,handleResult);
ds.refreshCollection(myCollection); 
//myCollecton is managed by the myDataService destination

the problem is that the event handler is not firing.

I could listen for the CollectionEvent, but I would like to be able to verify 
the AsyncToken in the result which I can't do when listening for the collection 
change.

I am wondering if anyone has been able to use this feature successfully.

Thanks,

Kevin

--- In flexcoders@yahoogroups.com, rahul_bindu rahul_bi...@... wrote:

 Kevin,
 This is a quick fix, you could listen to the 
 CollectionEvent.COLLECTION_CHANGE on the managed collection. If you could 
 post more code, I would be in a better position to solve the issue.
 
 Rahul.
 --- In flexcoders@yahoogroups.com, Kevin lists@ wrote:
 
  Is anyone out there using the feature of LCDS that allows you to  
  refresh a managed collection (see below)?  I am able to get the  
  collection to refresh, but I can't seem to get any of the event  
  handlers to fire, thus I can't listen for the result of the fill using  
  (myDataService.addEventListener(ResultEvent.RESULT,handleResult). I  
  have traced the result in my logs and I know I am attaching the  
  listener to the correct dataService.  I am wondering if this is a  
  known bug or if it's something I am doing wrong.
  
  I am interested if anyone is having the same problem.  Thanks, Kevin
  
/**
* Refreshes an array collection previously filled with the fill  
  method or managed as
* a managed association.  This method makes a request to the  
  server, fetches the new
* version of any resident items in the collection using the fill  
  parameters original used
* with this collection or by fetching the property from the  
  parent item.
* If any changes are found, they merged into the collection in  
  an incremental fashion.
*
*  @return AsyncToken You can use this token to register one or  
  more callback
*functions to receive result or fault events from  
  this refresh operation.
*Null is returned if there is nothing to refresh for  
  a paged collection.
*This token is also returned in the codecall/ 
  code property of
*the codeResultEvent.RESULT/code or in the
*codeFaultEvent.FAULT/code.
*Custom data can be attached to this object and  
  inspected later
*during the event handling phase.
*/
   public function  
  refreshCollection(value:ListCollectionView):AsyncToken
 





[flexcoders] Re: Flex 4 beta and iFrame - fixed

2009-06-02 Thread markgoldin_2000
Fixed.
In run/debug changed from:
D:\projects\sfcs\UFDPortal\bin-debug\UFDPortal.swf
to D:\projects\sfcs\UFDPortal\bin-debug\UFDPortal.html

--- In flexcoders@yahoogroups.com, markgoldin_2000 markgoldin_2...@... 
wrote:

 A quick run from new Flash Builder unvealed a problem with using iFrame. The 
 message is:
 Error: Error #2067: The ExternalInterface is not available in this container. 
 ExternalInterface requires Internet Explorer ActiveX, Firefox, Mozilla 1.7.5 
 and greater, or other browsers that support NPRuntime.
   at Error$/throwError()
   at flash.external::ExternalInterface$/call()
   at IFrame/set visible()[D:\projects\sfcs\UFDPortal\src\IFrame.as:776]
   at 
 mx.containers::ViewStack/childAddHandler()[E:\dev\beta1\frameworks\projects\framework\src\mx\containers\ViewStack.as:1328]
   at flash.events::EventDispatcher/dispatchEventFunction()
   at flash.events::EventDispatcher/dispatchEvent()
   at 
 mx.core::UIComponent/dispatchEvent()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\UIComponent.as:11260]
   at 
 mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:3875]
   at 
 mx.core::Container/addChildAt()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:2541]
   at 
 mx.core::Container/addChild()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:2459]
   at 
 mx.core::Container/createComponentFromDescriptor()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:4275]
   at 
 mx.containers::ViewStack/createComponentsFromDescriptors()[E:\dev\beta1\frameworks\projects\framework\src\mx\containers\ViewStack.as:1067]
   at 
 mx.core::Container/createChildren()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:3120]
   at 
 mx.core::UIComponent/initialize()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\UIComponent.as:6510]
   at 
 mx.core::Container/initialize()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:3053]
   at 
 mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\UIComponent.as:6402]
   at 
 mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:3879]
   at 
 mx.core::Container/addChildAt()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:2541]
   at 
 mx.core::Container/addChild()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:2459]
   at 
 mx.core::Container/createComponentFromDescriptor()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:4275]
   at 
 mx.core::Container/createComponentsFromDescriptors()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:4082]
   at 
 mx.core::Container/createChildren()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:3120]
   at 
 mx.core::UIComponent/initialize()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\UIComponent.as:6510]
   at 
 mx.core::Container/initialize()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:3053]
   at 
 mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\UIComponent.as:6402]
   at 
 mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:3879]
   at 
 mx.core::Container/addChildAt()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:2541]
   at 
 mx.core::Container/addChild()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:2459]
   at 
 mx.core::Container/createComponentFromDescriptor()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:4275]
   at 
 mx.core::Container/createComponentsFromDescriptors()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:4082]
   at 
 mx.core::Container/createChildren()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:3120]
   at 
 mx.core::UIComponent/initialize()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\UIComponent.as:6510]
   at 
 mx.core::Container/initialize()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:3053]
   at 
 mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\UIComponent.as:6402]
   at 
 mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:3879]
   at 
 mx.core::Container/addChildAt()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\Container.as:2541]
   at 
 

[flexcoders] Drawing the background Issue

2009-06-02 Thread j2me_soul
The code is pretty simple. This is all I am trying to do: 
 mx:Script
  ![CDATA[
   private function init():void{
//var p:Point = new Point(btn1.x, btn1.y);
//var pg:Point = localToGlobal(p);

with(btn1.graphics){
 clear();
 lineStyle(2, 0xff, 1);
 beginFill(0x123456, 1);
// globel coordinates doesn't work too
// drawRect(pg.x, pg.y, btn1.width + 20, btn1.height+ 20);
 drawRect(btn1.x, btn1.y, btn1.width + 20, btn1.height+ 20);
 endFill();
}

 btn2.graphics.clear();
 btn2.graphics.lineStyle(2, 0xff, 1);
 btn2.graphics.beginFill(0x123456, 1);
 btn2.graphics.drawRect(btn2.x, btn2.y, btn2.width + 20, btn2.height+ 20);
 btn2.graphics.endFill();
   }
  ]]
 /mx:Script
 mx:Button id=btn1 label=ButtonOne  x=149 y=198/
 mx:Button id=btn2 label=ButtonTwo  x=273 y=198/
The problem is that the background was drawn in a very far away.
I am wondering why the backgroundcolor depart from the buttons.
 

Re: [flexcoders] Drawing the background Issue

2009-06-02 Thread Manish Jethani
2009/6/2 j2me_soul j2me_s...@163.com:

 The code is pretty simple. This is all I am trying to do:
  mx:Script
   ![CDATA[
    private function init():void{
 //var p:Point = new Point(btn1.x, btn1.y);
 //var pg:Point = localToGlobal(p);

var p:Point = new Point(btn1.x, btn1.y);
p = this.localToGlobal(p);
p = btn1.globalToLocal(p);

That works. First you convert from the Application's co-ordinate space
to the global co-ordinate space, and then you convert from there to to
button's local co-ordinate space.

It is of course pointless. You might as well use 0,0 as your x,y co-ordinates.

 with(btn1.graphics){
  clear();
  lineStyle(2, 0xff, 1);
  beginFill(0x123456, 1);
 // globel coordinates doesn't work too
 // drawRect(pg.x, pg.y, btn1.width + 20, btn1.height+ 20);
  drawRect(btn1.x, btn1.y, btn1.width + 20, btn1.height+ 20);
  endFill();
 }

Manish


[flexcoders] SWF Encryption using the Local Encrypted Store

2009-06-02 Thread arieljake
Hi all, I need some help from the community with this. I am very close to a 
solution, but may have hit a snag.

The accepted approach for encrypting an AIR app is to deliver an encrypted swf 
with a wrapper that decrypts and loads the child.

The issue becomes how/where to store the decryption key for the wrapper to use 
when loading the child.

Nitro-LM / Simplified Logic embeds the key in wrapper and uses proprietary 
methods to make extracting that key difficult.

Here is the alternative I am playing with:

Company X create a simple program compiled with the same product id and AIR 
certificate as the program they are distributing to generate at home base the 
files for an empty Encrypted Local Store that has had the encryption key added 
to it. Then, the Encrypted Local Store files created by AIR are added to the 
AIR file - these files are encrypted with AIR's encryption mechanism. When the 
AIR file is installed, these files are then copied by the wrapper into the 
Encrypted Local Store directory and then read from using the AIR API for the 
Encrypted Local Store - and voila - the wrapper has the decryption key and the 
key is never transmitted in clear text.

I tried this and it seemed to work, but then it seems as if it doesn't work 
from one computer to the next - AIR seems to encrypt the ELS files with a 
formula that includes the program ID, the AIR certificate, AND the user's 
computer id, which prevents the company from distributing the original ELS 
files. 

Can only Adobe verify whether this solution will work? Can anyone lend insight 
/ advice on this? Thanks.



[flexcoders] Re: Custom Actionscript component data-binding question

2009-06-02 Thread valdhor
MXML is just a nice easy way to create an instance of a class. Flex will 
compile the MXML into ActionScript and then compile that into bytecode for the 
Flash Player to run.

When you instantiate the object in MXML, the parameters will either be public 
variables of the class or will be set via setters.

For example, if you look at the Panel class you can see that the title is set 
via a setter (To see the Panel class in Flex Builder, click on the 
mx:Panel... MXML and hit F3). You can then find the function:

public function set title(value:String):void



HTH



Steve



--- In flexcoders@yahoogroups.com, Keith Hughitt keith.hugh...@... wrote:

 Hi Valdhor,
 
 Thanks for the suggestion, that is a very good idea and something I hadn't 
 thought of. I'll certainly try that out, however, I'm still uncertain as to 
 how to pass in / accept data in custom AS classes. For instance, when I 
 specify things as MXML parameters, are they available in the class 
 constructors, or are they set sometime after the constructor is called via 
 setters?
 
 Thanks,
 Keith
 
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  Why are you trying to bind a datagrid? That is a display object.
  
  A far better way is to pass in the arraycollection the datagrid is based 
  on. Then just create the datagrid in your custom component.





Re:Re: [flexcoders] Drawing the background Issue

2009-06-02 Thread j2me_soul
Thanks Manish! 
 
That works.
 
drawRect(0, 0, btn1.width + 20, btn1.height+ 20);
 
Is the 0,0 point is the ContentPoint of the btn1 ?



在2009-06-03,Manish Jethani manish.jeth...@gmail.com 写道:





2009/6/2 j2me_soul j2me_s...@163.com:

 The code is pretty simple. This is all I am trying to do:
  mx:Script
   ![CDATA[
private function init():void{
 //var p:Point = new Point(btn1.x, btn1.y);
 //var pg:Point = localToGlobal(p);

var p:Point = new Point(btn1.x, btn1.y);
p = this.localToGlobal(p);
p = btn1.globalToLocal(p);

That works. First you convert from the Application's co-ordinate space
to the global co-ordinate space, and then you convert from there to to
button's local co-ordinate space.

It is of course pointless. You might as well use 0,0 as your x,y co-ordinates.

 with(btn1.graphics){
  clear();
  lineStyle(2, 0xff, 1);
  beginFill(0x123456, 1);
 // globel coordinates doesn't work too
 // drawRect(pg.x, pg.y, btn1.width + 20, btn1.height+ 20);
  drawRect(btn1.x, btn1.y, btn1.width + 20, btn1.height+ 20);
  endFill();
 }

Manish




Re: Re: [flexcoders] Drawing the background Issue

2009-06-02 Thread Manish Jethani
2009/6/2 j2me_soul j2me_s...@163.com:

 drawRect(0, 0, btn1.width + 20, btn1.height+ 20);

 Is the 0,0 point is the ContentPoint of the btn1 ?

No, it's the top-left.

Manish


[flexcoders] Advanced Data grid Row Color using Action Script .

2009-06-02 Thread guess what

I am building an advancedDataGrid from Action script completely. I have the 
Data grid up and running . There is a requirement which says I need to Show 
Summary rows within the data grid in a differemt Color . What I am doing is 
based on the data of the xml I want to draw it in different colors or say make 
it bold . Can anyone help me in this regard .
Since i am building it from Action Script completely . I dont know how to set 
the bg color . This is my Code . Kindly help me folks .

var dg:AdvancedDataGrid = new AdvancedDataGrid ; 

 
   //instantiate a new DataGrid
var dgc:AdvancedDataGridColumn;
var aColumnsNew:Array = dg.columns
var iTotalDGWidth:int = 0;
for (var i:int=0;iaColumnDef.length;i++)  {  //loop over 
the column definition array
  oColumnDef = aColumnDef[i];
  dgc = new AdvancedDataGridColumn();  
//instantiate a new DataGridColumn
  dgc.dataField = oColumnDef.dataField;//start 
setting the properties from the column def array
  dgc.width = oColumnDef.width;
  iTotalDGWidth += dgc.width;  //add up the 
column widths
  dgc.editable = oColumnDef.editable;
  dgc.sortable = oColumnDef.sortable
  dgc.visible = oColumnDef.visible;
  dgc.wordWrap = oColumnDef.wordWrap;
  aColumnsNew.push(dgc)   the new dataGridColumn onto the array
}



dg.columns =aColumnsNew;  the array back to the dtaGrid
dg.width = iTotalDGWidth;
dg.dataProvider = _xlcCatalog;
 this.addChild(dg); 


  


Re: [flexcoders] SWF Encryption using the Local Encrypted Store

2009-06-02 Thread Kevin F. Benz
We also found that the encrypted local store wasn¹t effective for
pre-popluated or user persisted data. We ended up building our own encrypted
container as we needed to be able to allow a user to backup and recover it
as data in the ELS directory isn¹t necessarily available to the Vista user
without administrative privileges.
K

On 6/2/09 10:23 AM, arieljake arielj...@yahoo.com wrote:
 
 Hi all, I need some help from the community with this. I am very close to a
 solution, but may have hit a snag.
 
 The accepted approach for encrypting an AIR app is to deliver an encrypted swf
 with a wrapper that decrypts and loads the child.
 
 The issue becomes how/where to store the decryption key for the wrapper to use
 when loading the child.
 
 Nitro-LM / Simplified Logic embeds the key in wrapper and uses proprietary
 methods to make extracting that key difficult.
 
 Here is the alternative I am playing with:
 
 Company X create a simple program compiled with the same product id and AIR
 certificate as the program they are distributing to generate at home base the
 files for an empty Encrypted Local Store that has had the encryption key added
 to it. Then, the Encrypted Local Store files created by AIR are added to the
 AIR file - these files are encrypted with AIR's encryption mechanism. When the
 AIR file is installed, these files are then copied by the wrapper into the
 Encrypted Local Store directory and then read from using the AIR API for the
 Encrypted Local Store - and voila - the wrapper has the decryption key and the
 key is never transmitted in clear text.
 
 I tried this and it seemed to work, but then it seems as if it doesn't work
 from one computer to the next - AIR seems to encrypt the ELS files with a
 formula that includes the program ID, the AIR certificate, AND the user's
 computer id, which prevents the company from distributing the original ELS
 files. 
 
 Can only Adobe verify whether this solution will work? Can anyone lend insight
 / advice on this? Thanks.
 
   
 
 
 
 
 Kevin F. Benz
 kb...@kbenz.com425-785-7100
 http://www.kbenz.com
 
 We can't solve problems by using the same kind of thinking we used when we
 created them - Albert Einstein
 



[flexcoders] Re: Custom Actionscript component data-binding question

2009-06-02 Thread Keith Hughitt
Hi Steve,

Thanks, that makes things pretty clear. I'm still having trouble passing in 
variables. For example, in the MXML example above I specify a test variable.

When I try to access it in the FilterManager constructor, however, the variable 
is empty (both test, and _test).

I must be missing something simple. Any suggestions?

Thanks,
Keith

--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 MXML is just a nice easy way to create an instance of a class. Flex will 
 compile the MXML into ActionScript and then compile that into bytecode for 
 the Flash Player to run.
 
 When you instantiate the object in MXML, the parameters will either be public 
 variables of the class or will be set via setters.
 
 For example, if you look at the Panel class you can see that the title is set 
 via a setter (To see the Panel class in Flex Builder, click on the 
 mx:Panel... MXML and hit F3). You can then find the function:
 
 public function set title(value:String):void
 
 
 
 HTH
 
 
 
 Steve




[flexcoders]Importing a project into Flash Builder 4 from Flex Builder 3

2009-06-02 Thread dorkie dork from dorktown
Will importing a project from Flex Builder 3 into Flash Builder 4 ruin my
Flex Builder 3 project?

Should I move my projects from Flex Builder workspace folder to a Flash
Builder 4 workspace? I'm hestitant because I don't want to ruin anything
like my workspace or project files opening a project in FB4.

Recommended steps to open Flex 3 project in FB4??? TIA (am i the only one
whos says tia anymore?)

dorkie stuck in 90's webspeak dork from dorktown


Re: [flexcoders]Importing a project into Flash Builder 4 from Flex Builder 3

2009-06-02 Thread Daniel Freiman
From: http://labs.adobe.com/technologies/flashbuilder4/

You can install a separate copy of Flash Builder 4 standalone and it will
remain separate from any Flex Builder 2 or 3 installations. Also, workspaces
created in Flex Builder 2 or Flex Builder 3 are not supported by Flash
Builder 4. Lastly, Flash Builder 4 can import existing Flex Builder
projects, but a project that has its settings modified by Flash Builder 4
will no longer open in Flex Builder 3 or Flex Builder 2.

- Daniel Freiman*
*
On Tue, Jun 2, 2009 at 3:15 PM, dorkie dork from dorktown 
dorkiedorkfromdorkt...@gmail.com wrote:



 Will importing a project from Flex Builder 3 into Flash Builder 4 ruin my
 Flex Builder 3 project?

 Should I move my projects from Flex Builder workspace folder to a Flash
 Builder 4 workspace? I'm hestitant because I don't want to ruin anything
 like my workspace or project files opening a project in FB4.

 Recommended steps to open Flex 3 project in FB4??? TIA (am i the only one
 whos says tia anymore?)

 dorkie stuck in 90's webspeak dork from dorktown
  



Re: [flexcoders]Importing a project into Flash Builder 4 from Flex Builder 3

2009-06-02 Thread Alan Rother
If you are planning on doing this, I would make copies of your FB3 code and
use these to import into FB4 (Don't use your originals). That
should alleviate the risk.
=]
-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org


Re: [flexcoders]Importing a project into Flash Builder 4 from Flex Builder 3

2009-06-02 Thread dorkie dork from dorktown
Thanks guys

On Tue, Jun 2, 2009 at 2:29 PM, Alan Rother alan.rot...@gmail.com wrote:



 If you are planning on doing this, I would make copies of your FB3 code and
 use these to import into FB4 (Don't use your originals). That
 should alleviate the risk.

 =]
 --
 Alan Rother
 Adobe Certified Advanced ColdFusion MX 7 Developer
 Manager, Phoenix Cold Fusion User Group, AZCFUG.org
  



[flexcoders] Re: Custom Actionscript component data-binding question

2009-06-02 Thread valdhor
So how are you instantiating a FilterManager object?


--- In flexcoders@yahoogroups.com, Keith Hughitt keith.hugh...@... wrote:

 Hi Steve,
 
 Thanks, that makes things pretty clear. I'm still having trouble passing in 
 variables. For example, in the MXML example above I specify a test variable.
 
 When I try to access it in the FilterManager constructor, however, the 
 variable is empty (both test, and _test).
 
 I must be missing something simple. Any suggestions?
 
 Thanks,
 Keith
 
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  MXML is just a nice easy way to create an instance of a class. Flex will 
  compile the MXML into ActionScript and then compile that into bytecode for 
  the Flash Player to run.
  
  When you instantiate the object in MXML, the parameters will either be 
  public variables of the class or will be set via setters.
  
  For example, if you look at the Panel class you can see that the title is 
  set via a setter (To see the Panel class in Flex Builder, click on the 
  mx:Panel... MXML and hit F3). You can then find the function:
  
  public function set title(value:String):void
  
  
  
  HTH
  
  
  
  Steve





[flexcoders] Re: Need Alternative for enterFrame event (Causing Memory leak )

2009-06-02 Thread Dharmendra Chauhan
Hi Mark,
 Sorry for late reply.
I have tried the approch suggested by you but it seems that AS3 does not 
support it.I might be not be correct but this but this is what I experienced.

I tried both  SetVariable and flashVar ,but none these appears to be working.

I have to find out other ways to get of my issue.


Thanks a ton for your help.



Regards,
Dharmendra




   
--- In flexcoders@yahoogroups.com, Dharmendra Chauhan chauhan_i...@... 
wrote:

 Hi Mark
 Thanks a ton,
Workaround suggeted by you should be doable.I will definitely implement it 
 and will keep the group posted. 
 
 Thanks again Mark.
 
 Regards,
 Dharmendra
 
  
 --- In flexcoders@yahoogroups.com, mark.jonkman@ wrote:
 
  Hi Dharmendra 
  
  While you don't have access to JavaScript, would the old school methods 
  still work such as setting a Flash variable on the active x control. Back 
  in older versions of Flash the only way to communicate between the browser 
  and the ActiveX was to use things like setVariable then inside Flash you 
  would have a watch expression that watched for changes to that variable, 
  and reacted. The variable value could only be a string (I think). Back then 
  we would change the value of the variable from outside, have Flash react to 
  the change, reset the value of the variable to its non-set state. 
  Assuming this would still work, when the .NET application regained focus 
  you would tell the ActiveX instance to setVariable(focusReceived, 
  true); and in Flash it would see that, reset the listeners. One word of 
  warning, if your resetting your listeners constantly, are you doing 
  anything to remove the old listeners first - if not that may well be the 
  source of your memory leak. I used the setVariable method in VB with the 
  old Flash active x controls a number of years ago and it worked flawlessly, 
  you just have to set it up right to begin with and it was obviously 
  messier then the ExternalInterface method. 
  
  Sincerely 
  Mark R. Jonkman 
  
  - Original Message - 
  From: Dharmendra Chauhan chauhan_icse@ 
  To: flexcoders@yahoogroups.com 
  Sent: Friday, May 29, 2009 3:00:46 PM GMT -05:00 US/Canada Eastern 
  Subject: [flexcoders] Re: Need Alternative for enterFrame event (Causing 
  Memory leak ) 
  
  Hi Manish, 
  
  Thanks for the suggestion. 
  
  I wish , I could use java script to set the Focus but I do not have luxury 
  of Java Script as My application is running as ActiveX control inside dot 
  net based application. 
  
  Once the callback broken , communication from Ashokwave lib to swf is not 
  possible. 
  
  This is really a serious issue, I need some work around to fix it as I 
  could not wait till the adobe fix it. 
  
  Regards, 
  Dharmendra 
  
  
  
  
  --- In flexcoders@yahoogroups.com, Manish Jethani manish.jethani@ wrote: 
   
   On Fri, May 29, 2009 at 12:40 AM, Dharmendra Chauhan 
   chauhan_icse@ wrote: 
   
The issue is with callBack ,what is happening is as soon you hide Flex 
application by opening another application(any app) and then again you 
come back to your flex app , call back does not work , they are 
broken.I 
found following related jira for this. 

http://bugs.adobe.com/jira/browse/FP-143 

To solve this issue , I am re-registering all callBacks on ENTER_FRAME 
event and issue appears to be solved but this is leading to memory 
leak. 

Neither Activate nor FocusEvent.FOCUS_IN does serve my purpose , both 
required a mouse Clk before they dispached. 
   
   I thought you'd get 'activate' when the player got focus. You could 
   try setting the focus back to Flash through JavaScript (I don't 
   remember how to do this now). You should be getting a focus event on 
   the HTML/JS side at least. 
   
   Manish 
   
  
  
  
  
   
  
  -- 
  Flexcoders Mailing List 
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt 
  Alternative FAQ location: 
  https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
   
  Search Archives: 
  http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
 





[flexcoders] Re: Custom Actionscript component data-binding question

2009-06-02 Thread Keith Hughitt
custom:FilterManager datagrid={Application.application.dgResults} test=Test 
String width=100% height=100%/




[flexcoders] Re: Custom Actionscript component data-binding question

2009-06-02 Thread valdhor
That should work.

When are you testing the variable test (ie. where is your breakpoint set) when 
you get a null value.


--- In flexcoders@yahoogroups.com, Keith Hughitt keith.hugh...@... wrote:

 custom:FilterManager datagrid={Application.application.dgResults} 
 test=Test String width=100% height=100%/





[flexcoders] Pushing the Framework RSL to Site Visitors in advance.

2009-06-02 Thread pedr.browne
Hi,

I'm currently considering persuading a client to move a highly-trafficked 
site's widgets over to Flex. The big hurdle is of course the increased download 
that comes with Flex. 

Having weighed up the options, I certainly want to use Flex, and have no doubt 
that through the use of the Framework RSL, any initially increased downloads 
would soon reconcile themselves. However, my client is going to take some 
serious convincing that it is worthwile taking the initial hit from the 
framework RSL (vs AS3 only widgets).

So I was wondering about starting to push the Framework RSL out to the site's 
users (Mostly repeat users who use the site regularly), in advance of 
implimenting the Flex widgets/components. I envisage this being done on 
heavilly-trafficked, but lightweight pages which do not use any streamed 
content. I would imagine using a hidden swf set to use the Framework RSL, 
possibly delaying its initialisation to ensure anything else necessary for the 
page to display propperly has loaded. I have the luxury of time on this, with 
potentially 3 - 4 months before deployment, so I think over this timeframe a 
significant number of visitors could be seeded with the Framework RSL.

I was wondering whether anyone has tried anything like this, and whether anyone 
saw any potential problems with this approach.

Thanks.




[flexcoders] LCDS Bug: delete item from heirarchical collection sporadically throws exception

2009-06-02 Thread neelkparikh
I am having a hierarchical object(managed) with an Array collection. 

Add works fine but deleting items (one at a time) from the collection sometimes 
causes an internal exception (only printed with mx:TraceTarget/. Most likely 
happens after first successful delete.

The item disappears from the local collection but LCDS has no knowledge of it 
and hence autoCommit remains FALSE and change can't be rolled back. 

exception given in stacktrace:

RangeError: Index '2' specified is out of bounds.
RangeError: Index '2' specified is out of bounds.
at 
mx.collections::ListCollectionView/getItemAt()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:422]
at 
mx.data::DataMessageCache/logUpdate()[C:\depot\flex\branches\enterprise_corfu_rc\frameworks\projects\data\src\mx\data\DataMessageCache.as:682]
at 
mx.data::DataStore/http://www.adobe.com/2006/flex/mx/internal::logUpdate()[C:\depot\flex\branches\enterprise_corfu_rc\frameworks\projects\data\src\mx\data\DataStore.as:2499]
at 
mx.data::ConcreteDataService/itemUpdateHandler()[C:\depot\flex\branches\enterprise_corfu_rc\frameworks\projects\data\src\mx\data\ConcreteDataService.as:6118]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at 
com.thed.vo::CycleVO/dispatchEvent()[C:\thed\trunk\web\src\main\client\com\thed\vo\CycleVO.as:41]
at 
anonymous()[C:\depot\flex\branches\enterprise_corfu_rc\frameworks\projects\data\src\mx\data\utils\Managed.as:924]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at 
mx.collections::ArrayList/internalDispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\collections\ArrayList.as:524]
at 
mx.collections::ArrayList/removeItemAt()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\collections\ArrayList.as:363]
at 
mx.collections::ListCollectionView/removeItemAt()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:601]
at 
com.thed.controls.views.Scheduling::TCRScheduling/deletePhase()[C:\thed\trunk\web\src\main\client\com\thed\controls\views\Scheduling\TCRScheduling.mxml:228]
at 
com.thed.controls.views.Scheduling::TCRScheduling/__phaseCalendar_slItemDelete()[C:\thed\trunk\web\src\main\client\com\thed\controls\views\Scheduling\TCRScheduling.mxml:476]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at 
mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298]
at 
com.thed.controls.SwimLaneCalendar::SwimLaneCalendar/dispatchSwinLaneEvent()[C:\thed\trunk\web\src\main\client\com\thed\controls\SwimLaneCalendar\SwimLaneCalendar.mxml:129]
at 
com.thed.controls.SwimLaneCalendar::SwimLaneCalendar/handleDeleteResponse()[C:\thed\trunk\web\src\main\client\com\thed\controls\SwimLaneCalendar\SwimLaneCalendar.mxml:142]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at 
mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298]
at 
mx.controls.alertClasses::AlertForm/removeAlert()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\alertClasses\AlertForm.as:500]
at 
mx.controls.alertClasses::AlertForm/clickHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\alertClasses\AlertForm.as:541]
btnExport.visible: false



[flexcoders] general tips: port javascript to as3

2009-06-02 Thread arocheking
Hi, I'm considering porting a library over to as3

You don't have to look at this, but if you want to the javascript is here: 
http://googlegeodevelopers.blogspot.com/2009/04/markerclusterer-solution-to-too-many.html

I haven't done this before. I was hoping to get the main general steps to 
convert javascript to as3. I'm thinking, 1) declare data type for the 
variables, 2) define public/private/protected on the methods etc. 3) consider 
breaking some parts into their own classes as needed.
Thanks.



Re: [flexcoders] general tips: port javascript to as3

2009-06-02 Thread Pedro Sena
Very interesting lib btw.

I believe that you already now that google provided a library for flex too,
don't you?

If you can, please share it in google code, I'm very interested on it.

I could even give you some help on weekends.

Regards,

PS

On Tue, Jun 2, 2009 at 7:22 PM, arocheking rochek...@gmail.com wrote:



 Hi, I'm considering porting a library over to as3

 You don't have to look at this, but if you want to the javascript is here:
 http://googlegeodevelopers.blogspot.com/2009/04/markerclusterer-solution-to-too-many.html

 I haven't done this before. I was hoping to get the main general steps to
 convert javascript to as3. I'm thinking, 1) declare data type for the
 variables, 2) define public/private/protected on the methods etc. 3)
 consider breaking some parts into their own classes as needed.
 Thanks.

  




-- 
/**
* Pedro Sena
* Systems Architect
* Sun Certified Java Programmer
* Sun Certified Web Component Developer
*/


Re: [flexcoders] Pushing the Framework RSL to Site Visitors in advance.

2009-06-02 Thread Pedro Sena
Hi,

I had the same idea a time ago.

The invisible swf that would preload the RSL while a html page show some
content that the user would read, that way the swf would be 'transparently'
loaded.

Appears to be a good idea, I didn't have time to implement it, but I really
don't see any problem with it.

If you gonna try it, please keep us informed, at least I'm very interested
on it =)

I don't know if is your case, but in a controlled environment(intranet for
example) I believe that exist some way to manually put the RSL inside the
dir that the browser lookup for cached content. It's just an idea, I don't
know if its achievable.

Regards,

PS

On Tue, Jun 2, 2009 at 10:49 AM, pedr.browne pedr.bro...@gmail.com wrote:




 Hi,

 I'm currently considering persuading a client to move a highly-trafficked
 site's widgets over to Flex. The big hurdle is of course the increased
 download that comes with Flex.

 Having weighed up the options, I certainly want to use Flex, and have no
 doubt that through the use of the Framework RSL, any initially increased
 downloads would soon reconcile themselves. However, my client is going to
 take some serious convincing that it is worthwile taking the initial hit
 from the framework RSL (vs AS3 only widgets).

 So I was wondering about starting to push the Framework RSL out to the
 site's users (Mostly repeat users who use the site regularly), in advance of
 implimenting the Flex widgets/components. I envisage this being done on
 heavilly-trafficked, but lightweight pages which do not use any streamed
 content. I would imagine using a hidden swf set to use the Framework RSL,
 possibly delaying its initialisation to ensure anything else necessary for
 the page to display propperly has loaded. I have the luxury of time on this,
 with potentially 3 - 4 months before deployment, so I think over this
 timeframe a significant number of visitors could be seeded with the
 Framework RSL.

 I was wondering whether anyone has tried anything like this, and whether
 anyone saw any potential problems with this approach.

 Thanks.

  




-- 
/**
* Pedro Sena
* Systems Architect
* Sun Certified Java Programmer
* Sun Certified Web Component Developer
*/


[flexcoders] Re: ADG/DataGrid prevent render even from firing immediately on propertyChange

2009-06-02 Thread tntomek
--- In flexcoders@yahoogroups.com, tntomek tnto...@... wrote:

 --- In flexcoders@yahoogroups.com, foobone9 foobone9@ wrote:
 
  You might try enableAutoUpdate and disableAutoUpdate on ICollectionView, 
  not sure if that has the desired affect or not.
  
  You could also put custom events in your model objects and manually 
  dispatch collection events or call explicitly tell the grid when to update.
  
  --- In flexcoders@yahoogroups.com, tntomek tntomek@ wrote:
  
   Hi,
   
   Is there any way to tell the ADG to not re-render itself immediately 
   after a propertyChanged even has been fired in the dataProvider? 
   
   I have quite a wide row (lots of cells) and lots of custom logic that 
   updates these dependent properties on each row. i.e. calculated columns. 
   I am doing the calculations at dataProvider level vs labelFunctions. On 
   each set function of one of my cells in the row I raise a 
   propertyChanged event if the value was changed. Tracing through what 
   the ADG is doing I'm finding that its re-rendering each time I raise this 
   event even if its in the same row. Is there any way to tell the ADG to 
   wait a few milliseconds in case another propertyChanged event comes in so 
   as to render once instead of 10 times?
   
   If there is no ADG option what is the best pattern for this assuming I 
   want to do this in my underlying dataprovider objects. Should I raise 
   custom events and fake a itemUpdated once I know there are no more 
   changes? I don't see a clean way to do this however since I never really 
   know when I'm done, and using a timer or something of this nature seems 
   like a major hack.
   
   -Tom
  
 
 
 By explicitly tell the grid when to update do you mean manually calling 
 itemUpdated at the View level?. If so does the grid actually know to 
 re-render only that updated row? It seems to me that it always re-rendered 
 all visible cells regardless of what was changed. So passing null or a real 
 row into itemUpdated has the same results.
 
 Also if I am to manully dispatch propertyChanged from my row, and I never 
 really know when I'm done updating all of my dependant cells is there any 
 good way to do this. i.e. Cell A update cell B and cell B update updates cell 
 E, and this can go on indefinatley. By catchign all property changed events 
 at Row level and using a timer of say 50ms i would almost guarantee that I 
 wouldn't rethrow more than a single propertyChanged event on any of the 
 updated cells in a row. Do you think there is a better way to do this?



Follow up finding, 

Do 10 propertyChanged events from my dataProvider cause grid to refresh once or 
10 times? My most recent observations show that it's just once, though for some 
reason the first load invokes my labelFunction 3 times. Is there any point in 
using enableAutoUpdate if grid appears to be 'smart' enough?




Re: [flexcoders] Referencing Hiddenfield in html page

2009-06-02 Thread Angelo Anolin
Hi Tracy,
I was able to work out something with the flashvars as you have suggested and 
am able to pass static values already to the SWF application.

But how would I do, like for example, in my aspx page containing the SWF file, 
the value I want to pass into SWF via flashvars is contained in a hiddenfield?

Like:

asp:HiddenField ID=hiddenField1 runat=server /
    
   %-- object width=100% height=100%  
    embed src=http://localhost:50179/TestWebService/PaxType.swf; 
type=application/x-shockwave-flash width=100% height=100%
    /embed
    /object--%
    
    object id='mySwf' 
    classid=clsid:D27CDB6E-AE6D-11cf-96B8-44455354
    
codebase=http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab;
    height=100% 
    width='100%'
    param name='src' value='MX/PaxType.swf'/
    param name='flashVars' value='firstName=AngelolastName=Anolin'/
    embed src=MX/PaxType.swf 
   pluginspage=http://www.adobe.com/go/getflashplayer;
   type=application/x-shockwave-flash
   height=100%
   width=100% 
   flashVars=firstName=AngelolastName=Anolin
    /embed
    /object
 
In the flashvars above, you could see that I am passing a static value of 
firstName=Angelo and lastName=Anolin to the flash.  How can I then make 
that the flashvars be passing the hiddenfield value?

Thanks.





From: Tracy Spratt tr...@nts3rd.com
To: flexcoders@yahoogroups.com
Sent: Tuesday, 2 June, 2009 11:59:13
Subject: RE: [flexcoders] Referencing Hiddenfield in html page





You can use ExternalInterface to call javascript to get it into Flex or you can 
pass the data into the Flex app via flashvars when you start the app.
 
Tracy Spratt,
Lariat Services, development services available



From:flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On 
Behalf Of Angelo Anolin
Sent: Monday, June 01, 2009 11:47 PM
To: flexcod...@yahoogro ups.com
Subject: [flexcoders] Referencing Hiddenfield in html page
 




Hi FlexCoders,
 
As I am trying to build a simple little application, I want to know how flex 
can access a hiddenfield value in an html (or aspx) page?
 
In one of the old aspx application we have, we are using the HttpContext. 
Current.Request. ServerVariables to get the logged in User Name.
 
Since I am hosting the compiled SWF file in an aspx/html page, I need to be 
able to pass the logged user details which I store in a hiddenfield in my aspx 
page to Flex.  Any advice/suggestions?
 
Thanks.
 



  

[flexcoders] Flex / Fireworks integration

2009-06-02 Thread arieljake
Anyone know in Fireworks how to load a css to make those styles available as 
font styles, box styles, and image assets?



[flexcoders] Adobe Flex Language Reference

2009-06-02 Thread Angelo Anolin
Is there a PDF download for this document?  I see this a lot in the Adobe 
Developer's Guide PDF documentation.

Thanks.


  

RE: [flexcoders] Referencing Hiddenfield in html page

2009-06-02 Thread Tracy Spratt
I haven't worked withHiddenField, but you can have the server generate the
content for the flashvar, something like:

value='firstName=%=MyServerVar%'

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Angelo Anolin
Sent: Tuesday, June 02, 2009 9:02 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Referencing Hiddenfield in html page

 






Hi Tracy,

I was able to work out something with the flashvars as you have suggested
and am able to pass static values already to the SWF application.

 

But how would I do, like for example, in my aspx page containing the SWF
file, the value I want to pass into SWF via flashvars is contained in a
hiddenfield?

 

Like:

 

asp:HiddenField ID=hiddenField1 runat=server /

   %-- object width=100% height=100%  
embed src=http://localhost:
http://localhost:50179/TestWebService/PaxType.swf
50179/TestWebService/PaxType.swf type=application/x-shockwave-flash
width=100% height=100%
/embed
/object--%

object id='mySwf' 
classid=clsid:D27CDB6E-AE6D-11cf-96B8-44455354
codebase=http://fpdownload.
http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab
macromedia.com/get/flashplayer/current/swflash.cab
height=100% 
width='100%'
param name='src' value='MX/PaxType.swf'/
param name='flashVars'
value='firstName=AngelolastName=Anolin'/
embed src=MX/PaxType.swf 
   pluginspage=http://www.adobe.
http://www.adobe.com/go/getflashplayer com/go/getflashplayer
   type=application/x-shockwave-flash
   height=100%
   width=100% 
   flashVars=firstName=AngelolastName=Anolin
/embed
/object
 
In the flashvars above, you could see that I am passing a static value of
firstName=Angelo and lastName=Anolin to the flash.  How can I then make
that the flashvars be passing the hiddenfield value?

 

Thanks.

 

  _  

From: Tracy Spratt tr...@nts3rd.com
To: flexcoders@yahoogroups.com
Sent: Tuesday, 2 June, 2009 11:59:13
Subject: RE: [flexcoders] Referencing Hiddenfield in html page

You can use ExternalInterface to call javascript to get it into Flex or you
can pass the data into the Flex app via flashvars when you start the app.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On
Behalf Of Angelo Anolin
Sent: Monday, June 01, 2009 11:47 PM
To: flexcod...@yahoogro ups.com
Subject: [flexcoders] Referencing Hiddenfield in html page

 





Hi FlexCoders,

 

As I am trying to build a simple little application, I want to know how flex
can access a hiddenfield value in an html (or aspx) page?

 

In one of the old aspx application we have, we are using the HttpContext.
Current.Request. ServerVariables to get the logged in User Name.

 

Since I am hosting the compiled SWF file in an aspx/html page, I need to be
able to pass the logged user details which I store in a hiddenfield in my
aspx page to Flex.  Any advice/suggestions?

 

Thanks.

 

 





Re: [flexcoders] Referencing Hiddenfield in html page

2009-06-02 Thread Angelo Anolin
Hi Tracy,

Instead of flashvars, I opted to utilize the ExternalInterface instead.

Here's how I got it working.

I declare a small function in my MXML script(or actionscript).  Be sure to 
include 
import flash.external.*;
 
private function getHTMLField():void
{
 var _hidValue:String;
 
 if (ExternalInterface.available) 
 {
  var jsFunction:String = getHiddenfieldValue;
  _hidValue = ExternalInterface.call(jsFunction);
 } 
 else 
 {
  _hidValue = Wrapper not available;
 }
}

In my aspx / html page, I have a javascript function named getHiddenfieldValue 
which returns the value of the hiddenfield which I want to use in my flex 
application.
script language=javascript type=text/javascript
 function getHiddenfieldValue()
 {
  return document.getElementById('%=hiddenfield1.ClientID %').value;
 }
/script

Now, the function getHTMLField, I call in the application's creationComplete 
event, and the value returned by the javascript which I store in a variable can 
then be utilized by the application.

Thanks for your help and ideas.

Regards,





From: Tracy Spratt tr...@nts3rd.com
To: flexcoders@yahoogroups.com
Sent: Wednesday, 3 June, 2009 12:41:26
Subject: RE: [flexcoders] Referencing Hiddenfield in html page





I haven’t worked withHiddenField, but you can have the server generate the 
content for the flashvar, something like:
value='firstName= %=MyServerVar%'
 
Tracy Spratt,
Lariat Services, development services available



From:flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On 
Behalf Of Angelo Anolin
Sent: Tuesday, June 02, 2009 9:02 PM
To: flexcod...@yahoogro ups.com
Subject: Re: [flexcoders] Referencing Hiddenfield in html page
 




Hi Tracy,
I was able to work out something with the flashvars as you have suggested and 
am able to pass static values already to the SWF application.
 
But how would I do, like for example, in my aspx page containing the SWF file, 
the value I want to pass into SWF via flashvars is contained in a hiddenfield?
 
Like:
 
asp:HiddenField ID=hiddenField1 runat=server /
    
   %-- object width=100% height=100%   
    embed src=http://localhost: 50179/TestWebSer vice/PaxType. swf 
type=application/ x-shockwave- flash width=100% height=100% 
    /embed
    /object--%
    
    object id='mySwf' 
    classid=clsid: D27CDB6E- AE6D-11cf- 96B8-44455354000 0
    codebase=http://fpdownload. macromedia. com/get/flashpla 
yer/current/ swflash.cab
    height=100%  
    width='100%'
    param name='src' value='MX/PaxType. swf'/
    param name='flashVars' value='firstName= AngelolastName=Anolin' /
    embed src=MX/PaxType. swf 
   pluginspage= http://www.adobe. com/go/getflashp layer
   type=application/ x-shockwave- flash
   height=100% 
   width=100% 
   flashVars=firstNam e=AngelolastName=Anolin
    /embed
    /object
 
In the flashvars above, you could see that I am passing a static value of 
firstName=Angelo and lastName=Anolin to the flash.  How can I then make 
that the flashvars be passing the hiddenfield value?
 
Thanks.
 



From:Tracy Spratt tr...@nts3rd. com
To: flexcod...@yahoogro ups.com
Sent: Tuesday, 2 June, 2009 11:59:13
Subject: RE: [flexcoders] Referencing Hiddenfield in html page
You can use ExternalInterface to call javascript to get it into Flex or you can 
pass the data into the Flex app via flashvars when you start the app.
 
Tracy Spratt,
Lariat Services, development services available



From:flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On 
Behalf Of Angelo Anolin
Sent: Monday, June 01, 2009 11:47 PM
To: flexcod...@yahoogro ups.com
Subject: [flexcoders] Referencing Hiddenfield in html page
 



Hi FlexCoders,
 
As I am trying to build a simple little application, I want to know how flex 
can access a hiddenfield value in an html (or aspx) page?
 
In one of the old aspx application we have, we are using the HttpContext. 
Current.Request. ServerVariables to get the logged in User Name.
 
Since I am hosting the compiled SWF file in an aspx/html page, I need to be 
able to pass the logged user details which I store in a hiddenfield in my aspx 
page to Flex.  Any advice/suggestions?
 
Thanks.