[flexcoders] FB3/Eclipse - CSS design view not showing images

2010-04-13 Thread John Robinson
Anyone encounter this? I'm using Eclipse with the Flex Builder 3  
plugin. I'm trying to skin a horizontal scrollbar with some images. I  
just discovered the CSS design view/editor and  thought it was exactly  
what I need. The problem is that I choose my images and hit refresh,  
but they don't show up. It displays the little blue icon all stretched  
out (like a missing image icon).

Anyone?

Thanks!
John


Re: [flexcoders] Polling vs. Timeout error vs. ???

2009-04-21 Thread John Robinson
if you only have to reload the data every 3 minutes, you should be  
fine using a timer.

You won't get the 'script running too long' error as a result of using  
a timer. That error happens basically when  code takes too long to  
process or goes into an infinite loop.

john



On Apr 21, 2009, at 11:34 AM, flexaustin wrote:

> I think I asked this question before but my searches for my messages  
> come up empty (search in this forum is awful).
>
> I have a Flex application that I need to do polling. Because of the  
> implementation/install of our app I cannot use any push technology.
>
> So my solution, which I am not sure will work, is to create a timer  
> on my the main stage that every 3 minutes tell the app to it needs  
> to make another httpservice call.
>
> My question is can this be done or if I create a timer that loops  
> forever will I get a Timeout error "script has been running blah  
> blah or what ever the time error says"?
>
> Or I could create a timer and have it run and when it sends out a  
> request create a new timer and kill/delete/remove the last timer?
>
> Any other way to accomplish this?
>
>



Re: [flexcoders] Re: binding not updating for ArrayCollection when item changes?

2009-03-13 Thread John Robinson
Thanks Josh! I haven't tried to implement this yet but so far it makes  
sense.


Thanks again,
John


On Mar 12, 2009, at 9:01 PM, Josh McDonald wrote:


In your custom control, change this:


public function set dataProvider(dp:ArrayCollection):void {
_dp = dp;
	trace("this fires when the AC is created, but not when it's  
contents change");	

}

to something like this:


public function set dataProvider(value : ArrayCollection) : void
{
if (_dp == value)
return;

if (dataProvider)
 
dataProvider.removeEventListener(CollectionEvent.COLLECTION_CHANGE,  
handleUpdatedProvider);


_dp = value;

if (dataProvider)
 
dataProvider.addEventListener(CollectionEvent.COLLECTION_CHANGE,  
handleUpdatedProvider, ???, ???, true); // Weak listener!


handleUpdatedProvider(null);
}

private function handleUpdatedProvider(event : CollectionEvent) : void
{
//... do stuff
}


Note that this is just typed out of the top of my head, probably  
full of typos, and you need to put the default options in place of  
"???" when attaching the listener :)


-Josh


2009/3/13 John Robinson 
Yeah, I've been directly updating the properties. Here's the weird  
part... if I use the ArrayCollection as a dataProvider for a List  
control, it updates. If I use it for a custom control that I've  
created, it does not.



Example:

This works as expected:


This does not:


//pseudo component source


private var _dp:ArrayCollection;

public function set dataProvider(dp:ArrayCollection):void {
_dp = dp;
	trace("this fires when the AC is created, but not when it's  
contents change");	

}




Thanks again!
John

On Mar 10, 2009, at 4:44 PM, valdhor wrote:

How do you update a given UserVO's userData? Do you directly access  
the public properties?


I have never done it this way - I use getters and setters...

package com.jrobinson.model.VO
{
[Bindable]
public class UserVO
{
private var _id:int = -1;
private var _username:String = null;
private var _enabled:Boolean = false;
private var _userData:XMLList = null;

public function UserVO(id:int, username:String,  
enabled:Boolean, userData:XMLList)

{
_id = id;
_username = username;
_enabled = enabled;
_userData = userData;
}

//accessor methods
public function get id():int {return _id;}
public function get username():String {return _username;}
public function get enabled():Boolean {return _enabled;}
public function get userData():XMLList {return _userData;}

//mutator methods
public function set id(id:int):void {_id = id;}
public function set username(username:String):void  
{_username = username;}
public function set enabled(enabled:Boolean):void {_enabled  
= enabled;}
public function set userData(userData:XMLList):void  
{_userData = userData;}

}
}


> >> I have a strange issue with data binding not updating when an  
item in

> >> an ArrayCollection is changed. I'm using Cairngorm and have the
> >> following setup. In my ModelLocator I have a 'users'  
ArrayCollection
> >> that contains 'UserVO' objects. I have a two views that binds  
their
> >> dataProvider to the 'users' AC in the ModelLocator. My UserVO  
looks

> >> like so:
> >>
> >> package com.jrobinson.model.VO
> >> {
> >> [Bindable]
> >> public class UserVO
> >> {
> >> public var id:int = -1;
> >> public var username:String = null;
> >> public var enabled:Boolean = false;
> >> public var userData:XMLList = null;
> >>
> >>
> >> public function UserVO(user_id:int, uName:String,  
enabled:Boolean,

> >> d:XMLList)
> >> {
> >> id = user_id;
> >> username = uName;
> >> enabled = enabled;
> >> userData = d;
> >> }
> >>
> >> }
> >> }
> >>
> >> I first have a command that loads all of the users and  
populates the

> >> AC. This updates the bindings as expected. I then have a second
> >> command that loads the userData portion for a given user. Once
> >> retrieved, I update the given UserVO's userData, but this  
time, the

> >> bindings fail to update.
> >>
> >> I feel like I've seen this before but can't find where or what  
the
> >> workaround might be. I guess I'm just looking for confirmation  
that

> >> this should or shouldn't work.
> >>
> >> Thanks!
> >> John
> >>





--
"Therefore, send not to know For whom the bell tolls. It tolls for  
thee."


Josh 'G-Funk' McDonald
  -  j...@joshmcdonald.info
  -  http://twitter.com/sophistifunk
  -  http://flex.joshmcdonald.info/








Re: [flexcoders] Re: binding not updating for ArrayCollection when item changes?

2009-03-12 Thread John Robinson
Yeah, I've been directly updating the properties. Here's the weird  
part... if I use the ArrayCollection as a dataProvider for a List  
control, it updates. If I use it for a custom control that I've  
created, it does not.


Example:

This works as expected:


This does not:


//pseudo component source


private var _dp:ArrayCollection;

public function set dataProvider(dp:ArrayCollection):void {
_dp = dp;
	trace("this fires when the AC is created, but not when it's contents  
change");	

}




Thanks again!
John

On Mar 10, 2009, at 4:44 PM, valdhor wrote:

How do you update a given UserVO's userData? Do you directly access  
the public properties?


I have never done it this way - I use getters and setters...

package com.jrobinson.model.VO
{
[Bindable]
public class UserVO
{
private var _id:int = -1;
private var _username:String = null;
private var _enabled:Boolean = false;
private var _userData:XMLList = null;

public function UserVO(id:int, username:String,  
enabled:Boolean, userData:XMLList)

{
_id = id;
_username = username;
_enabled = enabled;
_userData = userData;
}

//accessor methods
public function get id():int {return _id;}
public function get username():String {return _username;}
public function get enabled():Boolean {return _enabled;}
public function get userData():XMLList {return _userData;}

//mutator methods
public function set id(id:int):void {_id = id;}
public function set username(username:String):void  
{_username = username;}
public function set enabled(enabled:Boolean):void {_enabled  
= enabled;}
public function set userData(userData:XMLList):void  
{_userData = userData;}

}
}


> >> I have a strange issue with data binding not updating when an  
item in

> >> an ArrayCollection is changed. I'm using Cairngorm and have the
> >> following setup. In my ModelLocator I have a 'users'  
ArrayCollection
> >> that contains 'UserVO' objects. I have a two views that binds  
their
> >> dataProvider to the 'users' AC in the ModelLocator. My UserVO  
looks

> >> like so:
> >>
> >> package com.jrobinson.model.VO
> >> {
> >> [Bindable]
> >> public class UserVO
> >> {
> >> public var id:int = -1;
> >> public var username:String = null;
> >> public var enabled:Boolean = false;
> >> public var userData:XMLList = null;
> >>
> >>
> >> public function UserVO(user_id:int, uName:String,  
enabled:Boolean,

> >> d:XMLList)
> >> {
> >> id = user_id;
> >> username = uName;
> >> enabled = enabled;
> >> userData = d;
> >> }
> >>
> >> }
> >> }
> >>
> >> I first have a command that loads all of the users and  
populates the

> >> AC. This updates the bindings as expected. I then have a second
> >> command that loads the userData portion for a given user. Once
> >> retrieved, I update the given UserVO's userData, but this time,  
the

> >> bindings fail to update.
> >>
> >> I feel like I've seen this before but can't find where or what  
the
> >> workaround might be. I guess I'm just looking for confirmation  
that

> >> this should or shouldn't work.
> >>
> >> Thanks!
> >> John
> >>


Re: [flexcoders] Re: binding not updating for ArrayCollection when item changes?

2009-03-10 Thread John Robinson
Nice catch! That didn't seem to be causing the problem but thanks for  
pointing it out.

I've simplified the case in that I'm not calling the web service  
anymore, just flipping the enabled property but binding still is not  
updating. Any other ideas?

Thanks,
John

On Mar 10, 2009, at 10:53 AM, valdhor wrote:

> I don't know if this is your problem but one thing I noticed is youu  
> have an ambiguous set of your enabled property. You have
>
> enabled = enabled;
>
> which (I assume) is to set the enabled property of your class to the  
> enabled parameter that is passed in. This won't work. You should have
>
> this.enabled = enabled;
>
> or change one of the parameter names.
>
> --- In flexcoders@yahoogroups.com, John Robinson  wrote:
>>
>> I have a strange issue with data binding not updating when an item in
>> an ArrayCollection is changed. I'm using Cairngorm and have the
>> following setup. In my ModelLocator I have a 'users' ArrayCollection
>> that contains 'UserVO' objects. I have a two views that binds their
>> dataProvider to the 'users' AC in the ModelLocator. My UserVO looks
>> like so:
>>
>> package com.jrobinson.model.VO
>> {
>>  [Bindable]
>>  public class UserVO
>>  {
>>  public var id:int = -1;
>>  public var username:String = null;
>>  public var enabled:Boolean = false;
>>  public var userData:XMLList = null;
>>  
>>  
>>  public function UserVO(user_id:int, uName:String, 
>> enabled:Boolean,
>> d:XMLList)
>>  {
>>  id = user_id;
>>  username = uName;
>>  enabled = enabled;
>>  userData = d;
>>  }
>>
>>  }
>> }
>>
>> I first have a command that loads all of the users and populates the
>> AC. This updates the bindings as expected. I then have a second
>> command that loads the userData portion for a given user. Once
>> retrieved, I update the given UserVO's userData, but this time, the
>> bindings fail to update.
>>
>> I feel like I've seen this before but can't find where or what the
>> workaround might be. I guess I'm just looking for confirmation that
>> this should or shouldn't work.
>>
>> Thanks!
>> John
>>
>
>
>
>
> 
>
> --
> 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
>
>
>



John Robinson - Flash/Flex Developer at large
Blog: http://jrobinsonmedia.wordpress.com


John Robinson - Flash/Flex Developer at large
Blog: http://jrobinsonmedia.wordpress.com




[flexcoders] binding not updating for ArrayCollection when item changes?

2009-03-09 Thread John Robinson
I have a strange issue with data binding not updating when an item in  
an ArrayCollection is changed. I'm using Cairngorm and have the  
following setup. In my ModelLocator I have a 'users' ArrayCollection  
that contains 'UserVO' objects. I have a two views that binds their  
dataProvider to the 'users' AC in the ModelLocator. My UserVO looks  
like so:

package com.jrobinson.model.VO
{
[Bindable]
public class UserVO
{
public var id:int = -1;
public var username:String = null;
public var enabled:Boolean = false;
public var userData:XMLList = null;


public function UserVO(user_id:int, uName:String, 
enabled:Boolean,  
d:XMLList)
{
id = user_id;
username = uName;
enabled = enabled;
userData = d;
}

}
}

I first have a command that loads all of the users and populates the  
AC. This updates the bindings as expected. I then have a second  
command that loads the userData portion for a given user. Once  
retrieved, I update the given UserVO's userData, but this time, the  
bindings fail to update.

I feel like I've seen this before but can't find where or what the  
workaround might be. I guess I'm just looking for confirmation that  
this should or shouldn't work.

Thanks!
John


Re: [flexcoders] SWF access from Javascript from different domains

2009-01-22 Thread John Robinson
I think you need to add the "allowScriptAccess" param:
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16494

John


On Jan 22, 2009, at 11:49 AM, edison5308 wrote:

> Hi Everyone,
>
>
> I have a problem (looks like a domain issue) with communication
> between javascript and a SWF on a different domain.
>
> I have the following setup:
>
> - Javascript (domain1)
> - SWF located on a CDN (domain2)
>
> The javascript has 2 functions:
> 1. getData()
> 2. replay()
>
> The SWF has 1 function:
> 1. play()
>
> On application complete, the SWF calls play(). The function play()
> makes an external interface call to the javascript's getData()
> function - this part is working fine regardless of domain.
>
> On the javascript side, replay() is supposed to invoke the SWF's
> play() function. I have allowed access to the SWF's play() function  
> by:
> ExternalInterface.addCallback("replay", play);
> This all works when the javascript and SWF are served from the same
> location but throws the following error if the SWF is elsewhere:
>
> Error calling method on NPObject! [plugin exception: Error in
> Actionscript. Use a try/catch block to find error.].
>
> Thanks in advance.
>
>
> Kind regards,
> Ed
>
>
>
> ---


Re: [flexcoders] Re: Yahoo maps api for flex 2

2007-11-09 Thread John Robinson

That looks like an outdated quote.

john


On Oct 30, 2007, at 4:10 PM, Mike Krotscheck wrote:

“To create and test applications using Yahoo! Flash Maps using the  
Flex component, you'll need Macromedia Flex 1.5 with the internal  
JRun4 server or Tomcat server.”




Note: An enterprising developer can sniff the traffic and reverse- 
engineer their API. Nobody’s done that yet though- I’ve been busy  
with SCORM :).




Michael Krotscheck

Senior Developer




Re: [flexcoders] Yahoo maps api for flex 2

2007-10-30 Thread John Robinson
As far as I know they haven't. They're AS2 map stuff has a version  
that works in Flex, but it uses the old AVM1, and either a js or lc  
bridge between that and your AS3 flex stuff.

John


On Oct 30, 2007, at 10:20 AM, Nate Pearson wrote:

> I thought that Yahoo made a new api for flex 2...maybe I dreamed it up
> because I can't find it on the net!
>
> Can anyone link me?
>
> Thanks,
>
> Nate
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders% 
> 40yahoogroups.com
> Yahoo! Groups Links
>
>
>

John Robinson - Flash/Flex Developer at large
Blog: http://jrobinsonmedia.wordpress.com




Re: [flexcoders] How to build on command line?

2007-09-10 Thread John Robinson

The simplest use I can think of:

mxmlc -output=path/to/whatever.swf -file-specs=path/to/whatever.mxml

There are a bunch more options available but that should at least get  
you an swf.


John

On Sep 10, 2007, at 9:23 AM, Mark Ingram wrote:

Hi, what steps do I need to take to build a flex project from the  
command line? I’ve had a look at mxmlc and it’s options, but it  
doesn’t give me any clear clues about what parameters I need to  
pass through to it.


Are there any good examples out there?



Cheers,



Mark




Re: [flexcoders] Re: Flex 2 Training From the Source

2007-08-29 Thread John Robinson
One possible answer (below)... great book by the way!

John

On Aug 29, 2007, at 10:29 AM, droponrcll wrote:

> --- In flexcoders@yahoogroups.com, "Tony" <[EMAIL PROTECTED]> wrote:
>>
>> Amy,
>>
>> This may be your place.
>>
>> Go for it!
>
> OK, first question:
>
> In Lesson 7 (p 162), we instantiate the PopupManager class from
> inside a component.  Wouldn't that cause problems accessing it from
> other parts of the program, if you needed to?  Or am I
> misunderstanding the singleton class issue?
>


You're using static methods of the PopUpManager class, so I don't  
think it ever actually instantiates PopUpManager. If you want to  
access PopUpManager from elsewhere, just import it and use it. If you  
want to get to the popup that's created, that's a different story.  
I'm not sure why you'd want to do that, but I think PopUpManager  
keeps a list of it's popup's somewhere, that you might be able to get  
at. (Again, import PopUpManager and access it's properties/methods).


> Second question:
>
> Later in Lesson 7 (p 172), we create an ArrayCollection just of
> categories and then another ArrayCollection of Products arranced
> under the key of the ID of the Category.  Why are we not just adding
> a Products property to each Category and storing the Products in
> that?  Maybe that's explained or corrected later, but that's as far
> as I've read.  :-)

I haven't read much farther than here either, so I don't really have  
an answer.


> Third question:
>
> It seems to me that all the looping in the logic described in my
> second question is necessary because of a glaring hole in E4X.
> Because all of the hype around E4X says it assumes that the order of
> the XML nodes is important, yet when you use the .. operator, you
> don't get back any information on where that node was found.  Does
> that hole actually exist, or is it just a hole in the docs for Flex?
> If it does exist, has anyone extended E4X to fix this, and if so
> could I get a link?  If not, is it even possible (is the E4X logic in
> a class that is extensible?
>
> OK, that last question was actually several questions, but maybe
> someone can answer them, or at least take a stab.
>
> Thanks;
>
> Amy
>



[flexcoders] Flex 3 apache module on OSX?

2007-06-14 Thread John Robinson
Anyone successfully get this working? I ran into some hurdles during  
the install and am not quite sure I've got everything setup correctly.

The hurdle was that the installer wanted the path to the apache  
config directory, which when using the built-in webserver is hidden  
in "/etc/httpd". My solution was to copy this directory to a visible  
directory on my desktop and point the installer there.

Then it asked for the webserver root directory which it picked out on  
it's own "/Library/WebServer/Documents". This is where it put the  
"samples" directory.

After the install, I copied the files from my mock httpd directory  
into the real directory and restarted the server. Nothing. I then  
went into "/Applications" and noticed that instead of creating it's  
own folder, it just dumped it's files all over the applications  
directory. I then put these into their own folder  called  
"Flex3Apache" and updated "compiler.conf" and "httpd.conf" to reflect  
that. Restarted the server again but still no luck. When I browse to  
an mxml file, it just shows me a blank page (very snappily I might  
add, like it's not hitting the compiler at all).

Anyone?

Thanks,
John Robinson - Flash/Flex Developer at large
Blog: http://jrobinsonmedia.wordpress.com




Re: [flexcoders] Re: Is there any way around the crossdomain.xml

2007-05-27 Thread John Robinson
I honestly have no idea. What is the webservice you're trying to use?  
It looks like it requires some sort of authentication and ssl?

Can you find any examples of consuming the service with php? If it  
isn't something you can work out in flex perhaps you can make php do  
all of the work.

John


On May 26, 2007, at 6:03 PM, pioplacz wrote:

> Ok, well tryed to talk to them but didn't get any response. But I  
> will instead use the php
> proxy way, but now i've run into another problem so maybe you could  
> help me out.
> In their API reference they wrote that I have to include this line  
> in my application:
>
> System.setProperty("javax.net.ssl.trustStore","");
>
> But that line is only for java apps. Is there any way to make it  
> work with php or flex?
>
>
> --- In flexcoders@yahoogroups.com, John Robinson <[EMAIL PROTECTED]> wrote:
>>
>> First, ask the folks who provide the webservice to install a
>> crossdomain.xml file for you. If that isn't an option, you can make a
>> php/etc proxy file to do the loading for you. Google "php flash  
>> proxy".
>>
>>
>> John
>>
>> John Robinson - Flash/Flex Developer at large
>> Blog: http://jrobinsonmedia.wordpress.com
>>
>>
>> On May 26, 2007, at 5:34 PM, pioplacz wrote:
>>
>>> Hi!
>>>
>>> I'm trying to create an application that loads data from a wsdl
>>> webservice the problem is that
>>> I don't have access to the hosting server and I'm not possible to
>>> upload crossdomain file on
>>> it. That's why I'm asking you all, is there any way around it? Can
>>> i do something to make it
>>> work? It's really important and I really would like to make that
>>> app in flex.
>>>
>>
>





Re: [flexcoders] sandbox error

2007-05-27 Thread John Robinson
I'm not quite sure what it is you're doing, but it sounds like you're  
talking directly to mysql over a socket connection. I'd be very  
careful in doing so in that all of your mysql authentication info is  
included in the swf file. The swf can be easily decompiled and your  
database compromised.


I'd look into using server-side technology to handle the mysql  
interaction CF/PHP/etc.


Aside from that, you're swf once uploaded is running in whatever  
domain you uploaded it to. If you want to disregard the above, and  
just get it working, make sure mysql and the swf are running on the  
EXACT same domain.



John Robinson - Flash/Flex Developer at large
Blog: http://jrobinsonmedia.wordpress.com


On May 27, 2007, at 5:03 AM, li.wen wrote:


Hello all,

I am using flash.net.Socket class to connect mysql database. And I  
always meet sandbox violation error. I have some questions  
regarding this problem.


1) When I develop the flex application and mysql database  
(localhost:3066 is used) in same machine, there is no sandbox   
violation box error, since they are considered as in the same  
domain. Am I correct?
2) After I upload the flex application the server which is equipped  
with mysql, I access the flex application from client machine.  
Firstly the flex application will be downloaded to the client  
machine's cache, then start to execute. Now flex application and  
mysql database are considered as in different domain, and the  
sandbox violation may happen?
3) In order to solve it, I need to enable mysql remote access? Set  
mysql server address to digital format (xxx.xxx.xxx.xxx) to instead  
of "localhost"?

4) Or alternative way to solve it is to set "crossdomain.xml" file?
Thank you.

Regards,
Joe






Re: [flexcoders] Is there any way around the crossdomain.xml

2007-05-26 Thread John Robinson
First, ask the folks who provide the webservice to install a  
crossdomain.xml file for you. If that isn't an option, you can make a  
php/etc proxy file to do the loading for you. Google "php flash proxy".


John

John Robinson - Flash/Flex Developer at large
Blog: http://jrobinsonmedia.wordpress.com


On May 26, 2007, at 5:34 PM, pioplacz wrote:

> Hi!
>
> I'm trying to create an application that loads data from a wsdl  
> webservice the problem is that
> I don't have access to the hosting server and I'm not possible to  
> upload crossdomain file on
> it. That's why I'm asking you all, is there any way around it? Can  
> i do something to make it
> work? It's really important and I really would like to make that  
> app in flex.
>





Re: [flexcoders] Flex cookbook article: Flex2 XML Reader Can Create UIComponents

2007-05-18 Thread John Robinson
For the archives, compile times can be greatly reduced using fcsh,  
though I'm not sure how you'd go about using it in a server-side  
environment.

http://labs.adobe.com/wiki/index.php/Flex_Compiler_Shell

John

On May 17, 2007, at 8:30 PM, Paul J DeCoursey wrote:

> You can easily integrate a compile on demand system using the Flex SDK
> and Tomcat.  The problem is the compilers are not very fast.  I'm
> guessing that the Apache/IIS module does some caching so that compiles
> run faster because they don't have to reload large libraries each  
> time.
> Once the compiler is opened up a little more you should be able to
> implement this kind of thing.
>
> Austin Kottke wrote:
>> Ely,
>>
>> I find runtime MXML something that would be invaluable.
>>
>> It is something that if implemented could make developing in flex  
>> a lot
>> more scaleable and integration with the server end would be a lot  
>> more
>> feasible. (As in doing HTTPRequests where serverside MXML could be
>> generated through Velocity/JSP and then given back to the ui) A  
>> lot of
>> developers don't know a thing about flex, but can learn basic MXML  
>> for
>> layout or simple scripting and implement basic server side  
>> operations.
>> And if these are kept just as mxml it makes updates in the future
>> easier. We can then just tell someone (edit the MXML) and you're  
>> done,
>> instead of "download the flex sdk, set your ant build, yada ya" --  
>> some
>> aren't programmers, but MXML is very easy to learn. It's a lot more
>> confrontable for a designer/layout guy to tackle.
>>
>> Anyway, runtime MXML would be something that would majorly increase
>> scalability and integration with servers - similar to the Apache  
>> IIS mod
>> for JSP, etc - the only problem is that it's just for Apache or IIS.
>> Some run tomcat, resin, etc. But having it on the client end would
>> eliminate this problem.
>>
>> Best, austin
>>
>> Ely Greenfield wrote:
>>
>>> Austin et. al. –
>>>
>>> There are a number of features of MXML that simply can’t be  
>>> replicated
>>> at runtime. Things like script blocks. Other features would be
>>> prohibitively difficult (arbitrary binding expressions, @Embed,
>>> mx:Component, among others). You could reduce MXML to a
>>> runtime-parsable subset, and I know various people have taken  
>>> various
>>> approaches to this. The more you reduce it, the easier it would  
>>> be to
>>> replicate…removing repeaters, implicit arrays, default properties,
>>> etc. would get you down to something that could be implemented in a
>>> reasonable amount of time.
>>>
>>> I’m curious…how many people would find runtime MXML to be  
>>> important to
>>> them?
>>>
>>> Ely.
>>>
>>> *From:* flexcoders@yahoogroups.com  
>>> [mailto:[EMAIL PROTECTED]
>>> *On Behalf Of *Doug McCune
>>> *Sent:* Thursday, May 17, 2007 12:47 PM
>>> *To:* flexcoders@yahoogroups.com
>>> *Subject:* Re: [flexcoders] Flex cookbook article: Flex2 XML Reader
>>> Can Create UIComponents
>>>
>>> Yeah, ummm, my advice would be ignore that article. That's one of  
>>> the
>>> effects of having an article submission process that allows  
>>> anyone to
>>> submit anything. I know the cookbook is supposed to be user  
>>> generated
>>> and reviewed, but anyone from Adobe want to exercise a little
>>> editorial control? I wouldn't mind the hand of god going in there  
>>> and
>>> selectively removing a little content... sometimes democracy needs a
>>> helping hand.
>>>
>>> On 5/17/07, *Daniel Freiman* <[EMAIL PROTECTED]
>>> > wrote:
>>>
>>> I think they're just stating that the mx.modules package exists. The
>>> sentence "We also know Flex2 knows how to read MXML at runtime  
>>> because
>>> the compiler knows how to convert MXML into GUI Objects" doesn't
>>> inspire confidence that they know what they're talking about. Since
>>> it's possible that they don't know what a compiler does, it's also
>>> possible they're just writing and compiling Modules and don't
>>> understand that they're doing it. Then again, that wouldn't explain
>>> what they're fighting with another company about earlier in the  
>>> article.
>>>
>>> They claim what they're talking about is in the docs so I'd either
>>> search them or not worry about it. My guess is you'd be searching a
>>> long time for something that isn't there. It would be nice if  
>>> someone
>>> could prove my guess wrong though.
>>>
>>> Dan Freiman
>>> nondocs 
>>>
>>> On 5/17/07, *Austin Kottke* <[EMAIL PROTECTED]
>>> > wrote:
>>>
>>> Hi,
>>>
>>> There is an intriguing article in the flex cookbook on the adobe  
>>> site
>>> about
>>> reading in MXML at runtime and using the XML object to create  
>>> components
>>> at runtime. While
>>> I don't totally get how this works as there are no code samples, but
>>> very vague actually, but it states:
>>>
>>> "Let's consider, for a moment, how Adobe might have chosen to  
>>> leverage
>>> reuse within the

Re: [flexcoders] Parse Unknown XML Structure

2007-05-16 Thread John Robinson

I think you want to use XML.children() and XML.attributes().

John



On May 16, 2007, at 2:32 PM, Kevin Aebig wrote:


Hey all,



First post, so be gentle.



Back in the ol days, Flash developers had to use recursion to parse  
through an XML document. I’m finding myself again in this position,  
but don’t know how to proceed as my initial attempts don’t recurse  
currently. Also, I’d like to find out if there is a better way to  
do it with AS3 these days.




Basically I need to be able to look at every node and tell:

-  whether or not it has specific attributes

-  whether or not it has children



I know this seems easy, but the XML structure isn’t known  
beforehand, so using simple object notation seems futile.




Thanks for any help you can provide…



!k






Re: [flexcoders] New Apollo screencast: SearchCoders/Dashboard now has chat

2007-05-15 Thread John Robinson
Very cool. Though I'd change the name from "Dashboard" to something  
more specific. (OSX already has an app called Dashboard).

Other than that... woot!

john


On May 14, 2007, at 6:10 PM, Tom Bray wrote:

> Hey everybody,
>
> We just launched a huge upgrade to the SearchCoders/Dashboard and now
> you can chat about Flex & Apollo (and hopefully get answers in real
> time).  Check out the screencast demo here:
>
> http://labs.searchcoders.com/dashboard/demo/
>
> Cheers,
>
> Tom
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders% 
> 40yahoogroups.com
> Yahoo! Groups Links
>
>
>



Re: [flexcoders] Instantiating uncompiled MXML at runtime in flex

2007-05-15 Thread John Robinson
Do you have an example of the xml?

Does it have actionscript in it, or is it just laid out components?  
Laying out components is easy... figuring out and running AS is quite  
a bit more difficult.

I've done some experiments with loading pseudo-mxml at runtime and  
displaying it, but there are some caveats.

First, you need to make sure any components you *MIGHT* use are  
compiled in the swf. I ended up having to do something like so in  
order for that to happen:

import mx.controls.Panel;

private var myNonExistingPanel:Panel;

Then you have to worry about setting properties and styles on the  
component, based on (usually) the attributes in the xml. Not using  
attributes but nested tags makes things a little bit more difficult.

Hope that helps a bit.

John



On May 13, 2007, at 6:28 PM, Austin Kottke wrote:

> Anyone have any ideas on how to take an entire Panel that is just  
> an xml
> file and then
> load this in flex 2 and then have it instantiate it? This is not a
> compiled SWF using the Modules package in flex, but
> just a simple xml file.
>
> I've done this with a Tree Control where I loaded in the xml and it
> generated the components at runtime, however
> I'm thinking of an entire set of code in MXML or XML that gets  
> loaded in
> and immediately created.
>
> I know there is a Apache MXML server on labs, but I was thinking that
> this is done just in flex.
>
> Anyone have any experience in this?
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders% 
> 40yahoogroups.com
> Yahoo! Groups Links
>
>
>



Flash Player Security Forum (was Re: [flexcoders] Re: Load & Display Image from FileReference)

2007-05-12 Thread John Robinson
Initially I had a whole post asking questions about why this was the  
case (can't reference user-selected file without uploading/ 
downloading first) but I felt it was pretty OT for the flexcoders  
list (or probably flashcoders list for that matter). Does anyone know  
of a venue for discussing Flash Player security specifics?


Thanks,
John

On May 11, 2007, at 4:45 PM, Daniel Freiman wrote:


Apollo would work.

I have no specific knowlage but my guess is that flex doesn't  
actually access your file system.  What it probably does is tell  
your browser to access the file system.  In any event, this issues  
has been widely discussed and there isn't a way around it (unless  
you can figure out how to hack adobe's security sandbox).


Dan Freiman
nondocs





Re: [flexcoders] output formats (excel/word)

2007-05-12 Thread John Robinson
Flex doesn't have any output formats or any of this functionality  
built in. I'd say build your front end in Flex, but continue to use  
CF for your file output. Simply send your data to a CFC that does the  
conversion and then allow the user to download (or whatever) the  
outputted file.


John


On May 10, 2007, at 5:22 PM, Derrick Anderson wrote:


hi,

i am digging my heels into flex and as I am about to start a  
project for a client of mine to build a 'reporting dashboard' i am  
really considering using flex to do it (i am SO not impressed with  
coldfusion anymore :) )  I am up for the challenge but I am  
wondering how easy it is to create xls/doc/pdf documents in flex.   
i'm sure the pdf integration is there, but if i want to allow users  
to export data into excel and send it directly to their desktop  
(like cfcontent does),  would it be worth getting into?  are there  
any resources explaining how to do it?


thanks

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




Re: [flexcoders] Add a node to a tree programatically

2007-05-08 Thread John Robinson
I'm running out the door but here's a quickie example. Note.. I'm not  
quite sure about adding a node while there is no node selected (aka,  
how to set selectedNode to the root node of the tree)


http://www.adobe.com/2006/mxml";  
creationComplete="init()" >







 
 
 
 
 
 
 
 
 
 
 
 
 
 








On May 7, 2007, at 6:28 PM, Alejandro Narancio wrote:

> Guys,
>
> I want to add a node programatically to a tree using ActionScript,  
> anybodoy know how can I do that?
>
> Thanks in advance,
> Alex




Re: [flexcoders] Re: Html Text does NOT print in same format as rendered on scre

2007-05-04 Thread John Robinson

Scott -

I didn't notice the loss of quality when I tested it (quickly)  
yesterday, but I'm noticing it now that you mentioned it.


I played with it a bit more but the only thing I found that helped at  
all (though still not great) was to set "smoothing = true" for the  
Bitmap. It looks better but is now a little fuzzy and on paper (cheap  
inkjet) the text is not as dark as the one without smoothing. I'm  
wondering if it's possible to overlay the no-smoothing bitmap with a  
transparent background over the smoothed version?



John



On May 3, 2007, at 10:55 PM, scott_flex wrote:



Thanks for the example John! However, when you printed your output
to PDF did you lose a lot of text quality? Printing the image/bitmap
i lose a lot of quality on the printout, font is real jagged.

The bitmap image created from my source panel is very clear on. I
assume this is because the flash player is not printing it
intellegently as a font but rather an image.

Even so though... the bitmap image is pretty darn close to the real
dimensions of the printed page, based on 72pixel per inch.. Would
think i would lose that much qualtily.

--Scott

--- In flexcoders@yahoogroups.com, John Robinson <[EMAIL PROTECTED]> wrote:
>
> Scott -
>
> I thought the same thing (use Bitmap/BitmapData). Quick example:
>
>
> 
> http://www.adobe.com/2006/mxml";
> creationComplete="init()" >
>
> 
> 
> 
>
>  autoLayout="true" click="onClick()">
> 
> 
>  height="{my_panel.height}"/>
>
> 
>
> I didn't try going to a printer but just saved as a pdf. Page 2
looks
> just like it's displayed in the browser, while page 1 looks like
the
> text has been shrunken horizontally a tad. Strange, but using
bitmap
> should solve your issues for now.
>
> Note... I tried adding the Bitmap object and the BitmapData object
to
> the printJob but it gave me errors so I'm not sure if the image is
> necessary or not.
>
> John
>
>
>
> On May 2, 2007, at 11:24 AM, scott_flex wrote:
>
> > I thought about that. I don't know how to make it a bitmap yet but
> > from what i've seen i should be able to fairly easily...and I
assume
> > i can send a bitmap image to the printer.
> >
> > In my real app i'm taking a few panels and adding them to a vbox
> > control so I can create "pages" to send to the printer. I
calculate
> > the height and when the combined height of my panels with text are
> > taller than a page 700ish pixels high, i create another page...
this
> > also allows me to have a nice print preview screen so they see
> > exactly how it will print...
> >
> > --Scott
> >
> > --- In flexcoders@yahoogroups.com, John Mark Hawley  wrote:
> > >
> > > Can you make the display object into a bitmap and then print
that
> > instead?
> > >
> >> .
> >
> >
>



Messages in this topic (0)Reply (via web post) | Start a new topic
Messages
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders% 
40yahoogroups.com


Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch  
format to Traditional

Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe



[flexcoders] modules with video

2007-05-03 Thread John Robinson
I have an app that has a few external modules that it switches my  
"main" view between.

One of these modules has an externally loaded video (using  
VideoDisplay, or whatever it's called).

When I load this module up everything works fine, the video plays, etc.

When I unload it and load a different module in it's place, the  
module with the video is removed from the screen but I can still hear  
the sound playing. Anyone?

Also, I'm somewhat confused by how modules really work. All of the  
examples I've found via google seem to reference a time before the  
official inclusion of the module related classes (pre-2.0.1 update?).

Does anyone know of a good reference point that'll help me get my  
head around what the Flex framework is doing when I load/unload modules?


Thanks!
John


Re: [flexcoders] ambiguous question about resizable components

2007-05-03 Thread John Robinson

mx:HDividedBox?

john


On May 3, 2007, at 3:48 PM, flashcrow2000 wrote:


Hello,

I want to implement an application which will require 2 columns, one
with controls and one with some content. These columns will be
separated by a dragable bar; the effect will be the one on Windows
Explorer when you enlarge the "folders" column's width..

My question: Is there a component I can use for this, or should I
implement everything from scratch?

Thanks,
Cosmin







Re: [flexcoders] Re: Html Text does NOT print in same format as rendered on scre

2007-05-03 Thread John Robinson

Scott -

I thought the same thing (use Bitmap/BitmapData). Quick example:



http://www.adobe.com/2006/mxml";  
creationComplete="init()" >






	autoLayout="true" click="onClick()">



	height="{my_panel.height}"/>




I didn't try going to a printer but just saved as a pdf. Page 2 looks  
just like it's displayed in the browser, while page 1 looks like the  
text has been shrunken horizontally a tad. Strange, but using bitmap  
should solve your issues for now.


Note... I tried adding the Bitmap object and the BitmapData object to  
the printJob but it gave me errors so I'm not sure if the image is  
necessary or not.


John



On May 2, 2007, at 11:24 AM, scott_flex wrote:


I thought about that. I don't know how to make it a bitmap yet but
from what i've seen i should be able to fairly easily...and I assume
i can send a bitmap image to the printer.

In my real app i'm taking a few panels and adding them to a vbox
control so I can create "pages" to send to the printer. I calculate
the height and when the combined height of my panels with text are
taller than a page 700ish pixels high, i create another page... this
also allows me to have a nice print preview screen so they see
exactly how it will print...

--Scott

--- In flexcoders@yahoogroups.com, John Mark Hawley <[EMAIL PROTECTED]> wrote:
>
> Can you make the display object into a bitmap and then print that
instead?
>

.







Re: [flexcoders] Creating an object from a class name

2007-04-18 Thread John Robinson


On Apr 16, 2007, at 4:45 PM, Matt Maher wrote:


I bet this is easy.

 I have "MainView" as a string and I need to create an object of that
 type... for example

 var myObject:Object = new GetObjectFromString("MainView");

 I know, that line of code is a mess. Got any help for me?! Thanks!!



I ran into something like this the other day. "getDefinitionByName()" 
is what you're looking for.


// import utils
import flash.utils.*;

// our target class
import mx.controls.Button;


var className = "Button";

var theClass:Object = flash.utils.getDefinitionByName("mx.controls." + 
className);

var theNewObject = new theClass();



I only messed with it long enough to get what I needed out of it so 
others here might be able to chime in. As far as I was able to tell, 
you still need the full path ("mx.controls." in this example).



john