Flash :: Flex - Compiler Arguments - Force SWC Inclusion
May 2, 2011
I'm trying to write a compiler argument for FDT to force the inclusion of one of my SWCs. It looks kind of like this (App name changed, but the real one also contains mixed case and a space): -include-libraries "C:WorkspacesMy Applibssite.swc" Problem is that the compiler claims it is unable to open this file. Is there a problem maybe with using a full path like this? Ideally I would prefer to use a token to represent the project folder, something like -include-libraries "${project}/libs/site.swc", but I don't seem able to find a token list in the docs.
I've got external folder with resources (graphics, movies, etc) which is shared between a couple of projects. I'm able to link this resource folder in FlashBuilder (as described in [URL]). After that all the paths to embeds are relative to the project, and that's the behaviour I want.
This linked resource appears in .project file as follows: <linkedResources><link> <name>resources</name> <type>2</type> <locationURI>DOCUMENTS/Shared/resources</locationURI> </link></linkedResources>
Note, that it isn't source folder and it is not included in compilerSourcePath tag. The question is how can I specify resource linked folder in mxmlc command line arguments? -source-path is not working here, relative pathes to embeds can not be resolved.
I compile a SWF with ANT using FDT. In the compiler arguments I am setting default-frame-rate to 30. When I run the SWF, the stage.framerate property is 30 (which is correct), but as the Stats util from mrdoob shows, the SWF runs way faster up to 52 fps.So it seems the compiler argument default-frame-rate is applied, still the events are fired at a higher rate.[code]
I've embedded a MovieClip symbol with the [Embed] syntax into my AS3 project, which I'm compiling with the Flex 3 SDK. That MovieClip has instances of other clips within it that are placed on stage with instance names. I can't just access them by instance name like I would if I were compiling with the Flash IDE. How can I reference them?
Our Flash web-based applications play lots of audio for narration and sound-effects. Some of our customers have firewall rules that block downloading of MP3 and other audio files. So, we need to wrap those MP3 files in SWFs. In the past, I've written JSFL scripts that automate the Flash IDE and walk through a complicated, fragile set of steps to embed MP3 files into FLAs and then publish those to SWFs. Now, Flex SDK provides the mxmlc compiler. I've mixed ANT into our workflow, and command-line and automated builds have been a joy. So, I want to make transcoding or wrapping of MP3s part of our build process. I've found Embedding Asset at Compile time in Pure AS3, but this will require that I write a script to generate a wrapper class AS file. Is there a cleaner way to wrap or transcode MP3 files into SWFs?
There are some classes that were taken out of the 4.0 flex sdk and I would like to know how to configure my compiler to use both sdk's, if it is even possible.
I typed the following code two ways... one has the word "new" and one doesnt... the one with the word "new" completely ignores the clearInterval() call... however when the code is run without the word "new" it behaves as I expected- with the interval terminating in the first call of the function. why the inclusion of the word new causes the clearInterval not to work?
myInterval = new setInterval(myFunction,100); function myFunction(){ trace("hello"); clearInterval(myInterval); }
After changing the Flex SDK to 3.6 (from 4.5.1) so as to target Flash player 9.0.124, the project no longer compiles, producing spurious errors such as XML does not have matching begin and end tags leading me to believe that the compilation process is 'borked'.
This is a pure AS project, and so should have no dependency on the Flex SDK, howver, it seeems to be inextricably linked to the Flex 4.x SDK and Flash Player 10+. I have tried swf-version and -target-player-version in the compiler arguments, but there is still something I am missing to get this to compile for Flash player 9.
I have a project that I need to develop some Java code for. The project is using Flash and BlazeDS. For the initial build of the project, an Ant script is run that eventually runs what I believe is the Flex compiler (the sdk attribute points to a FlashBuilder 4 sdk/4.1.0 directory).
Why do I need to do add extra namespace declarations (below) in a Flex 4.1 "MX only component set" project to get it to compile within Flash Builder? (It says mx:LineChart cannot be resolved when a chart is added via Design View, and datavisualization.swc is referenced.)
Is there a way I can get this to compile without adding these special xmlns:charts, xmlns:series and chartClasses to the declaration? (If I just leave the default namespaces and use mx:SomeChartComponent, it doesn't compile.)
Yesterday when playing a game (Balloons Tower Defense 3) I noticed that the game started to slow down over time and then randomly speed up very quickly. Looking at the memory usage dropping each time I assumed it was the GC running.
As a legitimate question, is there anyway to force Flash to GC from, say, Firefox? Perhaps there's an addon or a command you can run that will do this? I know that you can do System.gc() but this game isn't mine so I can't modify the source with a "Click here to GC" button.
I have seen a few blog entries on this and have had a discussion or two with my team mates but I would like to see what the stack overflow community thinks.
So why does the Adobe Alchemy Tool create so much faster running flash byte code than the flex compiler?
Also, when will the flex compiler be able to make similar performance gains? Will it require programmer specific use of special Array's or something of that nature to get the same performance?
According to the answers to this question here, the reason why I'm not seeing errors as I work in Flash Builder is that FB is "optimizing" them out because they aren't referenced at any point in the code execution. Is there an option to force Flash Builder to compile all files regardless of whether they're used in the software?
the PolicyFile's url is like this :[URL]and my restful webservices address is like this : [URL]crossdomain.xml include my flash's host url.the weird thing is flash still tried to load the [URL] like this first is right and response 200. the second response 400 .finally, the flash still told me SecrityError#2048
Does MXML get compiled down to as3 and then converted to flash bytecode? Also, is there a significant performance penalty to compiling mxml vs compiling as3?
I am completely new to the whole FlashDevelop/Flash/etc toolchain, but wanted to do some experimenting. I installed FlashDevelop and Flex SDK on my laptop, and thinks worked out just fine, except for one thing: the compiler messages are localized! Messages like "gebruik van een niet-gedefinieerde eigenschap" (Dutch.. sort of) are limiting my productivity. I don't recognize them because they look nothing like what I'm used to in any other programming environment, as a proper sentence they make even less sense than English error messages, and I certainly can't google them properly. Now I've already seen there are a couple of xml files and java/mxmlc/fcsh/etc configs I can tweak, but nothing so far helped.
I have couple of questions about AS3 variables handling by AVM/compiler/scope .1. This code in Flash will throw an error:
[Code]...
but it won`t throw an error in Flex (only warning in Editor). Why?.2. How Flash sees variables in loops? Apparently this:
[Code]....
isn`t equal to just: var mc:MovieClip=new MovieClip(); var mc:MovieClip=new MovieClip(); because it will throw an error again as earlier in Flash, but in Flex in function not? Is Flash changing somehow my loop before compilation?
.3. Where in a class in equivalent to timeline in Flash - where in class I would put code which I put normally on timeline (I assume it is not constructor because of what I have written earlier, or maybe it`s a matter of Flash/Flex compiler)?
Are there any workarounds to get the Flex compiler to work with a 64bit JRE? If I use an MXMLC task in an Ant buildfile in Eclipse it works fine but if I try to use MXMLC from the command line (or try the Run... command from FDT in Eclipse) it fails, telling me ...
The Flex application below generates the compiler warning: Data binding will not be able to detect assignments to 'dp'. This seems correct since the variable 'dp' is not a bindable property (there is no [Bindable] metadata tag). I have added a button which appends items to the back of 'dp' when it is clicked. Although the compiler warns me that I will not see changes to 'dp', the list shows the new item every time the button is clicked! I do not understand why I can see new items appear in the list. Can someone explain why this still works although 'dp' is not bindable?
I have a very simple practice program for Flex 4 ( Gumbo ).
[Code]...
Why does it think that cPicker is static? Or that cPicker.hexValue is undefined? Also it seems that even after importing the ColorPicker library in the code using the import keyword, I somehow have to import it on the commandline for building as well. Is that correct?
I was trying to further reduce the filesize of a SWF file by optimizing the embedded PNG graphics (using ImageOptim tool). To my surprise, this didn't yield any effect, so I created two test Images:
Original (433883 bytes) Optimized (273723 bytes)
When embedding either of these assets in a simple ActionScript project, the compiled SWF is ~274kb in size. Which raises the question: Does Flex optimize embedded PNG assets during compile-time? If yes, is there some documentation about the optimization going on? It can't be because of the SWF compression alone, because zipping the images doesn't reduce filesize at all.
Here's the Code for completeness: package { import flash.display.Sprite; public class SizeTest extends Sprite { [Embed("/assets/original.png")] private var ImageAsset:Class; public function SizeTest(){ }}}
Is there a external-source-path option available in Flex compiler similar to external-library-path? My requirement is that, I am building a "SWC" file but I don't want to include certain folders inside my 'src' folder as these are anyway available in my other application during run time. (Trying to be resource constraint). So, I want to use these folders during compilation but do not want to include them in the generated "SWC" file.
I cannot get embed fonts working Everywhere I look it says to do it like I am doing it below, but it doesn't work. I am using FlashDevlop with Flex compiler. There are no error messages. I have tried taking everything out of the Embed directive and adding it in one by one, but no affect. When I use the system font, it works. When I use the embedded fonts without setting embedFonts to true, I get TimesRoman. When I use embedded font with embedFonts to true, I get nothing.
ActionScript Code: package fontManager{ import flash.text.TextField; import flash.text.TextFormat; import flash.display.Sprite; import flash.events.Event; public class Main extends Sprite [Code] .....
i am using mxmlc for building the flex projects using ant.how to use flex builder-> copy non embeded files to destination folder compiler option in ANT