0

I've got some syntax in a project I'm working on that I'm not familiar with:

 CONFIG::FLASH_10_1 
 {
  import flash.net.NetStreamAppendBytesAction;
  import flash.events.DRMErrorEvent;
  import flash.events.DRMStatusEvent;
 }

with the following compiler flags

-define CONFIG::LOGGING false -define CONFIG::FLASH_10_1 true -define CONFIG::PLATFORM true -define CONFIG::MOCK false

The class references aren't working when the imports are inside that block and I'm wondering if it's an fb4 vs fb4.5 issue. If I pull them out, all the references work as expected.

Shane
  • 4,921
  • 5
  • 37
  • 53

1 Answers1

1

This 'peculiar syntax' is referred to as Conditional Compilation, where certain code is compiled only if the Compilation Constant provided is true.

This question shows a different syntax for defining the compilation constants, you may want to try changing that. I will test it and update this answer shortly.


After my testing, I believe that you're doing your compiler flags incorrectly--at least in FB4.5.

-define+=CONFIG::FLASH_10_1,true

or

-define CONFIG::FLASH_10_1,true

The Compilation Constant and its value should be separated by a comma, not a space. The += syntax was shown in some of the examples I saw, and appears to work, I'm not certain what the difference is between the two options.

Community
  • 1
  • 1
Sam DeHaan
  • 10,246
  • 2
  • 40
  • 48
  • @Shane I added a bit, test my answer to see if it solves your problem. – Sam DeHaan Jun 27 '12 at 18:01
  • Playing around with it, it's not working for me verbatim, but I think there's a solution in your answer somewhere, I'll post and accept if it works. Thanks – Shane Jun 27 '12 at 18:08
  • Sounded promising. FB4 isn't accepting the comma separated key value pairs, oddly, it's requiring a space or "apply" and "ok" are disabled. I tried all the combinations of += , spaces, spaces and commas that I could and I succeeded in changing the error messages, but I couldn't make them go away. Oddly, I can define one variable, but I am not able to define more. – Shane Jun 27 '12 at 18:25
  • I'm going to accept this as an answer because it did bring me closer to the correct syntax. The answer resolved itself after some mystical combination of reverting the repository, restarts and rebooting. – Shane Jun 27 '12 at 19:18