Re: [flexcoders] Re: Bug: history.js issues in IE7

2008-12-22 Thread Tom Chiverton
On Thursday 18 Dec 2008, flexaustin wrote:
 No erros are being thrown in IE. 

Wouldn't trust it as far as I could throw it. Use FireFox and open it's error 
console.

-- 
Tom Chiverton
Helping to proactively introduce principle-centered materials



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] Button with Icon and two labels one with Left align while Other with right Align

2008-12-22 Thread Manish Jethani
On Sat, Dec 20, 2008 at 1:20 PM, Ashish Verma verma.lu...@gmail.com wrote:
 I tried the same. but how to fine tune all the methods like meaure, update
 list, label properties with this new textfield. and main problem is that the
 alignment is apply only for button not for textfield. please provide some
 work around.

Here's a custom Button-derived component with a basic TextField object
aligned at 100 px. horizontally.

public class MyButton extends Button
{
private var label2Changed:Boolean = false;

protected var label2Field:TextField;

private var _label2:String = ;
public function get label2():String
{
return _label2;
}
public function set label2(value:String):void
{
if (_label2 != value) {
_label2 = value;

label2Changed = true;

invalidateProperties();
}
}

override protected function createChildren():void
{
if (label2  !label2Field) {
label2Field = new TextField();
addChild(label2Field);
}

super.createChildren();
}

override protected function commitProperties():void
{
if (label2Changed) {
label2Changed = false;

if (label2  !label2Field) {
label2Field = new TextField();
addChild(label2Field);

invalidateDisplayList();

} else if (!label2  label2Field) {
removeChild(label2Field);
label2Field = null;

invalidateDisplayList();
}
}

super.commitProperties();
}

override protected function measure():void
{
super.measure();

measuredWidth += 100;
}

override protected function
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
{
super.updateDisplayList(unscaledWidth, unscaledHeight);

if (label2Field) {
label2Field.text = label2;

// align
label2Field.x = 100;
label2Field.y = 5;

// bring to front
setChildIndex(label2Field, numChildren - 1);
}
}
}

Notice the implementations of the createChildren, commitProperties,
measure, and updateDisplayList methods, the label2 setter, and the
backing variables _label2 and label2Changed, and the internal
TextField object label2Field, and how they're all handled. You'll find
the best way to learn to write custom components is to just peek into
the source of the Flex framework itself.

Manish


Re: [flexcoders] FlexTasks: Compc for Flash Player 10

2008-12-22 Thread Tom Chiverton
On Sunday 21 Dec 2008, Tyler Kocheran wrote:
 Is there a way to use compc to generate a SWC file targeting Flash Player
 10?

Using the Flex 4 SDK, yes ?

-- 
Tom Chiverton
Helping to advantageously grow virtual wireless revolutionary world-class 
materials



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] TourDeFlex in linux

2008-12-22 Thread Tom Chiverton
On Sunday 21 Dec 2008, Deniz Davutoglu wrote:
 Hi I installed air 1.5 for linux an TourDeFlex in ubuntu 8.10 but
 after install I cant find TourDeFlex in any menu does any one knows
 hot to reach to app?

It should be in /opt/

-- 
Tom Chiverton
Helping to competently improve error-free market-growth



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] Re: Is Flex the wrong technology for widgets? SWF file sizes are too big...

2008-12-22 Thread Tom Chiverton
On Thursday 18 Dec 2008, Fotis Chatzinikos wrote:
 Hi, I think I read somewhere that the framework will cache per domain. Ie
 if siteX uses the framework and it is cached it is only cached for siteX,
 not siteY...

That's not true, if you are talking about the signed Flex framework RSLs.
If someone has ever seen a Flex app. that used the same version of the signed 
RSL, it wont need to be refetched for your app. That's rather the point.
-- 
Tom Chiverton
Helping to revolutionarily exploit convergence



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: Database connection from AIR application

2008-12-22 Thread jason_williams_mm
Kotha,
Can you elaborate on your use case a little? If you are not interested
in accessing server side logic, why are you wanting to get data from
outside of the runtime (there is an embedded SQL database in the runtime)?

jw

--- In flexcoders@yahoogroups.com, kotha poornima poorni_ag...@...
wrote:

 Hi Fidel,
 First of all Thanks for the reply.
 And i need to clarify one more thing from you:
 If we are going to write any server-side code like java or
coldfusion then we have to deploy in Tomcat or Weblogic Servers
right!!! Then how we can say the application as Desktop application
rather than a webapplication.
 
 
 
 
 
 From: Fidel Viegas fidel.vie...@...
 To: flexcoders@yahoogroups.com
 Sent: Thursday, December 18, 2008 1:00:09 PM
 Subject: Re: [flexcoders] Database connection from AIR application
 
 
 On Thu, Dec 18, 2008 at 7:59 AM, kotha poornima poorni_agile@
yahoo.com wrote:
  Hi all,
  I am going to create a AIR Desktop application. Am i able to
connect to the
  database such as SQL Server or MYSQL from AIR to retrieve data.
Can anyone
  give me an idea how can i do this task or send me any websites
regarding the
  same.
 
 No, you need to write server-side code in java, php, ruby, .net,
 etc..., or your can use a gateway such as merapi.
 
 All the best,
 
 Fidel.





[flexcoders] Re: Runaway series effect on line chart

2008-12-22 Thread Tim Hoff

If you're using series interpolate, you probably only need the showData
effect.

-TH

--- In flexcoders@yahoogroups.com, Richard Rodseth rrods...@...
wrote:

 I'm 99% certain the data is not changing, because I follow a similar
pattern
 for all my chart modules, and because the chart does not continually
update
 without the effects (even when hitting a mock service with random
data).

 If no one else has seen this, I might have to forego the effect for
now, but
 I'll try to create a test case when I have time.

 The chart does have two vertical axes and three line series, so it's
more
 complex than the category chart I tweaked.

 On Thu, Dec 18, 2008 at 3:24 PM, Tim Hoff timh...@... wrote:

 
  What's going on when you set the data; a loop perhaps?
 
  -TH
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Richard
  Rodseth rrodseth@
  wrote:
 
  
   I added a SeriesInterpolate effect to a column chart. Spiffy!
  
   However, when I added showData/hideData effects to one series of a
  line
   chart, they run constantly like an oscilloscope. Has anyone else
  encountered
   this?
  
 
 
 






Re: [flexcoders] Runtime Screen/Form designer

2008-12-22 Thread Pat Buchanan
Carl, check out:  http://flexible.riaforge.org/

If you find anything better let me know!

Thanks!
-Pat Buchanan
DataNotion.com

On Thu, Dec 18, 2008 at 12:14 PM, Carl Vorster carl.vors...@gmail.comwrote:

Hi,

 I'm looking for a kick start into building a screen designer/painter where
 the end user can actually build their own screens/forms using drag and drop.

 I saw some examples a while back, but can't seem to find it, and google is
 not helping….



 Any pointers would be greatly appreciated.





 Thanks



 Carl

 



[flexcoders] Write file to server

2008-12-22 Thread mccaffreymike
Flex rookie here...

Trying to read/change/write a text file on the server.

Why doesn't this file save work?

I'm able to use the URLRequest/URLLoader to read the file, but want 
to write changes back to the file.

I get the File saved message but the file is not updated.

Thanks 

//save the file 
request = new URLRequest(C:\\temp.txt);
request.method = URLRequestMethod.POST; 
request.data = changedData;

loader = new URLLoader();
loader.addEventListener(Event.COMPLETE, 
saveComplete);   
loader.addEventListener(IOErrorEvent.IO_ERROR, onIOError);   

try {
loader.load(request);  
}
catch (e:Error){
Alert.show(Error in loader.load + e.message);
}

  }

private function saveComplete(event:Event):void {   
Alert.show(File saved); 
} 



[flexcoders] Best practices for using custom service type with Cairngorm ServiceLocator

2008-12-22 Thread adamratcliffe2002
I have an AIR application which uses the Merapi bridge to communicate with a 
local Java 
application.  My service class wraps the bridge and I would like to initialize 
this service 
alongside the HTTPService I have defined in the ServiceLocator mxml.

Should I extend the Cairngorm ServiceLocator to support my own service 
interface as an 
additional type or is there some better way of doing this?

Cheers
Adam



[flexcoders] building a pie chart with XML data

2008-12-22 Thread flexnoob

I am trying to construct a pie chart using XML data and the resulting
chart is empty. Because I am using the trial version I do see the
flex data visualization trial message. However, the pie chart
does not appear. I have the xml file located in the src directory.



My flex 3 code:



?xml version=1.0 encoding=utf-8?

mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;

 creationComplete=rockstar.send()



 mx:HTTPService id=rockstar url=piebv.xml /





 mx:PieChart width=300 height=300 

 mx:series

 mx:PieSeries
dataProvider={rockstar.lastResult.piebv.employee}

 field=@sales labelField=@name
labelPosition=callout /

 /mx:series

 /mx:PieChart



/mx:Application





My XML:



   ?xml version=1.0 encoding=utf-8 ?

 employees

 employee name=Doug sales=15 /

 employee name=Deepa sales=75000  /

 employee name=Darron sales=3  /

 employee name=Ben sales=6  /

 /employees









Re: [flexcoders] Re: SWF file format question - SymbolClass Tag

2008-12-22 Thread aaron smith
Thanks, externs is pretty much what I was looking for.

On Fri, Dec 19, 2008 at 9:02 PM, Alex Harui aha...@adobe.com wrote:
 There are three mxmlc options:



 -load-externs (removes all files listed from some other –link-report

 -compiler.external-library-path (remove all files from a SWC)

 -externs (removes a class)







 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Gordon Smith
 Sent: Friday, December 19, 2008 4:47 PM

 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Re: SWF file format question - SymbolClass Tag



 Also, I'm pretty sure that there is some compiler option you can use to
 prevent specific classes from getting linked in. That's a lot easier than
 trying to remove them after they've been linked in.



 Gordon Smith

 Adobe Flex SDK Team



 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Gordon Smith
 Sent: Friday, December 19, 2008 4:23 PM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Re: SWF file format question - SymbolClass Tag



 The AS3 classes are in the DoABC (or maybe a DoABC2?) tag.



 It seems unlikely that you could remove a class and still have the SWF work.
 If the class wasn't used by your application, the MXML compiler wouldn't
 have linked it in.



 Gordon Smith

 Adobe Flex SDK Team



 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of aaron smith
 Sent: Wednesday, December 17, 2008 3:24 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: SWF file format question - SymbolClass Tag



 Actually, I could be wrong. would it make more sense if it was the
 DoABC tag? There's a field on DoABC called ABCData - I would assume
 that's the bytecode. hmm. i'll keep looking arund. if anyone has any
 ideas hook me up.

 On Wed, Dec 17, 2008 at 1:44 PM, aaron smith
 beingthexemplaryli...@gmail.com wrote:
 Has anyone read through the SWF file format, and been able to decipher
 how exactly AS3 classes are compiled into the SWF? From reading
 through all of the control tags it seems it would be the SymbolClass
 tag. So, it would seem, I could rip out SymbolClass tags from the
 bytecode (for a specific class) - while keeping track of the new file
 length, then write the swf again and have a swf that doesn't include
 the definition for a particular class. Anyone else think that makes
 sense?

 Thanks


 



--
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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:flexcoders-dig...@yahoogroups.com 
mailto:flexcoders-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
flexcoders-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



Re: [flexcoders] Re: SWF file format question - SymbolClass Tag

2008-12-22 Thread aaron smith
Hey Gordon,

The reason I wanted to remove a class was because I have two swfs - a
shell, and some other swfs, and didn't want the same class compiled
into every swf - thereby wasting K. So i was looking for a way to
manual remove a class from sub-swfs.

-A



On Sun, Dec 21, 2008 at 12:55 PM, aaron smith
beingthexemplaryli...@gmail.com wrote:
 Thanks, externs is pretty much what I was looking for.

 On Fri, Dec 19, 2008 at 9:02 PM, Alex Harui aha...@adobe.com wrote:
 There are three mxmlc options:



 -load-externs (removes all files listed from some other –link-report

 -compiler.external-library-path (remove all files from a SWC)

 -externs (removes a class)







 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Gordon Smith
 Sent: Friday, December 19, 2008 4:47 PM

 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Re: SWF file format question - SymbolClass Tag



 Also, I'm pretty sure that there is some compiler option you can use to
 prevent specific classes from getting linked in. That's a lot easier than
 trying to remove them after they've been linked in.



 Gordon Smith

 Adobe Flex SDK Team



 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Gordon Smith
 Sent: Friday, December 19, 2008 4:23 PM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Re: SWF file format question - SymbolClass Tag



 The AS3 classes are in the DoABC (or maybe a DoABC2?) tag.



 It seems unlikely that you could remove a class and still have the SWF work.
 If the class wasn't used by your application, the MXML compiler wouldn't
 have linked it in.



 Gordon Smith

 Adobe Flex SDK Team



 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of aaron smith
 Sent: Wednesday, December 17, 2008 3:24 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: SWF file format question - SymbolClass Tag



 Actually, I could be wrong. would it make more sense if it was the
 DoABC tag? There's a field on DoABC called ABCData - I would assume
 that's the bytecode. hmm. i'll keep looking arund. if anyone has any
 ideas hook me up.

 On Wed, Dec 17, 2008 at 1:44 PM, aaron smith
 beingthexemplaryli...@gmail.com wrote:
 Has anyone read through the SWF file format, and been able to decipher
 how exactly AS3 classes are compiled into the SWF? From reading
 through all of the control tags it seems it would be the SymbolClass
 tag. So, it would seem, I could rip out SymbolClass tags from the
 bytecode (for a specific class) - while keeping track of the new file
 length, then write the swf again and have a swf that doesn't include
 the definition for a particular class. Anyone else think that makes
 sense?

 Thanks


 




--
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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:flexcoders-dig...@yahoogroups.com 
mailto:flexcoders-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
flexcoders-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



Re: [flexcoders] FlexTasks: Compc for Flash Player 10

2008-12-22 Thread Robert Stehwien
Add the following flag to target flash player 10
compc -target-player=10.0.0 [other options]

Also recommend you make sure you are using the 3.2+ SDK
$ which compc
/Applications/Adobe Flex Builder 3/sdks/3.2.0/bin/compc

--Robert

On Sat, Dec 20, 2008 at 5:07 PM, Tyler Kocheran rfkroc...@gmail.com wrote:

  Is there a way to use compc to generate a SWC file targeting Flash Player
 10?
 Google yields little results on the matter.

 --
 And do this, knowing the time, that now it is high time to awake out of
 sleep;
 for now our salvation is nearer than when we first believed.
 



[flexcoders] FLVPlayback using a Tree Control

2008-12-22 Thread Jesse
Hello all, I'm still new to Flex and trying to tackle this project. 

I have a FLVPlayback component inside my Flex project and it's source
is being provided by a XML file loaded into a Tree control.  There are
several branches to my tree(and sub-branches), and everything works
appropriately when I click on the leafs: The FLVPlayback loads the the
referenced .flv in the XML file.

Where I've run into a brick wall is to get the FLVPlayback to keep
going down the XML file when the movie is finished playing.  I'm
absolutely stuck, I've spent 2 days on this but I'm afraid it's just
beyond my skill level at the moment.  Any help would be GREATLY
appreciate, I'm quite frustrated.

Here's my code, I cut out all the visual stuff I could:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
xmlns:video=fl.video.* backgroundGradientAlphas=[1.0, 1.0]
backgroundGradientColors=[#FF, #FF] paddingTop=2
applicationComplete=init(); layout=horizontal

mx:Script
![CDATA[

import mx.controls.Text;
import mx.events.VideoEvent;
import mx.events.ListEvent;
import mx.collections.XMLListCollection;
import mx.rpc.events.ResultEvent;
import mx.core.IUIComponent;

[Bindable]
private var xLocations:XMLList;
[Bindable]
private var xPhoto:XML;

private function init():void 
{
xmlService.send();
videoHolder.addChild(flvPlayback);
}

private function resultHandler(event:ResultEvent):void
{
xLocations = event.result.person;
}

private function changeHandler(event:ListEvent):void
{
var selectedXML:XML = event.target.selectedItem as XML;

if (selectedXML.name() == video)
{
xPhoto = selectedXML;
}
}
private function nextFLV(e:Event):void 
{
?
}

]]
mx:Script

mx:HTTPService id=xmlService url=data/slideshow.xml
result=resultHandler(event) resultFormat=e4x/

video:FLVPlayback id=flvPlayback source=data/{xpho...@source}
width=375 height=225 scaleMode=maintainAspectRatio
skin=data/SkinUnderPlayStopSeekMuteVol.swf skinAutoHide=false
complete=nextFLV(event)/

mx:Panel width=700 height=425 borderStyle=solid
backgroundColor=#CC cornerRadius=10 alpha=1.0 paddingTop=0
roundedBottomCorners=true layout=horizontal headerHeight=5

mx:Panel width=400 height=100% y=0 right=253
status={xpho...@label}

mx:Panel title={xpho...@title}

mx:TextArea text={xpho...@description} editable=false/
/mx:Panel

mx:UIComponent id=videoHolder/
/mx:Panel

mx:Panel
mx:Tree id=locationTree dataProvider={xLocations}
variableRowHeight=true labelField=@label 
change=changeHandler(event) wordWrap=true 
verticalScrollPolicy=on openDuration=0/
/mx:Panel
/mx:Panel

/mx:Application




[flexcoders] Lua Alchemy v0.1a Released

2008-12-22 Thread Robert Stehwien
Lua Alchemy is a port of the Lua programming language for ActionScript using
Alchemy.  Using v0.1a inside Flash/Flex you can create any ActionScript
class available at runtime, call functions, get/set properties on
ActionScript objects and use Lua functions as an ActionScript function
(including event listeners).

The project can be found here:
http://code.google.com/p/lua-alchemy/

A demo can be found here:
http://www.arcanearcade.com/Flex/LuaAlchemyDemoV.1a/index.html

The next version will include syntax sugar so instead of calling
as3.call(var, function, param) you could call var.function(param) and
similar calls to make calling ActionScript code look the same as calling Lua
code.


Re: [flexcoders] few compc questions

2008-12-22 Thread aaron smith
Yeah that -include-libraries worked. Strange as it isn't documented in
the compc help, or the online docs for compc. How did you come about
finding that?

Thanks for that tip about resource bundles.
-Aaron


On Fri, Dec 19, 2008 at 11:02 AM, Manish Jethani
manish.jeth...@gmail.com wrote:
 On Fri, Dec 19, 2008 at 3:36 PM, aaron smith
 beingthexemplaryli...@gmail.com wrote:
 -Does anyone know what the -include-resource-bundles switch does with
 compc?

 It includes the specified resource bundles and any dependencies.

 compc -output myResources_en_US.swc \
 -include-resource-bundles foo.bar.tooltips -locale=en_US

 Includes foo/bar/tooltips.properties. If you have any 'Embed' metadata
 in the properties file where you're including some other objects
 (SWFs, PNGs, etc.), those objects will be included too. Basically this
 is for compiling a resource bundle SWC in a specific locale. e.g.
 myResources_en_US.swc. You can then use this SWC to compile your main
 application by putting it in mxmlc's library path.

 -Why does compc expose all of the metadata switches and compiler
 switches when most don't apply?

 :-/

 -Is there a way to create a new swc, and include classes from other
 swcs in the new one?

 I think you can include _all_ classes from another SWC by using
 -include-libraries but I'm not sure about including specific classes.

 Manish

 


[flexcoders] Re: Issue with ExternalInterface in FireFox (Error calling method on NPObject)

2008-12-22 Thread valdhor
The link you provided works for me (All items on the page).

I am using Firefox 3.0.5 on Windows XP.


--- In flexcoders@yahoogroups.com, gireeshgiri gireeshkuma...@...
wrote:

 Hi
 
I am trying to communicate with javascript and Flex, but its not 
 working the way I want in FireFox. 
 
 What I wanted is, Clicking on a javascript link I need to open a File 
 Dialog box (new FileReference().browse()) from Flex. (I have a file 
 upload program in flex, and the link will be javascript to select the 
 files) but Its not working in Firefox, But I am able to do any other 
 operations using javvascript, only file dialog doesnt open. 
 
 I am getting the below error, When I checked, the call is coming to 
 Flex code but opening FileDialog failed. I tried all possible ways 
 but it didnt work. Any solution ?
 
 uncaught exception: Error calling method on NPObject! [plugin 
 exception: Error in Actionscript. Use a try/catch block to find 
 error.].
 
 
 You can try the program from the below location
 http://gireeshkumar.ind.in/demo/jsbridgetest/FileTest.html
 
 
 Thanks
 Gireesh





[flexcoders] Re: Write file to server

2008-12-22 Thread valdhor
Mike

You need to send your data to some kind of server side code (Eg. PHP).
From your code, you are sending data to a text file. A text file has
no idea what to do with the data you are sending it (Actually, the
text file doesn't even see the data - text files are very
unintelligent as files go) so does nothing. Your code does exactly
what you told it to. It made the request to load the file. Once the
request is made the complete event fires and you get your message.

What you need is some form of server to run code on. What server do
you have?



--- In flexcoders@yahoogroups.com, mccaffreymike mcc.m...@... wrote:

 Flex rookie here...
 
 Trying to read/change/write a text file on the server.
 
 Why doesn't this file save work?
 
 I'm able to use the URLRequest/URLLoader to read the file, but want 
 to write changes back to the file.
 
 I get the File saved message but the file is not updated.
 
 Thanks 
 
 //save the file 
 request = new URLRequest(C:\\temp.txt);
 request.method = URLRequestMethod.POST; 
 request.data = changedData;
 
 loader = new URLLoader();
   loader.addEventListener(Event.COMPLETE, 
 saveComplete);   
 loader.addEventListener(IOErrorEvent.IO_ERROR, onIOError);   
 
 try {
   loader.load(request);  
 }
 catch (e:Error){
   Alert.show(Error in loader.load + e.message);
 }
 
   }
 
 private function saveComplete(event:Event):void {   
 Alert.show(File saved); 
 }





[flexcoders] Re: Tree problems

2008-12-22 Thread Amy
--- In flexcoders@yahoogroups.com, Dan Vega danv...@... wrote:

 I would rather take that approach because there can be an infinite 
number of
 children and I want it to be fast. Thats why  Ithink loading when 
requested
 is better for this scenario. How can I tell the tree to refresh its 
view?

The approach I described actually will appear faster to the user than 
what you're doing, though it can be kind of a pain handling all the 
synchronization of events.

I haven't worked with trees before, but I suspect you'll need to wait 
for the result to come back and call openNode again (once it knows 
what's in the node).

HTH;

Amy



[flexcoders] Re: ActionScript RemoteObject - Trying to learn so please be patient :-)

2008-12-22 Thread Amy
--- In flexcoders@yahoogroups.com, wkolcz wko...@... wrote:

 Thanks, that cleared the error on the AS page! Of course now I am 
getting an error on my .mxml page.
 
 TypeError: Error #1009: Cannot access a property or method of a 
null object reference.
 at com.isavepets.projects::ProjectGateway/list()
 at ASRemoteObject/initApp()

I think you're misunderstanding how event handling works.  You can't 
set up a result handler on an rpc call and then set some other 
variable to the result of the function and think that when the result 
handler gets called it will somehow return a value to where it was 
called by some other code.

Try something like this:


ProjectGateway.as
package com.isavepets.projects
{
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.remoting.Operation;
import mx.rpc.remoting.RemoteObject;

public class ProjectGateway
{
private var _ro:RemoteObject=new RemoteObject();

public function ProjectGateway()
{
var RO:RemoteObject = new RemoteObject();
_ro.destination = ColdFusion;
_ro.source = com.isavepets.projects.projectGateway;
}

public function execute():ArrayCollection{
var token = _ro.list();
var ac=new ArrayCollection();
token.addResponder(list, faultHandler);
token.ac=ac;
return ac;
}
public function list():void{
e.token.ac.source=e.result as Array;
}

private function faultHandler(e:FaultEvent):void {
Alert.show(e.fault.message, 'Project Gateway Error');
}

}
}

Then:
mx:Script 
![CDATA[ 
import mx.collections.ArrayCollection; 
import com.isavepets.projects.ProjectGateway; 
import mx.events.CollectionEvent;

[Bindable] 
public var projectData:ArrayCollection;
public var ProjGateway:ProjectGateway = new ProjectGateway();; 

public function initApp():void { 
projectData = ProjGateway.execute();
projectData.addEventListener(CollectionEvent.COLLECTION_CHANGE, 
onLoad);
} 

private function onLoad():void{
//your data is ready to go
}
]] 
/mx:Script



[flexcoders] How to remove the nativeMenu?

2008-12-22 Thread markflex2007
Hi,

I try:

parentApplication.nativeWindow.menu = null;

or 

windowMenu.removeAllItems(); 


But the menu still show on the screen but only not functions.



Thanks

Mark



[flexcoders] Re: What kind of applications do you build with flex?

2008-12-22 Thread nathanpdaniel
http://flex.org/showcase/

--- In flexcoders@yahoogroups.com, Hyder hyder_...@... wrote:

 Seeing the physical size overhead that comes bundled with the flash 
 framework and the not so widespread use of framework caching as of 
 yet, I don't believe that the advantages of building complete 
websites 
 in flex outweigh its benefits.
 
 I'd like to get an idea to what kind of applications you folks really 
 build with flex... in what industry is flex normally used? Do you 
 build rias for the general audience or to a loyal / member audience?





[flexcoders] TrackHighlight Skin in HSlider?

2008-12-22 Thread Berkay Unal
Hi,

I have checked the documentation but could not find the relative skin
style for the trackhighlight?

Does anyone knows if it is possible to be changed?

Best
BUnal


Re: [flexcoders] Re: Write file to server

2008-12-22 Thread Alan

Do something like this server side:

?php
header('Content-type: text/csv');


//	$csvData = ($_POST['csvdata']) ? $_POST['csvdata'] :  
$_GET['csvdata'];

$csvData = $_POST['tsvString'];

echo  $csvData;
?

csvdata and tsvString are vars ( strings)  that I set in my  
flashvars


Alan

On Dec 22, 2008, at 8:56 AM, valdhor wrote:


You need to send your data to some kind of server side code (Eg. PHP).
From your code, you are sending data to a text file. A text file has
no idea what to do with the data you are sending it (Actually, the
text file doesn't even see the data - text files are very
unintelligent as files go) so does nothing. Your code does exactly
what you told it to. It made the request to load the file. Once the
request is made the complete event fires and you get your message.




[flexcoders] Re: TrackHighlight Skin in HSlider?

2008-12-22 Thread Berkay Unal
Hey Guys,

Sorry , i haven't seen it. Found it.

Best


On Mon, Dec 22, 2008 at 17:44, Berkay Unal berkayu...@gmail.com wrote:
 Hi,

 I have checked the documentation but could not find the relative skin
 style for the trackhighlight?

 Does anyone knows if it is possible to be changed?

 Best
 BUnal



[flexcoders] Re: Best practices for using custom service type with Cairngorm ServiceLocator

2008-12-22 Thread Michael VanDaniker
Frankly, using the ServiceLocator in the first place is far from a
best practice. In the past, I've done this to initialize my remote
objects:

var ro:RemoteObject =
RemoteObject(ServiceLocator.getInstance().getRemoteObject(ro));
ro.endpoint = myEndpoint;
ro.source = mySource;

You can do something similar for your HTTPServices when you know what
properties you want to set on them.

--- In flexcoders@yahoogroups.com, adamratcliffe2002 a...@... wrote:

 I have an AIR application which uses the Merapi bridge to
communicate with a local Java 
 application.  My service class wraps the bridge and I would like to
initialize this service 
 alongside the HTTPService I have defined in the ServiceLocator mxml.
 
 Should I extend the Cairngorm ServiceLocator to support my own
service interface as an 
 additional type or is there some better way of doing this?
 
 Cheers
 Adam





[flexcoders] Re: building a pie chart with XML data

2008-12-22 Thread Amy
--- In flexcoders@yahoogroups.com, flexnoob flexn...@... wrote:

 
 I am trying to construct a pie chart using XML data and the 
resulting
 chart is empty. Because I am using the trial version I do see the
 flex data visualization trial message. However, the pie chart
 does not appear. I have the xml file located in the src directory.
 
 
 
 My flex 3 code:
 
 
 
 ?xml version=1.0 encoding=utf-8?
 
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 
  creationComplete=rockstar.send()
 
 
 
  mx:HTTPService id=rockstar url=piebv.xml /
 
 
 
 
 
  mx:PieChart width=300 height=300 
 
  mx:series
 
  mx:PieSeries
 dataProvider={rockstar.lastResult.piebv.employee}

Try removing the piebv in the above line.

HTH;

Amy



[flexcoders] Re: building a pie chart with XML data

2008-12-22 Thread EddieBerman
Try this:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=absolute
creationComplete=rockstar.send()
mx:HTTPService id=rockstar url=xmldata.xml /
mx:PieChart width=300 height=300 
dataProvider={rockstar.lastResult.employees.employee} 
mx:series
mx:PieSeries 
field=sales labelField=name 
labelPosition=callout /
/mx:series
/mx:PieChart  
mx:Button label=fred/
/mx:Application


--- In flexcoders@yahoogroups.com, flexnoob flexn...@... wrote:

 
 I am trying to construct a pie chart using XML data and the 
resulting
 chart is empty. Because I am using the trial version I do see the
 flex data visualization trial message. However, the pie chart
 does not appear. I have the xml file located in the src directory.
 
 
 
 My flex 3 code:
 
 
 
 ?xml version=1.0 encoding=utf-8?
 
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 
  creationComplete=rockstar.send()
 
 
 
  mx:HTTPService id=rockstar url=piebv.xml /
 
 
 
 
 
  mx:PieChart width=300 height=300 
 
  mx:series
 
  mx:PieSeries
 dataProvider={rockstar.lastResult.piebv.employee}
 
  field=@sales labelField=@name
 labelPosition=callout /
 
  /mx:series
 
  /mx:PieChart
 
 
 
 /mx:Application
 
 
 
 
 
 My XML:
 
 
 
?xml version=1.0 encoding=utf-8 ?
 
  employees
 
  employee name=Doug sales=15 /
 
  employee name=Deepa sales=75000  /
 
  employee name=Darron sales=3  /
 
  employee name=Ben sales=6  /
 
  /employees





[flexcoders] Re: building a pie chart with XML data

2008-12-22 Thread EddieBerman
Try this (moved the dataprovider to the chart rather than the series 
and removed the @ before the field names)
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=absolute
creationComplete=rockstar.send()
mx:HTTPService id=rockstar url=piebv.xml /
mx:PieChart width=300 height=300 
dataProvider={rockstar.lastResult.employees.employee} 
mx:series
mx:PieSeries 
field=sales labelField=name 
labelPosition=callout /
/mx:series
/mx:PieChart  
/mx:Application


--- In flexcoders@yahoogroups.com, flexnoob flexn...@... wrote:

 
 I am trying to construct a pie chart using XML data and the 
resulting
 chart is empty. Because I am using the trial version I do see the
 flex data visualization trial message. However, the pie chart
 does not appear. I have the xml file located in the src directory.
 
 
 
 My flex 3 code:
 
 
 
 ?xml version=1.0 encoding=utf-8?
 
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 
  creationComplete=rockstar.send()
 
 
 
  mx:HTTPService id=rockstar url=piebv.xml /
 
 
 
 
 
  mx:PieChart width=300 height=300 
 
  mx:series
 
  mx:PieSeries
 dataProvider={rockstar.lastResult.piebv.employee}
 
  field=@sales labelField=@name
 labelPosition=callout /
 
  /mx:series
 
  /mx:PieChart
 
 
 
 /mx:Application
 
 
 
 
 
 My XML:
 
 
 
?xml version=1.0 encoding=utf-8 ?
 
  employees
 
  employee name=Doug sales=15 /
 
  employee name=Deepa sales=75000  /
 
  employee name=Darron sales=3  /
 
  employee name=Ben sales=6  /
 
  /employees





[flexcoders] Re: Write file to server

2008-12-22 Thread valdhor
Alan

We don't know, as yet, what server the OP is using.

Once we do we can offer some suggestions for what he wants to do.



--- In flexcoders@yahoogroups.com, Alan ultr...@... wrote:

 Do something like this server side:
 
 ?php
   header('Content-type: text/csv');
   
   
 //$csvData = ($_POST['csvdata']) ? $_POST['csvdata'] :  
 $_GET['csvdata'];
   $csvData = $_POST['tsvString'];
   
   echo  $csvData;
 ?
 
 csvdata and tsvString are vars ( strings)  that I set in my  
 flashvars
 
 Alan
 
 On Dec 22, 2008, at 8:56 AM, valdhor wrote:
 
  You need to send your data to some kind of server side code (Eg. PHP).
  From your code, you are sending data to a text file. A text file has
  no idea what to do with the data you are sending it (Actually, the
  text file doesn't even see the data - text files are very
  unintelligent as files go) so does nothing. Your code does exactly
  what you told it to. It made the request to load the file. Once the
  request is made the complete event fires and you get your message.





RE: [flexcoders] Re: SWF file format question - SymbolClass Tag

2008-12-22 Thread Alex Harui
The most common way to do this is to generate a link-report from the shell and 
use load-externs when building the sub-swf.

Keep in mind that by doing so you commit the sub-swf to be linked with and 
running the same version of Flex as the shell.  The Marshal Plan in Flex 3.2 is 
a way to build sub-swfs w/o requiring same versions.

-Original Message-
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of aaron smith
Sent: Sunday, December 21, 2008 1:00 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: SWF file format question - SymbolClass Tag

Hey Gordon,

The reason I wanted to remove a class was because I have two swfs - a
shell, and some other swfs, and didn't want the same class compiled
into every swf - thereby wasting K. So i was looking for a way to
manual remove a class from sub-swfs.

-A



On Sun, Dec 21, 2008 at 12:55 PM, aaron smith
beingthexemplaryli...@gmail.com wrote:
 Thanks, externs is pretty much what I was looking for.

 On Fri, Dec 19, 2008 at 9:02 PM, Alex Harui aha...@adobe.com wrote:
 There are three mxmlc options:



 -load-externs (removes all files listed from some other -link-report

 -compiler.external-library-path (remove all files from a SWC)

 -externs (removes a class)







 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Gordon Smith
 Sent: Friday, December 19, 2008 4:47 PM

 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Re: SWF file format question - SymbolClass Tag



 Also, I'm pretty sure that there is some compiler option you can use to
 prevent specific classes from getting linked in. That's a lot easier than
 trying to remove them after they've been linked in.



 Gordon Smith

 Adobe Flex SDK Team



 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Gordon Smith
 Sent: Friday, December 19, 2008 4:23 PM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Re: SWF file format question - SymbolClass Tag



 The AS3 classes are in the DoABC (or maybe a DoABC2?) tag.



 It seems unlikely that you could remove a class and still have the SWF work.
 If the class wasn't used by your application, the MXML compiler wouldn't
 have linked it in.



 Gordon Smith

 Adobe Flex SDK Team



 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of aaron smith
 Sent: Wednesday, December 17, 2008 3:24 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: SWF file format question - SymbolClass Tag



 Actually, I could be wrong. would it make more sense if it was the
 DoABC tag? There's a field on DoABC called ABCData - I would assume
 that's the bytecode. hmm. i'll keep looking arund. if anyone has any
 ideas hook me up.

 On Wed, Dec 17, 2008 at 1:44 PM, aaron smith
 beingthexemplaryli...@gmail.com wrote:
 Has anyone read through the SWF file format, and been able to decipher
 how exactly AS3 classes are compiled into the SWF? From reading
 through all of the control tags it seems it would be the SymbolClass
 tag. So, it would seem, I could rip out SymbolClass tags from the
 bytecode (for a specific class) - while keeping track of the new file
 length, then write the swf again and have a swf that doesn't include
 the definition for a particular class. Anyone else think that makes
 sense?

 Thanks


 




--
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] mailto from textarea in AIR application - line breaks fail in windows

2008-12-22 Thread cedar.rabbit
I have an AIR app that needs to open and pre-populate an email in the user's 
default email 
application. This is not difficult, see the application code I've provided at 
the end of this 
post.  

When you build this AIR app and run it on a mac, it works fine - any carriage 
returns you 
typed in the text area are displayed properly in apple mail and other mac email 
clients.  

When you build this AIR app and run it on a pc, it fails.  Only the text before 
the first 
carriage return is displayed.

I have tried the following:
1. forcing word wrapping in the text area
2. replacing new lines in the text (\n) with a windows return and new line 
(\r\n) using 
this regular expression: /\r\n/gm;

Any ideas or suggestions would be greatly appreciated!
Thanks






?xml version=1.0 encoding=utf-8?
mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=absolute width=800 height=600 backgroundColor=white

mx:Script
![CDATA[
import flash.net.navigateToURL;

private function onSend():void
{
var address:String = address;
var subject:String = subject;
var body:String = ta.text;

var sendURL:URLRequest = new 
URLRequest(mailto:+address+;?
subject=+subject+body=+body);
navigateToURL(sendURL);
}
]]
/mx:Script
mx:VBox width=100% height=100%
mx:TextArea id=ta width=100% height=100%/
mx:Button label=Send verticalCenter=0 horizontalCenter=0 
click=onSend()/
/mx:VBox

/mx:WindowedApplication



[flexcoders] Flex 3 checkbox as itemrenderer in datagrid, selected property boolean not working

2008-12-22 Thread jmsavoy

I have a checkbox as an itemrenderer in a datagrid as follows:

mx:DataGrid dataProvider={myArrayCollection}
 mx:columns
  mx:DataGridColumn headerText=Sent width=75
textAlign=center
   mx:itemRenderer
mx:Component
 mx:CheckBox click=data.Sent=!data.Sent
selected={data.Sent}/
/mx:Component
   /mx:itemRenderer
  /mx:DataGridColumn
 /mx:columns  

/mx:DataGrid

The dataProvider is an AC pulled and created from mysql db. This is trimmed
version of my datagrid, in the full version there are many other columns,
and they all display the correct data.

The value Sent is a text string either true or false. However, the
checkbox is always checked, regardless of the value of Sent being true
or false.

If I set all false values to NULL, i.e. not set in the database, then
those items do not display as checked - however this is not the desired
method, I would rather have them set to false and not NULL

Has anyone else seen this issue, or can anyone shed light on the problem?
Thanks !
-- 
View this message in context: 
http://www.nabble.com/Flex-3-checkbox-as-itemrenderer-in-datagrid%2C-%22selected%22-property-boolean-not-working-tp21131337p21131337.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Cairngorm Console: a new tool for debugging and monitoring Cairngorm Application

2008-12-22 Thread revel.julien
KapLab  http://lab.kapit.fr  has just released CairngormConsole
http://lab.kapit.fr/display/cairngormconsole/Cairngorm+Console :  a
new free tool for inspection of Cairngorm applications
It is a must have for Cairngorm users and for those who want to go
deeper into Cairngorm framework and see what happens behind the scene.



In its first 0.9.0 version, the console includes the following features:

* A log for all Cairngorm operations: commands, events, services, ...
* Watch the bindings in action at the ModelLocator level
* An inspection tree of the ModelLocator
* Running commands and commands history
* Running HTTPServices and services history
* Running HTTPServices and services history
* Stacktrace on all operations to pin-point starting line of code
* Object inspectors on data, such as command parameters, event
attributes, or services result
* Interoperability with KapInspect
http://lab.kapit.fr/display/kapinspect/Kap+Inspect : another great
KapLab debugging tool
You will find all these in the links listed below:

* KapLab Home http://lab.kapit.fr

*  CairngormConsole Home page
http://lab.kapit.fr/display/cairngormconsole/Cairngorm+Console
* Developer Guide
http://lab.kapit.fr/display/cairngormconsole/Developer+Guide
* Demo
http://lab.kapit.fr/demo/cairngormconsole/prod/CafeTownsend.html

* Forum http://lab.kapit.fr/display/forum/Cairngorm+Console

You will be able to report problems or ask for new features in our
forums, as new releases will be published on a regular basis.
Hopefully you will enjoy it and it will help you to maintain and develop
your applications with more ease and productivity

Oh, BTW, MC  HNY  [B-)]



[flexcoders] how to manage display of 2 images inside a VBox?

2008-12-22 Thread kearney_buskirk
Hi Flex Coders

The situation: a large photo jpg and a small text png are vertically 
constrained within a 
VBox. The small text png is positioned below the photo in the layout. 

The problem is the small file loads first at the top of the VBox and then is 
pushed down to 
its place at the bottom once the larger photo loads.

So how to program Flex to load the text file after the photo file? Or second 
choice would be 
for the text file to be constrained to load in its place.

Putting this within the opening VBox tag didn't work:

creationPolicy=queued
creationIndex=0

Thanks in advance for any help.

Kearney Buskirk



Re: [flexcoders] few compc questions

2008-12-22 Thread Manish Jethani
On Sat, Dec 20, 2008 at 1:13 AM, aaron smith
beingthexemplaryli...@gmail.com wrote:
 Yeah that -include-libraries worked. Strange as it isn't documented in
 the compc help, or the online docs for compc. How did you come about
 finding that?

I gave the '-help' option to compc on the commandline.

  bash$ compc -help include
  Adobe Flex Compiler (compc)
  Version 3.2.0 build 3958
  Copyright (c) 2004-2007 Adobe Systems, Inc. All rights reserved.

  -compiler.include-libraries [library] [...]
  alias -include-libraries
  a list of libraries (SWCs) to completely include in the SWF
  (repeatable)
  ...


-- 
http://manishjethani.com/


Re: [flexcoders] Re: Tree problems

2008-12-22 Thread Dan Vega
I appreciate the help! Does anyone have an example of this? I have a hard
time believing that I am the first person to attempt something like this.
For small sub directories it seems to be working fine but any large data set
does not work, you need to close the node and then re open it.


[flexcoders] Re: Flex 3 checkbox as itemrenderer in datagrid, selected property boolean not working

2008-12-22 Thread valdhor
I may be wrong (Someone correct me if I am)...

The built-in item renderer sees the field as a string and decides that
an empty string will be false and non-empty will be true for the
checkbox. It does not convert the string value of false to the
boolean value of false.

You will need to create a custom item renderer for that field.

See http://blogs.adobe.com/aharui/item_renderers/ for details.



--- In flexcoders@yahoogroups.com, jmsavoy jeremysa...@... wrote:

 
 I have a checkbox as an itemrenderer in a datagrid as follows:
 
 mx:DataGrid dataProvider={myArrayCollection}
  mx:columns
   mx:DataGridColumn headerText=Sent width=75
 textAlign=center
mx:itemRenderer
 mx:Component
mx:CheckBox click=data.Sent=!data.Sent
 selected={data.Sent}/
 /mx:Component
/mx:itemRenderer
   /mx:DataGridColumn
  /mx:columns
  

 /mx:DataGrid
 
 The dataProvider is an AC pulled and created from mysql db. This is
trimmed
 version of my datagrid, in the full version there are many other
columns,
 and they all display the correct data.
 
 The value Sent is a text string either true or false. However, the
 checkbox is always checked, regardless of the value of Sent being
true
 or false.
 
 If I set all false values to NULL, i.e. not set in the database, then
 those items do not display as checked - however this is not the
desired
 method, I would rather have them set to false and not NULL
 
 Has anyone else seen this issue, or can anyone shed light on the
problem?
 Thanks !
 -- 
 View this message in context:
http://www.nabble.com/Flex-3-checkbox-as-itemrenderer-in-datagrid%2C-%22selected%22-property-boolean-not-working-tp21131337p21131337.html
 Sent from the FlexCoders mailing list archive at Nabble.com.





[flexcoders] Selecting multiple rows in a grid using only mouse (using click and drag )

2008-12-22 Thread vivekanandraju
Hi,

I am trying to find a way in which multiples rows of a grid can be
selected using only the mouse.

I referred the material on flex documentation, and found that we have
use either the Shift or the CTRL key to select multiple rows.

Is there any way in which the users can click  drag their mouse on
the grid and select multiple rows?

Please advise.


thanks,
vivek.



Re: [flexcoders] Selecting multiple rows in a grid using only mouse (using click and drag )

2008-12-22 Thread Pedro Sena
I don't think that there is another way.

BUT what you could do is use checkboxes, so the user may specify the lines
that he wants.

Hope this helps,

Pedro Sena

On Mon, Dec 22, 2008 at 3:41 PM, vivekanandraju vivekanandr...@yahoo.comwrote:

   Hi,

 I am trying to find a way in which multiples rows of a grid can be
 selected using only the mouse.

 I referred the material on flex documentation, and found that we have
 use either the Shift or the CTRL key to select multiple rows.

 Is there any way in which the users can click  drag their mouse on
 the grid and select multiple rows?

 Please advise.

 thanks,
 vivek.

  




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


RE: [flexcoders] mailto from textarea in AIR application - line breaks fail in windows

2008-12-22 Thread Keith Reinfeld
Have you tried:  

 

escape(body)  

 

?

 

Regards, 

-Keith 
http://keithreinfeld.home.comcast.net
http://keithreinfeld.home.comcast.net/ 
 

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of cedar.rabbit
Sent: Monday, December 22, 2008 11:56 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] mailto from textarea in AIR application - line breaks
fail in windows

 

I have an AIR app that needs to open and pre-populate an email in the user's
default email 
application. This is not difficult, see the application code I've provided
at the end of this 
post. 

When you build this AIR app and run it on a mac, it works fine - any
carriage returns you 
typed in the text area are displayed properly in apple mail and other mac
email clients. 

When you build this AIR app and run it on a pc, it fails. Only the text
before the first 
carriage return is displayed.

I have tried the following:
1. forcing word wrapping in the text area
2. replacing new lines in the text (\n) with a windows return and new line
(\r\n) using 
this regular expression: /\r\n/gm;

Any ideas or suggestions would be greatly appreciated!
Thanks

?xml version=1.0 encoding=utf-8?
mx:WindowedApplication xmlns:mx=http://www.adobe.
http://www.adobe.com/2006/mxml com/2006/mxml 
layout=absolute width=800 height=600 backgroundColor=white

mx:Script
![CDATA[
import flash.net.navigateToURL;

private function onSend():void
{
var address:String = address;
var subject:String = subject;
var body:String = ta.text;

var sendURL:URLRequest = new URLRequest(mailto:+address+;?
subject=+subject+body=+body);
navigateToURL(sendURL);
}
]]
/mx:Script
mx:VBox width=100% height=100%
mx:TextArea id=ta width=100% height=100%/
mx:Button label=Send verticalCenter=0 horizontalCenter=0 
click=onSend()/
/mx:VBox

/mx:WindowedApplication

 



Re: [flexcoders] Re: Tree problems

2008-12-22 Thread Dan Vega
Ok,
I think I found the solution but it was basically through guessing, can
anyone tell me why I need both of these ?

tree.invalidateList();
tree.invalidateDisplayList();


Re: [flexcoders] Flex 3 checkbox as itemrenderer in datagrid, selected property boolean not working

2008-12-22 Thread Manish Jethani
On Mon, Dec 22, 2008 at 10:42 PM, jmsavoy jeremysa...@yahoo.com wrote:

 I have a checkbox as an itemrenderer in a datagrid as follows:


   mx:itemRenderer
mx:Component
 mx:CheckBox click=data.Sent=!data.Sent
 selected={data.Sent}/
/mx:Component
   /mx:itemRenderer


 The value Sent is a text string either true or false. However, the
 checkbox is always checked, regardless of the value of Sent being true
 or false.

   mx:Component
mx:CheckBox click=data.Sent=!data.Sent
selected={data.Sent == 'true'}/
   /mx:Component

You'll have to compare with the actual string true (as pointed out
by valdhor), because any non-empty string evaluates to true in AS3.

-- 
http://manishjethani.com/


Re: [flexcoders] how to manage display of 2 images inside a VBox?

2008-12-22 Thread Manish Jethani
On Mon, Dec 22, 2008 at 10:14 PM, kearney_buskirk
kear...@lightthrumedia.com wrote:

 The situation: a large photo jpg and a small text png are vertically 
 constrained within a
 VBox. The small text png is positioned below the photo in the layout.

 The problem is the small file loads first at the top of the VBox and then is 
 pushed down to
 its place at the bottom once the larger photo loads.

 So how to program Flex to load the text file after the photo file? Or second 
 choice would be
 for the text file to be constrained to load in its place.

 VBox
   Image source=... complete=smallImage.load() /
   Image source=... autoLoad=false /
 /VBox

On the complete event of the first one, you load the second.

 Putting this within the opening VBox tag didn't work:

 creationPolicy=queued
 creationIndex=0

creationPolicy is really for the container (VBox) itself, not for its
children. That is to say, it does not affect the order in which the
children are created. Moreover, here the issue is not that the second
one is _created_ before the first, it is that the image inside the
second one gets loaded before the first.

-- 
http://manishjethani.com/


[flexcoders] Re: mailto from textarea in AIR application - line breaks fail in windows

2008-12-22 Thread cedar.rabbit
Hi Keith

Thanks for the response.  Yes, I tried:

escape(ta.text)

which is the same thing as escaping the body var I would think.  It gave me 
the contents 
of all the text, but on a single line, i.e, without any carriage returns.  So 
one step closer, 
but still not perfect.



--- In flexcoders@yahoogroups.com, Keith Reinfeld keithreinf...@... wrote:

 Have you tried:  
 
  
 
 escape(body)  
 
  
 
 ?
 
  
 
 Regards, 
 
 -Keith 
 http://keithreinfeld.home.comcast.net
 http://keithreinfeld.home.comcast.net/ 
  
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of cedar.rabbit
 Sent: Monday, December 22, 2008 11:56 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] mailto from textarea in AIR application - line breaks
 fail in windows
 
  
 
 I have an AIR app that needs to open and pre-populate an email in the user's
 default email 
 application. This is not difficult, see the application code I've provided
 at the end of this 
 post. 
 
 When you build this AIR app and run it on a mac, it works fine - any
 carriage returns you 
 typed in the text area are displayed properly in apple mail and other mac
 email clients. 
 
 When you build this AIR app and run it on a pc, it fails. Only the text
 before the first 
 carriage return is displayed.
 
 I have tried the following:
 1. forcing word wrapping in the text area
 2. replacing new lines in the text (\n) with a windows return and new line
 (\r\n) using 
 this regular expression: /\r\n/gm;
 
 Any ideas or suggestions would be greatly appreciated!
 Thanks
 
 ?xml version=1.0 encoding=utf-8?
 mx:WindowedApplication xmlns:mx=http://www.adobe.
 http://www.adobe.com/2006/mxml com/2006/mxml 
 layout=absolute width=800 height=600 backgroundColor=white
 
 mx:Script
 ![CDATA[
 import flash.net.navigateToURL;
 
 private function onSend():void
 {
 var address:String = address;
 var subject:String = subject;
 var body:String = ta.text;
 
 var sendURL:URLRequest = new URLRequest(mailto:+address+;?
 subject=+subject+body=+body);
 navigateToURL(sendURL);
 }
 ]]
 /mx:Script
 mx:VBox width=100% height=100%
 mx:TextArea id=ta width=100% height=100%/
 mx:Button label=Send verticalCenter=0 horizontalCenter=0 
 click=onSend()/
 /mx:VBox
 
 /mx:WindowedApplication






Re: [flexcoders] FLVPlayback using a Tree Control

2008-12-22 Thread Manish Jethani
On Mon, Dec 22, 2008 at 5:31 AM, Jesse jtbr...@yahoo.com wrote:

 private function changeHandler(event:ListEvent):void
 {
 var selectedXML:XML = event.target.selectedItem as XML;

 if (selectedXML.name() == video)
 {
 xPhoto = selectedXML;
 }
 }
 private function nextFLV(e:Event):void
 {
 ?
 }
[snip]

See if this works:

  xPhoto.parent().child(xPhoto.childIndex() + 1)@source

Basically childIndex gives you the current index, parent gives you the
parent, and from there you can increment by 1 and get the next child
in the sequence.

-- 
http://manishjethani.com/


Re: [flexcoders] Re: mailto from textarea in AIR application - line breaks fail in windows

2008-12-22 Thread Manish Jethani
On Tue, Dec 23, 2008 at 1:01 AM, cedar.rabbit cedar.rab...@yahoo.com wrote:

 Thanks for the response.  Yes, I tried:

 escape(ta.text)

 which is the same thing as escaping the body var I would think.  It gave me 
 the contents
 of all the text, but on a single line, i.e, without any carriage returns.  So 
 one step closer,
 but still not perfect.


What happened to the carriage returns, did they get converted to spaces?

Try encodeURIComponent instead of escape.

-- 
http://manishjethani.com/


Re: [flexcoders] FlexTasks: Compc for Flash Player 10

2008-12-22 Thread Manish Jethani
On Mon, Dec 22, 2008 at 4:04 AM, Robert Stehwien rstehw...@gmail.com wrote:

 Also recommend you make sure you are using the 3.2+ SDK
 $ which compc
 /Applications/Adobe Flex Builder 3/sdks/3.2.0/bin/compc

Actually the version option will give you the version number.

 $ compc -version
 Version 3.2.0 build 3958

-- 
http://manishjethani.com/


[flexcoders] Creating UTF8 strings from hex bytes encoded as text

2008-12-22 Thread biosmonkey
I have a need to take a string that is encoded as hex bytes and decode
it into a utf8 string.

For example:
30 30 30 
would be 000

This works fine since chars 0x7f are standard ascii in utf8. The
problem is taking this concept and trying to decode a utf8 string with
bytes 0x7f.

For example, the sequence:
e8 8b b1 e8 aa 9e
should display two Japanese characters.

I do not know how to create a string with these values that will
display properly as utf8.  One problem is that I do not know how Flex
internally stores utf8 strings.  If I cut-and-paste the actual utf8
string from a file into Flex, the JA characters show up fine in the
editor, debugger and the application. 

[I am not sure if this will show up for you but let's try]
public var test:String=#33521;#35486;;

So clearly Flex can understand a sequence of bytes in a String object
as utf8.  But how to create it? If I try to create a string using the
bytes, it fails. For example

public var test2:String=\xe8\x8b\xb1\xe8\xaa\x9e;

does not display properly.  If I view these to vars in the debugger.
the test var is correct, whereas the test2 is junk.

I have not experimented with the ByteArray class, as I know there are
some utf8 specific functions, but why won't this work?  The MX file is
encoded as utf8, and as I said Flex understands utf8 strings just fine
so why can't I take each byte value and concatenate to get a utf8 string?






[flexcoders] Re: mailto from textarea in AIR application - line breaks fail in windows

2008-12-22 Thread cedar.rabbit
Manish

When I use escape() or encodeURIComponent I get the same results.  The 
following:

1
2
3
4
5

becomes a single string without line breaks, like this:

12345




 
 
 What happened to the carriage returns, did they get converted to spaces?
 
 Try encodeURIComponent instead of escape.
 
 -- 
 http://manishjethani.com/






[flexcoders] Reset a form

2008-12-22 Thread Jonathan Arnold
I have a fairly complicated modeless form. Once the user clicks Add, it should
send information based upon the current settings and then reset all the controls
to a known state. Is there any easy way to do this besides just hard coding all
the settings in a ResetForm function?

-- 
Jonathan Arnold   http://www.buddydog.org

Klingon multitasking systems do not support time-sharing. When a
Klingon program wants to run, it challenges the scheduler in hand-to-hand
combat and owns the machine.


Re: [flexcoders] Loading network SWFs from SWF hosted on filesystem (SWF is not a loadable module

2008-12-22 Thread Manish Jethani
On Sun, Dec 14, 2008 at 1:03 AM, hughesmatt78 hughes.m...@gmail.com wrote:

 A SWF file may also call Security.allowDomain() with the wildcard
 parameter * to allow any domain.
 This is necessary to allow a local-with-networking SWF file to
 cross-script a network SWF file.

[snip]

 SimpleModule.mxml (the module hosted at localhost)
 ?xml version=1.0 encoding=utf-8?
 mx:Module xmlns:mx=http://www.adobe.com/2006/mxml;
 initialize=Security.allowDomain('*') 
mx:Text text=Hi there /
 /mx:Module

The problem here is that the initialize event is dispatched _much
later_ in the cycle, so your allowDomain call never actually happens
-- you get an error before that. If you can find a way to call
allowDomain inside your module before it is intialized, this can work.
I don't think there's a way though: normally you'd call allowDomain in
the module's constructor, but there's no constructor here.

Even if you succeeded in calling allowDomain with a *, you would be
opening up a potential security hole in your app. So I would go with
Alex's suggestion and try loading off the same host.

-- 
http://manishjethani.com/


Re: [flexcoders] Rendering Problem

2008-12-22 Thread Manish Jethani
On Mon, Dec 1, 2008 at 6:06 AM, Rafael Faria
rafaelfaria.gru...@gmail.com wrote:

 What could be causing problems with rendering?! I have this
 application that every now and than flicks, the background goes white
 for a second than get back to normal. Its not really something in
 particular because that happens in a couple of components i create.

 One in particular that do pretty much the same as the date, opening a
 popup on the side, but everytime i open that i get this flickering
 problem.

Are your custom components doing anything special with styles? I
remember the Flex documentation used to recommend a way of setting up
styles for a custom component that actually caused the entire
application to get redrawn when the component was loaded for the first
time.

There could be any number of reasons for the flickering, so without
knowing what your components are doing it's hard to say.

-- 
http://manishjethani.com/


[flexcoders] Is there a way to tie a popup window to an object on a window such that...

2008-12-22 Thread Libby
Hi, FlexCoders!

Is there a way to tie a modal popup window to a parent object on a
window such that no matter how the other objects on the window move
around, the popup sticks or follows the parent object? The
PopupManager CenterPopUp() is not working, it centers at 0,0. I'm
thinking maybe because I need to move my popup into another layer or
something...

Thanks,
Libby



Re: [flexcoders] Creating UTF8 strings from hex bytes encoded as text

2008-12-22 Thread Manish Jethani
On Tue, Dec 23, 2008 at 2:35 AM, biosmonkey biosmon...@yahoo.com wrote:
 I have a need to take a string that is encoded as hex bytes and decode
 it into a utf8 string.

 For example, the sequence:
 e8 8b b1 e8 aa 9e
 should display two Japanese characters.

You could do this:

  var s:String = decodeURIComponent(%e8%8b%b1%e8%aa%9e);
  trace(s);

Or try the ByteArray class (probably better).

-- 
http://manishjethani.com/


[flexcoders] Re: Creating UTF8 strings from hex bytes encoded as text

2008-12-22 Thread biosmonkey

I'll reply to you and my own post, as the solution was indeed the
ByteArray class.

It was quite simple actually


1) create a bytearray 
2) writebyte each value into the bytearray
3) output by using by the toString function

Data was correctly decoded from the bytearray as a utf8 string, and it
worked the first time.  Wish I had known this 8 hours ago

I still am not clear on why I had so much trouble with trying to use
strings (why can't I just concatenate the codes?), but this works so
I'm not really going to investigate it any further!

Thanks




[flexcoders] Wrapping Text in Alert

2008-12-22 Thread Stephen More
Is there an easy way to get text inside of a mx.controls.Alert to wrap ?

-Thanks
Steve More


Re: [flexcoders] Wrapping Text in Alert

2008-12-22 Thread Manish Jethani
On Tue, Dec 23, 2008 at 3:54 AM, Stephen More stephen.m...@gmail.com wrote:
 Is there an easy way to get text inside of a mx.controls.Alert to wrap ?

It already wraps.

  mx:Button click=Alert.show('The quick brown fox jumped over the
wall. The quick brown fox jumped over the wall. ...') /

Perhaps you want to reduce the width of the box?

-- 
http://manishjethani.com/


Re: [flexcoders] Re: Creating UTF8 strings from hex bytes encoded as text

2008-12-22 Thread Manish Jethani
On Tue, Dec 23, 2008 at 3:53 AM, biosmonkey biosmon...@yahoo.com wrote:

 I still am not clear on why I had so much trouble with trying to use
 strings (why can't I just concatenate the codes?), but this works so
 I'm not really going to investigate it any further!

Concatenating the bytes is exactly what you're doing with ByteArray.
You stuff the bytes into a single array and then read the entire array
as a UTF-8 string.

The String class does not do UTF-8 encoding/decoding itself, or you
would be able to just stuff the data directly into a String object and
print it out afterwards.

-- 
http://manishjethani.com/


Re: [flexcoders] FlexTasks: Compc for Flash Player 10

2008-12-22 Thread Tyler Kocheran
I'm aware that I can do compc on commandline with FP10, but is it possible
yet to do it in FlexTasks for Ant? I haven't looked at the Flex 4 SDK yet,
I've just been getting nightly builds of 3.

On Mon, Dec 22, 2008 at 12:39 PM, Manish Jethani
manish.jeth...@gmail.comwrote:

   On Mon, Dec 22, 2008 at 4:04 AM, Robert Stehwien 
 rstehw...@gmail.comrstehwien%40gmail.com
 wrote:

  Also recommend you make sure you are using the 3.2+ SDK
  $ which compc
  /Applications/Adobe Flex Builder 3/sdks/3.2.0/bin/compc

 Actually the version option will give you the version number.

 $ compc -version
 Version 3.2.0 build 3958

 --
 http://manishjethani.com/
  




-- 
And do this, knowing the time, that now it is high time to awake out of
sleep;
for now our salvation is nearer than when we first believed.


Re: [flexcoders] Re: Passing URLVariables from 1 Flex App to another?

2008-12-22 Thread Rick Winscot
I just saw this... and had to respond. Is there a reason you aren¹t using
the Ajax approach to Spring Security? If you did ­ you wouldn¹t have to be
thinking of your app in Œpieces.¹

Rick Winscot


On 9/22/08 11:37 AM, djohnson29 djohnso...@yahoo.com wrote:

  
  
 
 Thanks for your suggestions.  The reason I want Login to be a separate
 application is because I am using Spring Security to secure the app.
 Therefore, Login.mxml I want to be accessible to everyone, but in
 order to access Main.mxml the user will have to have the required
 Spring Security ROLE to be able to access it.
 
 I was able to get this to work but not by passing the logged in values
 to the 2nd app.  Instead, upon a successful login I load Main.mxml and
 in the 2nd app's creationComplete event I use an HTTP service to call
 a java delegate class which talks to Spring Security directly and
 fetches the login info again.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ,
 djohnson29 djohnso...@... wrote:
 
  I have 2 Flex Applications, Login.mxml and Main.mxml.  Login.mxml
  handles the use Login and upon a successful authentication (with
  Spring Security), I want to load Main.mxml (Main.html which contains
  Main.swf)
  
  After a successfully logging in with spring security, from Login.mxml
  I load the main app like so:
  
  
  var url:URLRequest = new URLRequest(Main.html);
  var uv:URLVariables = new URLVariables();
  url.method = POST;
  uv.UserName = username;  // string var
  navigateToURL(url,_self);
  
  Main.html (containing Main.swf) loads successfully, but I am unable to
  extract the desired parameters.  I want to pass the logged in user
  info from Login to Main.
  
  How do I access these URLVariables from the newly loaded Application?
  
  What is the best (simplest!) way to do this?
  
  Thanks
 
 
  
 



RE: [flexcoders] Re: Creating UTF8 strings from hex bytes encoded as text

2008-12-22 Thread Alex Harui
You successfully concatenated codes.  You can't concatenate bytes because Flash 
is platform independent and doesn't want to expose the dirty details of its 
string implementation.

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of biosmonkey
Sent: Monday, December 22, 2008 2:23 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Creating UTF8 strings from hex bytes encoded as text


I'll reply to you and my own post, as the solution was indeed the
ByteArray class.

It was quite simple actually

1) create a bytearray
2) writebyte each value into the bytearray
3) output by using by the toString function

Data was correctly decoded from the bytearray as a utf8 string, and it
worked the first time. Wish I had known this 8 hours ago

I still am not clear on why I had so much trouble with trying to use
strings (why can't I just concatenate the codes?), but this works so
I'm not really going to investigate it any further!

Thanks



RE: [flexcoders] Reset a form

2008-12-22 Thread Alex Harui
If you use a data model, you can reassign the model to a new instance of the 
model class.

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Jonathan Arnold
Sent: Monday, December 22, 2008 1:25 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Reset a form


I have a fairly complicated modeless form. Once the user clicks Add, it should
send information based upon the current settings and then reset all the controls
to a known state. Is there any easy way to do this besides just hard coding all
the settings in a ResetForm function?

--
Jonathan Arnold http://www.buddydog.org

Klingon multitasking systems do not support time-sharing. When a
Klingon program wants to run, it challenges the scheduler in hand-to-hand
combat and owns the machine.



RE: [flexcoders] how to manage display of 2 images inside a VBox?

2008-12-22 Thread Alex Harui
Did you try resizeToContent=true?

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Manish Jethani
Sent: Monday, December 22, 2008 12:09 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] how to manage display of 2 images inside a VBox?


On Mon, Dec 22, 2008 at 10:14 PM, kearney_buskirk
kear...@lightthrumedia.commailto:kearney%40lightthrumedia.com wrote:

 The situation: a large photo jpg and a small text png are vertically 
 constrained within a
 VBox. The small text png is positioned below the photo in the layout.

 The problem is the small file loads first at the top of the VBox and then is 
 pushed down to
 its place at the bottom once the larger photo loads.

 So how to program Flex to load the text file after the photo file? Or second 
 choice would be
 for the text file to be constrained to load in its place.

VBox
Image source=... complete=smallImage.load() /
Image source=... autoLoad=false /
/VBox

On the complete event of the first one, you load the second.

 Putting this within the opening VBox tag didn't work:

 creationPolicy=queued
 creationIndex=0

creationPolicy is really for the container (VBox) itself, not for its
children. That is to say, it does not affect the order in which the
children are created. Moreover, here the issue is not that the second
one is _created_ before the first, it is that the image inside the
second one gets loaded before the first.

--
http://manishjethani.com/



RE: [flexcoders] Is there a way to tie a popup window to an object on a window such that...

2008-12-22 Thread Tracy Spratt
You need to find the event(s) that fire during the move around
activity, then in the handler(s)  move the pop-up.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Libby
Sent: Monday, December 22, 2008 4:44 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Is there a way to tie a popup window to an object
on a window such that...

 

Hi, FlexCoders!

Is there a way to tie a modal popup window to a parent object on a
window such that no matter how the other objects on the window move
around, the popup sticks or follows the parent object? The
PopupManager CenterPopUp() is not working, it centers at 0,0. I'm
thinking maybe because I need to move my popup into another layer or
something...

Thanks,
Libby

 



[flexcoders] Display only part of a canvas??

2008-12-22 Thread jmfillman
I have a Canvas that with a height of 3000. For some users, I only want 
them to be able to view and scroll a portion of the height of the 
canvas, say 1200-2200. It can vary from user to user, and some will 
need to see the entire height. I'm at a loss as to whether or not this 
is even possible, and if so, how.



Re: [flexcoders] Re: Issue with ExternalInterface in FireFox (Error calling method on NPObject)

2008-12-22 Thread Gireesh Kumar
Hi,

  what version of Flash player you have ? I am using Flash player 10.

-Gireesh

On Mon, Dec 22, 2008 at 6:43 PM, valdhor valdhorli...@embarqmail.comwrote:

   The link you provided works for me (All items on the page).

 I am using Firefox 3.0.5 on Windows XP.

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 gireeshgiri gireeshkuma...@...
 wrote:

 
  Hi
 
  I am trying to communicate with javascript and Flex, but its not
  working the way I want in FireFox.
 
  What I wanted is, Clicking on a javascript link I need to open a File
  Dialog box (new FileReference().browse()) from Flex. (I have a file
  upload program in flex, and the link will be javascript to select the
  files) but Its not working in Firefox, But I am able to do any other
  operations using javvascript, only file dialog doesnt open.
 
  I am getting the below error, When I checked, the call is coming to
  Flex code but opening FileDialog failed. I tried all possible ways
  but it didnt work. Any solution ?
 
  uncaught exception: Error calling method on NPObject! [plugin
  exception: Error in Actionscript. Use a try/catch block to find
  error.].
 
 
  You can try the program from the below location
  http://gireeshkumar.ind.in/demo/jsbridgetest/FileTest.html
 
 
  Thanks
  Gireesh
 

  




-- 
Gireesh Kumar G
http://gireeshkumar.ind.in/


Re: [flexcoders] Wrapping Text in Alert

2008-12-22 Thread Stephen More
On Mon, Dec 22, 2008 at 5:39 PM, Manish Jethani
manish.jeth...@gmail.com wrote:
 Is there an easy way to get text inside of a mx.controls.Alert to wrap ?

 It already wraps.

 mx:Button click=Alert.show('The quick brown fox jumped over the
 wall. The quick brown fox jumped over the wall. ...') /

 Perhaps you want to reduce the width of the box?

Here is a little background, my flex application is really small
width 125 x height 300.

I would like the Alert box to be slightly smaller than the flex application.

import mx.controls.Alert;
import mx.managers.PopUpManager;

private function showAlert() : void
{
var myAlert:Alert = Alert.show('The quick brown fox
jumped over the wall. The quick brown fox jumped
 over the wall. ...');
myAlert.width = Application.application.width - 20;
PopUpManager.centerPopUp( myAlert );
}

The text is wrapping in your example, but it does wrap tight enough as
it is overflowing the edges.
How can the text wrap such that all text will fall within myAlert.width ?

I am attaching a screen shot.

-Steve
attachment: alert.png

Re: [flexcoders] Re: Issue with ExternalInterface in FireFox (Error calling method on NPObject)

2008-12-22 Thread Anirudh Sasikumar
Hi Gireesh,

You may be running into the new security restriction in flash player
10 that FileReference.browse() and FileReference.download() can only
be called only from ActionScript that originates from user
interaction.

Read more about it
http://www.adobe.com/devnet/flashplayer/articles/fplayer10_security_changes_02.html#head3
and http://theflashblog.com/?p=423

Cheers,
-- 
Anirudh Sasikumar
http://anirudhs.chaosnet.org/

On Tue, Dec 23, 2008 at 8:12 AM, Gireesh Kumar gireeshkuma...@gmail.com wrote:
 Hi,

   what version of Flash player you have ? I am using Flash player 10.

 -Gireesh


Re: [flexcoders] Display only part of a canvas??

2008-12-22 Thread Paul Andrews
- Original Message - 
From: jmfillman jmfill...@verizon.net
To: flexcoders@yahoogroups.com
Sent: Tuesday, December 23, 2008 12:11 AM
Subject: [flexcoders] Display only part of a canvas??


I have a Canvas that with a height of 3000. For some users, I only want
 them to be able to view and scroll a portion of the height of the
 canvas, say 1200-2200. It can vary from user to user, and some will
 need to see the entire height. I'm at a loss as to whether or not this
 is even possible, and if so, how.

You can't scroll part of a Canvas, but you can mask a Canvas so that only 
part of the camvas is visible. Check out
the mask property for canvas and using masks in general (it's not specific 
to a canvas). 



Re: [flexcoders] Re: Issue with ExternalInterface in FireFox (Error calling method on NPObject)

2008-12-22 Thread Gireesh Kumar
Ops, Yes I think this is the issue.  So It means I need to put the Browse
link in the Flex file, Is there is any other option to get the outside
(html) link working for File browse dialog ?

-Gireesh

On Tue, Dec 23, 2008 at 10:03 AM, Anirudh Sasikumar 
anirudhsasiku...@gmail.com wrote:

   Hi Gireesh,

 You may be running into the new security restriction in flash player
 10 that FileReference.browse() and FileReference.download() can only
 be called only from ActionScript that originates from user
 interaction.

 Read more about it

 http://www.adobe.com/devnet/flashplayer/articles/fplayer10_security_changes_02.html#head3
 and http://theflashblog.com/?p=423

 Cheers,
 --
 Anirudh Sasikumar
 http://anirudhs.chaosnet.org/


 On Tue, Dec 23, 2008 at 8:12 AM, Gireesh Kumar 
 gireeshkuma...@gmail.comgireeshkumar.g%40gmail.com
 wrote:
  Hi,
 
  what version of Flash player you have ? I am using Flash player 10.
 
  -Gireesh
  




-- 
Gireesh Kumar G
http://gireeshkumar.ind.in/


RE: [flexcoders] Display only part of a canvas??

2008-12-22 Thread Alex Harui
Couldn't you just put in two Canvases where the scrolling items go in one and 
the fixed ones go in another?

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Paul Andrews
Sent: Monday, December 22, 2008 8:56 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Display only part of a canvas??


- Original Message -
From: jmfillman jmfill...@verizon.netmailto:jmfillman%40verizon.net
To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
Sent: Tuesday, December 23, 2008 12:11 AM
Subject: [flexcoders] Display only part of a canvas??

I have a Canvas that with a height of 3000. For some users, I only want
 them to be able to view and scroll a portion of the height of the
 canvas, say 1200-2200. It can vary from user to user, and some will
 need to see the entire height. I'm at a loss as to whether or not this
 is even possible, and if so, how.

You can't scroll part of a Canvas, but you can mask a Canvas so that only
part of the camvas is visible. Check out
the mask property for canvas and using masks in general (it's not specific
to a canvas).