views:

11

answers:

1

Hi All,

I will take advantage of the fact that this discussion is not answered yet to add some info and narrow down my problem.

You can still download my project from the link below.

It seems that my fla's document class in Flash Pro CS5 is not linked properly to the default application class in Flash Builder 4. What I mean is that when you click in Flash CS5 on the "Edit class definition" (pencil icon) in the properties window you are prompted to create a new flash project in Flash Builder 4 or if such a file already exists, then it is opened in FB.

My project has such a file, but when I click in Flash CS5 on "Edit class definition" I am prompted to create it again. I removed the existing file and when prompted I created it again from scratch, but that didn't help. Flash CS5 still tried to recreate the file.

Any ideas?

Bye.


I am programming in Flash Builder 4 with Flash Pro CS5.

I wrote a small app to test tracing of call stack using swc files to share flash assets with flash\as3 projects accessing shared assets and modifying their properties.

When I click Ctrl+F11 to run the app, all works OK. the swf loads and the as3 code runs to do some work.

When I try to publish the app (in Publish Settings Export SWC is turned off) I get an air app that runs the swf, but the as3 code doesn't seem to run at whole.

Why doesn't the AS3 code run?

I posted a zip of the project on: http://www.vikomo.com/stackoverflow_code_share/tracer_call_stack.zip

I should mention: If you run the swf as I published it you will see two squares moving in the flash. If you run the project from flash builder you will see a car with two people in it with their alpha set to 0.5 or so. These graphics won't appear if the AS3 doesn't run.

Thanks a lot for your help.

Bye, RaamEE

A: 

Well, as usual, after looking and thinking again I found that my original problem had nothing to do with the publish of the project, the use of swc files or not being able to link the document class in Flash CS5 and FlashBuilder to the same file.

The problem lay in the way I traced the call stack to the output.

during my code I call the following method http:// www . actionscript . org / forums / showthread.php3?p=763398

private function callingMethod(caller:int=1):String { var pattern:RegExp = /at.*^)/gim; try{ throw new Error(); } catch (e:Error){ var result:String = e.getStackTrace().match(pattern)[caller]; return result.replace(pattern, "$1"); }
return null; }

Now I need to figure out why the catching of the error here causes the AS3 code to be thrown out.

If I don't use this function, the program continues as normal (except for the tracing output of the stack).

Any ideas why this function causes my code to stop working?

RaamEE