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 CS4 Scene - Mediator  (Read 8842 times)
dgtlmonk
Courseware Beta
Newbie
***
Posts: 8


View Profile Email
« on: October 07, 2009, 10:17:07 »

Hi,

  A little confused on how would i handle different flash scene through a mediator .. anyone have this before?

Kind Regards,
Joel
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: October 08, 2009, 06:15:32 »

You might not want to do that. Of the laundry list of reasons not to use scenes given in the Flash CS3 help, the following is perhaps the most relevant here:

"Scenes combined with ActionScript might produce unexpected results. Because each scene Timeline is compressed onto a single Timeline, you might encounter errors involving your ActionScript and scenes, which typically requires extra, complicated debugging."

-=Cliff>
Logged
ninjaparade
Newbie
*
Posts: 2


View Profile Email
« Reply #2 on: October 19, 2009, 10:17:27 »

I agree with Cliff on this.

I've built quite a few applications with the pmvc framework in Flash. and what I do, and please Cliff correct me if you feel this isn't best practice, but I export a MovieClip from the flash library that would be considered the "viewComponent" using "Export for Actionscript".

In doing this, That viewComponent would be controlled by its Mediator, and that Mediator would listen to the notifications that are meant for that viewComponent and handle it accordingly. Information (data) would then be passed to the viewComponent through that Mediator and the other way around.

There is a great tutorial regarding this topic should you consider going this route you can find it here.

http://hubflanger.com/building-a-flash-site-using-puremvc/

hope this Helps.

Ninja
Logged
Pages: [1]
Print