Flash Action Script Error Repository

A library of solutions to Actionscript, Flash, Flex and AIR

Archive for the 'General' Category

The default property contents must be contiguous

The default property contents must be contiguous

When in Design View in Flex 4 you must keep the visual design MXML code together. Having a Script block right in the middle of it will create this error.

Incorrect:

XML:
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
  3.                xmlns:s="library://ns.adobe.com/flex/spark"
  4.                xmlns:mx="library://ns.adobe.com/flex/mx">
  5.  
  6.     <!-- Visual markup code -->
  7.     <s:TextInput x="26" y="134" id="code1" width="302" text="Status of Mic"/>
  8.  
  9.     <!-- Script tag interrupts and is located in the middle of visual markup code -->
  10.     <fx:Script>
  11.         <![CDATA[
  12.         private var swfpgno:int = 1;
  13.         ]]>
  14.     </fx:Script>
  15.  
  16.     <!-- Visual markup code -->
  17.     <s:TextInput x="26" y="77" id="mic1" width="302"/>
  18. </s:Application>

Correct:

XML:
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
  3.                xmlns:s="library://ns.adobe.com/flex/spark"
  4.                xmlns:mx="library://ns.adobe.com/flex/mx">
  5.  
  6.     <!-- Script tag does not interrupt flow of design view code -->
  7.     <fx:Script>
  8.         <![CDATA[
  9.         private var swfpgno:int = 1;
  10.         ]]>
  11.     </fx:Script>
  12.  
  13.     <!-- Design View visual markup is in a continuous block -->
  14.     <s:TextInput x="26" y="134" id="code1" width="302" text="Status of Mic"/>
  15.     <s:TextInput x="26" y="77" id="mic1" width="302"/>
  16.  
  17. </s:Application>

No comments

The compressed (zipped) folder is invalid or corrupt

Description
I exported a Flex Archive project to the desktop (Windows XP). When I tried to open it I received this message, "The compressed (zipped) folder is invalid or corrupt".

Cause
Possibly a bug in Flex Builder export feature. Tested other projects and they would export fine. Only occured on certain projects. Might be related to using "${DOCUMENTS}" variable in the Flex Build Path. The ${DOCUMENTS} token is a variable that points to the current workspace.

Solution
But you can use Flex > Export > Other > General > Archive Project to export your project. All options can be left at default. To import the file you can continue to use Flex > Import > Flex Archive Project.
NOTE! You may have to recreate the "libs" folder if it is not there.

No comments