Re: [Flashcoders] Pulling data from social media

2014-08-27 Thread Peter Ginneberge

 Have you considered using PHP to fetch the data you need, and then convert
 it from JSON to XML? It may be easier to deal with.

Not really, JSON support is built into the Flash player, so can you convert 
from JSON to AS and back.


var data:Object = JSON.parse(jsonData);

where jsonData is a JSON formatted string.

regards,
Peter


On 27/08/2014 19:36, James Merrill wrote:

Instagram uses JSON formatting for their API too. Depending on the data you
want to retrieve, you may need to use OAuth. Fortunately they make it
pretty easy.

Have you considered using PHP to fetch the data you need, and then convert
it from JSON to XML? It may be easier to deal with.

http://stackoverflow.com/questions/856833/is-there-some-way-to-convert-json-to-xml-in-php


On Tue, Aug 26, 2014 at 5:59 PM, John R. Sweeney Jr. jr.swee...@comcast.net

wrote:



Hi,

So one else has any experience with Pinterest or Instagram?

Thanks,
John

John R. Sweeney Jr.
Senior Interactive Multimedia Developer
OnDemand Interactive Inc
Hoffman Estates, IL 60169


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders






___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Pulling data from social media

2014-08-27 Thread Peter Ginneberge

Both have API's, so should be documented how to get the data you're after.

http://instagram.com/developer/
https://developers.pinterest.com/


On 27/08/2014 22:15, John R. Sweeney Jr. wrote:

I’m sorry I didn’t state my need better. I know that is what I’ll have to do 
with Twitter, but I’m not find how to access Pinterest and Instagram to pull 
the followers of a specific person on each site.

I really appreciate your comments…

Thanks,


John R. Sweeney Jr.
Senior Interactive Multimedia Developer
OnDemand Interactive Inc
Hoffman Estates, IL 60169




On Aug 27, 2014, at 3:01 PM, Peter Ginneberge p.ginnebe...@telenet.be wrote:


where jsonData is a JSON formatted string.

regards,
Peter


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Air Windows installed app

2014-02-24 Thread Peter Ginneberge

Easiest way is probably the app with runtime embedded option.
And if that is similar to how it works in Flash Builder (Flex), you'll then 
need installer software to create a custom executable.


As stated in the article:
quote
The resulting set of files is a complete AIR application, including a captive 
copy of the AIR runtime. It can then be packaged as an installer using several 
different approaches.

/quote

The different approaches are further explained in the article.

On 24/02/2014 8:02, natalia Vikhtinskaya wrote:

Not sure I understand how I can use this information in Flash Cs6. I
created app in this program as Air 3.2 for Desktop. I have only two options
- Windows Installer and App with runtime embedded.


2014-02-23 16:42 GMT+04:00 Peter Ginneberge p.ginnebe...@telenet.be:


You can apply for a license to (re)distribute the Air runtime and then
package it with your application.
http://help.adobe.com/en_US/air/redist/WS485a42d56cd19641-
70d979a8124ef20a34b-8000.html

Or you can include a captive copy of the Air runtime with your application.
http://www.adobe.com/devnet/air/articles/air3-install-and-
deployment-options.html

The first option will install the Air runtime with your application, as if
the user installed it himself, so it's separated from your application,
meaning both your application and the Air Runtime can be uninstalled
separately.

The second options installs both as a bundle. When a user uninstalls your
app, the runtime gets uninstalled with it.

regards,
Peter

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Air Windows installed app

2014-02-23 Thread Peter Ginneberge
You can apply for a license to (re)distribute the Air runtime and then package 
it with your application.

http://help.adobe.com/en_US/air/redist/WS485a42d56cd19641-70d979a8124ef20a34b-8000.html

Or you can include a captive copy of the Air runtime with your application.
http://www.adobe.com/devnet/air/articles/air3-install-and-deployment-options.html

The first option will install the Air runtime with your application, as if the 
user installed it himself, so it's separated from your application, meaning 
both your application and the Air Runtime can be uninstalled separately.


The second options installs both as a bundle. When a user uninstalls your app, 
the runtime gets uninstalled with it.


regards,
Peter


On 23/02/2014 7:28, natalia Vikhtinskaya wrote:

Thank you for help.
  I try to describe situation better. When I publish app as Windows
installer the user can take my exe file and install app on his pc. On
desktop he has icon after clicking on it he runs app. It plays well but
function write nothing do. I use

newFileStream.openAsync (appFile, FileMode.WRITE);
newFileStream.writeUTFBytes(xmlSets);
newFileStream.close ();

Yes, the user does not have Air and function that works only in Air does
not work for him. The same installation on my pc works well.
Okay. Next I created Application with runtime embedded. I gave the user
folder with all files that was created by Flash. He puts this folder on his
pc and run exe file. This works well. Everything writes well. But he wants
to have installation process that allow him to install this app as usual
new program. This second way does not give him that. Maybe I can combine
these two ways somehow? This is the first problem.
And additional question. Exe file shows information Unknown publisher.
How I can change that?

Thank you for any help. Not much places in net now where we can find help
for Flash questions.


2014-02-20 16:26 GMT+04:00 David Benman d...@dbenman.com:


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Video question

2014-01-31 Thread Peter Ginneberge

YouTube has a flash API that you can use:
https://developers.google.com/youtube/flash_api_reference


On 1/02/2014 0:46, John R. Sweeney Jr. wrote:

Hello again,

Has anyone used Youtube or Vimeo videos in their Flash app? My client will 
produce the video's and post them, then want a Flash based game that will play 
those videos on demand from within the game.

I've always had the videos either next to the .swfs or on another server, using 
a crossdomain.xml. Can a YouTube or Vimeo be embedded into my app to look like 
part of the game or do you end up with pop-up video windows?

Thanks,


John R. Sweeney Jr.
Senior Interactive Multimedia Developer
OnDemand Interactive Inc
Hoffman Estates, IL 60169



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] static const singleton GC?

2013-09-20 Thread Peter Ginneberge

That's not a singleton, as every time you call the public static constant, it 
creates a new instance.

The static var should be private and the class needs an access point method, 
usually called getInstance();

 private static var INSTANCE:AppApi;

 public function AppApi():void {
  if (INSTANCE != null ) {
   throw new Error(Only one instance allowed.  +
To access the Singleton instance, use getInstance().); 
  }

 }
 
 public static function getInstance():AppApi{

  if(!INSTANCE) INSTANCE = new AppApi();
  return INSTANCE;
 }
 


Then elsewhere in your app you refer to the singleton with:
AppApi.getInstance();


- Original Message - 
From: ktu ktu_fl...@cataclysmicrewind.com

To: Flash Coders flashcoders@chattyfig.figleaf.com
Sent: Friday, September 20, 2013 3:18 PM
Subject: Re: [Flashcoders] static const singleton  GC?



anybody have any ideas?
this is still shaking my boots.

thanks :)


On Mon, Sep 16, 2013 at 5:53 PM, ktu ktu_fl...@cataclysmicrewind.comwrote:


hey all!

I'm faced with an interesting question.

in my codebase, we made the decision to use a few singletons. to implement
those singletons we used the static const trick:

package com.example {
public static const API:AppAPI = new AppAPI();
}

package com.example {
public class AppAPI {
public function AppAPI () {
if (API) throw new Error();
}
}

this works fine in the normal environment we run in. that is, we run in a
scheduler system that loads the flash player, runs our swf, then shuts down
the flash player, doing that over and over again based off the schedule of
content. the problem now is that a new client uses a scheduler that is
built on AIR, so the flash player instance never shuts down. whenever our
app comes up in the scheduler, memory jumps and never goes down causing the
AIR app to crash every couple of hours. If, they load my application only
once, and leave it running, it lasts for days without any major memory
leaks.

any idea how i could test whether GC does pick this up or could? or any
known issues with this trick and GC? maybe you just have tricks in general
to finding out what GC isn't getting?

thanks!!!

--
Ktu;

The information contained in this message may or may not be privileged
and/or confidential. If you are NOT the intended recipient,
congratulations, you got mail!





--
Ktu;

The information contained in this message may or may not be privileged
and/or confidential. If you are NOT the intended recipient,
congratulations, you got mail!
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AIR

2013-05-20 Thread Peter Ginneberge

content created today will still run in the future, independent of where
air itself is going.


Unless you're using the HTML component to load external (http) content which 
you have no control  over.
Webkit (the browser engine AIR uses) currently doesn't support HTML 5 very well.

For instance, I was trying to load a web IRC client (https://kiwiirc.com/), which simply doesn't work because it uses HTML 5 
features.

Another app I had just finished - and worked perfectly - suddenly broke, 
because an html page I was loading upgraded to HTML 5.

If you have full control over the things you're creating, you're good to go, just be careful when relying on things you have no 
control over.

Moving forward, we'll see more and more HTML 5 content out there. AIR (webkit) 
needs to catch up, fast.. like.. yesterday.

regards
Peter



On 19 May 2013 15:08, Hans Wichman hans.wich...@gmail.com wrote:


Hi John,

content created today will still run in the future, independent of where
air itself is going. I wouldnt worry too much bout it, but that might be
just me :)

best
h

Sent from my iPad

On 19 mei 2013, at 14:39, John McCormack j...@easypeasy.co.uk wrote:

 Hi there.

 I would like to produce some educational material using AIR but am
feeling very insecure about its future.

 Could you possibly let me know how active you are in producing content
deliverable through AIR.

 Thanks

 John


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3

2012-10-27 Thread Peter Ginneberge

AS4 is on the way, including a new VM to support it.


- Original Message - 
From: Kerry Thompson al...@cyberiantiger.biz

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Friday, October 26, 2012 8:28 PM
Subject: Re: [Flashcoders] AS3



I don't think there is going to be an AS4. The ECMA Script committee was
working on a new standard at one point, but they disbanded 2-3 years ago
without issuing a standard for ECMA Script 4.

Adobe have been adding capabilities, such as sort, and I expect they will
continue to add capabilities. They might even call a new release
ActionScript 4, but it won't meet any ECMA standard.

I don't think that's necessarily a bad thing. AS3 is a mature, robust
language that has most of the features found in Java, JavaScript, and even
C++. To go much beyond what they already have, it would almost mean a whole
new programming paradigm.

Cordially,

Kerry Thompson



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Accessing FlashVars

2012-04-30 Thread Peter Ginneberge

Not sure it matters, but there's quotes missing in the HTML:

   param name=FlashVars value=appUrl=test /

probably should be: 


   param name=FlashVars value=appUrl=test /

- Original Message - 
From: Kerry Thompson al...@cyberiantiger.biz

To: FlashCoders flashcoders@chattyfig.figleaf.com
Sent: Tuesday, May 01, 2012 12:46 AM
Subject: [Flashcoders] Accessing FlashVars



Flash Builder 4 AS3 project, Windows 7, Firefox 12.0.

I can't access the FlashVars in the HTML file. I've been working on this
all day, and it's driving me crazy (crazier). Do you see anything in the
following code?

In the constructor of my default AS3 file, I have this:

  this.loaderInfo.addEventListener(Event.COMPLETE, init);

and in the init() function:

   var flashVars:Object;

   flashVars = this.loaderInfo.parameters;

When I look at it in the debugger, flashVars is an object, but it has no
parameters. The relevant HTML is pretty straightforward:

   object classid=clsid:D27CDB6E-AE6D-11cf-96B8-44455354
width=100% height=100% id=RMK_Beta
   param name=movie value=RMK_Beta.swf /
   param name=FlashVars value=appUrl=test /
   param name=quality value=high /
   param name=bgcolor value=#ff /
   param name=allowScriptAccess value=sameDomain /
   param name=allowFullScreen value=true /
   !--[if !IE]--
   object type=application/x-shockwave-flash
data=RMK_Beta.swf width=100% height=100%
  param name=FlashVars value=appUrl=test
/
   param name=quality value=high /
   param name=bgcolor value=#ff /
   param name=allowScriptAccess value=sameDomain /
   param name=allowFullScreen value=true /
   !--![endif]--
   !--[if gte IE 6]--
   p
   Either scripts and active content are not permitted
to run or Adobe Flash Player version
   10.0.0 or greater is not installed.
   /p
   !--![endif]--
   a href=http://www.adobe.com/go/getflashplayer;
   img src=
http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif;
alt=Get Adobe Flash Player /
   /a
   !--[if !IE]--
   /object
   !--![endif]--
   /object


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: odd request: as1 flash remoting components!

2012-03-30 Thread Peter Ginneberge

Can't tell if these are AS1 or AS2, as I can't install them (requires Flash MX 
to be installed, which I don't).

First installer is from a Studio MX installer CD
http://dl.dropbox.com/u/58645452/Flash%20Remoting%20Components.exe

Second installer I found on my (very) old laptop. It was sitting in a folder called Remoting MX next to another installer called 
flashremoting_comp_as20-win-en.exe so hopefully this is the as1.0 version, but again, I can't tell.

http://dl.dropbox.com/u/58645452/FlashRemotingComponents-win-en.exe

Looked on a bunch of very old CD's (ran into Flash 3, Director and Generator 
!!), but nothing that really screamed Remoting AS1.
Hopefully one of the above installers does the trick.
Fingers crossed...

regards,
Peter

- Original Message - 
From: tom rhodes tom.rho...@gmail.com

To: flashcoders flashcoders@chattyfig.figleaf.com
Sent: Friday, March 30, 2012 4:06 PM
Subject: [Flashcoders] Re: odd request: as1 flash remoting components!



i know it was a long time ago, but surely someone has these somewhere :(

On 29 March 2012 20:41, tom rhodes tom.rho...@gmail.com wrote:


hi,

i'm going through some really old work to add to a portfolio site, one old
site in particular i used to really like uses the original as1 amfphp style
remoting :D

only thing is, i can't compile it anymore as i lack the necessary
NetServices.as, NetDebug.as files which i neglected to pop in the source 8
years ago ;)

hopefully i'm bringing back happy memories of first configuring flash
remoting in AS1 for some people and they might still have these files
kicking about? can't find them online anywhere... :(

cheers,

tom.


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] MVC - ScreenManager

2012-03-27 Thread Peter Ginneberge

I have Command classes for that in combination with a ServiceLocator (Singleton) that 
holds all the services.
Commands are instantiated (only when needed) and executed by the Controller.
Commands, when executed, fetch the required service (RemoteService/WebService/HTTPService) from the ServiceLocater, listens for 
events on the service and executes it.

When data returns it is stored in the Model, which then dispatches a change 
event.

regards,
Peter

- Original Message - 
From: Creighton, Gerry gcreigh...@discmakers.com

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Monday, March 26, 2012 7:07 PM
Subject: Re: [Flashcoders] MVC - ScreenManager



If I'm loading XML would that be done in the model or the controller?




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Dispatching events from V to C

2012-03-15 Thread Peter Ginneberge

I usually have Events that match the data (for lack of a better word) they 
are related with.

eg: NewsEvent, UserEvent, etc..

Events then contain one or more static constants representing different event 
types.

eg: NewsEvent.GET_NEWS, NewsEvent.UPDATE_NEWS, UserEvent.LOGIN, 
UserEvent.LOGOUT, etc..

Here's one I'm actually using right now:
=

public class NewsEvent extends MVCEvent {

 public static const GET_NEWS:String = getNews;
 public static const UPDATE_NEWS:String = updateNews;
 public static const ADD_NEWS:String = addNews;
 public static const DELETE_NEWS:String = deleteNews;

 public var data:NewsDTO;

 public function NewsEvent(type:String, dto:NewsDTO=null) {
  super(type);
  data = dto;
 }

 override public function clone():Event {
  return new NewsEvent(type, data);
 }

}

==

The controller then maps the different event types to Commands:
// AppController:

 private function initCommands():void {
  addCommand(NewsEvent.GET_NEWS, GetNewsCommand);
  addCommand(NewsEvent.UPDATE_NEWS, UpdateNewsCommand);

  addCommand(NewsEvent.ADD_NEWS, AddNewsCommand);
  addCommand(NewsEvent.DELETE_NEWS, DeleteNewsCommand);
  // etc..
 }

==

addCommand (not included) does an addEventListener and maps it to the command class for later execution (when the event is 
triggered).


That's about all the controller does really, listen for events, which are 
mapped to commands.
I do reduce the number of event classes by grouping them (NewsEvent has: get, 
add, update, delete),
instead of having an AddNewsEvent, GetNewsEvent, UpdateNewsEvent and so on.

Hope that helps.. do let us know if it doesn't :)

regards,
Muzak


- Original Message - 
From: Mattheis, Erik (MIN-WSW) ematth...@webershandwick.com

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Thursday, March 15, 2012 10:25 PM
Subject: [Flashcoders] Dispatching events from V to C


Say I have  a save button that can exist in multiple views and can save multiple things. What's the best way to do this? Dispatch 
a different custom event from each type of button? Send one type of custom event  with different parameters? I have a controller 
that listens for 28 different custom events. I'd like to make the controller class smaller.


_ _ _
Erik Mattheis | Weber Shandwick

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Dispatching events from V to C

2012-03-15 Thread Peter Ginneberge

How does the controller know about each command class? Is each instantiated by 
the controller?


Yup, controller knows about command classes.

This is the FrontController (part of my MVC framework), which the AppController 
extends.
Might be able to view it in my repository, allthough i'm not sure if you have 
access as a non-assembla member
http://www.assembla.com/code/muzakdeezign/subversion/nodes/trunk/AirMVC/src/be/gip/mvc/control/FrontController.as?rev=67

=

 private var commands:Dictionary = new Dictionary();

 public function addCommand(eventType:String, commandRef:Class):void {
  if(commands[eventType] != null) {
   throw new MVCError(The command has already been registered: +eventType);
  }
  this.commands[eventType] = commandRef;
  MVCEventDispatcher.getInstance().addEventListener(eventType, 
this.executeCommand, false, 0, true);
 }

 protected function executeCommand(event:MVCEvent):void {
  var commandToInitialise:Class = this.getCommand(event.type);
  var commandToExecute:ICommand = new commandToInitialise();
  commandToExecute.execute(event);
 }

 protected function getCommand(commandName:String):Class {
  var command:Class = this.commands[commandName];
  if (command == null) {
   throw new MVCError(A command with the given name does not exist:  + 
commandName);
  }
  return command;
 }



So in each project i have 1 AppController (that extends FrontController) which 
maps Events to Commands.


Do the command classes talk directly to the model or view or back through the 
controller?


Command classes talk directly to the model, so they know the model, they don't 
know about views.
Changes in the Model trigger an event, which a View may (or may not) listen to.

Only the Controller knows about commands.. and it doesn't really know them. All it 
knows is they have an execute method.

So basically,
   - view triggers event
   - controller listens for event, looks up command mapped to that event
   - if command is found, an instance of that command is created and its 
execute() method is invoked.
   - command does whatever it needs doing (like fetch data from server)
   - command stores data in model, which triggers a change event
   - view listens for model change event(s)

Event broadcasting/listening is done through an EventDispatcher Singleton:
http://www.assembla.com/code/muzakdeezign/subversion/nodes/trunk/AirMVC/src/be/gip/mvc/events/MVCEventDispatcher.as?rev=67

All of this is basically a mixture of ARP and Cairngorm.

regards,
Muzak

- Original Message - 
From: Mattheis, Erik (MIN-WSW) ematth...@webershandwick.com

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Thursday, March 15, 2012 11:10 PM
Subject: Re: [Flashcoders] Dispatching events from V to C


How does the controller know about each command class? Is each instantiated by the controller? Do the command classes talk directly 
to the model or view or back through the controller?


On 3/15/12 4:44 PM, Peter Ginneberge p.ginnebe...@telenet.be wrote:


==

The controller then maps the different event types to Commands:
// AppController:

 private function initCommands():void {
  addCommand(NewsEvent.GET_NEWS, GetNewsCommand);
  addCommand(NewsEvent.UPDATE_NEWS, UpdateNewsCommand);

  addCommand(NewsEvent.ADD_NEWS, AddNewsCommand);
  addCommand(NewsEvent.DELETE_NEWS, DeleteNewsCommand);
  // etc..
 }

==

addCommand (not included) does an addEventListener and maps it to the command 
class for later execution (when the event is
triggered).


_ _ _
Erik Mattheis | Weber Shandwick
P: (952) 346.6610
M: (612) 377.2272
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Should I use BlazeDS for this?

2012-03-09 Thread Peter Ginneberge

WebOrb seems to have RTMP in all their editions (including the free one).
http://www.themidnightcoders.com/products/weborb-for-java/product-editions.html

regards,
Muzak

- Original Message - 
From: Dave Watts dwa...@figleaf.com

To: Steven Loe stevenloe5...@yahoo.com; Flash Coders List 
flashcoders@chattyfig.figleaf.com
Sent: Friday, March 09, 2012 6:08 PM
Subject: Re: [Flashcoders] Should I use BlazeDS for this?



When we have network slowdowns, polling sometimes fails and the
project hangs. Is Blaze/LiveCycle well behaved on thin networks? Is it
more robust than polling under these conditions?


To add to Henrik's answer, LiveCycle supports async (push) via RTMP,
but BlazeDS doesn't include RTMP support. It does support HTTP
long-polling, which is about as efficient as you get without actual
async communication:

https://en.wikipedia.org/wiki/Push_technology#Long_polling

Dave Watts, CTO, Fig Leaf Software


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] MVC style Correction

2012-03-07 Thread Peter Ginneberge
What he was asking was where does certain logic go, such as: 
   where do you check whether an email address is valid.


So if only the view cares about the valid email address, you can do so in the 
view, otherwise move the logic to the controller.
It also depends on how strict you are about what a view can / cannot do.

Some people (and frameworks) prefer to have no logic whatsoever in the view (dumb view) 
and have all the logic in the controller or in a go-between pattern: Observer / Mediator / Presenter - whichever fits their need.

For instance PureMVC and RobotLegs use Mediators:
http://puremvc.org/component/option,com_wrapper/Itemid,34/
http://www.robotlegs.org/diagram/

regards,
Muzak

- Original Message - 
From: Karl DeSaulniers k...@designdrumm.com

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, March 07, 2012 9:15 PM
Subject: Re: [Flashcoders] MVC style Correction


So a view can possibly have its own MVC within it? As long as the view  
is the only one using the data?


View Controller
View Model
View View

Or am I interp. this incorrectly?

Best,
Karl


On Mar 7, 2012, at 10:29 AM, John McCormack wrote:

Issues which have not been resolved has to do with how the logic is  
distributed amongst MVC partners.


So if anyone comes across an example in which they are uncertain,  
please let us hear about it.


On that subject, the book by Joel Hooks' and Lindsey Fallow:  
ActionScript Developers Guide to RobotLegs:

http://shop.oreilly.com/product/0636920021216.do

says...

As to whether checking an email address is valid view logic or  
application logic, there's no fixed answer.
A good filter is that if only the view classes care about this  
logic, it belongs in your view layer.
If other parts of the application need to be checked or informed,  
it's controller code.


John


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] MVC style Correction

2012-03-06 Thread Peter Ginneberge
I guess I am looking to the controller to do the event dispatching to  
the model the model to listening for the result.



You don't normally do that. The controller talks to the model directly, so the 
controller knows the model.
The model doesn't know neither view nor controller and dispatches events when 
it changes.

There's some more explaning here on MSDN (1/3 down the page, under Solution):
http://msdn.microsoft.com/en-us/library/ff649643.aspx

Note that they refer to this page I posted earlier:
http://st-www.cs.illinois.edu/users/smarch/st-docs/mvc.html



- Original Message - 
From: Karl DeSaulniers k...@designdrumm.com

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Tuesday, March 06, 2012 11:35 AM
Subject: Re: [Flashcoders] MVC style Correction



I kind of like that.

I guess I am looking to the controller to do the event dispatching to  
the model
the model to listening for the result. the view listening for changes  
to the model.


On Mar 6, 2012, at 4:26 AM, Cor wrote:


You could ofcourse take another approach:
In the view:
dispatchEvent(new Event(View.YOURVIEWEVENT));

and in the Contoller:

View.addEventListener(View.YOURVIEWEVENT, callback);

So there is a loose coupling as Paul wrote.




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] MVC style Correction

2012-03-05 Thread Peter Ginneberge
The dependency with this is that any changes to the UI - additional 
views being added or removed, requires that the controller be changed 
too. Any change to a view could cause the controller to become broken.


For this reason, I would say it's bad practice.


Not necessarily so.
But.. you'd use an interface, which the view implements.
In which case you'd probably be talking about a Presenter rather than a 
Controller :)

pseudo code:

// PRESENTER
private var view:IView;
public function ViewPresenter(v:IView) {
   view = v;
   // add listeners and whatnot..
}

onSomeEventHandler(event:SomeEvent):void {
   view.update();
}



// VIEW
public class MyView implements IView {
   public function update()(// do stuff);
}



// VIEW INTERFACE
public interface IView {
   public function update();
}

GWT uses this kind of architecture:
http://code.google.com/intl/nl/webtoolkit/articles/mvp-architecture.html
http://code.google.com/intl/nl/webtoolkit/articles/mvp-architecture.html#binding

http://code.google.com/intl/nl/webtoolkit/articles/mvp-architecture-2.html

http://www.google.com/intl/nl/events/io/2009/sessions/GoogleWebToolkitBestPractices.html

So in GWT I usually have:

(only 1) AppController
(several) Presenter + View + Model triads

A view dispatches events to which the presenter listens.
Presenter talks to view via its interface.

View doesn't know the presenter, 
Presenter doesn't know the view, only its interface.


regards,
Muzak

- Original Message - 
From: Paul Andrews p...@ipauland.com

To: flashcoders@chattyfig.figleaf.com
Sent: Monday, March 05, 2012 3:11 PM
Subject: Re: [Flashcoders] MVC style Correction


The dependency with this is that any changes to the UI - additional 
views being added or removed, requires that the controller be changed 
too. Any change to a view could cause the controller to become broken.


For this reason, I would say it's bad practice.


On 05/03/2012 13:57, Merrill, Jason wrote:

tutor mentions Controller can update View, but that example is not included.
If anyone can give me a little example of how that is done in MVC, don't 
hasitate

In about the simplest form:


//In the controller:

onSomeEventHandler(event:SomeEvent):void
{
_someViewInstance.update();
}


//In the view:

public function update():void
{
//Do stuff to change the view
}

Hope that helps.


  Jason Merrill


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] MVC style Correction

2012-03-05 Thread Peter Ginneberge
I'm guessing we're now into nuancing the model to hold view states and the presenter is controlling multiple views, or is that 
wrong?




Not in GWT, no.
There's one Presenter (or Controller) for the whole app.
And then there's an MVP triad for every view.

The app controller would then for instance listen to navigation events and be responsible for displaying the view matching the nav 
event.

It would do that by creating a presenter and view instance, passing the view to 
the presenter, e.g.

   var p:HomePresenter = new HomePresenter(new HomeView());
   // you could store p for later use, so to only create the presenter 
(+view) once


The presenter's constructor argument is an interface:

   public function HomePresenter(view:IHomeView) {}

By using a presenter and view interface, you're able to have very dumb views, swap them out, as long as they implement the required 
interface.

This also allows for easier unit testing, in GWT even without the view 
implementations at all.

=

@Ross:


I also loathe Interfaces.
the only time i use interfaces is to allow objects with two different class 
lineages to be used interchangeably.


That's the whole point of the view interface and why I brought it up, as you can then swap views and your presenter is none the 
wiser.
I admit, interfaces aren't used very often in Actionscript, in Java however, 99% of the time you're programming against interfaces 
or abstract classes.


==

Anyway.. hope I'm not confusing people who are just getting into the whole 
design pattern thing too much.

If you like reading, google:
   mvc vs mvp vs mvvm

MVVM: http://en.wikipedia.org/wiki/Model_View_ViewModel

Martin Fowler on PresentationModel:
http://martinfowler.com/eaaDev/PresentationModel.html

regards,
Muzak

- Original Message - 
From: Paul Andrews p...@ipauland.com

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Monday, March 05, 2012 5:00 PM
Subject: Re: [Flashcoders] MVC style Correction


I'm guessing we're now into nuancing the model to hold view states and the presenter is controlling multiple views, or is that 
wrong?


On 05/03/2012 15:33, Peter Ginneberge wrote:
The dependency with this is that any changes to the UI - additional views being added or removed, requires that the controller 
be changed too. Any change to a view could cause the controller to become broken.


For this reason, I would say it's bad practice.


Not necessarily so.
But.. you'd use an interface, which the view implements.
In which case you'd probably be talking about a Presenter rather than a 
Controller :)

pseudo code:

// PRESENTER
private var view:IView;
public function ViewPresenter(v:IView) {
   view = v;
   // add listeners and whatnot..
}

onSomeEventHandler(event:SomeEvent):void {
   view.update();
}



// VIEW
public class MyView implements IView {
   public function update()(// do stuff);
}



// VIEW INTERFACE
public interface IView {
   public function update();
}

GWT uses this kind of architecture:
http://code.google.com/intl/nl/webtoolkit/articles/mvp-architecture.html
http://code.google.com/intl/nl/webtoolkit/articles/mvp-architecture.html#binding

http://code.google.com/intl/nl/webtoolkit/articles/mvp-architecture-2.html

http://www.google.com/intl/nl/events/io/2009/sessions/GoogleWebToolkitBestPractices.html

So in GWT I usually have:

(only 1) AppController
(several) Presenter + View + Model triads

A view dispatches events to which the presenter listens.
Presenter talks to view via its interface.

View doesn't know the presenter, Presenter doesn't know the view, only its 
interface.

regards,
Muzak



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] MVC style Correction

2012-03-01 Thread Peter Ginneberge

Wanted to add that I use my own custom MVC micro-architecture which is based on 
(a mixture of) ARP and Cairngorm.

Back when I was still developing in Flash (before I moved to Flex) I used ARP by Aral Balkan, which as far as I know was the first 
real MVC framework for Flash.

Not even sure if there is another :)

Unfortunatly ARP no longer exists, well at least it's no longer being 
developed/updated.
There's still some info up on the osflash.org site:
http://osflash.org/projects/arp

But, the most important thing about ARP - at least to me - was the documentation that came with it and I can't seem to be able to 
get my hands on a working copy.
The online version is down and the downloadable version (exe) for some reason doesn't work properly (I'm guessing it's hooked up to 
the online html version or something).

http://osflash.org/downloads/arp/ARP_2.02_Manual.exe

If someone can get it to work, I'd love to hear about it.

The thing is, it contained a great explanation of how MVC applies to Flash. It explained all the relevant design patterns very well, 
including Model, View, Controller, Command and ServiceLocator.


If you download the ARP sources + samples, you can still see how it works (and 
use it if you like).
http://osflash.org/downloads/arp/ARP_2.02.zip

regards,
Muzak

- Original Message - 
From: Peter Ginneberge p.ginnebe...@telenet.be

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, February 29, 2012 4:25 PM
Subject: Re: [Flashcoders] MVC style Correction



Here's what I use.

packages:

- business
   Contains singleton with services (RemoteObject, WebService, HTTPService, 
SQLite), used by Command classes.

- commands
   Contains commands that are executed by the Controller when a matching event 
is triggered.
   Commands are responsible for fetching data from server and storing it in the 
model.

- control
   Contains AppController (singleton) that wires custom events to commands.

- dto
   Date Transfer Objects (aka Value Objects). These get passed around with 
custom events and are stored in Model, etc.

- events
   Custom events, usually dispatched by views. Controller listens for these 
events and executes matching command.

- model
   App models. Dispatches change event when data changes.

- view
   App views.

==


Where would you expect transfer object class

   dto package


Where would you expect a custom event class?

   events package


Where would you put a class that reads from and writes to the file system?

   commands package

What about a class that holds string values to display ion dialog boxes, on buttons, etc? Is that part of the view or should it 
be defined in the model?


Not in the view and certainly not in the model.
Most likely a static utility class - package: utils

regards,
Muzak




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] MVC style Correction

2012-03-01 Thread Peter Ginneberge

Found this FlashPaper swf that explains the ARP Pizza sample app:
http://aralbalkan.com/downloads/FlashToFlex.swf

The sample app is included in this download:
http://osflash.org/downloads/arp/ARP_2.02.zip



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] MVC style Correction

2012-02-29 Thread Peter Ginneberge

Here's what I use.

packages:

- business
   Contains singleton with services (RemoteObject, WebService, HTTPService, 
SQLite), used by Command classes.

- commands
   Contains commands that are executed by the Controller when a matching event 
is triggered.
   Commands are responsible for fetching data from server and storing it in the 
model.

- control
   Contains AppController (singleton) that wires custom events to commands.

- dto
   Date Transfer Objects (aka Value Objects). These get passed around with 
custom events and are stored in Model, etc.

- events
   Custom events, usually dispatched by views. Controller listens for these 
events and executes matching command.

- model
   App models. Dispatches change event when data changes.

- view
   App views.

==


Where would you expect transfer object class

   dto package


Where would you expect a custom event class?

   events package


Where would you put a class that reads from and writes to the file system?

   commands package

What about a class that holds string values to display ion dialog boxes, on buttons, etc? Is that part of the view or should it be 
defined in the model?


Not in the view and certainly not in the model.
Most likely a static utility class - package: utils

regards,
Muzak


- Original Message - 
From: Mattheis, Erik (MIN-WSW) ematth...@webershandwick.com

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Monday, February 27, 2012 10:19 PM
Subject: Re: [Flashcoders] MVC style Correction


I've been putting all my class files in one of three folders, model, view, controller. I'm mostly concerned with making the code as 
easy to understand as possible.


Where would you expect transfer object class - a class that just defines a set 
of values to pass as a group?

Where would you expect a custom event class?

Where would you put a class that reads from and writes to the file system? Air.File has methods that produce UI elements. What are 
benefits/drawbacks to writing the extra code to get File.browseForOpen() somewhere in the View?


What about a class that holds string values to display ion dialog boxes, on buttons, etc? Is that part of the view or should it be 
defined in the model?




_ _ _

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Fwd: MVC

2012-02-17 Thread Peter Ginneberge



Main problem that I see with the code that was posted is that it breaks
a major MVC rule and teaches a real bad habit: Views shouldn't have any
knowledge of Models


Not sure where you get the idea that a View shouldn't communictate with the 
Model directly:

This states otherwise: 
http://st-www.cs.illinois.edu/users/smarch/st-docs/mvc.html

quote
Unlike the model, which may be loosely connected to multiple MVC triads, Each view is associated with a unique controller and vice 
versa. Instance variables in each maintain this tight coupling. A view's instance variable controller points at its controller, and 
a controller's instance variable view points at its associated view. And, because both must communicate with their model, each has 
an instance variable model which points to the model object. So, although the model is limited to sending self changed:, both the 
view and the controller can send messages directly to each other and to their model.

/quote

For those wondering why I quote the above article:
http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller#History

regards,
Muzak


- Original Message - 
From: jchilc...@interactivityunlimited.com

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Thursday, February 16, 2012 3:07 PM
Subject: RE: [Flashcoders] Fwd: MVC



Main problem that I see with the code that was posted is that it breaks
a major MVC rule and teaches a real bad habit: Views shouldn't have any
knowledge of Models and Models shouldn't care who's using them
(Controllers are just conduits between Views and Models). On a larger
scale, this would present itself to be a huge maintenance nightmare and
dependencies have now been created. Everything should be independent of
each other enough that I could replace one section without affecting the
operation of anything else in the application. In this case. the
controller should be passing either Value or Transfer Objects back and
forth between the View and Model. This way, I could change models on the
fly and the controller and view wouldn't suspect a thing.

RobotLegs is an excellent example for learning about MVC.



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Updating to 10.3 or 11 External player in cs5.5?

2012-02-08 Thread Peter Ginneberge

Is there any way to fix this?

Have you installed the FP11 debug player?

If not, download and install it!


If I remember correctly, installing FP11 won't change a thing.
The Flash IDE uses a .dll (on windows) for preview/testing inside the IDE.
The only way to update that player dll is to actually wait for Adobe to release 
an updated version.

I haven't used Flash in a long time, so things may have changed, but that's how 
it used to be.

regards,
Peter


- Original Message - 
From: Paul Andrews p...@ipauland.com

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, February 08, 2012 8:01 PM
Subject: Re: [Flashcoders] Updating to 10.3 or 11 External player in cs5.5?



On 08/02/2012 18:38, Steven Hargrove wrote:

Hi all,

I've configured my cs5.5 IDE to compile to FP 10.3  11. The problem is,
when I test movie and run my SWF in the External test player - its still
using 10.2. It compiles the SWF to the proper version, but it just makes it
more difficult to test.

Is there any way to fix this?

Have you installed the FP11 debug player?

If not, download and install it!



Thanks,
Steve
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Updating to 10.3 or 11 External player in cs5.5?

2012-02-08 Thread Peter Ginneberge

Just looked it up real quick:
The IDE player dll is located in:

   {FLASH DIR}\Common\Configuration

and is called: authplay.dll

If you look at the file's properties you'll notice it says: Adobe Flash Player 
10.2 r153

Doing a trace inside the IDE gives: WIN 10,2,153,2

   import flash.system.Capabilities;
   trace(Capabilities.version);


In short, you're screwed :(

regards,
Peter


- Original Message - 
From: Peter Ginneberge p.ginnebe...@telenet.be

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, February 08, 2012 8:24 PM
Subject: Re: [Flashcoders] Updating to 10.3 or 11 External player in cs5.5?



Is there any way to fix this?

Have you installed the FP11 debug player?

If not, download and install it!


If I remember correctly, installing FP11 won't change a thing.
The Flash IDE uses a .dll (on windows) for preview/testing inside the IDE.
The only way to update that player dll is to actually wait for Adobe to release 
an updated version.

I haven't used Flash in a long time, so things may have changed, but that's how 
it used to be.

regards,
Peter




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Updating to 10.3 or 11 External player in cs5.5?

2012-02-08 Thread Peter Ginneberge

Cos then you're not really debugging.
In order to get trace output you'd have to start a Remote Debug Session.

So instead of just doing CTRL+Enter you'd have to:

- Publish (ALT+SHIFT+F12)
- start Remote Debug Session (no shortcut)
- switch to browser and hit F5

It's certainly doable, but a real PITA if you're doing extensive 
testing/debugging.

Might be easier switching to Flash Builder..

I just tested hooking up FlashBuilder to an fla and can debug in FP 11 :)

In FB:
   File  New Flash Professional Project.
   Point to the target Flash .fla file

In the Flash Builder preferences, under FlashBuilder - Debug, specify the path to the Standalone Debug player to be used for 
debugging.

In my case that is: C:\Program Files (x86)\Adobe\Adobe Flash Builder 
4.5\player\win\11.1\FlashPlayerDebugger.exe

I also had to add the playerglobal.swc to to project's classpath.
Once that's done, you're all set.. hit CTRL+SHIFT+ENTER and off you go.

Same fla as previous post now has this output (in Flash IDE):

Attempting to launch and connect to Player using URL 
C:\Users\Peter\Desktop\fp-test.swf
[SWF] C:\Users\Peter\Desktop\fp-test.swf - 2247 bytes after decompression
WIN 11,1,102,55

regards,
Peter

- Original Message - 
From: Chris Foster cfos...@catalystinteractive.com.au

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, February 08, 2012 10:36 PM
Subject: RE: [Flashcoders] Updating to 10.3 or 11 External player in cs5.5?



Maybe I'm missing something here - what is stopping you from keeping
your SWF open in a browser window (with the debug Player of your choice)
and simply hitting F5 after you've republished?

C:




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Adobe is my down-ass chick

2011-12-31 Thread Peter Ginneberge
With easily I was meaning that you do not have to teach yourself another programming language: more than that, I'm not scared by 
learning something new, I'm scared by the fact that I will lose all my long experience on Flash and I do not want to!


I understand what you're saying.
When I started learning Java (not so very long ago) I got frustrated by the 
mess that is JSP and Servlets.
That is why I'm so glad I finally found something like GWT to make web apps more or less the way I'm used to in Flex (I stopped 
using Flash around v8).

Meaning, OOP, MVP, etc..
http://code.google.com/intl/nl/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html
http://code.google.com/intl/nl/webtoolkit/articles/mvp-architecture.html

If you look at this project structure: 
http://code.google.com/intl/nl/webtoolkit/images/contacts-project-hierarchy.png
That's almost exactly what it would look like in Flex when using Cairngorm for 
instance, but without the Command pattern.
There's libraries out there that do have a Command implementation.

And with GWT you can use a declarative xml like structure for layout, close to 
Flex' MXML:
http://code.google.com/intl/nl/webtoolkit/doc/latest/DevGuideUiBinder.html


So why must I dismiss such a powerful thing like Flash?
Just because it's fancy to say Flash is dead?
What wil happen when softwarehouses that right now are focusing on html 5 (or other things) will finally realize that with flash 
you can export to iPhone, iPad and Android with a simple click and for this reason the developing process is faster than any other 
thing done in another programming language?




I hear ya !
I just love Flex, I really do. The thing is, in a few years time (I'm guessing) 
plugins will be a thing of the past.
Windows 8 is already moving in that direction. So it will simply be a matter of: we 
don't have a choice.

I mentioned this on FlexCoders already. If Adobe - moving away from the Flash plugin - would make FlashBuilder into something that 
spits out HTML/JS web apps much like GWT now does with Java, I'd be all over it. And I'm sure I'm not the only one :)


The power and beauty of ActionScript+MXML to build the apps we're used to and 
not having to touch the ugliness that is JS/HTML.
That'd be my wish for 2012 :)

regards,
Muzak



- Original Message - 
From: Ima Newsletta bignewsletter...@gmail.com

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Saturday, December 31, 2011 10:12 AM
Subject: Re: [Flashcoders] Adobe is my down-ass chick



Thanks Muzak,
Very interesting links!

However I said easily :-)
With easily I was meaning that you do not have to teach yourself another programming language: more than that, I'm not scared by 
learning something new, I'm scared by the fact that I will lose all my long experience on Flash and I do not want to!


In some time, performance won't be a trouble at all seen the power of the new 
devices.

So why must I dismiss such a powerful thing like Flash?
Just because it's fancy to say Flash is dead?
What wil happen when softwarehouses that right now are focusing on html 5 (or other things) will finally realize that with flash 
you can export to iPhone, iPad and Android with a simple click and for this reason the developing process is faster than any other 
thing done in another programming language?


So right now, I stay with Flash.

Happy new year to everyone.


Il 31/12/2011 03:27, Peter Ginneberge ha scritto:

Sorry for the late reply..


With your new chicks can you easily make web apps, desktop apps, android apps 
and ios apps?


Yup, except for desktop.

Once compiled, they're plain HTML/JS apps.
Mind you, I haven't done any Android and/or iOS apps  with GWT yet.

Just goodle GTW ios for instance and you'll find the stuff you need.

Here's a how-to - note the date -- 2007.
http://code.google.com/intl/en/webtoolkit/articles/gwt-iphone.html
The article is for GWT 1.4. The current version is 2.4 and alot has changed 
(improved) since then.

And there's all sorts of additional libraries available for all kinds of 
development.
Smart GWT: http://code.google.com/p/smartgwt/
GWT Mobile: http://code.google.com/p/gwt-mobile-webkit/
Ext GWT: http://www.sencha.com/products/extgwt/
etc..

As for desktop apps, you could wrap your GWT with AIR :)

regards,
Muzak





___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] XMLList Namespace Madness

2011-04-29 Thread Peter Ginneberge

The following works for me:

===

var myXMLList:XMLList = XMLList(GetUserProfileByNameResponse 
xmlns=http://microsoft.com/webservices/SharePointPortalServer/UserProfileService; 
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns:xsd=http://www.w3.org/2001/XMLSchema;

GetUserProfileByNameResult
 PropertyData
  ValueHelloWorld 1/Value
/PropertyData
 PropertyData
  ValueHelloWorld 2/Value
 /PropertyData
 /GetUserProfileByNameResult
/GetUserProfileByNameResponse);

var pnNs:Namespace=new 
Namespace(http://microsoft.com/webservices/SharePointPortalServer/UserProfileService;);
var myXMLList2:XMLList = myXMLList.pnNs::GetUserProfileByNameResult;

for each (var node:XML in myXMLList2.pnNs::PropertyData) {
trace(- PropertyData: , node.toXMLString());
}

===

regards,
Muzak

- Original Message - 
From: Merrill, Jason jason.merr...@bankofamerica.com

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Friday, April 29, 2011 4:32 AM
Subject: [Flashcoders] XMLList  Namespace Madness


I'm going crazy trying to drill down into a XMLList which has namespaces declared. I have been able to go into a few layers of the 
original XML with namespaces using namespace definitions in AS3, but now I am stuck at the last level.


The XMLList I have pared it down to has a length of 1 and has namespaces declared, which is throwing things off.  How can I get to 
the PropertyData / nodes given that namespaces are involved?


The following code can be copied and pasted into a fresh .fla as a test case:

/*TEST CASE-*/

var myXMLList:XMLList = XMLList(GetUserProfileByNameResponse 
xmlns=http://microsoft.com/webservices/SharePointPortalServer/UserProfileService; 
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns:xsd=http://www.w3.org/2001/XMLSchema;

 GetUserProfileByNameResult
   PropertyData
   ValueHelloWorld 1/Value
   /PropertyData
   PropertyData
   ValueHelloWorld 1/Value
   /PropertyData
 /GetUserProfileByNameResult
/GetUserProfileByNameResponse);

var pnNs:Namespace = new 
Namespace(http://microsoft.com/webservices/SharePointPortalServer/UserProfileService;);

var myXMLList2:XMLList = myXMLList.pnNs::GetUserProfileByNameResult;

trace(myXMLList2: +myXMLList2)//Traces fine, except more namespaces (xmlns) 
appear as attributes in first node.

for each (var propertyDataXML:XML in myXMLList2..PropertyData)
{
   //WHY DOES THIS NOT TRACE?
   trace(propertyDataXML: +propertyDataXML);
}
/*--*/

I also tried this for the loop as well:

/*--*/

for each (var propertyDataXML2:XML in 
myXMLList2.pnNs::GetUserProfileByNameResult..PropertyData)
{
   //WHY DOES THIS NOT TRACE?
   trace(propertyDataXML: +propertyDataXML2);
}
/*--*/

And why does the trace on myXMLList2 show an XML list where there is more namespace applied: GetUserProfileByNameResponse 
xmlns=http://microsoft.com/webservices/SharePointPortalServer/UserProfileService...; ??


Any help is MUCH appreciated.

Jason Merrill



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] flash.filesystem not in Flash?

2011-02-23 Thread Peter Ginneberge

AIR 2.0 has OS native installers (.exe, dmg).


For first time user, it would be a two-step installation to run an AIR app.


This is pretty much automated from what I remember. Haven't installed the 
runtime in a while though.
There's also the option to use your own installer (e.g. NSIS) as a wrapper for an AIR app and with that you can silently install the 
runtime.

I've done that before, easy-peasy.

In case you don't know NSIS:
http://nsis.sourceforge.net/Main_Page

There's an Eclipse plugin (EclipseNSIS) so you can install it right into 
FlashBuilder/Eclipse.


- Original Message - 
From: Merrill, Jason jason.merr...@bankofamerica.com

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, February 23, 2011 6:47 PM
Subject: RE: [Flashcoders] flash.filesystem not in Flash?



i think AIR has negated the need for these windowless flash wrappers - are 
these still in production?


Yes, the tools are still out there. AIR requires installation of the AIR runtime first.  The wrappers do not, they are standalone 
.exes.  For first time user, it would be a two-step installation to run an AIR app. So it depends on what your client needs/wants 
and what the user can do.  For example, AIR is not an approved tech in our environment, so if this were us, we'd have to look at 
other options.


Jason Merrill


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] flash.filesystem not in Flash?

2011-02-23 Thread Peter Ginneberge


Because it is much easier to get a random wrapper approved than AIR. Oh wait, 
it shouldn't be.



Especially since AIR apps need to be digitally signed (requires certificate).
Granted, you can build an AIR app with a developer certificate, but during install that is being displayed as Publisher: UNKNOWN 
and some security warnings. It's pretty hard to miss.



- Original Message - 
From: Henrik Andersson he...@henke37.cjb.net

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, February 23, 2011 6:58 PM
Subject: Re: [Flashcoders] flash.filesystem not in Flash?



Merrill, Jason skriver:

i think AIR has negated the need for these windowless flash wrappers - are 
these still in production?


Yes, the tools are still out there. AIR requires installation of the AIR runtime first.  The wrappers do not, they are standalone 
.exes.  For first time user, it would be a two-step installation to run an AIR app. So it depends on what your client needs/wants 
and what the user can do.  For example, AIR is not an approved tech in our environment, so if this were us, we'd have to look at 
other options.




Because it is much easier to get a random wrapper approved than AIR. Oh wait, 
it shouldn't be.



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] ComboBox label issue

2011-01-24 Thread Peter Ginneberge

If you want to display both the fontName and fontStyle, define a labelFunction 
for the combobox.

function setLabel(item:Object):String {
var fnt:Font = item as Font;
return fnt.fontName +  ( + fnt.fontStyle + );
}

font_cb.labelFunction = setLabel;


- Original Message - 
From: Creighton, Gerry gcreigh...@discmakers.com

To: flashcoders@chattyfig.figleaf.com
Sent: Monday, January 24, 2011 4:11 PM
Subject: [Flashcoders] ComboBox label issue


I�m having a problem properly displaying the font name and variant in a 
combobox.
I have fonts embedded in my swf and am exporting for AS.
I have a ComboBox that I�m populating from an enumerated font array like so...
code

fontArray = Font.enumerateFonts(false);//using false only enumerates embedded 
fonts
fontArray.sortOn(fontName,Array.CASEINSENSITIVE);
_fontDP = new DataProvider(fontArray);

FontCB.dataProvider = _fontDP;

//when I set up the FontCB I set the labelField like so...
FontCB.labelField = fontName;
/code

When the ComboBox is opened the display names for the fonts only show the main 
name of the font and not
each variant (shown below). When I publish and select to �Generate Size Report� I 
get all of the proper font names  variants.
How can I get the proper font names to display properly.
Ie
Arial
Arial
Arial
Arial
Book Antiqua
Book Antiqua
Book Antiqua
Book Antiqua
Helvetica
Helvetica
Helvetica
Helvetica

___

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How to utilize this code: public static const: Needhelp understanding...

2011-01-12 Thread Peter Ginneberge
I don't remember all the details, but if I'm not mistaken, those were used in the AS2 days to attach a class to a MovieClip, without 
them being linked in the Library (through the Symbol properties).


Google: Object.registerClass and/or __packages

Muzak


- Original Message - 
From: Micky Hulse mickyhulse.li...@gmail.com

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, January 12, 2011 10:08 AM
Subject: [Flashcoders] How to utilize this code: public static const: Needhelp 
understanding...



Hello,

Surfing around the net, I found this class:

http://snipplr.com/view/27981/from-as2-to-as3--where-did-it-go--setrgb--mck/

The code I would like some help with:

code

public class MyClass {

// Public static constants:
public static const CLASS_REF = com.foo.util.MyClass;
public static const CLASS_NAME:String = 'MyClass';
public static const LINKAGE_ID:String = 'com.foo.util.MyClass';

/code

Note: Among other things, I changed var to const; I assume const was
a better pick... No?

So, I understand that a public static const can be accessed from
another class without class initialization, but I don't understand how
the above code could be helpful (other than for meta/documentation
purposes?).

Could someone post an example that shows how/why/when the above
constants could (or, can) be used in the workflow of a project/app?

I hope my question makes sense...

Thanks!
Micky


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How to utilize this code: public staticconst: Needhelp understanding...

2011-01-12 Thread Peter Ginneberge

The class is a rewrite from AS2, so I guess they just left it in there.

In AS3 - for use with getDefinitionByName() or getQualifiedClassName() - those constants serve no purpose, as to get to them you 
have to know their package anyway.


- Original Message - 
From: Merrill, Jason jason.merr...@bankofamerica.com

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, January 12, 2011 4:38 PM
Subject: RE: [Flashcoders] How to utilize this code: public staticconst: 
Needhelp understanding...



but if I'm not mistaken, those were used in the AS2 days to attach a class to a 
MovieClip


Not necessarily in this case though. In AS3 you can use things like getDefinitionByName() or getQualifiedClassName() to 
dynamically reference or dynamically instantiate an instance of a class.  Since this is AS3 code, the use would not be related to 
AS2.  It could be used like that with dynamic class referencing, or they may just be doing it as available metadata for some odd 
reason.


An example of how I have used dynamically generated class instances is if I have some external XML that describes an application 
or solution of some kind, and I want to have the XML describewhat objects (and therefore what classes) are created, at runtime in 
the Flash player. For example:


var aCoolSpriteClass:Class = getDefinitionByName(aCoolSprite) as Class;
var obj:DisplayObject = new aCoolSpriteClass() as DisplayObject;


Note: Among other things, I changed var to const; I assume const was
a better pick... No?


Yes, those would be constants, so I would declare them as const so they cannot be modified.  Constants do never change in value at 
runtime.


Jason Merrill
Instructional Technology Architect
Bank of America  Global Learning



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How to utilize this code:public staticconst: Needhelp understanding...

2011-01-12 Thread Peter Ginneberge

so I guess


Yes, right - we're really just guessing


Well, it was a bit more than just a guess :)
http://www.matthijskamstra.nl/blog/index.php/2008/07/23/from-as2-to-as3-where-did-it-go-setrgb/

quote
   So a little as2 update.
/quote

You're right that they serve no code-purpose in that class, but they could in theory be used outside the class from an interface 
perspective.

Erhm, no.. just.. no :)

regards,
Muzak

- Original Message - 
From: Merrill, Jason jason.merr...@bankofamerica.com

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, January 12, 2011 9:01 PM
Subject: RE: [Flashcoders] How to utilize this code:public staticconst: 
Needhelp understanding...



those constants serve no purpose, as to get to them you have to know their 
package anyway.


OK, but one of those constants DOES contain the package name.  And how do you know they serve no purpose? You're right that they 
serve no code-purpose in that class, but they could in theory be used outside the class from an interface perspective.


I'm not suggesting they use getDefinitionByName() with the constant, as I said, that may just be odd metadata.  I was just 
answering the question about what values like that can be used for.



so I guess


Yes, right - we're really just guessing what they put those constants in for, since they don't serve a purpose inside the method 
implementations internally in the class.



Jason Merrill
Instructional Technology Architect
Bank of America  Global Learning



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Automagically create an interface from a given AS3class?

2010-12-20 Thread Peter Ginneberge

Just did a quick google and this turned up:
http://flashfocus.nl/forum/showthread.php?t=38705

It's a Dutch forum, but you should be able to get the tool here:
http://flashfocus.nl/forum/attachment.php?attachmentid=6488d=1196363980

Haven't tried/tested it, just a quick google search.

regards;
Muzak


- Original Message - 
From: Matt Perkins nudoru.m...@gmail.com

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Monday, December 20, 2010 3:12 PM
Subject: [Flashcoders] Automagically create an interface from a given AS3class?



So this is me being extremely lazy - is there a tool or a feature of a tool
that'll automatically create an interface from a class file?

I'm learning DI and implementing it in a framework that I have and to
properly follow DI principals, I need to make heavy use of interfaces as
types rather than the classes. I have a good list of interfaces to create.

Thanks!

Matt Perkins
-
http://www.nudoru.com
http://udon.nudoru.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] (From a PDF?) Getting bitmap data

2010-12-03 Thread Peter Ginneberge

Not sure what you mean with swc only. All sources can be found here:

http://code.google.com/p/purepdf/source/browse/
http://code.google.com/p/fxpdf/source/browse/
http://code.google.com/p/pavo/source/browse/


- Original Message - 
From: lists...@fo.com

To: flashcoders@chattyfig.figleaf.com
Sent: Friday, December 03, 2010 7:07 PM
Subject: [Flashcoders] (From a PDF?) Getting bitmap data



Thank you everyone, for the thoughts on how to pull images from PDFs.

I did find some other tools (just to mention them) but they are .swc-only; no source, and the customer needs to at least have the 
source available.


They are:

fxpdf
http://code.google.com/p/fxpdf/downloads/list
.swc-only
.write-only?

pavo
http://code.google.com/p/pavo/
. questionabe docs
. swc-only

purePDF
http://code.google.com/p/purepdf/downloads/detail?name=purePDF_0.74.20100527.zipcan=2q=
. reads pdf from .swf...
 .swc-only
  http://code.google.com/u/@VBhTQ1BRDxRGXQJ5/


I’ll see what I can come up with AS3 –wise.

thanks

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders