[SIZE=2]I am using a tree menu that I am loading in Print2Flash documents. There is one node on the menu I want to load a regular SWF file that will have links to animations. Because my loader is customized to load Print2Flash documents, is there a way to use a new loader to load a standard SWF on one of the Tree Menu Nodes?[/SIZE]
[SIZE=2] [/SIZE]
[SIZE=2]I tried to put in a new loader but so far no luck, I am getting ‘Incorrect number of argument. Expected no more than 1’ on the case line for the new loader.[/SIZE]
[SIZE=2] [/SIZE]
[SIZE=2]Code is below…my attempt to put in a new loader is bolded…any help?[/SIZE]
[SIZE=2] [/SIZE]
[SIZE=2]stop();
import com.microwebber.tree.;
import Print2Flash.
import flash.display.Loader;
import flash.events.Event;
import flash.net.URLRequest;
import fl.events.*;[/SIZE]
[SIZE=2]
stage.align=StageAlign.TOP_LEFT[/SIZE]
[SIZE=2] [/SIZE]
[SIZE=2]mytree.setSize(315,417);
var usingFolderIcons = false;
function switchIcons(e){
usingFolderIcons = !usingFolderIcons;
mytree.setDefaultFolderStyle(usingFolderIcons);
mytree.invalidate();
}
//mytree.setHorizontalPolicy(true,true);[/SIZE]
[SIZE=2] [/SIZE]
[SIZE=2]var dp:XML =
<node>
<node label="LS-15 Liner Hanger Packer Overview ">
</node>
<node label="Module Course Content ">
<node label="Pre-Operational Procedures "/>
<node label="Running Procedures: Quick Glance "/>
<node label="Detailed Running Procedures "/>
<node label="Post Operational Procedures "/>
<node label="Animations "/>
</node>
<node label="Testing Your Knowledge of this Module ">
</node>
</node>;[/SIZE]
[SIZE=2] [/SIZE]
[SIZE=2]mytree.setRendererStyle(“nodeIndent”, 20);[/SIZE]
[SIZE=2] [/SIZE]
[SIZE=2]mytree.addXML(dp);[/SIZE]
[SIZE=2] [/SIZE]
[SIZE=2]btnClose2.addEventListener(MouseEvent.CLICK, bigborecontent);
function bigborecontent(myevent:MouseEvent):void {
MovieClip(parent.parent).removeF();
}[/SIZE]
[SIZE=2]
var P2FDocLoader:Print2FlashDoc3; [/SIZE]
[SIZE=2] [/SIZE]
[SIZE=2]mytree.addEventListener(ListEvent.ITEM_CLICK, handleClick);
function handleClick (ev:ListEvent) : void {
switch(ev.item.label) {
case "LS-15 Liner Hanger Packer Overview ":
P2FDocLoader=new Print2FlashDoc3(“modules/overview.swf”,375,115,575,550,this);
break;
case "Pre-Operational Procedures ":
P2FDocLoader=new Print2FlashDoc3(“modules/LSpreoperational.swf”,375,115,575,550,this);
break;
case "Running Procedures: Quick Glance ":
P2FDocLoader=new Print2FlashDoc3(“modules/LSrunningproceduresquickglace.swf”,375,115,575,550,this);
break;
case "Detailed Running Procedures ":
P2FDocLoader=new Print2FlashDoc3(“modules/LSrunningproceduresdetailed.swf”,375,115,575,550,this);
break;
case "Post Operational Procedures ":
P2FDocLoader=new Print2FlashDoc3(“modules/LSpostoperational.swf”,375,115,575,550,this);
break;
case "Testing Your Knowledge of this Module ":
P2FDocLoader=new Print2FlashDoc3(“modules/testing.swf”,375,115,575,550,this);
break;
}
} [/SIZE]
[SIZE=2] [/SIZE]
[SIZE=2]var loader:Loader = new Loader();
addChild(loader);[/SIZE]
[SIZE=2]mytree.addEventListener(ListEvent.ITEM_CLICK, handleClick1); **
function handleClick1 (ev:ListEvent) : void { **
** switch(ev.item.label) {
** case "Animations ":
** loader.load(new URLRequest(“modules/LSpostoperational.swf”,375,115,575,550,this));**
** break;**
** }**
**} **[/SIZE]