tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/576-flash-dll-robotlegsRobotlegs: Discussion 2012-07-16T08:26:25Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/162016262012-05-24T05:30:33Z2012-05-24T05:30:33ZFlash DLL & robotlegs<div><p>the accessory:.......</p></div>cimon(from chinese) tag:robotlegs.tenderapp.com,2009-10-18:Comment/162016262012-05-24T11:01:05Z2012-05-24T15:01:55ZFlash DLL & robotlegs<div><p>Hi cimon,</p>
<ul>
<li>
<p>Is the <strong>robotlegs library</strong> missing in your
original project as well, or just in the attached one?</p>
</li>
<li>
<p>You have 3 separate projects inside your flash_dll folder:</p>
</li>
</ul>
<p>MyUtils<br>
RobotlegsDLL<br>
RobotlegsTest</p>
<p>with 3 different application domains.</p>
<p>In your RobotlegsTest you are trying to load an swf from
RobotlegsDLL.<br>
You have to make sure that the url for your RobotlegsDLL.swf is
correct.<br>
Your RobotlegsDLL.swf is inside RobotlegsDLL/bin-debug/ folder in
your attached project.<br>
So your url should be something like this:<br>
<strong>var url:String="http:// yourpath /flash_dll
/RobotlegsDLL/bin-debug</strong>/RobotlegsDLL.swf";</p>
<p>(yourpath = your real path to the flash_dll )</p>
<p>loader.load(new URLRequest(url, context);</p>
<ul>
<li>then you should keep a reference to your main context:</li>
</ul>
<p>This is wrong:<br>
private var context:LoaderContext = new LoaderContext(false,
ApplicationDomain.currentDomain);</p>
<p>private function onCompleteHanlder(evt_:Event):void<br>
{</p>
<p>var context:MyContext = new MyContext(this);</p>
<p>}</p>
<p>This is correct:</p>
<p>private var loaderContext:LoaderContext = new
LoaderContext(false, ApplicationDomain.currentDomain);</p>
<p><strong>private var context:MyContext;</strong></p>
<p>private function onCompleteHanlder(evt_:Event):void<br>
{</p>
<p><strong>context</strong> = new MyContext(this);</p>
<p>}</p>
<p>See Common Problems: <a href=
"https://github.com/robotlegs/robotlegs-framework/wiki/Common-Problems#wiki-mysteriously-stops">
https://github.com/robotlegs/robotlegs-framework/wiki/Common-Proble...</a></p>
<p>You also may want to read this, in case you haven’t
already: <a href=
"https://github.com/robotlegs/robotlegs-framework/wiki/Best-Practices">
https://github.com/robotlegs/robotlegs-framework/wiki/Best-Practices</a></p>
<p>Let us know if it helped.</p>
<p>Ondina</p></div>Ondina D.F.