1. The main slot's Movie Clip and its assets.
First, we open the website.fla file of the template which contains the slot we want to use. In the library we open Template Elements --> Slots, find the needed slot and select it and its Assets folder. Then we right-click on the selected elements and choose Copy (or press Ctrl-C on keyboard).
Now we should open the website.fla of the template which we want to put our slot to. We open Template Elements --> Slots, right-click on the folder, and choose Paste (or press Ctrl-V on keyboard).
2. AS file.
Now we need to ascertain if there is an AS file for this slot. We right-click on the slot's Movie Clip and choose Linkage Properties. Let's check the Base class field. If the AbstractMotoSlot is inherited for this slot, then it doesn't have the own AS file and this step should be skipped. In our case the slot has its own class named BGImageSlot, so we have to copy it too.
It can be found in the src\slots folder of the template. We copy it to the same folder of another template.
3. Structure.xml
And the last step is copying the slot's node from the structure.xml. Open the structure.xml file of the source template and find the node of the slot you need. It can be found by the librarySymbolLinkage="" attribute - its value will conform to the Class name in the slot's Movie Clip linkage properties. In this example it is BGImageSlot.
<slot id="3" librarySymbolLinkage="BGImageSlot" animated="true" resizable="true" mainPropertyID="1"> <name><![CDATA[Background Image Slot]]></name> <properties> <property id="1" type="image"> <name><![CDATA[Image]]></name> </property> <property id="4" type="plainText"> <name><![CDATA[Gallery ID]]></name> <parameters> <restrict><![CDATA[0-9]]></restrict> </parameters> </property> <property id="2" type="checkBox"> <name><![CDATA[FullScreen Mode]]></name> </property> <property id="3" type="radioButton"> <name><![CDATA[Alignment]]></name> <dataProvider> <item data="Fill">fill</item> <item data="Fit">fit</item> <item data="Center">center</item> <item data="Zoom">zoom</item> </dataProvider> </property> </properties> <template width="1100" height="830" alpha="1" blocked="false"> <properties> <item propertyType="1"><![CDATA[images/bg-ell-1.png]]></item> <item propertyType="2"><![CDATA[true]]></item> <item propertyType="3"><![CDATA[Center]]></item> <item propertyType="4"><![CDATA[0]]></item> </properties> </template> </slot>
So, let's select the whole node and paste it to the <slots> section of another structure.xml.
It's very important to set the correct id for the slot in the new template. You should set the ID which is not taken by any other slot. In our example the template had five slots before putting a new one, that's why the ID will be "6".
The same goes for modules - you can move them in a similar way.
Thank you for reading this tutorial.



Sections
Recent Forum Posts

RSS
Twitter