0

I am working on a project in Flex 3.

First off, I should explain I'm learning Flex as I go along. I was tasked with figuring out something and I needed Flex to do it as that is what our UI guys do (I am a database developer and work in PL/SQL and minimal ColdFusion).

What I'm trying to do is create a PDF, and I was able to get this to work on my local machine with a simple program using Flash Builder 4.6. It grabs a snapshot of an object and turns it into a PDF with no issues.

When I move this to Flex 3, I get issues. The error I am getting is:

abc bytecode decoding failed.

I tried to refresh and clean the project per some google searches suggestions, but that did not fix anything.

My code looks like this:

public function pdfBtn_printPDF(event:MouseEvent):void
        {

            Alert.show("Hello!");
        }

Starting with an alert box to verify the function works perfectly. With my full function code or even if I replace it with just the following:

public function pdfBtn_printPDF(event:MouseEvent):void
        {
            var createPDF:PDF = new PDF(Orientation.PORTRAIT, Unit.MM, Size.A4);
        }

I get the error above and my project won't work. I am at a loss as to what I am missing. am I creating the variable wrong? If I create it outside of the function it still gives me the decoding error and I have verified that I am creating the variables like other variables inside this project.Any help would be appreciated!!

user2921015
  • 69
  • 1
  • 9

1 Answers1

0

The issue was I had compiled a library in Flash 4.6 and it wasn't compatible with Flex 3. It is working now with a new library.

user2921015
  • 69
  • 1
  • 9