Package flash.swf

Examples of flash.swf.TagEncoder


        // which extends ByteArrayOutputStream -- this writer would need to be replaced with
        // some other object that can accept an OutputStream in its constructor. The point is
        // to eliminate the extra buffers, and just always write directly to the intended target.
        // - mikemo
        final boolean useCompression = configuration.getCompilerConfiguration().useCompression();
        TagEncoder encoder = configuration.generateSizeReport() ? new TagEncoderReporter() : new TagEncoder();       
        new MovieEncoder(encoder).export(movie, useCompression);
        encoder.writeTo(out);
        generateSizeReport(configuration, movie, encoder);

        if (ThreadLocalToolkit.getBenchmark() != null)
        {
            LocalizationManager l10n = ThreadLocalToolkit.getLocalizationManager();
View Full Code Here


            if (args[i].equals("-aspath"))
            {
                aspath = args[++i];
                continue;
            }
            TagEncoder encoder = new TagEncoder();
            //ConsoleOutputHandler tagHandler = new ConsoleOutputHandler(null, null);
            SwfxParser swfxParser = new SwfxParser(encoder, StringUtils.splitPath(aspath));
            boolean success = swfxParser.parse(args[i]);//, tagHandler);
            if (success)
            {
                String swfFileName = args[i].substring(0, args[i].lastIndexOf('.')) + ".swf";
                OutputStream out = new BufferedOutputStream(new FileOutputStream(swfFileName));
                try
                {
                    encoder.writeTo(out);
                }
                finally
                {
                    out.close();
                }
View Full Code Here

        // which extends ByteArrayOutputStream -- this writer would need to be replaced with
        // some other object that can accept an OutputStream in its constructor. The point is
        // to eliminate the extra buffers, and just always write directly to the intended target.
        // - mikemo
        final boolean useCompression = configuration.getCompilerConfiguration().useCompression();
        TagEncoder encoder = configuration.generateSizeReport() ? new TagEncoderReporter() : new TagEncoder();
        new MovieEncoder(encoder).export(movie, useCompression);
        encoder.writeTo(out);
        generateSizeReport(configuration, movie, encoder);

        if (ThreadLocalToolkit.getBenchmark() != null)
        {
            LocalizationManager l10n = ThreadLocalToolkit.getLocalizationManager();
View Full Code Here

    public void testCompileDate() throws IOException {

        long time = System.currentTimeMillis();

        // encode the movie with the product info (compilation time)
        TagEncoder te = new TagEncoder();
        MovieEncoder me = new MovieEncoder(te);

        Movie movie = new Movie();
        movie.size = new Rect(100, 100);
        movie.frames = new ArrayList();
        movie.productInfo = new ProductInfo(time);
        me.export(movie);

        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        te.writeTo(bos);

        // decode the movie and save the compilation time in the special handler
        ProductInfoTagHandler decodeHandler = new ProductInfoTagHandler();
        TagDecoder decoder = new TagDecoder(new ByteArrayInputStream(bos.toByteArray()));
        decoder.parse(decodeHandler);
View Full Code Here

            Frame frame1 = (Frame)m.frames.get(0);
            Matrix mt = new Matrix(0, 0);
            frame1.controlTags.add(new PlaceObject(mt, tag, 1, null));

            //Compile SWF
            TagEncoder tagEncoder = new TagEncoder();
            MovieEncoder movieEncoder = new MovieEncoder(tagEncoder);
            movieEncoder.export(m);

            //Write to file
            tagEncoder.writeTo(fos);
        }
        finally
        {
            fos.close();
        }
View Full Code Here

TOP

Related Classes of flash.swf.TagEncoder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.