ActionScript 3.0 :: Flex Catch Mxmlc Output With Php?
Dec 9, 2009I am compiling an .as file with mxmlc on the fly using PHP.
CODE:
exec("mxmlc example.as",$retval,$success);
print_r($retval);
[code].....
I am compiling an .as file with mxmlc on the fly using PHP.
CODE:
exec("mxmlc example.as",$retval,$success);
print_r($retval);
[code].....
I've tried using the haltonfailure="false" and failureproperty="compile.failed" but ant just throws an error when I try to run it: "The <mxmlc> type doesn't support the "haltonfailure" attribute." I need to do a little cleanup before the build script exits if the mxmlc task fails, how do I achieve this?
View 2 RepliesIn Flash AS3 i wanna write the single try catch block in order to catch any errors in whole class. For ex, i have a lot of functions in myClass.as. I don'w wanna write in each function try catch blocks in order to catch errors in this function. Is there any methods to do this?
View 2 RepliesI'm trying to build a flex project, linking it to some RLSs. When setting up the project in Flex Builder, the corresponding "build configuration" (that I got by adding -dump-config to the compiler options) generates (among other things) a tag like this :
<runtime-shared-libraries>
<url>some-lib.swf</url>
<url>some-other-lib.swf</url>
[Code]....
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?
View 1 RepliesI downloaded the Flex 4 SDK from Adobe and extracted the contents to ~/Documents/flex4_sdk.
Now I have the following simple MXML file:
<?xml version="1.0"?>
<!-- usingas/StatementSyntax.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
[Code]....
When I compile it with mxmlc /path/to/file.mxml, I get:
Loading configuration file ~/Documents/flex4_sdk/frameworks/flex-config.xml/path/to/file.mxml (38642 bytes)
However, the resultant SWF file is blank. (Basically just a white canvas.)
I've got the Flex SDK 4 on my Mac and I found a way to compile AS3 into SWF files using Flex's mxmlc compiler in Xcode, so I wondered, would it be possible to do this sort of simply online? Using for example a language I'm familiar with, PHP?I thought it'd be a thing that would be interesting to use for a website, or like some private projects.
View 1 RepliesI am using ant to build my web application. I have a target in my ant script which takes approximately 8 minutes to compile. Since mxmlc compiles everything from scratch and loads up the JVM each time, it is taking a lot of time. Is there a way to optimize this task?[code]...
View 2 RepliesWhen I use mxmlc to compile my mxml file, I get swf file. Now, I want to change the config to make mxmlc compiler generate html file instead, as we can do in Eclipse or Flex Builder.
View 2 RepliesHow to generate an Executable file of my MXML (flex) Application. What is the command using in command prompt for MXMLC.exe.
View 1 RepliesI need a way to programmatically record what source files are consumed in an MXMLC compile.Ideally there would be a flag to pass to MXMLC to have it report the complete list of sourc files it is compiling, but there doesn't seem to be such a flag. It seems generally you just pass a main.mxml file to MXMLC and it goes off and compiles everything it needs to without telling you what it's doing. As far as I can tell, you also cannot explicitly list the files for it to compile; it will resolve references automatically and compile referenced sources without any way to control that behavior or report on it.
If the compiler cannot supply this information and a user cannot control this behavior, the only other option I can think of is write my own source code scanner for MXML that will traverse all the references in a code tree to give a report of what MXMLC should be compiling, though that's obviously error prone and certainly not something I'm looking forward to.
Which mxmlc attributes do I need to replicate the behaviour of Flash Builder 4's Export Release Build?debug=false and optimize=true seems obvious, but doesn't reduce the swf's file size as FB4's Export Release Build does.
View 1 RepliesI am compiling a very simple app, Main.mxml:
<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark">
[code]....
This is quite worrying because I am developing in Eclipse (which uses mxmlc) yet my master build script (which uses flexmojos) is producing a totally different file.
I've downloaded flex SDK from hen I call mxmlc or compc russian symbols are outputed, so it's impossible to work in command line. Is it possible somehow to switch language to English?
View 1 RepliesI've noticed that, recently, builds in FlexBuilder have been taking much, much longer than they used to (30 or 40 seconds, as opposed to 3 or 4). What is the simplest way of profiling these builds to figure out what is taking so much time?
View 4 RepliesI am trying to compile a file into swf using mxmlc in command line. When it is a very simple mxml, compile is successful. But when the file contaion the fx name space, I get a compile error like: could not resolve (or ) to a component implementation.
I have to be able to do this, without the help of Flash Builder because I am working on a project where I will need to generate swf files from mxml files of which we generate the code.The code I am trying to compile is:
<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
[code]....
Has anyone noticed the following behavior building Flex programs using the mxmlc ANT task (running in the background): as the MXMLC task starts, it steals the window focus from whatever application is currently running, and then gives it back again! This is extremely disruptive.Is there a way to run the MXMLC task "headless" so it doesn't interact at all with the window system?I'm running on Mac OS X (10.5.8, if that matters), and Flash 4.0.1 (although the behavior existed on 3.x as well).
View 1 RepliesI'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'm interested in learning just enough Flash/Flex to do things that I can't do from HTML and JavaScript alone - play sound files and video, use multiple file upload things, perform cross-domain Ajax requests using the crossdomain.xml file etc. As such, I don't really want to learn (or pay for) the Flex IDE. I'm not much of an IDE guy in any case.
The problem is, most of the tutorials I've found talk about the IDE. I've figured out how to compile .mxml files at the command line using bin/mxmlc - now I just need to learn MXML, ActionScript and the various APIs! What are the best resources for learning these? I'm fine with buying a book, I just don't want to shell out for the API itself.
I'm using:
- Flex SDK 3.5.0
- Parsley 2.2.2.
- Flash Builder 4
Down in my src folder (which is configured as part of the source path in the Flash Builder), I have a logging.xml which I configure via Parsley:
[Code]....
I have a web application that converts SVG files into swf ones. In order to do so, there are 3 steps:
1 - Running through SVG Files in a folder
[Code]...
i have this flex app (it's a flex project created from flash builder), and it compiles fine when i build it from the IDE.it fails to compile when i do it from command line through mxmlc.i am invoking the mxmlc at the location "flash-builder-installation"sdks"flex-ver"inthe mxml file is test.mxml.i don't have any dependency on any of custom swc file.i am getting the following type errors when i compile it.[code]
View 2 RepliesMy ant buildfiles tell mxmlc.jar to recompile target mxml source. However, if the target mxml source file has not changed, either ant or mxmlc is ignoring the file and will not create a new swf. This is an annoyance because I'm editing files imported by the target mxml. I need it to rebuild when those files change. I'm guessing that the mxmlc is creating a cache file somewhere and comparing the target mxml (or maybe just a hash). Is this what is happening? What's the standard work-around? At the moment, I'm editing the target mxml just to cause a file change.
View 2 RepliesI've been trying for hours to make sense of this problem. When I run my code through the Flash IDE, everthing is fine. However, when I run it through the command line compiler or Flex itself t doesn't work. This is after setting up all the required Flex bits to create a Flash stage and display content. it keeps giving me an "Access of undefined property" error though I've clearly defined those properties in question a line or two before.
[Code]...
What the heck is going on?? I'm stumped. Embed seems to work fine, but I'd prefer to change it this way. I think there's something about XML dynamism if you use embed instead.
use the mxmlc task of the Flex Ant tasks with a user-definable list of source path or library paths? The idea is that the user can define an arbitrary list of source paths and/or library (swc) paths into an Ant properties file and the build file takes these values and evaluates them for use in the mxmlc task. Just wondering if there are any tricks (maybe utilizing filtering/string replacing) to get this working?
View 2 RepliesIs there any way to catch any error within Flex application and send it via let's say email or record it somehow (this emailing or recording part is not the problem, just error catching for whole application is).
View 1 RepliesI'm loading data from TextFlow to spark:TextArea. In TextFlow i have 'a href' elements. Problem lies with the address of the 'link' elements. Some of them will go outside of the page (these i will leave without doing anything), other will go to other subpages in my site(these one i have to catch and process in code).[code]...
View 3 RepliesI'm looking for a way to catch an Exception thrown by PHP in Flex using HTTPService. Is it possible to do it without using AMFPHP?
In my current implementation, if an Exception is thrown in PHP, a FaultEvent.FAULT is indeed dispatched on Flex side. The only problem is that the exception's message string is nowhere to be found in FaultEvent.[code]...
Core of my code is following:
var img:Image = new Image;
img.source = 'http://..........';
img.autoLoad = true;
[Code]....
I found that, the complete event does not occur for some images. How can I catch complete event without signal leaks?
I have a BorderContainer with some instances of spark Line. I need to select this lines by clicking on this. But adding event mouse click listener fails. ASdoc [URL] says that line have only activate and deactivate events. Any best way to detect whether line clicked (use another line class?). I think that catching of clicks in the bordercontainer is bad solution.
View 2 Replies