Note that there are some explanatory texts on larger screens.

plurals
  1. POIntellij IDEA and Flex SDK runtime shared library
    text
    copied!<p>I am trying to make <code>IntelliJ IDEA 12</code> configure <code>rsl</code> libraries for runtime loading. Do you have any experience with that, and do you maybe have a sample <code>XML</code> you put into aditional compiler options?</p> <p>Also, I didnt find the plugin for this, if you know any please say</p> <p>update:</p> <p>To clarify the practice project more:</p> <p>I want to make 2 'swf's that will have one tweening library used on a simple shape, but I want to make that tweening library crossdomain rsl.</p> <p>Then the goal is to in MainApp load and add to stage one swf and then the other. What I expect to happen is that the first time rsl will be loaded and the second time it will be used from cache.</p> <p>I am programing in pure AS3. Examples would be wonderful :) Right now I am trying to build one class that has RedSquare and tweening applied to that square. Ofcourse, tweening should come from rsl library.</p> <p>Update 2:</p> <p>I got to the point where I create [Frame(factoryClass='path.to.class')] and I create Preloader.</p> <p>But here now I dont know how to make a preloader that would load rsl's and then go to the next frame, or main class. What [Frame] tag does, is it makes two frames, one for preloader, and one for main class that should be executed after.</p> <p>Config I pass to the compiler:</p> <pre><code>&lt;flex-config&gt; &lt;!-- A list of runtime shared library URLs to be loaded before applications start. --&gt; &lt;!-- GreenSock --&gt; &lt;runtime-shared-library-path&gt; &lt;path-element&gt;/Users/matej/Documents/Projects/Work/External/greensock-as3/greensock.swc&lt;/path-element&gt; &lt;rsl-url&gt;http://localhost/~matej/rsls/greensock.swf&lt;/rsl-url&gt; &lt;policy-file-url&gt;http://localhost/~matej/rsls/crossdomain.xml&lt;/policy-file-url&gt; &lt;rsl-url&gt;http://localhost/rsls/greensock.swf&lt;/rsl-url&gt; &lt;policy-file-url&gt;http://localhost/rsls/crossdomain.xml&lt;/policy-file-url&gt; &lt;/runtime-shared-library-path&gt; &lt;!-- static-link-runtime-shared-libraries: statically link the libraries specified by the -runtime-shared-libraries-path option.--&gt; &lt;static-link-runtime-shared-libraries&gt;false&lt;/static-link-runtime-shared-libraries&gt; &lt;/flex-config&gt; </code></pre> <p>main class</p> <pre><code>package { import com.greensock.TweenLite; import Preloader; import flash.display.Sprite; import flash.events.MouseEvent; [Frame(factoryClass="Preloader")] public class RedSquare extends Sprite{ //--------------------------------------------------------------- // Private variables //--------------------------------------------------------------- private var redRectangle:Sprite; //--------------------------------------------------------------- // Constructor //--------------------------------------------------------------- public function RedSquare() { redRectangle = new Sprite(); redRectangle.graphics.beginFill(0xFFFF0000); redRectangle.graphics.drawRect(100,100,50,30); redRectangle.graphics.endFill(); addChild(redRectangle); redRectangle.addEventListener(MouseEvent.MOUSE_OVER,onOver); } //--------------------------------------------------------------- // Public methods //--------------------------------------------------------------- //--------------------------------------------------------------- // Private methods //--------------------------------------------------------------- private function onOver(event:MouseEvent):void { TweenLite.to(redRectangle,3,{x:400,y:200,rotation:160}) } } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload