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: FlexBuilder and embedded swfAssets in AS3 projects  (Read 13481 times)
crypt
Jr. Member
**
Posts: 16


View Profile Email
« on: March 19, 2009, 05:44:56 »

I am using FlexBuilder for creating "Actionscript projects", to write code, compile and debug. I don't like Flash IDE for this tasks, i use it just for creating assets, animation and user interfaces (view components) without any AS code except some dispatchevent to communicate transitions states, tween states etc.

I would like to ask, what is the best practice to embed this assets in a PureMVC framework? Where should
It's important for me not to loose actionscript from the embedded assets.
Is there any libarary for this?

Please Help,
thanks!
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: March 20, 2009, 05:37:54 »

Regardless of whether you use Flex, Flash, AIR or pure AS3, the view components should go in the same place in the application. The standard folder structure will do, and the same relationships exist between view components and their mediators. This is one of the benefits of the framework not having any dependencies but the language.

-=Cliff>
Logged
crypt
Jr. Member
**
Posts: 16


View Profile Email
« Reply #2 on: March 20, 2009, 06:35:03 »

Thanks! If I would like to create a "SpaceShip" view, I should create a mediator for it and a SpaceShip.as (view component).

In SpaceShip.as I can use to embed an asset with a library like this ?
http://www.tink.ws/blog/files/as3/LibraryExample/libraryExampleSource/

and after it in SpaceShip.as I should use addchild(mylittlespaceship) :-)
that's all?

Because I have one swf with many assets in it, would it be better to use tink's library in a proxy? from where can I access anytime all the library ellements in one place?

sorry if I am not clear, but my english is not the best ;-)
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #3 on: March 25, 2009, 02:37:33 »

Yes, you can do it this way. Using the embed tag within the class or using a proxy if you need those assets in multiple places.

-=Cliff>
Logged
crypt
Jr. Member
**
Posts: 16


View Profile Email
« Reply #4 on: March 26, 2009, 01:31:31 »

Thanks Cliff!
And thanks for puremvc, it's a great framework! ;-)

Only one thing is missing for me, a great code-editor for it ! :-) Can you suggest something? Plugin for Flexbuilder?
I have made some automatization in ant..
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #5 on: March 26, 2009, 04:45:24 »

I understand from listening to Eli Greenfield's talks at MAX last year that FB4 will include support for project templates and increased awareness of frameworks like Cairngorm and PureMVC. That was actually mentioned at MAX 2 yrs back and reiterated last year, so it was exciting to me, though no real details about what that really includes was mentioned. Personally I still do every project by hand and don't find it to be that much of a drag, though some automation would be nice in terms of creatinf the concrete Facade and adding the startup command(s), and adding mediators. But in my experience, time spent doing that sort of thing, on a project, its down in the range of less than a percent.

There are some code generators out there most notably FCG (which foes Cairngorm and PureMVC) by David Daeredt, but I read the other day that he has officially decommisioned the project.

-=Cliff>
Logged
crypt
Jr. Member
**
Posts: 16


View Profile Email
« Reply #6 on: March 26, 2009, 05:16:44 »

Yes, I read that too, but David Daeredt wrote there are better sollutions with Ant. I have found one, that is not completed yet. You should only edit one config file, and after it rubby on rails gem and Ant together will generate your main project files (directories, main.as, facade, startupcommand, events) and after it you can add mediators, proxys etc. I have added some extra functions to it: now it can generate:

- index.html + swfobject, expressinstall, swfaddress
- generated flexbuilder config files,
- setup your build directory, etc..
- some ftp feature will be good to, from a config file you can add your server ip/login/pass and you can publish it out with just one click, after it a automated email is sent to a client.. :-)

Logged
Jason MacDonald
Sr. Member
****
Posts: 243


View Profile Email
« Reply #7 on: March 26, 2009, 08:04:47 »

I use FlashDevelop with a set of custom templates (templates are very easy to create). This allows me to generate boiler code for Commands, Mediators, Proxies and a mix of other framework (my component framework) files I often find myself in need of. And since I'm using the Flash IDE for compiling I can launch a build from within FlashDevelop and it will launch Flash. Nice synergy.
Logged
crypt
Jr. Member
**
Posts: 16


View Profile Email
« Reply #8 on: March 26, 2009, 01:06:59 »

And why do you use flash ide for compiling? I think flexbuilder (or flashdevelope) is much more better for this task and for debugging.
Logged
Jason MacDonald
Sr. Member
****
Posts: 243


View Profile Email
« Reply #9 on: March 27, 2009, 06:19:03 »

And why do you use flash ide for compiling? I think flexbuilder (or flashdevelope) is much more better for this task and for debugging.

But because I have library assets I haven't made external yet. It's on the todo list.
Logged
Pages: [1]
Print