Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: Flash Demo?  (Read 10937 times)
quinrou
Jr. Member
**
Posts: 18


View Profile Email
« on: July 16, 2007, 07:20:01 »

Hi,

I am a Flash programmer and although I understand what you've done in Flex I have some little problems to apply to Flash as I don't want to start invoking or declaring function/command at the wrong place.

So I was wondering if you had any Flash examples with where you are using the framework. Even a very simple one would do...

Coz at the moment I am only sort of guessing what I am doing.
i.e. Flash uses a Document Root Class to initialise the application. So I'm guessing that's where I have to instanciate the ApplicationFacade, correct?

Flash Examples please?

Thanks
seb

Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: July 16, 2007, 05:46:23 »

Seb,

Yes, you can create a class extending MovieClip set it as the Document Root class and initialize the Facade from there. Or could instantiate it on a MovieClip instance on the Stage if the movie is going to be timeline based.

Your major concern will be in how to prepare the View.

In an MXML application, the Application object takes care of building all the initial View Components, and they're alive and waiting to have Mediators connected to them by the time you send a Notification (on creationComplete) to prepare the Model and the View.

This needs to happen differently in Flash. I will put a example online soon, I promise!  :)

-=Cliff>
Logged
quinrou
Jr. Member
**
Posts: 18


View Profile Email
« Reply #2 on: July 19, 2007, 09:31:13 »

Thanks Clif, looking forward to see the examples.

yes that's what I gathered about the AppliocationFacade. I created an Application Class which extands Sprite and that the instanciates the ApplicationFacade.

So far I have managed to get 2 buttons (mediators) working and they send notifications. the next step is to modify the state of another mediator when those notication happen i.e. go to a different frame label.

While wating for that Flash example I will carry on trying to crack the Framework with Flash. The way things work are very similare to other framework. I just need to find time to sit down and experiment..

Looking forward to see the examples
thanks

seb
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #3 on: July 29, 2007, 08:13:46 »

Seb,

Didn't forget about you. Or the other hundred gajillion Flashers out there in need of a AS3 framework. HelloFlash is here. I'll get more detailed info about how it works up there, but for now it's all internally documented and shouldn't be terribly hard to follow.

Be sure to check out the detailed instructions on the PureMVC download page for setting up with Flash. Then getting the demo up in the Flash IDE is a breeze.

-=Cliff>
Logged
quinrou
Jr. Member
**
Posts: 18


View Profile Email
« Reply #4 on: August 01, 2007, 01:31:17 »

Hi Cliff,

Thanks so much for this. I will download the demo and see what the differences between mine and yours. I actually made great process since my last post as I am now now using Flash just to produce the asset and using FlashDevelop combine with ANT and the mxmlc compiler to create the final swf.

The Workflow is very efficient and very much like the way I am working in AS2 which is FlashDevelop+ANT+MTASC with pixlib (AS2 framework).

Thanks so much again for the example.

Seb
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #5 on: August 01, 2007, 03:32:50 »

Seb,

Good to hear it's been going well for you.

Sounds like you've got a good workflow going there. I wonder if you might have time to document it in a separate post that would possibly guide new Flash programmers coming to PureMVC. There are a lot of ways to do things, but if you've found one that you feel you can really be productive with, I'm sure others would really appreciate it.

-=Cliff>
Logged
Pages: [1]
Print