---
id: 179
title: 'Adobe Flex : Change between Debug and Production Builds'
slug: adobe-flex-change-between-debug-and-production-builds
date: '2008-07-27T01:19:00Z'
modified: '2008-07-27T01:19:00Z'
status: publish
type: post
author: pmoelgaard
categories:
  - Uncategorized
tags:
  - Adobe Flex Builder
excerpt: null
canonicalPath: /posts/adobe-flex-change-between-debug-and-production-builds
featuredImage: null
commentCount: 0
wordCount: 99
readingTimeMinutes: 1
hasMedia: false
hasVideos: false
url: >-
  https://forwardthinking.pemo.me/posts/adobe-flex-change-between-debug-and-production-builds
---
Sometimes FlexAnt is just too troublesome to get working correctly (extisting projects tends to be difficulty to FlexAntify) so you need an easy way to toggle between Debug and Production builds...  
  
Instead of going through your projects and setting the variables to Debug=false (even if you have a script / application that does it for you) it makes more sense to use the optimizer application from the Adobe SDK.  
  
Then all you have to do is to call the following command on your binaries...  
optimizer bin-debug/\[binary\].swf –output bin/\[binary\].swf –keep-as3-metadata=Bindable,Managed,ChangeEvent,NonCommittingChangeEvent,Transient  
  
You can read more about the Optimizer here...  
[  
http://livedocs.adobe.com/flex/3/html/help.html?content=rsl\_07.html](http://livedocs.adobe.com/flex/3/html/help.html?content=rsl_07.html)
