[flexcoders] TLF code hints in Flex 3

2009-10-19 Thread Josh On
I have one installation of Flash Builder Beta 2 and on a different computer
I have a version of Flex Builder 3. 

I have an Actionscript project which uses TextLayout.

Everything works perfectly in Flash Builder Beta 2.

In the Flex 3 installation I am pointing to the Beta 2 sdk: 10485. It
compiles using ant - however, the code hints and syntax checking do not find
certain classes - e.g. ParagraphElement (all other classes in
flashx.textLayout.elements package are available as code hints).  It is as
if it is pointed to the wrong textLayout.swc - however in the build path
libraries it is pointing to the correct sdk file (and textLayout.swc is
there with suspiciously little information available about it). Is there
something else that might be causing code hinting oddities?

 

Thanks,

 

Josh



RE: [SPAM] [flexcoders] problem XML selection functions

2009-10-19 Thread Tracy Spratt
If that is in-line mxml code then you need to use entity encoding: &  Or
do the work in an AS code block.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of David Pariente
Sent: Monday, October 19, 2009 7:08 PM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] problem XML selection functions

 

  

Hi all,

I select 1 element from an XML

ab_XML.about.(lang=='e').desc

does the work, but actually i need it to compare another element:

ab_XML.about.(lang=='e' && web=='g').desc

But complains about the & symbol...

i saw an example like this with the hasOwnProperty function, in the flex 
help...

I don't know if what i'm trying can be done...i really need to get the 
data in one line, if possible.

Thanks a lot, i was googlering but couldn't find things like this, all 
examples i see it's with one comparison only.

ty,
David Pariente





[flexcoders] Re: Question for Math guys/girls

2009-10-19 Thread flexaustin
Good points.  I guess it would need to be percentage based as I didn't think 
about them shrinking the line past the point, duh. 

Yes the length and angle of the line can change at any time. Also I am not 
placing a marker in the same mc or sprite, but rather a popup on the mainstage 
needs to hover over that point on the line.

J

--- In flexcoders@yahoogroups.com, Charles Parcell  wrote:
>
> Does the angle of the line ever change? Or is it always 45 or 0? If the
> angle changes then the X coordinate will change for any points on the line.
> 
> I hope that you are not scaling a MC to grow/shrink the line.  Rather you
> should be drawing the line with every mouse move event (or whatever method
> you are using to allow user interaction).
> 
> Charles P.
> 
> 
> On Mon, Oct 19, 2009 at 6:23 PM, Netaman  wrote:
> 
> > What if the user should make the line shorter then 100 pixels does the
> > marker go away, I don't think it's math more like an array collection of
> > markers. You save the x,y coordinates of the marker, as the line gets bigger
> > or smaller you replace the markers that fit on the line from the array's x,y
> > coordinates... Add an click event listener to your container with the line,
> > then create a function to add the x,y coordinates to an array. Without a
> > code example I can only guess what you are trying to accomplish. You can
> > create a timer to refresh your container with the markers from the array, or
> > generate another event when the line changes length, or you add another
> > marker.
> >
> > Do you have any code to share?
> >
> > Randy
> >
> > --- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
> > >
> > > I have a line which can be horizontal or diagnol, and the user can make
> > it longer or short by dragging an end.
> > >
> > > If the user should click anywhere on the line I need to keep track of
> > this and place a marker or callout over this clicked spot on the line at all
> > times.  So if the user clicks say 1/4, say 100 pixels from the bottom of the
> > line) the way down from the top left of a diagonal line I need to put a
> > marker there. Then if the user drags the line to make it twice as long I
> > still need that marker to be in the same spot.
> > >
> > > How would I do this math wise?  And no I don't want it to be a percentage
> > of the length of the line. Meaning I always want the spot to be 100 pixels
> > from bottom of the line.
> > >
> > > TIA, J
> > >
> >
> >
> >
> >
> > 
> >
> > --
> > 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
> >
> >
> >
> >
>




Re: [flexcoders] Re: Question for Math guys/girls

2009-10-19 Thread Charles Parcell
Does the angle of the line ever change? Or is it always 45 or 0? If the
angle changes then the X coordinate will change for any points on the line.

I hope that you are not scaling a MC to grow/shrink the line.  Rather you
should be drawing the line with every mouse move event (or whatever method
you are using to allow user interaction).

Charles P.


On Mon, Oct 19, 2009 at 6:23 PM, Netaman  wrote:

> What if the user should make the line shorter then 100 pixels does the
> marker go away, I don't think it's math more like an array collection of
> markers. You save the x,y coordinates of the marker, as the line gets bigger
> or smaller you replace the markers that fit on the line from the array's x,y
> coordinates... Add an click event listener to your container with the line,
> then create a function to add the x,y coordinates to an array. Without a
> code example I can only guess what you are trying to accomplish. You can
> create a timer to refresh your container with the markers from the array, or
> generate another event when the line changes length, or you add another
> marker.
>
> Do you have any code to share?
>
> Randy
>
> --- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
> >
> > I have a line which can be horizontal or diagnol, and the user can make
> it longer or short by dragging an end.
> >
> > If the user should click anywhere on the line I need to keep track of
> this and place a marker or callout over this clicked spot on the line at all
> times.  So if the user clicks say 1/4, say 100 pixels from the bottom of the
> line) the way down from the top left of a diagonal line I need to put a
> marker there. Then if the user drags the line to make it twice as long I
> still need that marker to be in the same spot.
> >
> > How would I do this math wise?  And no I don't want it to be a percentage
> of the length of the line. Meaning I always want the spot to be 100 pixels
> from bottom of the line.
> >
> > TIA, J
> >
>
>
>
>
> 
>
> --
> 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
>
>
>
>


Re: [flexcoders] Flex 4 Autocomplete

2009-10-19 Thread Jeffry Houser


I have a version of the Flextras AutoCompleteComboBox compiled against 
the Flex 4 SDK; but we haven't been distributing it. 

It is not built from scratch using the Spark Architecture, though.  It 
just uses the Halo Architecture compiled against the new SDK.


More info on the Flextras AutoCompleteComboBox is here: 
http://www.flextras.com/?event=ProductHome&ProductID=10
But, if you want the Flex 4 version, you have to ask for it. 


bobby_world wrote:
 

Anyone know of an Autocomplete component for Flex 4? I want to use it 
with a TextInput control. I want something imilar to the Google search 
box in Firefox.


Bobby




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



RE: [flexcoders] Re: How to get class definition from a loaded module?

2009-10-19 Thread Alex Harui
yes

Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of tnajaryan
Sent: Monday, October 19, 2009 10:28 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How to get class definition from a loaded module?




Thanks for explanation.

Yes, I know the name of the class. Do you mean to call create() on 
IFlexModuleFactory?

Thanks.

--- In flexcoders@yahoogroups.com, Alex 
Harui  wrote:
>
> Modules and popups are exceptions to the .root documentation because they are 
> not parented by the main class in the SWF. In the case of modules, you 
> typically instantiate an object and parent it somewhere in your main app's 
> containers, even ModuleLoader.
>
> If you know the name of the class, use factory.create(className) to get the 
> instance.
>
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.
> Blog: http://blogs.adobe.com/aharui
>



[flexcoders] Flex 4 Autocomplete

2009-10-19 Thread bobby_world
Anyone know of an Autocomplete component for Flex 4? I want to use it with a 
TextInput control.  I want something imilar to the Google search box in Firefox.

Bobby



[flexcoders] regex issue when validating unicode range

2009-10-19 Thread Matt Muller
Hi there,

issue with regex when trying to test if a char is within a unicode range

var testIsArabic:Boolean = /\u0627/.test(str.charAt(0)); // this works
testing for arabic chars of unicode 0627

var testIsArabic:Boolean = /[\u0627-\u]/.test(str.charAt(0));  this
range does not work, returns false

NOTE: the str.charAt(0) is 0627

any ideas?

cheers,

MaTT


[flexcoders] Re: How to get class definition from a loaded module?

2009-10-19 Thread tnajaryan


Thanks for explanation.

Yes, I know the name of the class. Do you mean to call create() on 
IFlexModuleFactory? 

Thanks.


--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Modules and popups are exceptions to the .root documentation because they are 
> not parented by the main class in the SWF.  In the case of modules, you 
> typically instantiate an object and parent it somewhere in your main app's 
> containers, even ModuleLoader.
> 
> If you know the name of the class, use factory.create(className) to get the 
> instance.
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.
> Blog: http://blogs.adobe.com/aharui
> 



[flexcoders] Re: How to get class definition from a loaded module?

2009-10-19 Thread tnajaryan


OK, this almost works as I want. I can call 
ModuleManager.getAssociatedFactory(obj) to get IFlexModuleFactory and then call 
create(className) to create an instance. 

However it would be even better if I could get a class definition to avoid 
refactoring my program where the flow is like this:

var cls: Class = get-class-by-name(className);
// pass cls to some other function...
var obj: Object = new cls();

While debugging I noticed that IFlexModuleFactory is actually an instance of 
FlexModuleFactory which is not in Flex documentation. This FlexModuleFactory 
has a nice public function getDefinitionByName() which returns exactly what I 
need.

Any reason why is FlexModuleFactory undocumented?

I tried the following sequence and it works perfectly:

var factory: IFlexModuleFactory = ModuleManager.getAssociatedFactory(obj);
var classRef:Class = 
Class(FlexModuleFactory(factory).getDefinitionByName(className));

Is the omission of FlexModuleFactory from documentation intentional?

Thanks a lot!



[flexcoders] Re: How to get class definition from a loaded module?

2009-10-19 Thread tnajaryan


test reply. ignore this.



[flexcoders] Re: How to get class definition from a loaded module?

2009-10-19 Thread tnajaryan


Source is here: http://www.riatest.com/downloads/ModuleProblem.zip

If you uncomment line 13 in ModuleLoaderApp.mxml it will load the module in the 
application domain and everything works fine. However if you comment out this 
line and the module is loaded by default without overriding the domain then 
there is no way to get class definition.

Thanks a lot for looking.


--- In flexcoders@yahoogroups.com, "valdhor"  wrote:
>
> I'm willing to take a look. Can you post the code?
> 
> 
> 
> --- In flexcoders@yahoogroups.com, "tnajaryan"  wrote:
> >
> > I am trying to get class definition from a loaded module using 
> > ApplicationDomain.getDefinition(). I need it to be able to instantiate an 
> > object of that class using operator new.
> > 
> > When the module is loaded in the currentDomain of loader application 
> > everything is fine. I can get the definition using 
> > ApplicationDomain.currentDomain.getDefinition(className) call.
> > 
> > However when the module is loaded by default (not in the loader application 
> > domain) I cannot seem to be able to get the definition no matter what I 
> > try. 
> > 
> > The ApplicationDomain.currentDomain.getDefinition(className) throws and 
> > exception. I tried getting the correct domain using 
> > child.root.loaderInfo.applicationDomain, where child is an object from the 
> > loaded module. This still does not work since it returns the same domain. 
> > 
> > What is even strange is that child.root refers to the top-most application 
> > which seems to contradict to what is written in Flex docs for "root" 
> > property: 
> > "For a display object in a loaded SWF file, the root property is the 
> > top-most display object in the portion of the display list's tree structure 
> > represented by that SWF file." (See 
> > http://livedocs.adobe.com/flex/3/langref/flash/display/DisplayObject.html#root)
> > 
> > Doesn't this mean that "root" should refer to the Module in this case? If 
> > "root" refers to top-most application how do I get the correct domain given 
> > a DisplayObject from the module? 
> > 
> > Anyway, I am unable to find ANY way to get the class definition from the 
> > module using the class name. Any ideas?
> > 
> > Full source code of a trivial sample application that demonstrates the 
> > problem is available if anyone wants to have a look.
> > 
> > Thanks.
> >
>




[flexcoders] PHP service classes in a different directory besides Weborb's Services dir

2009-10-19 Thread Keith Sutton
Weborb seems to restrict you to putting service classes in the /Services 
directory. It would be nice in some cases to have an applications service 
classes in a subdirectory of the deployed application directory (i.e 
www.myhost.com/myApp/PHP/MyService.php). Has anyone successfully done this ? 
What -config.xml file magic have you used ?



RE: [flexcoders] 2 strange issues for begginer in action script ref

2009-10-19 Thread Gordon Smith
Issue 1: It looks like you want to create a Flex button. If so, you want 
mx.controls.Button, not mx.core.ButtonAsset. But you can't take a Flex Button 
and have it work inside a plain old Sprite, which is what a pure 
ActionScript-based app is. Flex is an application framework, and Flex controls 
expect to be inside of Flex containers. So you have to start by creating, in 
MXML, an  or an . Once you have that, you can do 
everything else in AS rather than MXML if you really don't like MXML. But it's 
a lot easier to just write .

Issue 2: Again, it looks like your problem is that you're expecting Flex 
controls to work inside of pure ActionScript apps.

Gordon Smith
Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of dennis
Sent: Friday, October 09, 2009 12:09 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] 2 strange issues for begginer in action script ref


Hello... I am new to action script and I am (pretty) confused... so any help is 
valuable!!!

--- issue 1 
-
I have the follow code... and I get blank page... nothing is appeared on the 
stage at all!!! For god's sake, what is wrong?

package
{
  import flash.display.Sprite;
  import mx.core.ButtonAsset;
  public class ASProject2 extends Sprite
  {
public function ASProject2()
{
  var mb: ButtonAsset = new ButtonAsset();
mb.x=100; mb.y=100; mb.width=200;
addChild(mb);
}
  }
}

--- issue 2 
-
Which button is the more simple button to use?
I found the spark components button is the component that Flash Builder uses if 
you write in mxml language. So I add the folder to my project's libraries 
paths, in precise I added as SWC folder the follow folder:
c:\Program Files\Adobe\Flash Builder 
Beta\sdks\4.0.0\frameworks\projects\flex4\src\spark\components\

Here is the (very simple) code (with compiler's errors):

package
{
  import flash.display.Sprite;
  import spark.components.Button;  // <- compile time error: 1172: Definition 
spark.components:Button could not be found.
  public class ASProjectInFB4 extends Sprite
  {
public function ASProjectInFB4()
{
  var ab : Button = new Button();  // <- compile time error: 1046: Type was 
not found or was not a compile-time constant: Button.
ab.x=10;
ab.y=10;
ab.width=200;
ab.height=100;
ab.enabled=true;
  addChild(ab);
}
  }
}

The problem (as you see) are the two compiler errors. Now... if get the cursor 
on "Button" text in my code and I press the F3 the Flash Builder transfers me 
to the declaration of Button class in the proper Button.as file! So I suppose 
that my definition in my preceding code is correct. If I remove the the SWC 
folder from the libraries of my project, the F3 buttons doesn't transfer me 
anywhere, so the SWC folder definition is working too...

What is wrong?

Best regards
Dennis




[flexcoders] problem XML selection functions

2009-10-19 Thread David Pariente
Hi all,

I select 1 element from an XML

ab_XML.about.(lang=='e').desc

does the work, but actually i need it to compare another element:

ab_XML.about.(lang=='e' && web=='g').desc

But complains about the & symbol...

i saw an example like this with the hasOwnProperty function, in the flex 
help...

I don't know if what i'm trying can be done...i really need to get the 
data in one line, if possible.

Thanks a lot, i was googlering but couldn't find things like this, all 
examples i see it's with one comparison only.

ty,
David Pariente


RE: [flexcoders] double underline on text

2009-10-19 Thread Gordon Smith
Neither TextField nor TLF support double-underlining, so you'll have to draw it 
yourself. In TLF (and in the new  control in Flex 4) the 
single-underlining is drawn with ActionScript code, so you can see how they do 
it.

Gordon Smith
Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Chris Sheffield
Sent: Tuesday, October 13, 2009 8:39 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] double underline on text



Does anyone out there know of a way to apply a double underline to
text in a Flex app? I have need of this in an upcoming project. I've
searched the docs but can't seem to find anything.

Thanks,
Chris

--
Chris Sheffield
Read Naturally, Inc.
www.readnaturally.com



RE: [flexcoders] Performance of associative array or dictionary lookup

2009-10-19 Thread Gordon Smith
No, they aren't sorted. They use a storage technique called a hash table.

Gordon Smith
Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of d9_tech
Sent: Thursday, October 15, 2009 2:50 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Performance of associative array or dictionary lookup



I'm curious to know what the algorithm is behind an associative array or 
dictionary look up. I'm assuming that associative arrays and dictionaries are 
sorted when they are created and then something like a binary search is used to 
do the look up. Can anyone confirm that this is true or offer additional 
information?

Thanks,

christian



RE: [flexcoders] cast/convert to a child class?

2009-10-19 Thread Gordon Smith
ArrayCollection does not have any idea what type of elements you put into it. 
You can have an ArrayCollection full of Dog instances, or an ArrayCollection 
full of Cat instances, or an ArrayCollection full of Cats and Dogs (i.e., 
Pets). But all are just ArrayCollections and no casting is required.

You're probably thinking of Vector. vs Vector.. There are indeed 
different types, and one cannot be cast to the other.

Gordon Smith
Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of coder3
Sent: Thursday, October 15, 2009 3:54 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] cast/convert to a child class?



Hi All,

I have a arrayCollection of class Pet,
and i have a child class Dog extends Pet,

is there a way to convert the arrayCollection of Pet to arrayCollection of
Dog?
--
View this message in context: 
http://www.nabble.com/cast-convert-to-a-child-class--tp25917283p25917283.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Re: Question for Math guys/girls

2009-10-19 Thread Netaman
What if the user should make the line shorter then 100 pixels does the marker 
go away, I don't think it's math more like an array collection of markers. You 
save the x,y coordinates of the marker, as the line gets bigger or smaller you 
replace the markers that fit on the line from the array's x,y coordinates... 
Add an click event listener to your container with the line, then create a 
function to add the x,y coordinates to an array. Without a code example I can 
only guess what you are trying to accomplish. You can create a timer to refresh 
your container with the markers from the array, or generate another event when 
the line changes length, or you add another marker.

Do you have any code to share?
 
Randy

--- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
>
> I have a line which can be horizontal or diagnol, and the user can make it 
> longer or short by dragging an end.
> 
> If the user should click anywhere on the line I need to keep track of this 
> and place a marker or callout over this clicked spot on the line at all 
> times.  So if the user clicks say 1/4, say 100 pixels from the bottom of the 
> line) the way down from the top left of a diagonal line I need to put a 
> marker there. Then if the user drags the line to make it twice as long I 
> still need that marker to be in the same spot. 
> 
> How would I do this math wise?  And no I don't want it to be a percentage of 
> the length of the line. Meaning I always want the spot to be 100 pixels from 
> bottom of the line.
> 
> TIA, J
>




[flexcoders] Re: Color in a color gradient.

2009-10-19 Thread ivansebastiansurya
Hi again,

That proposed solution seems to work, except that the colour that I get from 
getPixels32 seems to be a different colour that has an alpha of 1, i.e. if the 
original pixel is 0xFF at 0.5 alpha, what I got back is the colour with the 
same appearance but an alpha of 1.  Is there a way to get the actual colour and 
the actual alpha, rather than returning another colour with the same visual 
appearance with alpha of 1?
Thanks,

Ivan.

--- In flexcoders@yahoogroups.com, "ag_rcuren"  wrote:
>
> The first thing that comes to my mind is the getPixel32 method of the 
> BitmapData Class. You pass in the x and y of the pixel you want to know about 
> and it returns a ARGB unit color value back. So you would have to calculate 
> the exact point you want to know about and then use that method.
> 
> --- In flexcoders@yahoogroups.com, "ivansebastiansurya"  
> wrote:
> >
> > Hi everyone,
> > 
> > I've got a problem regarding colour gradient.  I have created a control 
> > when you can define colour points along a rectangle to create a colour 
> > gradient.  The problem that I have is that I need to find a way to find the 
> > exact colour at a point between the gradient points (my control also allow 
> > you to define the alpha at that point).
> > Anyone has come across that problem and know how to solve it?
> > Thanks in advance for reading my question and any help is greatly 
> > appreciated.
> > 
> > Ivan.
> >
>




[flexcoders] Question for Math guys/girls

2009-10-19 Thread flexaustin
I have a line which can be horizontal or diagnol, and the user can make it 
longer or short by dragging an end.

If the user should click anywhere on the line I need to keep track of this and 
place a marker or callout over this clicked spot on the line at all times.  So 
if the user clicks say 1/4, say 100 pixels from the bottom of the line) the way 
down from the top left of a diagonal line I need to put a marker there. Then if 
the user drags the line to make it twice as long I still need that marker to be 
in the same spot. 

How would I do this math wise?  And no I don't want it to be a percentage of 
the length of the line. Meaning I always want the spot to be 100 pixels from 
bottom of the line.

TIA, J 



[flexcoders] Re: How do you alternate two colors in a single column on a stacked bar chart

2009-10-19 Thread rlull2001
Perfect, thanks!

--- In flexcoders@yahoogroups.com, "EddieBerman"  wrote:
>
> Check out the fillFunction():
> 
> http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formatting_07.html
> 
> 
> 
> --- In flexcoders@yahoogroups.com, "rlull2001"  wrote:
> >
> > I want to alternate two colors on a stacked bar chart. For example, if 
> > there are 4 items stacked in a single column, I want the first and third 
> > one to be orange and the second and fourth ones to be blue. Does anyone 
> > know how to do this?
> >
>




[flexcoders] Re: How do you alternate two colors in a single column on a stacked bar chart

2009-10-19 Thread EddieBerman
Check out the fillFunction():

http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formatting_07.html



--- In flexcoders@yahoogroups.com, "rlull2001"  wrote:
>
> I want to alternate two colors on a stacked bar chart. For example, if there 
> are 4 items stacked in a single column, I want the first and third one to be 
> orange and the second and fourth ones to be blue. Does anyone know how to do 
> this?
>




[flexcoders] Re: embed font into preloader

2009-10-19 Thread Baz
I am thinking that converting the 6 chars I need for the preloader to vector
graphics would be the most efficient way to display/animate that text
without loading any superfluous data. To accomplish this, would I export
them through illustrator? To what format? Is there a flex way of doing this?
Thanks.

On Thu, Oct 15, 2009 at 12:18 PM, Baz  wrote:

> I have a custom font I would like to use for my preloader, but I would like
> to implement it without having to use Flash IDE. I know the exact text I
> need to write, it is only 6 characters long, but later on in the app I will
> need the entire set of chars of that font. What is the best way to go about
> this?
>
>1. Should I embed the font twice, once with a tiny subset of 6 chars
>for the preloader, then again in flex for the rest of the chars?
>2. Should I create vector images of each character for the preloader (I
>need to animate each char independently)?
>3. Should I create a series of png's for each char?
>4. Anything else?
>
> Thanks!
>
>


[flexcoders] Re: Graphics question

2009-10-19 Thread turbo_vb

Hi Christophe,

- How to have round buttons on an interface ?

You have a few options for skinning flex controls: images, drawing api,
or Degrafa.  (fxg for flex4).   Usually, these skins are applied in css
as skin, borderSkin or individual state skins; like upSkin.  Images are
the easiest, but add size to the swf; since they are embedded.  Using
the drawing api moves you to vector graphics and Degrafa gives you a
declarative way to draw skins.

- How to generated a drawing with Degrafa in the background of an HBox ?

There's some basic examples here:

GoogleMate Source


Drill down to src/assets/skins/TileListItemRendererSkin

-TH

--- In flexcoders@yahoogroups.com, "Christophe"
 wrote:
>
> Hello,
>
> I have 2 questions :
>
> - How to have round buttons on an interface ?
>
> - How to generated a drawing with Degrafa in the background of an HBox
?
>
> Thank you,
> Christophe
>




[flexcoders] How do you alternate two colors in a single column on a stacked bar chart

2009-10-19 Thread rlull2001
I want to alternate two colors on a stacked bar chart. For example, if there 
are 4 items stacked in a single column, I want the first and third one to be 
orange and the second and fourth ones to be blue. Does anyone know how to do 
this?



RE: [flexcoders] Re: How to get class definition from a loaded module?

2009-10-19 Thread Alex Harui
Modules and popups are exceptions to the .root documentation because they are 
not parented by the main class in the SWF.  In the case of modules, you 
typically instantiate an object and parent it somewhere in your main app's 
containers, even ModuleLoader.

If you know the name of the class, use factory.create(className) to get the 
instance.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of valdhor
Sent: Monday, October 19, 2009 8:05 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How to get class definition from a loaded module?



I'm willing to take a look. Can you post the code?

--- In flexcoders@yahoogroups.com, 
"tnajaryan"  wrote:
>
> I am trying to get class definition from a loaded module using 
> ApplicationDomain.getDefinition(). I need it to be able to instantiate an 
> object of that class using operator new.
>
> When the module is loaded in the currentDomain of loader application 
> everything is fine. I can get the definition using 
> ApplicationDomain.currentDomain.getDefinition(className) call.
>
> However when the module is loaded by default (not in the loader application 
> domain) I cannot seem to be able to get the definition no matter what I try.
>
> The ApplicationDomain.currentDomain.getDefinition(className) throws and 
> exception. I tried getting the correct domain using 
> child.root.loaderInfo.applicationDomain, where child is an object from the 
> loaded module. This still does not work since it returns the same domain.
>
> What is even strange is that child.root refers to the top-most application 
> which seems to contradict to what is written in Flex docs for "root" property:
> "For a display object in a loaded SWF file, the root property is the top-most 
> display object in the portion of the display list's tree structure 
> represented by that SWF file." (See 
> http://livedocs.adobe.com/flex/3/langref/flash/display/DisplayObject.html#root)
>
> Doesn't this mean that "root" should refer to the Module in this case? If 
> "root" refers to top-most application how do I get the correct domain given a 
> DisplayObject from the module?
>
> Anyway, I am unable to find ANY way to get the class definition from the 
> module using the class name. Any ideas?
>
> Full source code of a trivial sample application that demonstrates the 
> problem is available if anyone wants to have a look.
>
> Thanks.
>



Re: [flexcoders] Function when exit from the appli.

2009-10-19 Thread primo411
You can use setup a callback on your application with
External.addCallback(...)
Then in your html template, you can listen to the javascript event
"onbeforeunload" and call the function you have defined.

Cheers,
Julien Nicoulaud

2009/10/19 Christophe 

>
>
> Hello,
>
> I want to know when the user exit from my application, or if it does not
> closed, when he exit from the navigator.
>
> Is it to avoid to have several users connected with the same login.
>
> Which function to use ?
> Thank you,
> Christophe,
>
>  
>


[flexcoders] Re: How to get class definition from a loaded module?

2009-10-19 Thread valdhor
I'm willing to take a look. Can you post the code?



--- In flexcoders@yahoogroups.com, "tnajaryan"  wrote:
>
> I am trying to get class definition from a loaded module using 
> ApplicationDomain.getDefinition(). I need it to be able to instantiate an 
> object of that class using operator new.
> 
> When the module is loaded in the currentDomain of loader application 
> everything is fine. I can get the definition using 
> ApplicationDomain.currentDomain.getDefinition(className) call.
> 
> However when the module is loaded by default (not in the loader application 
> domain) I cannot seem to be able to get the definition no matter what I try. 
> 
> The ApplicationDomain.currentDomain.getDefinition(className) throws and 
> exception. I tried getting the correct domain using 
> child.root.loaderInfo.applicationDomain, where child is an object from the 
> loaded module. This still does not work since it returns the same domain. 
> 
> What is even strange is that child.root refers to the top-most application 
> which seems to contradict to what is written in Flex docs for "root" 
> property: 
> "For a display object in a loaded SWF file, the root property is the top-most 
> display object in the portion of the display list's tree structure 
> represented by that SWF file." (See 
> http://livedocs.adobe.com/flex/3/langref/flash/display/DisplayObject.html#root)
> 
> Doesn't this mean that "root" should refer to the Module in this case? If 
> "root" refers to top-most application how do I get the correct domain given a 
> DisplayObject from the module? 
> 
> Anyway, I am unable to find ANY way to get the class definition from the 
> module using the class name. Any ideas?
> 
> Full source code of a trivial sample application that demonstrates the 
> problem is available if anyone wants to have a look.
> 
> Thanks.
>




[flexcoders] Function when exit from the appli.

2009-10-19 Thread Christophe
Hello, 

I want to know when the user exit from my application, or if it does not 
closed, when he exit from the navigator. 

Is it to avoid to have several users connected with the same login. 

Which function to use ?
Thank you,
Christophe, 



[flexcoders] Re: popup window send event to main screen

2009-10-19 Thread Netaman
Yes you can, A quick overview - Create an Event meta tag  
create a class for the meta event that extends the Event and 
then dispatch your event that bubbles to the main application 
from your popup.

read here;
http://livedocs.adobe.com/flex/3/html/help.html?content=createevents_3.html

Of course if you are looking to create flex software that incorporates events 
then read the rest of the message.

You might want to look at a framework like puremvc, or a more complex framework 
like cairngorm, these use an more complex event driven model, view, controller, 
I personally keep it simple and apply a easyMVC architecture. "Anyone can make 
it complex, keeping it simple is Genius". By keeping it simple I can apply my 
own algorithms to software development having used for the last 27 plus years 
of on the job training.

read on if you want my candid opinion about frameworks.

So when you look at a programming model and it looks simple then you have the 
freedom to think outside the box, some software industry pundits have placed a 
big giant box in front of you saying learn this to solve the whatever comes up 
in the everyday software development, basically placing you inside a box, just 
a bigger box, saying this will lead you to quicker development, share the same 
core logic between programs, so on and so forth, but if you look closely enough 
and see that all their patterns and verbiage is just the framework a learning 
exercise, nothing wrong with learning, use what you like and discard the rest. 

The biggest pattern to solving the software development algorithms of tomorrow 
and today is on a web search engine page, I have found that by searching the 
web it's the biggest pattern solver of them all, better then any framework. I 
am more a web research software developer then software developer, design and 
function from a web search to figuring out the next software steps. 

The one thing I see the industry doing is following a framework, thinking it to 
be the greatest thing since bytes came in a core, but they miss the point, that 
by making pointless framework constructs/ additions to a software architecture 
they have diluted the meaning of the framework, making it hard to grow, making 
it complex.

No one person or group of persons has the intelligence to lead you down a path 
of programming enlightenment, just a bunch of software developers that dream in 
code. 

Randy





--- In flexcoders@yahoogroups.com, "markflex2007"  wrote:
>
> Hi,
> 
> Do you think if it is possible for popup Flex window to send event to main 
> Application screen?
> 
> Thanks
> 
> Mark
>




[flexcoders] How to get class definition from a loaded module?

2009-10-19 Thread tnajaryan
I am trying to get class definition from a loaded module using 
ApplicationDomain.getDefinition(). I need it to be able to instantiate an 
object of that class using operator new.

When the module is loaded in the currentDomain of loader application everything 
is fine. I can get the definition using 
ApplicationDomain.currentDomain.getDefinition(className) call.

However when the module is loaded by default (not in the loader application 
domain) I cannot seem to be able to get the definition no matter what I try. 

The ApplicationDomain.currentDomain.getDefinition(className) throws and 
exception. I tried getting the correct domain using 
child.root.loaderInfo.applicationDomain, where child is an object from the 
loaded module. This still does not work since it returns the same domain. 

What is even strange is that child.root refers to the top-most application 
which seems to contradict to what is written in Flex docs for "root" property: 
"For a display object in a loaded SWF file, the root property is the top-most 
display object in the portion of the display list's tree structure represented 
by that SWF file." (See 
http://livedocs.adobe.com/flex/3/langref/flash/display/DisplayObject.html#root)

Doesn't this mean that "root" should refer to the Module in this case? If 
"root" refers to top-most application how do I get the correct domain given a 
DisplayObject from the module? 

Anyway, I am unable to find ANY way to get the class definition from the module 
using the class name. Any ideas?

Full source code of a trivial sample application that demonstrates the problem 
is available if anyone wants to have a look.

Thanks.




[flexcoders] Re: Problem with SWFLoader content height and width

2009-10-19 Thread rob
Has anyone got any ideas on this?

I am still using the timeouts and it's horrid!

Anyone out there know anything detailed about the old SWFLoaders?

Thanks

Rob


--- In flexcoders@yahoogroups.com, "rob"  wrote:
>
> I tried callLater(), but had the same issue as before. Perhaps the next frame 
> is too soon.
> 
> I think as the SWF is in another process (virtual machine), callLater won't 
> work.
> 
> I either need a way to tell if the content height and width are exact or an 
> event to listen to.
> 
> The time out works, but I feel dirty using it ;)
> 
> Rob
> 
> 
> --- In flexcoders@yahoogroups.com, "valdhor"  wrote:
> >
> > Try a callLater so you are checking on the next frame.
> > 
> > --- In flexcoders@yahoogroups.com, "rob"  wrote:
> > >
> > > I have a complete event on two swfLoaders.
> > > 
> > > Once both of the swf loaders have dispatched their complete events I call 
> > > a method to calculate their content's width and height.
> > > 
> > > Something like this:
> > > 
> > > myWidth = mySwfLoader.contentWidth;
> > > myWidth += mySwfLoader2.contentWidth;
> > > 
> > > I get an intermittent problem where the content width and height are 
> > > reported incorrectly. If I call the method manually later, from a button, 
> > > then they always report correctly, even if they have previously reported 
> > > incorrectly.
> > > 
> > > Therefore I have assumed that at the point the complete event dispatched 
> > > by the SWFLoader, it hasn't calculated it's contents height and width. 
> > > Sometimes my method must be asking for this value before it's calculated.
> > > 
> > > My question is if this is a known problem, and if there is another event 
> > > I should be waiting for. I don't want to set a time out, to allow for the 
> > > content height and with to be calculated.
> > > 
> > > Please let me know if there is another event dispatched by the SWFLoader, 
> > > I have tried all the non inherited ones, but with no joy :(
> > > 
> > > Thanks
> > > 
> > > Rob
> > >
> >
>