From: Dmitry S. <dm...@jz...> - 2003-10-14 18:06:57
|
> Util.init("../classes"); > System.out.println("Starting TickerTest"); > FlashFile file = FlashFile.newFlashFile(); // create default > flash file > Script script = new Script(); // create main script with 1 > frame > script.setMain(); > file.setMainScript(script); // set main script for the file > //int startFrame = 1; > //Frame frame = script.getFrameAt(1); > Frame frame = new Frame(); > Instance instance = frame.addInstance(script, 1, null, null); script here has to be new Script() for the instance, i.e. change it to Instance instance = frame.addInstance(new Script(), 1, null, null); GenericCommand command = new TickerCommand(); > command.setInstance(instance); > > command.addParameter("datasource", "text.txt"); > command.addParameter("orient", "horizontal"); > command.addParameter("mask", "false"); > command.addParameter("stepsize", "8"); > command.addParameter("itemspace", "5"); > command.addParameter("halign", "left"); > command.addParameter("valign", "top"); > command.addParameter("instancename", ""); > > instance.setCommand(command); > StandardContext context = new StandardContext(); > context.setValue("filename", "tickertest.swf"); you need to set values to the context only if you use variables in command parameters (variables things like {varname}), so no need to setValue here if you got some exception then send the exception stacktrace as well. -- Dmitry Skavish \ |