Hi guys,
I am trying to use pthread in Flex project. Could someone show me how to do this?
1. I copied the "pthread.swc" in "09_Pthreads" in FlasCC sdk samples.
cd 09_Pthreads
make swctest
2. I created the Flex project with compiler options "-swf-verson=18 -target-player=11.5"
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
applicationComplete="application1_applicationCompleteHandler(event)">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
import sample.pthread.CModule;
protected function application1_applicationCompleteHandler(event:FlexEvent):void
{
CModule.rootSprite = this;
CModule.startAsync(this);
}
]]>
</fx:Script>
</s:Application>
3. Debug/Run the application, now the Flash Player plugin is hang. Also notice that the flashlog.txt showing the following exceptions.
ReferenceError: Error #1065: Variable AlcWorkerSprite is not defined.
VerifyError: Error #1014: Class spark.components::Application could not be found.
VerifyError: Error #1014: Class mx.resources::ResourceBundle could not be found.
VerifyError: Error #1014: Class mx.resources::ResourceBundle could not be found.
VerifyError: Error #1014: Class mx.resources::ResourceBundle could not be found.
VerifyError: Error #1014: Class mx.resources::ResourceBundle could not be found.
VerifyError: Error #1014: Class mx.resources::ResourceBundle could not be found.
VerifyError: Error #1014: Class mx.resources::ResourceBundle could not be found.
VerifyError: Error #1014: Class mx.core::SpriteAsset could not be found.
ReferenceError: Error #1065: Variable _class_embed_css_Assets_swf__2009191337_mx_skins_cursor_BusyCursor_15 996683 is not defined.
Thanks!