Re: [Flashcoders] AS2: SWF Decompiler Recommendations

2013-05-17 Thread Ross Sclafani
sothink swfdecompiler

i do not envy you.

Ross P. Sclafani
design / technology / creative

http://ross.sclafani.net
http://www.twitter.com/rosssclafani
http://www.linkedin.com/in/rosssclafani
[347] 204.5714



let go of even your longest held beliefs,
the only truth is in observation.

On May 17, 2013, at 3:31 PM, Jim Duber j...@duber.com wrote:

 Greetings all,
 
 I'm writing to ask for recommendations with regard to SWF decompilers. I had 
 several large projects on my stolen laptop that were not backed up. These are 
 AS2 projects authored in Flash CS4, with lots of timeline scripts all over 
 the place, including several Flash Media Server calls for recording audio 
 data. Media assets are backed up, so I'm not so worried as much about that as 
 I am in recovering all the code bits in somewhat of a logical manner.
 
 I've never had an occasion to use a swf decompiler (and hope never to HAVE TO 
 again!). In the meantime, I'm hoping to get some solid advice from the list.
 
 Thanks very much,
 Jim
 ___
 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] Game physics programming needed.

2012-10-28 Thread Ross Sclafani
Semi-warranted.

Ross P. Sclafani
Design | Technology | Creative
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714

On Oct 29, 2012, at 1:29 AM, Bryan Thompson br...@swfmagic.com wrote:

 I need to apologize to the list and especially to Oren.  This post was
 uncalled for.  I was angry about other issues and his post just set me off.
 Please disregard my very rude indiscretion.
 
 Bryan
 
 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Bryan
 Thompson
 Sent: Sunday, October 28, 2012 9:04 PM
 To: 'Flash Coders List'
 Subject: RE: [Flashcoders] Game physics programming needed.
 
 Oren, it's so simple.  There is a link at the bottom of every message you
 get.
 Click this: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 and use your common sense to figure out how to unsubscribe.  It's just not
 that difficult.
 
 If you still can't figure it out, consider giving up computing and look into
 basket weaving.
 
 Bryan
 
 
 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Oren B.
 Sent: Sunday, October 28, 2012 6:43 PM
 To: Flash Coders List
 Subject: Re: [Flashcoders] Game physics programming needed.
 
 ok,
 its getting really annoying. i have unsubscribed for 3 times from this
 mailing list.
 please remove me for good or ill have to trash your sessions with
 silverlight appraisals.
 :)
 
 thanks,
 Oren
 
 
 
 ___
 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] AS3

2012-10-26 Thread Ross Sclafani
my framework lets you code like this:


_package('com.neuromantic.display.shapes',

_import( 'com.neuromantic.display.shapes.Oval'),

_class( 'Circle' )._extends( 'Oval',{
Circle: function ( size ) {
this._super( size, size );
}

})
);



Ross P. Sclafani
design / technology / creative

http://ross.sclafani.net
http://www.twitter.com/rosssclafani
http://www.linkedin.com/in/rosssclafani
[347] 204.5714



let go of even your longest held beliefs,
the only truth is in observation.

On Oct 26, 2012, at 10:25 AM, Kevin Newman capta...@unfocus.com wrote:

 JS doesn't have classes, and emulating them is somewhat tricky using the 
 prototype chain (it can be done though).
 
 The easiest way to emulate classes though is to use a framework like 
 underscore.js (which Backbone.js is built on).
 
 Kevin N.
 
 
 On 10/26/12 9:21 AM, David Hunter wrote:
 I'd
 really like to learn to approach javascript from a class-based approach,
 
 ___
 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] RE: Can Javascript Listen to Flash Events?

2012-05-22 Thread Ross Sclafani
Definitely do this

Ross P. Sclafani
Design | Technology | Creative
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714

On May 22, 2012, at 1:02 PM, Nathan Mynarcik nat...@mynarcik.com wrote:

 Would allowscriptaccess=always work in this situation? Perhaps the issue
 is deeper than that?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] MVC - ScreenManager

2012-03-26 Thread Ross Sclafani
In my approach, the controller loads the XML, then puts it in the model which 
causes a CHANGE event to dispatch.

Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714

On Mar 26, 2012, at 1:07 PM, Creighton, Gerry gcreigh...@discmakers.com 
wrote:

 If I'm loading XML would that be done in the model or the controller?
 
 
 On 3/9/12 9:06 AM, Glen Pike g...@engineeredarts.co.uk wrote:
 
 :D
 
 On 09/03/2012 05:20, Karl DeSaulniers wrote:
 If you can't take the Henrik, get out of the kitchen.. lol
 
 
 ___
 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] MVC - ScreenManager

2012-03-26 Thread Ross Sclafani
All services in my MVC strategy are extensions to the controller tree that 
controllers use to get data from outside to put in the model. In my world, 
models don't do they hold so outside of their inner framework mechanisms, 
they are only made up of getters, setters, and vars.
All public methods in my MVC apps belong in the controller, or occasionally  
displayobject subclasses that are used by views, but not view subclasses 
themselves.

Division of duties:

Models - public vars/accessors

Controllers - public methods for manipulating model's public properties.

Views - private vars/methods to implement display logic based on model updates.

Again I can only speak about how wildly effective my approach is, but I'm sure 
there are merits to others where mine succeeds in simplicity.

Strokes / folks...

Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714

On Mar 26, 2012, at 1:37 PM, Merrill, Jason jason.merr...@bankofamerica.com 
wrote:

 I wouldn't put it in the controller, it a data thing.  I create a class that 
 loads in XML as a service class, and have the model load the service, 
 dispatching an event when done that the controller picks up on.  MVCS. 
 
 Jason Merrill
 Instructional Technology Architect II
 Bank of America  Global Learning 
 
 
 
 
 
 ___
 
 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com 
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Creighton, 
 Gerry
 Sent: Monday, March 26, 2012 1:25 PM
 To: Flash Coders List
 Subject: Re: [Flashcoders] MVC - ScreenManager
 
 I thought that it should be in the controller. Just wanted to be certain.
 
 Thanks,
 
 -Gerry
 
 On 3/26/12 1:21 PM, tom rhodes tom.rho...@gmail.com wrote:
 
 well, either you can add an Service to MVC and get MVCS, or perhaps 
 your main app controller would load it if it's config stuff and set up 
 models accordingly. i imagine you have a model ready and waiting to 
 store the info in?
 
 basically you want to keep app logic out of models, they just want to 
 be about data. so either do it in a controller that updates your model, 
 or have a controller use a service (so you don't bloat the controller) 
 which updates a model.
 
 On 26 March 2012 19:07, Creighton, Gerry gcreigh...@discmakers.com
 wrote:
 
 If I'm loading XML would that be done in the model or the controller?
 
 
 On 3/9/12 9:06 AM, Glen Pike g...@engineeredarts.co.uk wrote:
 
 :D
 
 On 09/03/2012 05:20, Karl DeSaulniers wrote:
 If you can't take the Henrik, get out of the kitchen.. lol
 
 
 ___
 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
 
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 --
 This message w/attachments (message) is intended solely for the use of the 
 intended recipient(s) and may contain information that is privileged, 
 confidential or proprietary. If you are not an intended recipient, please 
 notify the sender, and then please delete and destroy all copies and 
 attachments, and be advised that any review or dissemination of, or the 
 taking of any action in reliance on, the information contained in or attached 
 to this message is prohibited. 
 Unless specifically indicated, this message is not an offer to sell or a 
 solicitation of any investment products or other financial product or 
 service, an official confirmation of any transaction, or an official 
 statement of Sender. Subject to applicable law, Sender may intercept, 
 monitor, review and retain e-communications (EC) traveling through its 
 networks/systems and may produce any such EC to regulators, law enforcement, 
 in litigation and as required by law. 
 The laws of the country of each sender/recipient may impact the handling of 
 EC, and EC may be archived, supervised and produced in countries other than 
 the country in which you are located. This message cannot be guaranteed to be 
 secure or free of errors or viruses. 
 
 References to Sender are references to any subsidiary of Bank of America 
 Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are 
 Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a 
 Condition to Any Banking Service or Activity * Are Not Insured by Any Federal 
 Government 

Re: [Flashcoders] Dispatching events from V to C

2012-03-15 Thread Ross Sclafani
Usually I let the view detail the event handlers, which in turn call the 
appropriate controller methods. In this case, each view would have something 
like

private function saveButton_clickHandler(event:MouseEvent):void{
this.controller.save(/*here is the differing parameter*/);
}

Where the controller might have:

public function save( pathToFile:String ):void{
// do some Savin' based on that parameter
}

This is tidiest, and also makes all calls into the controller synchronous and 
stack-traceable. 

The business logic of what to do with the parameter naturally belongs in the 
controller.

I could understand thinking to have controller methods added as listeners to 
view events, but I like my controller methods to have signatures based directly 
on what they do, using typed arguments  with descriptive names and leave the 
event binding to view code.

Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714

On Mar 15, 2012, at 5:25 PM, Mattheis, Erik (MIN-WSW) 
ematth...@webershandwick.com wrote:

 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
 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] Dispatching events from V to C

2012-03-15 Thread Ross Sclafani
Again, a completely different approach to MVC than mine, so you have your pick 
:)

Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714

On Mar 15, 2012, at 5:44 PM, Peter Ginneberge p.ginnebe...@telenet.be wrote:

 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

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


Re: [Flashcoders] MVC - ScreenManager

2012-03-08 Thread Ross Sclafani
This guys approach sounds a lot like mine. At an airport but I'll try to check 
out his files 

Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714

On Mar 8, 2012, at 9:14 AM, Terry Riney tri...@blueridgetechsolutions.com 
wrote:

 Good morning,
 
 Like others before me I would like to really learn MVC by first doing my own 
 as opposed to a framework. This link is very close to what I need to 
 accomplish:
 
 http://www.ultrashock.com/index.php/forum/viewthread/80283/
 
 I have put my work in but keep getting block in one way or another, can 
 anyone point me in the direction of this setup in AS3 so I can at least get 
 that part of the plan out of the way (this link is AS2 and it seems any 
 reference to AS3 on this site is a dead end).
 
 Any help would be appreciated.
 
 Terry Riney
 ___
 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] MVC style Correction

2012-03-07 Thread Ross Sclafani
yay me!

Ross P. Sclafani
design / technology / creative

http://ross.sclafani.net
http://www.twitter.com/rosssclafani
http://www.linkedin.com/in/rosssclafani
[347] 204.5714



let go of even your longest held beliefs,
the only truth is in observation.

On Mar 7, 2012, at 10:27 AM, David Hunter wrote:

 Hi all,
 
 Really pleased that my original question has generated so much positive
 discussion, debate and learning on MVC. For me it has certainly shed some
 light on different ways to implement it and probably some improvements or
 different approaches I could take in the future.
 
 Currently I connect them all together exactly as Ross has his set up in his
 first example. Although I may experiment with some slightly different
 approaches or try out a framework.
 
 Regards,
 
 David
 
 
 On 7 March 2012 07:25, Cor c...@chello.nl wrote:
 
 +1
 
 Best regards,
 Cor van Dooren
 
 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of John
 McCormack
 Sent: dinsdag 6 maart 2012 21:30
 To: Flash Coders List
 Subject: Re: [Flashcoders] MVC style Correction
 
 Absolutely agree, so thank you everyone - very much.
 Each day I look for more.
 
 As a result of people talking about RobotLegs I bought and today received
 Joel Hooks' ActionScript Developers Guide to RobotLegs.
 
 A new direction - which I am thankful for.
 
 John
 
 On 06/03/2012 18:57, Kevin Newman wrote:
 Also, this thread has helped to flesh out my understanding of MVC to a
 substantial degree. I love that. :-)
 
 Kevin N.
 
 
 On 3/6/12 11:40 AM, Kevin Newman wrote:
 That's how I understand MVC anyway.
 
 ___
 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
 
 
 
 
 -- 
 David Hunter
 
 www.davidhunterdesign.com
 +44 (0) 7869 104 906
 ___
 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] MVC style Correction

2012-03-07 Thread Ross Sclafani
sounds about right.

Ross P. Sclafani
design / technology / creative

http://ross.sclafani.net
http://www.twitter.com/rosssclafani
http://www.linkedin.com/in/rosssclafani
[347] 204.5714



let go of even your longest held beliefs,
the only truth is in observation.

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

 
 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-05 Thread Ross Sclafani
i prefer to have the model update the views.

preferably via event for loose coupling.


the situations that a controller would alter a view  in the versions of MVC i 
have studied are for things that are pure visual responses.

like say a rollover:

ROLL_OVER event on View -- calls onRollOver on controller -- sets highlight 
on View.

Because the Flash SDK provides such a rich display API, I personally avoid this 
and leave any pure view event handling to the View internals to limit the 
public properties of Views.

I could see a scenario where one such rollover needs to cause changes in 
multiple views, and this approach could be implemented, but i would normally 
rout these types updates through a submodel dedicated to UI.

again, I value encapsulation above most other benefits of allowing the 
controller access to view properties, so i follow a standard unidirectional 
triangular flow.


Ross P. Sclafani
design / technology / creative

http://ross.sclafani.net
http://www.twitter.com/rosssclafani
http://www.linkedin.com/in/rosssclafani
[347] 204.5714
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] MVC style Correction

2012-03-05 Thread Ross Sclafani
that is exactly how i roll..

but there are some schools that have the controller effecting all change, even 
temporary ones on the views.

like i said, the flash SDK provides a great API for handling these things 
inside the views themselves.

but you could imagine in a develpoment environment with no display list, using 
a controller to implement such a thing.

in flash, though, it appears we take the same exact approach..so, you've got it 
perfect :D


Ross P. Sclafani
design / technology / creative

http://ross.sclafani.net
http://www.twitter.com/rosssclafani
http://www.linkedin.com/in/rosssclafani
[347] 204.5714

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


Re: [Flashcoders] MVC style Correction

2012-03-05 Thread Ross Sclafani
i think the flash display API prevents the need for all of these additional 
concerns and extra classes outside of Models Views and Controllers

I also loathe Interfaces.

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

like a time that i needed AIR NativeWindows to be able to snap to DisplayObjects

Ross P. Sclafani
design / technology / creative

http://ross.sclafani.net
http://www.twitter.com/rosssclafani
http://www.linkedin.com/in/rosssclafani
[347] 204.5714


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


Re: [Flashcoders] MVC style Correction

2012-02-27 Thread Ross Sclafani
I'm not implying that the code even adheres to my personal MVC file structure, 
but its functional operation is a good example to illustrate my MVC paradigm.



Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714

On Feb 27, 2012, at 6:39 AM, Henrik Andersson he...@henke37.cjb.net wrote:

 Ross Sclafani skriver:
 An MVC Example
 
 FLVPlayback is an interesting MVC  component:
 
 it holds a NetStream as a model of the video
 
 it holds a Video as a view of the Video
 
 It acts as controller to set the model in motion by connecting it to a stream
 
 the ui is also a view of the video: the percent elapsed is represented n the 
 scrub bar, ther is a play button while paused, a pause button while playing, 
 then there are the time readouts..
 
 
 Sadly, that is not true.
 
 First sentence of the manual page for the FLVPlayback class:
 FLVPlayback extends the Sprite class and wraps a VideoPlayer object.
 
 I don't have enough time to figure out how much this matters, but I
 assume that if you care you are better of reading the source code anyway.
 ___
 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] MVC style Correction

2012-02-27 Thread Ross Sclafani
In my world, an adapter is code I write to shoehorn code I didn't write into my 
framework. Code sealed in a third party SWF loaded by one of my views is a 
common candidate for an adapter.
From a completely green field, I can't imagine needing to adapt any code I 
write to other code I've written.

The name adapter implies two things that do not natively fit together.

Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714

On Feb 27, 2012, at 8:35 AM, John McCormack j...@easypeasy.co.uk wrote:

 It was a good example of MVC Ross, I think Henrik was saying it should have 
 been designed using MVC.
 
 I did see a nice example on a Microsoft poster using a clock with: analog and 
 digital views; data in the model and the controller enabling the views etc.
 
 I am wondering what an adapter might get up to.
 
 John
 
 On 27/02/2012 13:17, Ross Sclafani wrote:
 I'm not implying that the code even adheres to my personal MVC file 
 structure, but its functional operation is a good example to illustrate my 
 MVC paradigm.
 
 
 
 Ross P. Sclafani
 Owner / Creative Director
 Neuromantic Industries
 http://www.neuromantic.com
 http://ross.sclafani.net
 http://www.twitter.com/rosssclafani
 347.204.5714
 
 On Feb 27, 2012, at 6:39 AM, Henrik Anderssonhe...@henke37.cjb.net  wrote:
 
 Ross Sclafani skriver:
 An MVC Example
 
 FLVPlayback is an interesting MVC  component:
 
 it holds a NetStream as a model of the video
 
 it holds a Video as a view of the Video
 
 It acts as controller to set the model in motion by connecting it to a 
 stream
 
 the ui is also a view of the video: the percent elapsed is represented n 
 the scrub bar, ther is a play button while paused, a pause button while 
 playing, then there are the time readouts..
 
 Sadly, that is not true.
 
 First sentence of the manual page for the FLVPlayback class:
 FLVPlayback extends the Sprite class and wraps a VideoPlayer object.
 I don't have enough time to figure out how much this matters, but I
 assume that if you care you are better of reading the source code anyway.
 ___
 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

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


Re: [Flashcoders] MVC style Correction

2012-02-27 Thread Ross Sclafani
My takes:

I generally have a dataTypes folder at the same level as the MVC folder for 
'transfer objects'
I'd probably have an events folder at the same level in your case, but I can't 
see much of an argument for custom events in a properly architected MVC 
application. Since every write to the model throws a CHANGE event, the Entire 
app is evented in nature. What is an example of a custom event you'd like to 
support in your MVC app? I want to test my theory.

As for Files, that screams controller to me.

In an app that does file system manipulation via the OS, I'd likely have a 
fileSystemController class in my controller tree. The built-in browse for files 
UI is not likely something I'd concern my view tree with, I'd probably just 
treat it the same way I treat a web service: the controller talks to it and 
passes any result my app needs to access into the model.
If I was making my own views to the file system, thats when I would involve the 
view tree.


Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com

347.204.5714
http://ross.sclafani.net
http://www.twitter.com/rosssclafani

On Feb 27, 2012, at 4:19 PM, Mattheis, Erik (MIN-WSW) 
ematth...@webershandwick.com wrote:

 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.
 entire 
 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?
 
 
 
 _ _ _
 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] MVC style Correction

2012-02-26 Thread Ross Sclafani
thanks, its just how i do MVC

it really get interesting when you follow a mitosis development pattern... You 
start with one model, controller, and view, add features to each in parallel, 
and as each class gets too big, you break them out into subcontrollers, 
submodels, and subviews. Then sub-sub. My projects have a triple-tree structure 
branching out from the core model, controller, and view classes

finer granularity as you reach further in, and always broken into M, V, and C:

Models contain properties only. they dispatch a CHANGE Event every time one of 
their properties change,.

Views display properties of the model. they listen for the CHANGE Event, and 
update their appearance with the new values stored in the model every time it 
changes.

Controllers manipulate properties of the model. Whether trigger by event 
handlers in the views, or internal timers or network activity, any command that 
sets any value of any property of the model is placed in a controller. 
Controllers might use other controllers to trigger changes in submodels outside 
its subdomain

the project starts off very compact, then grows with its functionality as 
required, always growing out from the center so you never paint yourself into a 
corner

then later to optimize, you can get specific about which submodel a particular 
view is listening to, in turn limiting the number of change events it receives 
to those actually represented in the view.

all subcontrollers hold a reference to the root controller, so it is easy to 
target any node on the controller tree from anywhere inside of it.

same with the model tree. some submodel properties can emit the CHANGE Event 
only on a local level, and not send the event up the hierarchy, isolating the 
scope of view updates

An MVC Example

FLVPlayback is an interesting MVC  component:

it holds a NetStream as a model of the video

it holds a Video as a view of the Video

It acts as controller to set the model in motion by connecting it to a stream

the ui is also a view of the video: the percent elapsed is represented n the 
scrub bar, ther is a play button while paused, a pause button while playing, 
then there are the time readouts..

if the video its playing, 
the user clicks pause in the view, 
it tells the controller to pause the stream in the model, 
which notifies the views, so the Video is paused, and  pause button becomes a 
play button.

thats how i do MVC. 
data is stored in mvc.models, 
data is displayed in mvc.views, and 
data is manipulated in mvc.controllers.


Ross P. Sclafani
design / technology / creative

http://ross.sclafani.net
http://www.twitter.com/rosssclafani
http://www.linkedin.com/in/rosssclafani
[347] 204.5714

On Feb 26, 2012, at 11:09 PM, Karl DeSaulniers wrote:

 BTW Ross, I thought your example was great.
 
 Karl DeSaulniers
 Design Drumm
 http://designdrumm.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] MVC style Correction

2012-02-24 Thread Ross Sclafani
Apparently there are no rules.

Just call it MVC and it's MVC I guess.



Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714

On Feb 24, 2012, at 10:15 AM, Merrill, Jason 
jason.merr...@bankofamerica.com wrote:

 Maybe I'm off, but I don't think the controller should manipulate data. 
 
 Jason Merrill
 Instructional Technology Architect II
 Bank of America  Global Learning 
 
 
 
 
 
 ___
 
 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com 
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mattheis, 
 Erik (MIN-WSW)
 Sent: Thursday, February 23, 2012 8:26 PM
 To: Flash Coders List
 Subject: Re: [Flashcoders] MVC style Correction
 
 Ross Sclafani ross.sclaf...@gmail.com wrote:
 It is very easy to locate any code in one of my projects by ascertaining the 
 domain of the code in question and looking in the appropriate branch.
 Does it store data? It's in the model. Does it interpret and display data? 
 Try your views. Does it manipulate data? Look in the controller.
 
 This thread has been useful, thanks all. I've a ton of questions regarding 
 judgment calls and below I post a class illustrating a few I've struggled 
 with. The comments are intended to be my questions/admissions of bafflement. 
 I'm unsure where in a MVC this class should go as its main purpose is to work 
 with the File class which itself has methods which retrieve 
 (File.applicationDirectory), interpret (File.exists) and display 
 (File.browseForOpen) data.
 
 The class also is a dreaded example of allowing the view to listen directly 
 to the model for events, perhaps only because I've misguidedly decided to 
 make it part of the model as it has to do with copying and deleting a SQLite 
 file used in the app.
 
 package mvc.model {
 /* saveFileAs() saves a copy of a SQLite DB for the purposes of  transferring 
 data to an instance of this app on another  computer.
 
 closeDBAndReplace() = replaces the db file if the user  is importing data.
 */
 import flash.events.EventDispatcher;
 import flash.events.Event;
 import flash.filesystem.File;
 // class Data works with a SQLite DB
 import mvc.model.Data;
 // Where in a MVC should custom event classes  // be located? I wish to pass 
 my own objects  // along with events, usually Transfer Objects
 // or a string to be displayed
 import mvc.controller.CustomDataEvent;
 
 public class ManipulateDBFile extends EventDispatcher {
 
  private var _data:Data;
  private var _sourceFile:File;
  private var _copyToDirectory:File;
 
  public function ManipulateDBFile(data:Data) {
   _data = data;
  }
 
  public function saveFileAs() : void {
   var docsDir:File = File.desktopDirectory;
   // This creates a UI element. I would look for this code in the view!
   docsDir.browseForDirectory('Save File in  ...');
   // This is asking a UI elemt to inform the Model directly. Big bad no?
   docsDir.addEventListener(Event.SELECT, copyFile);
  }
 
  private function copyFile(e:Event):void  {
   _sourceFile = File.applicationStorageDirectory.resolvePath(msgDB.db);
   _copyToDirectory = e.target.resolvePath(msgDB.db);
   if (_copyToDirectory.exists) {
// Passing this event through the Controller seems to create complexity,
// or at least unnecessary lines of code. Is there an advantage gained by
// communicating to the view through the controller here?
var evt:CustomDataEvent = new 
 CustomDataEvent(CustomDataEvent.FILE_ALREADY_EXISTS);
dispatchEvent(evt);
   }
   else {
replaceFile();
   }
  }
 
  public function replaceFile() : void {
   var evt:CustomDataEvent = new 
 CustomDataEvent(CustomDataEvent.COPY_COMPLETE);
   try {
_sourceFile.copyTo(_copyToDirectory, true);
dispatchEvent(evt);
   }
 
   catch (error:Error) {
evt.param = error.message;
dispatchEvent(evt);
   }
   _sourceFile = null;
   _copyToDirectory = null;
  }
 
  public function closeDBAndReplace() : void {
   // The file cannot be deleted if there is a SQLConnection to it.
   // The class that is aware of a possible connection also does the
   // deletion. But deleting the file seems to conceptually
   // fit into this class better
   _data.addEventListener(CustomDataEvent.DRILL_RESET, findFile, false, 0, 
 true);
   _data.deleteDBFile();
 
  }
 
  private function findFile(e:CustomDataEvent) : void {
   _data.removeEventListener(CustomDataEvent.DRILL_RESET, findFile, false);
   var docsDir:File = File.desktopDirectory;
   docsDir.browseForOpen('Select msgDB.db file ...');
   docsDir.addEventListener(Event.SELECT, replaceDBFile);
  }
 
  private function replaceDBFile(e:Event):void  {
   var sourceFile:File = e.target as File;
   var destination:File = 
 File.applicationStorageDirectory.resolvePath(msgDB.db);
   try {
sourceFile.copyTo(destination, true);
dispatchEvent(new CustomDataEvent(CustomDataEvent.RESTART_REQUIRED

Re: [Flashcoders] MVC style Correction

2012-02-24 Thread Ross Sclafani
Yeah I understand how different the flavors are now. I didnt invent the 
triangular flow paradigm of my framework, I read it in a book.

Lots of books, lots of 'spirits' 

In the end it's just another 3 letter acronym.

Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714

On Feb 24, 2012, at 4:45 PM, Merrill, Jason jason.merr...@bankofamerica.com 
wrote:

 No rules, you're right, just having the controller manipulate data just seems 
 to go against the spirit of what MVC is all about. Controllers are usually 
 used as communication busses in my experience. 
 
 Jason Merrill
 Instructional Technology Architect II
 Bank of America  Global Learning 
 
 
 
 
 
 ___
 
 
 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com 
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ross Sclafani
 Sent: Friday, February 24, 2012 4:29 PM
 To: Flash Coders List
 Subject: Re: [Flashcoders] MVC style Correction
 
 Apparently there are no rules.
 
 Just call it MVC and it's MVC I guess.
 
 
 
 Ross P. Sclafani
 Owner / Creative Director
 Neuromantic Industries
 http://www.neuromantic.com
 http://ross.sclafani.net
 http://www.twitter.com/rosssclafani
 347.204.5714
 
 On Feb 24, 2012, at 10:15 AM, Merrill, Jason 
 jason.merr...@bankofamerica.com wrote:
 
 Maybe I'm off, but I don't think the controller should manipulate data. 
 
 Jason Merrill
 Instructional Technology Architect II
 Bank of America  Global Learning
 
 
 
 
 
 ___
 
 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com 
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of 
 Mattheis, Erik (MIN-WSW)
 Sent: Thursday, February 23, 2012 8:26 PM
 To: Flash Coders List
 Subject: Re: [Flashcoders] MVC style Correction
 
 Ross Sclafani ross.sclaf...@gmail.com wrote:
 It is very easy to locate any code in one of my projects by ascertaining the 
 domain of the code in question and looking in the appropriate branch.
 Does it store data? It's in the model. Does it interpret and display data? 
 Try your views. Does it manipulate data? Look in the controller.
 
 This thread has been useful, thanks all. I've a ton of questions regarding 
 judgment calls and below I post a class illustrating a few I've struggled 
 with. The comments are intended to be my questions/admissions of bafflement. 
 I'm unsure where in a MVC this class should go as its main purpose is to 
 work with the File class which itself has methods which retrieve 
 (File.applicationDirectory), interpret (File.exists) and display 
 (File.browseForOpen) data.
 
 The class also is a dreaded example of allowing the view to listen directly 
 to the model for events, perhaps only because I've misguidedly decided to 
 make it part of the model as it has to do with copying and deleting a SQLite 
 file used in the app.
 
 package mvc.model {
 /* saveFileAs() saves a copy of a SQLite DB for the purposes of  
 transferring data to an instance of this app on another  computer.
 
 closeDBAndReplace() = replaces the db file if the user  is importing data.
 */
 import flash.events.EventDispatcher;
 import flash.events.Event;
 import flash.filesystem.File;
 // class Data works with a SQLite DB
 import mvc.model.Data;
 // Where in a MVC should custom event classes  // be located? I wish to pass 
 my own objects  // along with events, usually Transfer Objects
 // or a string to be displayed
 import mvc.controller.CustomDataEvent;
 
 public class ManipulateDBFile extends EventDispatcher {
 
 private var _data:Data;
 private var _sourceFile:File;
 private var _copyToDirectory:File;
 
 public function ManipulateDBFile(data:Data) {
  _data = data;
 }
 
 public function saveFileAs() : void {
  var docsDir:File = File.desktopDirectory;
  // This creates a UI element. I would look for this code in the view!
  docsDir.browseForDirectory('Save File in  ...');
  // This is asking a UI elemt to inform the Model directly. Big bad no?
  docsDir.addEventListener(Event.SELECT, copyFile);  }
 
 private function copyFile(e:Event):void  {
  _sourceFile = File.applicationStorageDirectory.resolvePath(msgDB.db);
  _copyToDirectory = e.target.resolvePath(msgDB.db);
  if (_copyToDirectory.exists) {
   // Passing this event through the Controller seems to create complexity,
   // or at least unnecessary lines of code. Is there an advantage gained by
   // communicating to the view through the controller here?
   var evt:CustomDataEvent = new 
 CustomDataEvent(CustomDataEvent.FILE_ALREADY_EXISTS);
   dispatchEvent(evt);
  }
  else {
   replaceFile();
  }
 }
 
 public function replaceFile() : void {
  var evt:CustomDataEvent = new 
 CustomDataEvent(CustomDataEvent.COPY_COMPLETE);
  try {
   _sourceFile.copyTo(_copyToDirectory, true);
   dispatchEvent(evt);
  }
 
  catch (error:Error) {
   evt.param = error.message

Re: [Flashcoders] Fwd: MVC

2012-02-17 Thread Ross Sclafani
I'm firmly against views treating models as anything but read only.

Personal preference I guess

Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714

On Feb 17, 2012, at 1:11 PM, Peter Ginneberge p.ginnebe...@telenet.be wrote:

 
 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

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


Re: [Flashcoders] MVC style Correction

2012-02-17 Thread Ross Sclafani
Can somebody show me a View class that doesn't update itself?  What does it do? 
Are all of its properties public?

Conversely, can someone show me a controller class that does the work of both 
modifying the model and manipulating the view? Does it lead to a ton of code in 
one class?

I'm not suggesting my version of MVC is the only correct one, and while I'm not 
a fan of controller-centric mvc (like cocoa) i understand there are successful 
implementations (like iOS) That said, I have never been shown an MVC 
implementation in which anything is allowed to alter the model other than the 
controller, it's my current understanding that that's the only fundamental 
requirement of MVC no matter what flavor.

Further, I can attest to the fact that my approach has a real advantage in 
keeping display, state, and business logic highly discrete and evenly 
distributed code wise.

It is very easy to locate any code in one of my projects by ascertaining the 
domain of the code in question and looking in the appropriate branch.
Does it store data? It's in the model.
Does it interpret and display data? Try your views.
Does it manipulate data? Look in the controller.

Easy as MVC.

This separation of interests is what appeals to me about the pattern, and I've 
had great success not only creating apps with my particular approach, but I've 
also been able to pick them back after any amount of time and track down the 
code behind any feature very quickly.

If anyone doesn't mind detailing the benefits of another approach as I did 
mine, I'd love to disrupt these dogmatic feelings I'm having.

I don't need to be told I'm wrong, because clearly I'm not. I don't need more 
opinions about what 'correct' MVC looks like because my system works extremely 
well.  Im asking for concrete examples of different takes on MVC and what makes 
them advantageous. There has to be something left to learn on the matter..

I'll let you know when I get my framework up on the hub.

Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714

On Feb 17, 2012, at 5:18 PM, Kevin Newman capta...@unfocus.com wrote:

 Hands down the best explanation of MVC I've ever seen anywhere, is in this 
 iTunes U series (item 43 at the bottom of the list) - you can just grab the 
 slides too, but you'll miss all the emotion and humor of the delivery :-)
 http://itunes.apple.com/us/itunes-u/ipad-iphone-application-development/id473757255
 
 
 There seems to be some basic pieces that are commonly missing from most 
 descriptions of MVC:
 - Models have model data, broadcast changes to listening controllers, are 
 updated directly by the controller.
 - Views have view data, data that is specific to the view, are updated 
 directly by the controller, broadcast changes to listening controllers.
 - Models shouldn't communicate with Views (ever).
 - Views shouldn't communicate with Models (ever).
 
 A lot of examples of MVC I've seen take a shortcut and basically send the 
 model data to a view which renders that data, but that isn't MVC at all.
 
 Kevin N.
 
 
 On 2/16/12 1:43 PM, jchilc...@interactivityunlimited.com wrote:
 Models and Views don't talk to each other.
 
 ___
 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] Fwd: MVC

2012-02-16 Thread Ross Sclafani
From: Ross Sclafani ross.sclaf...@gmail.com
Date: February 16, 2012 2:39:34 AM EST
To: Cor c...@chello.nl
Cc: Flash Coders List flashcoders@chattyfig.figleaf.com, 
flashcoder...@googlegroups.com
Subject: Re: MVC

feel free to hit me up any time ill try to have time to respong

none the less, this should get you started:

/*
 * Model.as
 *
 * mvc.Model;
 */
package mvc {
import flash.events.EventDispatcher;
import flash.events.Event;
class Model extends EventDispatcher{
private var _count:int = 0;
public function get count():int{
return _count;
}
public function set count(value:int):void{
this._count= value;
update();
}
public function Model(){
super()
}
private function update():void{
this.dispatchEvent(new Event(Event.CHANGE));
}
}
}


/*
 * Controller.as
 *
 * mvc.Controller;
 */
package mvc {
public  class Controller {
private var model:Model;
public function Controller(model:Model){
super()
this.model = model;
}
public function countUp():void{
this.model.count++;
}
}
}

/*
 * View.as
 *
 * mvc.View;
 */
package mvc {
import flash.text.TextField;
import flash.events.Event;
import flash.display.Sprite;
public  class View extends Sprite(){
private var model:Model;
private var controller Controller;
private var textField:TextField = new TextField();
public function View(model:Model, controller:Controller){
model.addEventListener(Event.CHANGE, 
this.model_changeHandler);
super()
this.model = model;
this.controller = controller;
this.addChild(this.textField);
this.stage.addEventListener(MouseEvent.CLICK, 
this.stage_clickHandler)

}
private function stage_clickHandler(event:MouseEvent):void{
this.controller.countUp();
}
private function model_changeHandler(event:Event):void{
this.textField.text = this.model.count
}
}
}
/*
 * App.as
 *
 * MVC screen click counter.
 */ 
package{
import mvc.Model;
import mvc. View;
import mvc.Controller;
public class App{
private var model:Model = new Model();
private var controller:Controller = new Controller(this.model);
private var view:View = new View(model, controller);
public function App(){
this.addChild(this.view);
}
}
}

Now imagine a Model with more properties. 
And tons of different Views of them that data. 
Some of which provide a UI linked to Controller methods that manipulate it.

_ross


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


Re: [Flashcoders] Fwd: MVC

2012-02-16 Thread Ross Sclafani
I have a fuller framework that details a view life cycle, subModels, a 
Controller tree, animated transitions on change() and more. The classes I wrote 
are just the simplest examples that I thought would get people started.
I'll get the framework polished up and open sourced to Github if you guys are 
interested

Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714

On Feb 16, 2012, at 5:46 AM, Paul Andrews p...@ipauland.com wrote:

 Excellent job.
 
 I have one small point, on a practical level.
 
 For the views, in particular, I don't usually pass arguments to the 
 constructor. It's not such a big deal for code-only examples, but in my flash 
 world I mix my components between stuff created dynamically and things 
 created in the IDE - sometimes I build components as assemblies on the stage 
 using the IDE. The point is that passing arguments to the constructor then 
 becomes an issue for a view.
 
 Might I suggest an init() function to pass in Model and Controller?
 
 Paul
 
 
 
 On 16/02/2012 07:59, Ross Sclafani wrote:
 From: Ross Sclafaniross.sclaf...@gmail.com
 Date: February 16, 2012 2:39:34 AM EST
 To: Corc...@chello.nl
 Cc: Flash Coders Listflashcoders@chattyfig.figleaf.com, 
 flashcoder...@googlegroups.com
 Subject: Re: MVC
 
 feel free to hit me up any time ill try to have time to respong
 
 none the less, this should get you started:
 
 /*
  * Model.as
  *
  * mvc.Model;
  */
 package mvc {
import flash.events.EventDispatcher;
import flash.events.Event;
class Model extends EventDispatcher{
private var _count:int = 0;
public function get count():int{
return _count;
}
public function set count(value:int):void{
this._count= value;
update();
}
public function Model(){
super()
}
private function update():void{
this.dispatchEvent(new Event(Event.CHANGE));
}
}
 }
 
 
 /*
  * Controller.as
  *
  * mvc.Controller;
  */
 package mvc {
public  class Controller {
private var model:Model;
public function Controller(model:Model){
super()
this.model = model;
}
public function countUp():void{
this.model.count++;
}
}
 }
 
 /*
  * View.as
  *
  * mvc.View;
  */
 package mvc {
import flash.text.TextField;
import flash.events.Event;
import flash.display.Sprite;
public  class View extends Sprite(){
private var model:Model;
private var controller Controller;
private var textField:TextField = new TextField();
public function View(model:Model, controller:Controller){
model.addEventListener(Event.CHANGE, this.model_changeHandler);
super()
this.model = model;
this.controller = controller;
this.addChild(this.textField);
this.stage.addEventListener(MouseEvent.CLICK, 
 this.stage_clickHandler)

}
private function stage_clickHandler(event:MouseEvent):void{
this.controller.countUp();
}
private function model_changeHandler(event:Event):void{
this.textField.text = this.model.count
}
}
 }
 /*
  * App.as
  *
  * MVC screen click counter.
  */
 package{
import mvc.Model;
import mvc. View;
import mvc.Controller;
public class App{
private var model:Model = new Model();
private var controller:Controller = new Controller(this.model);
private var view:View = new View(model, controller);
public function App(){
this.addChild(this.view);
}
}
 }
 
 Now imagine a Model with more properties.
 And tons of different Views of them that data.
 Some of which provide a UI linked to Controller methods that manipulate it.
 
 _ross
 
 
 ___
 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] Fwd: MVC

2012-02-16 Thread Ross Sclafani
Absolutely. Good MVC should be taught at birth.

Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714

On Feb 16, 2012, at 5:17 AM, Beatrix Krümmer-Frau birik...@hotmail.de wrote:

 perfect! Can I use this for my Flash students?
 
 Am 16.02.2012 08:59, schrieb Ross Sclafani:
 From: Ross Sclafaniross.sclaf...@gmail.com
 Date: February 16, 2012 2:39:34 AM EST
 To: Corc...@chello.nl
 Cc: Flash Coders Listflashcoders@chattyfig.figleaf.com, 
 flashcoder...@googlegroups.com
 Subject: Re: MVC
 
 feel free to hit me up any time ill try to have time to respong
 
 none the less, this should get you started:
 
 /*
  * Model.as
  *
  * mvc.Model;
  */
 package mvc {
import flash.events.EventDispatcher;
import flash.events.Event;
class Model extends EventDispatcher{
private var _count:int = 0;
public function get count():int{
return _count;
}
public function set count(value:int):void{
this._count= value;
update();
}
public function Model(){
super()
}
private function update():void{
this.dispatchEvent(new Event(Event.CHANGE));
}
}
 }
 
 
 /*
  * Controller.as
  *
  * mvc.Controller;
  */
 package mvc {
public  class Controller {
private var model:Model;
public function Controller(model:Model){
super()
this.model = model;
}
public function countUp():void{
this.model.count++;
}
}
 }
 
 /*
  * View.as
  *
  * mvc.View;
  */
 package mvc {
import flash.text.TextField;
import flash.events.Event;
import flash.display.Sprite;
public  class View extends Sprite(){
private var model:Model;
private var controller Controller;
private var textField:TextField = new TextField();
public function View(model:Model, controller:Controller){
model.addEventListener(Event.CHANGE, this.model_changeHandler);
super()
this.model = model;
this.controller = controller;
this.addChild(this.textField);
this.stage.addEventListener(MouseEvent.CLICK, 
 this.stage_clickHandler)

}
private function stage_clickHandler(event:MouseEvent):void{
this.controller.countUp();
}
private function model_changeHandler(event:Event):void{
this.textField.text = this.model.count
}
}
 }
 /*
  * App.as
  *
  * MVC screen click counter.
  */
 package{
import mvc.Model;
import mvc. View;
import mvc.Controller;
public class App{
private var model:Model = new Model();
private var controller:Controller = new Controller(this.model);
private var view:View = new View(model, controller);
public function App(){
this.addChild(this.view);
}
}
 }
 
 Now imagine a Model with more properties.
 And tons of different Views of them that data.
 Some of which provide a UI linked to Controller methods that manipulate it.
 
 _ross
 
 
 ___
 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] MVC style

2012-02-16 Thread Ross Sclafani
Yeah it hasn't been open source but I'm ready to do that soon.

I'm having trouble parsing your other question, can you rephrase re: models 
knowing about each other?

Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714

On Feb 18, 2012, at 1:19 PM, John McCormack j...@easypeasy.co.uk wrote:

 A really nice explanation.
 
 I tried to find your EastAsMVC after being on your site, is it on the way?
 
 Also, what comes first, ie. how do the models find out about each other?
 
 John
 
 On 16/02/2012 00:05, Ross Sclafani wrote:
 I am an MVC purist, I always proceed as follows:
 
 Models should ONLY store information, particularly the state of the 
 application and any data retrieved from disk or the network.
 
 Views hold a reference to a model, watch it for updates, and respond to 
 those updates by rendering the model in its current state. 'rendering' could 
 refer to manipulating the display list in flash, outputting some text to 
 stout (or trace) serving up some JSON from a server app, whatever way of 
 expressing the state of the model your app requires. Views are also 
 responsible for  handling events that occur in their domain, and forwarding 
 them to the appropriate Controllers.
 Controllers exist to manipulate models. The only acceptable way to alter a 
 model is via a controller. Whether its storing data from a Web service in 
 the model, or altering the state of the app in response to user interaction, 
 the controllers hold all of the business logic that define how the app 
 behaves.
 
 Ideally, in AS3, the models consist of no methods except accessors that 
 retrieve values from private vars and store values there and notify 
 subscribed views of the update. Event dispatcher is a fantastic base class 
 for a model.
 Equally, wherever possible, a controller should only consist of methods. 
 Properties are for the model.
 This sets up a unidirectional flow of interaction and display. The 
 controller populates the model, the model notifies the views, the views 
 change. The changed view incites some user interaction, the view tells the 
 controller what the user wants to happen, and the controller alters the 
 state of the model accordingly, which then notifies the views to change, and 
 so on and so forth.
 
 Ross P. Sclafani
 Owner / Creative Director
 Neuromantic Industries
 http://www.neuromantic.com
 http://ross.sclafani.net
 http://www.twitter.com/rosssclafani
 347.204.5714
 
 On Feb 15, 2012, at 1:46 PM, Merrill, 
 Jasonjason.merr...@bankofamerica.com wrote:
 
 Calculations would not be in the controller, they would be in the Model.  
 Sometimes you can justify them being in the view if it's related to the 
 view.  Calculations are also in a Service class if they are part of a 
 service in some way.
 
 Jason Merrill
 Instructional Technology Architect II
 Bank of America  Global Learning
 
 
 
 
 
 ___
 
 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com 
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Hunter
 Sent: Wednesday, February 15, 2012 1:32 PM
 To: Flash Coders List
 Subject: [Flashcoders] MVC style
 
 Hello list,
 
 If I am making an application with MVC pattern and calculations are needed 
 to be performed on the data when the user interacts with the application, 
 would you:
 
 do the calculations in the Model?
 
 create a separate class that handles the calculations and puts the results 
 in the model?
 
 do the calculations in the Controller?
 
 looking forward to hearing people's thoughts on this,
 
 david
 
 --
 David Hunter
 
 www.davidhunterdesign.com
 +44 (0) 7869 104 906
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 --
 This message w/attachments (message) is intended solely for the use of the 
 intended recipient(s) and may contain information that is privileged, 
 confidential or proprietary. If you are not an intended recipient, please 
 notify the sender, and then please delete and destroy all copies and 
 attachments, and be advised that any review or dissemination of, or the 
 taking of any action in reliance on, the information contained in or 
 attached to this message is prohibited.
 Unless specifically indicated, this message is not an offer to sell or a 
 solicitation of any investment products or other financial product or 
 service, an official confirmation of any transaction, or an official 
 statement of Sender. Subject to applicable law, Sender may intercept, 
 monitor, review and retain e-communications (EC) traveling through its 
 networks/systems and may produce any such EC to regulators, law 
 enforcement, in litigation and as required by law.
 The laws of the country of each

Re: [Flashcoders] AIR Socket.readObject received in multiple ProgressEvents?

2012-02-16 Thread Ross Sclafani
Henke!
Have we met on IRC ? I operate there as butter. Used to hit up actionscript and 
papervison3d on freenode but it's been a while.

Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714

On Feb 16, 2012, at 5:20 PM, Henrik Andersson he...@henke37.cjb.net wrote:

 Mattheis, Erik (MIN-WSW) skriver:
 I'm not understanding something here - in the following excerpted and 
 simplified example, I'm trying to send a ByteArray of length 170 and there 
 seem to be 173 bytes received. Where are the extra bytes coming from and 
 and is that the reason readObject returns null? (tracing 
 _socketData.toString shows that the object properties I want to work with 
 are in the ByteArray):
 
 
 As I said before:
 
 This means that you MAY get more than one object in one go and that
 you MAY get only a part of the object(s) at the ends of the buffer.
 
 It is highly possible that multiple writes was stuffed into one read,
 even if you don't flush between the writes.
 
 The three left over bytes could be the first three bytes of the length
 of the next object.
 
 Your code must be able to deal with the crazy situation that it got a
 full length int, the encoded object and only three quarters of the
 length int for the next object in one go.
 ___
 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] MVC style

2012-02-15 Thread Ross Sclafani
I am an MVC purist, I always proceed as follows:

Models should ONLY store information, particularly the state of the application 
and any data retrieved from disk or the network.

Views hold a reference to a model, watch it for updates, and respond to those 
updates by rendering the model in its current state. 'rendering' could refer to 
manipulating the display list in flash, outputting some text to stout (or 
trace) serving up some JSON from a server app, whatever way of expressing the 
state of the model your app requires. Views are also responsible for  handling 
events that occur in their domain, and forwarding them to the appropriate 
Controllers.
Controllers exist to manipulate models. The only acceptable way to alter a 
model is via a controller. Whether its storing data from a Web service in the 
model, or altering the state of the app in response to user interaction, the 
controllers hold all of the business logic that define how the app behaves.

Ideally, in AS3, the models consist of no methods except accessors that 
retrieve values from private vars and store values there and notify subscribed 
views of the update. Event dispatcher is a fantastic base class for a model.
Equally, wherever possible, a controller should only consist of methods. 
Properties are for the model.
This sets up a unidirectional flow of interaction and display. The controller 
populates the model, the model notifies the views, the views change. The 
changed view incites some user interaction, the view tells the controller what 
the user wants to happen, and the controller alters the state of the model 
accordingly, which then notifies the views to change, and so on and so forth.

Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714

On Feb 15, 2012, at 1:46 PM, Merrill, Jason jason.merr...@bankofamerica.com 
wrote:

 Calculations would not be in the controller, they would be in the Model.  
 Sometimes you can justify them being in the view if it's related to the view. 
  Calculations are also in a Service class if they are part of a service in 
 some way. 
 
 Jason Merrill
 Instructional Technology Architect II
 Bank of America  Global Learning 
 
 
 
 
 
 ___
 
 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com 
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Hunter
 Sent: Wednesday, February 15, 2012 1:32 PM
 To: Flash Coders List
 Subject: [Flashcoders] MVC style
 
 Hello list,
 
 If I am making an application with MVC pattern and calculations are needed to 
 be performed on the data when the user interacts with the application, would 
 you:
 
 do the calculations in the Model?
 
 create a separate class that handles the calculations and puts the results in 
 the model?
 
 do the calculations in the Controller?
 
 looking forward to hearing people's thoughts on this,
 
 david
 
 --
 David Hunter
 
 www.davidhunterdesign.com
 +44 (0) 7869 104 906
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 --
 This message w/attachments (message) is intended solely for the use of the 
 intended recipient(s) and may contain information that is privileged, 
 confidential or proprietary. If you are not an intended recipient, please 
 notify the sender, and then please delete and destroy all copies and 
 attachments, and be advised that any review or dissemination of, or the 
 taking of any action in reliance on, the information contained in or attached 
 to this message is prohibited. 
 Unless specifically indicated, this message is not an offer to sell or a 
 solicitation of any investment products or other financial product or 
 service, an official confirmation of any transaction, or an official 
 statement of Sender. Subject to applicable law, Sender may intercept, 
 monitor, review and retain e-communications (EC) traveling through its 
 networks/systems and may produce any such EC to regulators, law enforcement, 
 in litigation and as required by law. 
 The laws of the country of each sender/recipient may impact the handling of 
 EC, and EC may be archived, supervised and produced in countries other than 
 the country in which you are located. This message cannot be guaranteed to be 
 secure or free of errors or viruses. 
 
 References to Sender are references to any subsidiary of Bank of America 
 Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are 
 Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a 
 Condition to Any Banking Service or Activity * Are Not Insured by Any Federal 
 Government Agency. Attachments that are part of this EC may have additional 
 important disclosures and disclaimers, which you 

Re: [Flashcoders] Large Images with Alpha Channel

2012-02-11 Thread Ross Sclafani
Well, you could load them all into flash pro, export a swf and import that at 
runtime, no?

You could even put them all in frames on the main timeline to somewhat  
automate the sequencing and layout of your walk cycle.

Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714

On Feb 11, 2012, at 7:09 PM, Beatrix Krümmer-Frau birik...@hotmail.de wrote:

 But that doesn't work when you need great images for games - like walkcicles 
 - and load them, instead of embedding them into flash!!
 
 Beatrix
 
 Am 12.02.2012 01:00, schrieb Kevin Newman:
 If you have access to Flash Pro, you can import a PNG-32 into the library, 
 and use the Flash to apply the JPEG compression. Flash will retain the alpha 
 mask.
 
 There may be other programs that can output a jpeg with an alpha channel in 
 a swf format like that, but I can't think of any off the top of my head.
 
 Kevin N.
 
 
 On 2/11/2012 12:43 AM, Ben Sand wrote:
 This blog shows how to combine a jpeg with a png alpha mask to get file
 sizes down, but it is for HTML5, although they were able to use a flash
 converter successfully:
 http://blog.jackadam.net/2010/alpha-jpegs/
 
 ___
 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] I invite everyone to troll Apple's support forums

2012-01-12 Thread Ross Sclafani
Yeah man. Think of it this way: if you really think flash is on thin ice, you 
are wasting time keeping Apples forum moderators employed while you waste time 
you could spend learning a new technology.

Flash has matured beyond just the Web, can you say the same about yourself?


Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714

On Jan 12, 2012, at 5:40 PM, Eric E. Dolecki edole...@gmail.com wrote:

 Trolling is sad.
 ___
 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] Nice looking bit map scaling in flash

2011-10-20 Thread Ross Sclafani
Best solution for bitmap scaling like that is openzoom , basically a port of 
silver light deepzoom

Ross P. Sclafani
Design | Technology | Creative
347.204.5714
http://ross.sclafani.net
http://www.twitter.com/rosssclafani

On Oct 20, 2011, at 8:04 PM, Ben Sand b...@bensand.com wrote:

 Need to zoom a background image. We'd rather do it as a bitmap than a
 vector.
 
 Image will be up to 5120x2880, with the centre portion displaying by
 default.
 
 We'd like to zoom up to double in and half out. ie. assuming a  2560x1440
 screen.
 * Zooming in all the way would give: 1280x720 with each pixel double in
 size
 * Zooming out all the way would give: 5120x2880 with each pixel halved in
 size.
 
 Scaling will be dynamic, ie. you could zoom to 101%, 102% etc.
 
 Can bitmaps look nice doing this, or do we have to use vectors?
 
 Thanks,
 
 Ben
 ___
 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] animation memory leak ... please help

2011-10-18 Thread Ross Sclafani
Are you disposing of the image after it is offscreen? Have you run the profiler 
to see what's happening?

Ross P. Sclafani
Design | Technology | Creative
347.204.5714
http://ross.sclafani.net
http://www.twitter.com/rosssclafani

On Oct 18, 2011, at 4:00 PM, Adrian Zając zajac.adr...@gmail.com wrote:

 I think I had this problem once...
 How many of images do you have? Maybe it will be better to make the same 
 number of movie clips, and download every jpg only once?
 
 
 Adrian
 
 W dniu 2011-10-18 20:39, [p e r c e p t i c o n] pisze:
 Hi All,
 
 I have an excrutiating memory leak.  Here's what i'm doing.
 
 first some specs:
 
 AS2, FP10+, Linux OS, ff browser
 
 I load a jpg into one of two movie clips...once a specified amount of time
 has expired
 i load the next image (download it using moviclip loader) and animate the
 visible movieclip off stage (slide it to the left or right) and at the same
 time i animate it
 i also fade it (mc._alpha -= mc._alpha-someAmount).
 i swap their depths and repeat this process.
 
 what i'd like to know is why after so many hours (8-24) flash starts slowing
 down and ultimately throws up the abort script dialog when i'm not really
 doing anything all that intensive..
 can someone explain how flash handles animations internally for example...it
 creates a copy of the image in memory..moves it then blits it the screen.
 
 can anyone give me some pointers as to where to begin looking for this leak
 or if you think this is flash player bug
 
 all advise helpful
 
 thanks
 
 percy
 
 
 
 
 
 ___
 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] can't get e.target.data

2011-10-08 Thread Ross Sclafani
Has to be.

Ross P. Sclafani
Design | Technology | Creative
347.204.5714
http://ross.sclafani.net
http://www.twitter.com/rosssclafani

On Oct 8, 2011, at 3:25 AM, Cor c...@chello.nl wrote:

 var str:String = String(e.target.data);
 
 without new?
 
 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
 DeSaulniers
 Sent: zaterdag 8 oktober 2011 2:44
 To: Flash List
 Subject: Re: [Flashcoders] can't get e.target.data
 
 Maybe set it to a var first?
 
 var data:String = e.target.data;
 var str:String = new String(data);
 
 HTH,
 
 Karl
 
 
 
 On Oct 7, 2011, at 2:23 PM, John Polk wrote:
 
 Here's a code snippet:
var req:URLRequest = new URLRequest(siteUrl + store/ 
 flash_store2.py?id= + id + pkg= + pkgID);
/*
var variables:URLVariables = new URLVariables();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
req.method = URLRequestMethod.POST;
variables.pkg = pkgID;
variables.id = id;
req.data = variables;
*/
loader.load(req);
loader.addEventListener(Event.COMPLETE, onSendComplete);
}
 
private function onSendComplete(e:Event):void
{
var txt:TextField = new TextField();
var myFormat:TextFormat = new TextFormat();
myFormat.font = Arial;
myFormat.size = 5;
var str:String = new String(e.target.data);
 
 First up, I find I have to often bypass URLVariables because it simply 
 doesn't work, as is the case here. But the real problem is
 thus:
 1) When I test this on my Mac, calling the data from my server, 
 everything works fine.
 2) When I test this on my server, calling the page TTW, everything 
 works fine if id has a value and pkg does not.
 3) When I test my python script that generates the data on my server 
 passing a value only for pkg, everything displays fine; however;
 4) When I test this on my server, calling the page TTW with no value 
 for id and a value for pkg, e.target.data only serves up this 
 string -- which is incomprehensible to me.
 How do I trouble-shoot this?
 TIA,
 John
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Karl DeSaulniers
 Design Drumm
 http://designdrumm.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
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] :O

2011-09-01 Thread Ross Sclafani
WOW Unity 3D will publish to Flash Player bit.ly/rmNbGp

but i imagine webGL can't be too far behind?

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


Re: [Flashcoders] :O

2011-09-01 Thread Ross Sclafani
in Flash Player*

On Sep 1, 2011, at 8:05 PM, Kevin Newman wrote:

 NVIDIA PhysX in Flash?!
 
 Ok, I'm interested.
 
 Kevin N.
 
 
 On 9/1/11 6:54 PM, Ross Sclafani wrote:
 WOW Unity 3D will publish to Flash Player bit.ly/rmNbGp
 
 but i imagine webGL can't be too far behind?
 
 ___
 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] PureMVC vs Cairngorm // who's better?

2011-06-24 Thread Ross Sclafani
I wrote my own MVC package.
On Jun 23, 2011, at 7:23 PM, Ben Sand wrote:

 We use robotlegs
 
 On Thursday, 23 June 2011, Jordan L. Chilcott - Interactivity
 Unlimited jchilc...@interactivityunlimited.com wrote:
 Huge vote for RobotLegs as well.
 
 jord
 --
 Jordan L. Chilcott
 
 Sent from my iPhone... because I can
 
 On 2011-06-23, at 9:23 AM, Merrill, Jason 
 jason.merr...@bankofamerica.com wrote:
 
 Robotlegs +1
 
 
 ___
 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] XMLList Namespace Madness

2011-04-29 Thread Ross Sclafani
typo
On Apr 29, 2011, at 2:54 PM, Merrill, Jason wrote:

 color designator (:)

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


Re: [Flashcoders] How make an SWF run on IPad?

2011-04-28 Thread Ross Sclafani
welcome to the most depressing feeling for Flash coders from last year.

fortunately things have changed since then, but you will have to repackage the 
swf into an iOS application using Flash CS5+ or the AIR SDK.

google Flash on iPad you will find plenty of discussion and a lot of coverage 
of apple's refusal to include flash in the iPad browser, and subsequent 
underhanded blocking of Flash-originated applications from the App Store. But 
if you persevere, you should find more recent articles that detail a) Apple's 
change of policy and b) Adobe's newest tools for creating iOS Apps using the 
Flash platform. 

best of luck.

On Apr 28, 2011, at 4:21 PM, Steve Abaffy wrote:

 I have been searching  the web for about an hour now, and I can't find a SWF
 to MP4 convert that will allow the actionscript (i.e. buttons etc..) to
 work. What I am trying to do is convert my flash presentation to something
 that will run on an IPad. I have entire site written in actionscript 3.0 so
 I have buttons and other interactive things on the screen. But flash will
 not run on an IPad so what can one do.
 
 
 
 Thanks
 
 ___
 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] How make an SWF run on IPad?

2011-04-28 Thread Ross Sclafani
i cannot overstate how surprising it is to hear this phrased this way.

On Apr 28, 2011, at 4:37 PM, Steve Abaffy wrote:

 it seems IPad
 does not support flash.

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


Re: [Flashcoders] How make an SWF run on IPad?

2011-04-28 Thread Ross Sclafani
i think this is actually Steve Jobs having some fun with the list.

must be.

or some kind of coma survivor.

On Apr 28, 2011, at 5:02 PM, Paul Andrews wrote:

 On 28/04/2011 21:21, Steve Abaffy wrote:
 
 You must be one of the very last people on earth to not realise until now 
 that the iPad doesn't support flash. I'm surprised that you think a video 
 format would support interaction of any kind.
 

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


Re: [Flashcoders] How to Make SWF work on IPad

2011-04-28 Thread Ross Sclafani
you cannot load any type of executable code except javascript to be interpreted 
by WebKit into an iOS device. this includes code-having SWFs into a app made in 
iphone packager et al.

please do the reading i suggested, this is really old news and readily available


On Apr 28, 2011, at 4:22 PM, Steve Abaffy wrote:

 Something I forgot to mention SWF will be delivered over the web.
 
 ___
 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] What is up with adobes documentation?

2011-04-21 Thread Ross Sclafani
I agree with this. Also, any professional worth their salt is going to have 
direct links to any documentation required to do their job.

Ross P. Sclafani
Design / Technology / Creative
347.204.5714
http://ross.sclafani.net
http://www.twitter.com/rosssclafani

On Apr 21, 2011, at 6:47 PM, Dave Watts dwa...@figleaf.com wrote:

 I think you're making a big leap from one thing to the other here.
 Flash detractors don't care about the state of Adobe's documentation

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


Re: [Flashcoders] How to access MovieClip declared in one function in an event listener

2011-04-21 Thread Ross Sclafani
read up on event.target.


On Apr 21, 2011, at 9:44 PM, Steve Abaffy wrote:

 Hello,
 
 
 
 I basically have the follow:
 
 
 
 Function DrawMyStuffOnScreen():void{
 
Var myMovieClip:MovieClip = new DefinedMovieClip();
 
Var myButton:SimpleButton = new DefinedButton();
 
myButton.addEventListener(MouseEvent.CLICK,DoSomething);
 
 //Defined Movie clip has several input fields in it
 
myMovieClip.TextField.text = SomeText;
 
addChild(myMovieClip);
 
 }
 
 Function DoSomething(MouseEvent.CLICK):void{
 
What goes in this function to be able to do something like
 
Trace(myMovieClip.TextField.text); // This show a complier
 error of basically I don't know what myMovieClip is;
 
 
 
Then tried:
 
Var myMC = new DefinedMovieClip();
 
Trace(myMC.TextField.text) // this works but is always empty
 since it initializes empty. 
 
So how do you access the textfield that is sitting on the
 stage???
 
 }
 
 Thanks
 
 ___
 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] Variable scope with asynchronous SQL connection

2011-04-20 Thread Ross Sclafani
the problem you may run into if you call in a loop is overwriting the object 
property.

i would implement a queue:

///

private var statementQueue:Vector.SQLStatement  = new Vector.SQLStatement();

public function getDayOfDrill() : void {
var sql:SQLStatement = new SQLStatement();
sql.sqlConnection = _sqlConnection;
sql.text =  SELECT dayOfDrill FROM time;
sql.addEventListener(SQLEvent.RESULT, getDayOfDrillResultHandler, false, 0, 
true);
statementQueue.push(sql);
sql.execute();
}

private function getDayOfDrillResultHandler(e:SQLEvent) : void {

var evt:FDataEvent = new FDataEvent(FDataEvent.GET_DAY_OF_DRILL);
evt.param = e.target.data[0];
dispatchEvent(evt);
statementQueue.splice(statementQueue.indexOf(e.target,1);

}


//


On Apr 20, 2011, at 3:43 PM, Henrik Andersson wrote:

 Mattheis, Erik (MIN-WSW) skriver:
  1.  The SQLConnection is asynchronous. Is there a possibility the function 
 variable sql would get garbage collected before the event handler fires?
 
 It is a local variable. Yes, it is up for garbage collection the instant the 
 function returns. So if the event happens after that (as you said it will) 
 then the garbage collection may happen before that.
 ___
 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] Getting ID in asynchronous SQLLite connection

2011-04-19 Thread Ross Sclafani
i recommend XML-Spy or similar to ease editing via grid mode, and then the 
actual xml format doesnt matter much.

On Apr 19, 2011, at 5:12 PM, Mattheis, Erik (MIN-WSW) wrote:

 The XML is for now going to be edited by account staff by hand, so the 
 simpler the better. For now I'm creating a (fake) UUID using this class 
 http://snipplr.com/view/45247/as3-globally-unique-identifier-guid/ - took 
 just a few minutes to implement.
 
 
 On 4/19/11 3:22 PM, Karl DeSaulniers k...@designdrumm.com wrote:
 
 Can you set an id attr in the post tag like..
 
 post id=message_123456789
 
 Best,
 Karl
 
 
 On Apr 19, 2011, at 2:39 PM, Mattheis, Erik (MIN-WSW) wrote:
 
 I'm looping trough XML defining message board posts and inserting
 them into a SQLLite database. My problem is I need to insert
 replies to posts and don't know an ID to create the parent-child
 relationship.
 _ _ _
 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


[Flashcoders] NativeWindowBoundsEvent.updateAfterEvent() ?

2011-04-06 Thread Ross Sclafani
hello_

I am creating a window docking system using transparent NativeWindows, and I 
achieve snapping by moving the contents within the NativeWindows when the 
correct amount of edge overlap occurs.

it's working fine, but i'm running into a problem where the NativeWindows 
appears to be moving before the contents are moved into the snap-position, 
giving it a jitter, rather than a sturdy snapped-edge feeling.

is there an equivalent to MouseEvent.updateAfterEvent() when dealing with 
NativeWindows? 

TL;DR:

I need changes to the DisplayList to keep up with the 
NativeWindowBoundsEvent.MOVING event I am handling.

thanks,

Ross P. Sclafani
design / technology / creative

http://ross.sclafani.net
http://www.twitter.com/rosssclafani
(347) 204.5714



let go of even your longest held beliefs,
the only truth is in observation.

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