Schemaphic Systems Blog

Sharing experiences in Flash, Flex and AIR

Build file to generate swf using Adobe SDK

with 9 comments

<?xml version="1.0" encoding="UTF-8"?>
<project name="SWF Compilation using build file" default="CompileSWF" basedir=".">

<property name="FLEX_HOME" value="C:/Program Files/Adobe/Flex Builder 3/sdks/3.2.0" />

<property name="SRC_DIR" value="${basedir}/src" />

<property name="DEPLOY_DIR" value="${basedir}/bin" />

<property name="LIB_PATH" value="${basedir}/lib" />

<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />

<target name="CompileSWF">

<!-- Template -->
<echo>Compiles SWF</echo>
<mxmlc
file="${SRC_DIR}/BaseTemplate.as"
output="${DEPLOY_DIR}/BaseTemplate.swf"
actionscript-file-encoding="UTF-8"
incremental="true"
debug="false"
default-frame-rate="24"
default-background-color="0x25262E"
>

<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
<source-path path-element="${FLEX_HOME}/frameworks"/>

<library-path dir="${LIB_PATH}" append="true">
<include name="fl.swc"/>
<!--
Mention your own swc library here
<include name="library.swc"/>
-->
<include name="framework.swc"/>
</library-path>
</mxmlc>

<!-- Clears out the build directory -->
<echo message="Removing build xtras..."/>
<delete>
<fileset dir="${DEPLOY_DIR}" includes="**/*.cache"/>
</delete>

</target>

</project>

Note: You should have ant, adobe open source SDK installed in your machine.

Advertisements

Written by Deepanjan Das

January 5, 2011 at 8:09 AM

9 Responses

Subscribe to comments with RSS.

  1. Please….help me….

    I’ve been searching on the web for someone who can help me urgently with an fla file….I can’t figure out what’ s wrong! I’m building an interactive animation, sort of a match maker between two people, where the person can submit some data: name, age and romantic level.
    I have 4 frames: the “cover”, a small introduction, the animation itself, and another frame for the result. On the third frame, I have an addEventListener, where I put the if conditions to make sure you entered all the info necessary to get a result. But it gives a strange error in output! please, help me! I’m desperate….have been working with this all night…..can’t think straight no more… fla: http://www.ludgifotografos.com/temp/pdfinal.fla

    thank you so much for your time

    Andrea Proença

    January 10, 2011 at 5:52 PM

  2. btw, there’s a stupid error in there:
    the vars t1, t5, t3…all of them are specified as string, number….it’s not necessary…. the error comes up after it…

    Andrea Proença

    January 10, 2011 at 5:54 PM

  3. I think the problem is error textbox, a dynamic text box, is not working correctly…..I can’t see to insert any text in it…
    I thought this would work:
    if(bla bla bla)
    {
    _error.text=”…….”;
    }

    aparantly no. I’m really desperate…..can’t find out where the problem is…

    Andrea Proença

    January 10, 2011 at 5:57 PM

  4. sorry my poor english. I’m portuguese

    Andrea Proença

    January 10, 2011 at 5:58 PM

  5. Dear Andrea,
    First the post here is not related to the problem you faced.
    But I thank you that you have visited my blog.
    I have seen your fla. The _error is not a TextField, it is a movieClip. That is why _error.text is not working.

    Do the following:
    1. Open library and double click on error clip to edit.
    2. Select the text field and give its instance name say – “error_txt”
    3. Now in the main timeline edit the code to be:
    _error.error_txt.text = “This is error”;

    Hope this helps you.
    Cheers 🙂

    Deepanjan Das

    deepanjandas

    January 10, 2011 at 8:46 PM

  6. ahhhhhhhhhhhhh another thing: I had to deliver it, got some mega braniac in code from the university to help me. In two hours, I managed to correct all errors and finish my work! gosh I’m relieved…..thank you!!!

    Andrea Proença

    January 13, 2011 at 3:48 AM

  7. Of course, what a magnificent site and illuminating posts, I will bookmark your website.All the Best!

    Kirsten Helmly

    January 13, 2011 at 4:32 AM

  8. Hi, can I quote some of the content found in this entry if I provide a link back to your site?

    ptz ip camera

    January 23, 2011 at 9:55 PM


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: