I'm using Flash Builder 3 to edit my Flex app, but I noticed that every time I make a change on the .html files (index.template.html for example), even if it's not in the IDE but with another program, Flash Builder rebuilds the whole project.
Is there anyway to stop this? Why would it need to rebuild the workspace everytime a html file changes?
If it was too long it wouldn't bother me, but it takes a lot of time (more than 1 minute) every time. For your information the html file is 95 lines of 'code'.
Thanks
In the main application menu, make sure Project->Build Automatically is unchecked. That will stop it from automatically rebuilding your project every time a file changes.
Looks like it's the HTMLWrapper that takes a long time for compiling.
If you encounter the same problem, you can deactivate the wrapper generation in the compiler option.
Ive written a short article about how to edit index.template.html so that your swf will centre on the page similar to Flashdevelop centering. You might find that useful, I wrote it mainly to explain to myself and the technique works fine.
See
http://www.thumbleaf.com/journal/?p=239
, Thomas
Related
i have made a webpage and now it is "feature-complete".
As a next step i want to put some style to it.
The project is based on the Play framework and i choose SCSS as my CSS alternative (with an SBT plugin to convert SCSS -> CSS).
Every time i change some CSS i have to reload the page in the browser, which takes a while, see if i like it and keep or revert. Then start over.
This workflow does not seem right to me. How do you style a webpage built with Play (specifically: i use Play templates, so i cannot just copy every piece of HTML into a CSS editor and style everything from there)?
The best way that i found is to change the CSS directly in Chrome, remember the changes and apply them to the source file later on.
Is there a more "automatic" way of doing things? Any nice editors or browser plugins that change the source file directly? What am i missing?
What are other people, using Play framework (or other templating systems) doing?
Thank you!
Maybe you can download an extension that automatically refresh's your page every ... seconds. On this way you only have to "Alt-tab" between your code and your page.
BTW: I couldn't comment this, I need 50 reputation. Otherwise I wouldn't have commented it because this isn't really an answer but this is just my advice.
I developed a project in flex and catalyst and the size of swf is too much, sometimes its take too much time to load. Product is already ready, so i cant change in code too much. Please help me to solve this issue. one more thing sometimes its load very fast and sometimes its take lots of time. Why its like that?
Quick answer is that there's no quick solution. There are several things you can do like caching RSLs (using the Adobe signed one), creating your own RSLs, dividing your application into modules, remove all embedded media and make it load on demand, use vectors (FXG) instead of bitmap files (png, jpg, etc) and make sure you don't add things that aren't needed.
All of these can make an application load faster and be much more responsive. The problem is that it's not a quick solution and needs quite a bit of architecting. Normally, you start this from the beginning of your project. From the sounds of it, you didn't know most of these concepts and you've added everything to one massive swf file (including RSLs).
You've got a long road ahead of you.
Do you have any query made to server? In that case it's better to check the server capabilities.
You're exporting a release build, not a debug build, right?
You can download SWFWire Inspector to examine what's in your file, and why it's so big. Like J_A_X said, it's probably mostly embedded assets, which you can try to load separately.
Disclaimer: I wrote this application
flash builder 4 comes with a couple of cool spark themes, and there are tons of others out there on the web, I want to be able to change the theme at runtime, without recompiling.
Is this possible?
If it is, do you have any hint's on how this can be achieved.
Thanks in advance
Gary
You can compile a css file into your swf and then load it at run time. Checkout IStyleManager.loadStyleDeclarations. On the other hand if you are referring to themes such as Halo and Spark, those cannot be swapped out at run time. So you are stuck with which ever one you compiled it with.
For further information take a look at this thread on the Adobe Forums.
One of the most annoying things when working with Flash/Flex projects is that it takes soo long to build the project. In a Flash game I am doing, it takes more than one minute to build it...
So, the question is simple: Is that normal? Am I doing something wrong? Is there a way to minimize this?
A common way of avoiding the long build-times is to divide your project up into multiple projects and reference them in as SWC's in a Main project.
Actually the shorter build times are mostly considered a positive side effect, as any larger project really ought to be divided into multiple project. Typically you will have more than one library project, handling the service layer/ controller ect.
This way you could for move the controller/ game logic to one project. This would have longer intervals between changes, and therefore you could close this project, building only the one you are currently working in.
If you are using a lot of assets from Flash ect. move those to a SWC as well.
A simple tip that makes compile time from the Flash IDE a bit shorter: Go to 'publish settings' > actionscript 3.0 > settings > disable 'Warnings Mode'
This mode checks if you are using actionscript 2.0 functions. If you know what you are doing (not copy/paste as2.0 code into as3.0 projects), you'll never need these 'warnings'.
Another tip is to use lots of SWC's: if you are using a tweenengine or a framework; most of them are available as SWC files. Use them.
Yes, it is normal. it can take more if your projects get bigger and bigger.
I have a flex project that a full build (using ANT not flex builder) takes 4 minutes.
The best advice I can give you on the subject and is an SSD drive, an SSD drive installed on my Mac cut the times by more then 50%.
I've found embedding assets tends to delay build times considerably. It's hardly noticeable at first but after a while they start stacking up and build time increases.
Maybe try delaying embedding assets a long as you can.
I can't get flash preloaders to work when there is a a # in the url of my page (even without any deep linking libraries or logic). I am using flex 3.3. Flash plugins 9 and 10, all browsers.
There is this bug regarding # in the url preventing preloaders from working:
http://bugs.adobe.com/jira/browse/SDK-14162
However, somehow, someone, somewhere has ways around this. Here are somewhat working examples (remember to clear your cache to ensure you see the preloader awesomeness):
http://www.adobecards.com/index.html#wtf
http://www.escriba.es/base_en.html#wtf
http://www.sonypictures.com/movies/onceuponatimeinmexico/site/mexico.html#wtf
http://instinct.ru/flash.html#wtf
http://www.alternativedesign.tv/plant5.html#wtf
However, these do not work (no preloader at all or momentarily stuck on 100%):
http://www.flashmagazine.com/articlefiles/preloader_finished.html#wtf
http://www.mariaclaudiacortes.com/colors/Colors.html#wtf
http://whoswestudios.com/flashsite.html#wtf
http://www.iotashan.com/examples/NotSoCustomPreloader/index.html#wtf
So, what is going on here? I suspect the flex framework.
Anyone know where to look in the flex code? Or is this bug deeper than anyone but adobe can fix?
Few things going on here.
(1) Looks like the quickest pre-loader from my #wtf examples is from Adobe. They load a very small container.swf, which then loads their 3mb main swf (amongst other biggies).
(2) Some of the others "preloaders" aren't really preloaders. Their opening animations play when the whole thing is loaded.
I believe the problem you are having is that you have your assets loading into the same frame as your preloader assets and code. Flash doesn't display a frame until it has been loaded to its entirety, cause your preloader not to be seen during load, and then covered up by the new asset after.
As a flex developer you do not have a timeline, so this is why it is important to use a small "container" as you call it or as loader movie. This movie is to have a tiny foot print so that it is available asap. Upon completion of load, the container can then call the main movie into itself, tracking the incoming data with the ProgressEvent.
It is hard to know exactly what the issue is from what you have said, but this is a common problem. Fonts, and any other embedded items either need to be embedded on frame 2 or laterm which I believe you can only do with the flash IDE, or you require the extra loader swf, lightweight and quick to load!
I have successfully deeplinked the following with preloaders
http://www.madagascargame.com
http://www.kungfupandagame.com