Package org.apache.flex.swf.tags

Examples of org.apache.flex.swf.tags.PlaceObject2Tag


            DefineSpriteTag spriteTag = (DefineSpriteTag)tag;
            for (ITag controlTag : spriteTag.getControlTags())
            {
                if (controlTag instanceof PlaceObject2Tag)
                {
                    PlaceObject2Tag placeObject = (PlaceObject2Tag)controlTag;
                    if (placeObject.isHasClipActions())
                    {
                        placeObject.setCharacter(null);
                        tagsModified = true;
                    }
                    if (placeObject.isHasCharacter())
                    {
                        tagsModified |= modifyTagsForEmbedding(placeObject.getCharacter());
                    }
                }
            }
        }
        else if (tag instanceof DefineButtonTag)
View Full Code Here


        return new MetadataTag(bitStream.readString());
    }

    private PlaceObject2Tag readPlaceObject2() throws IOException, MalformedTagException
    {
        final PlaceObject2Tag tag = new PlaceObject2Tag();
        tag.setHasClipActions(bitStream.readBit());
        tag.setHasClipDepth(bitStream.readBit());
        tag.setHasName(bitStream.readBit());
        tag.setHasRatio(bitStream.readBit());
        tag.setHasColorTransform(bitStream.readBit());
        tag.setHasMatrix(bitStream.readBit());
        tag.setHasCharacter(bitStream.readBit());
        tag.setMove(bitStream.readBit());

        tag.setDepth(bitStream.readUI16());
        if (tag.isHasCharacter())
            tag.setCharacter(getTagById(bitStream.readUI16(), tag.getTagType()));
        if (tag.isHasMatrix())
            tag.setMatrix(readMatrix());
        if (tag.isHasColorTransform())
            tag.setColorTransform(readColorTransformWithAlpha());
        if (tag.isHasRatio())
            tag.setRatio(bitStream.readUI16());
        if (tag.isHasName())
            tag.setName(bitStream.readString());
        if (tag.isHasClipDepth())
            tag.setClipDepth(bitStream.readUI16());

        ClipActions clipActions = new ClipActions();
        clipActions.data = bitStream.readToBoundary();
        tag.setClipActions(clipActions);

        return tag;
    }
View Full Code Here

        tags.add(image);

        Matrix tm = new Matrix();
        tm.setScale(1, 1);

        PlaceObject2Tag po = new PlaceObject2Tag();
        po.setDepth(10);
        po.setCharacter(shape);
        po.setHasCharacter(true);
        po.setMatrix(tm);
        po.setHasMatrix(true);

        List<ITag> spriteTags = new ArrayList<ITag>(1);
        spriteTags.add(po);
        int frameCount = 0;
        DefineSpriteTag sprite = buildSprite(spriteTags, frameCount, scalingGrid, tags);
View Full Code Here

        dumpPlaceObject23(tag);
    }

    public void dumpPlaceObject23(PlaceObjectTag tag)
    {
        PlaceObject2Tag tag2 = tag instanceof PlaceObject2Tag ? (PlaceObject2Tag)tag : null;
        PlaceObject3Tag tag3 = tag instanceof PlaceObject3Tag ? (PlaceObject3Tag)tag : null;

        if (tag != null || (tag2 != null && tag2.isHasCharacter()))
        {
            if (tag.getCharacter() != null && currentFrame != null &&
                currentFrame.getSymbolName(tag.getCharacter()) != null)
            {
                indent();
                out.println("<!-- instance of " + idRef(tag.getCharacter()) + " -->");
            }
        }

        open(tag);
        if (tag3 != null && tag3.isHasClassName())
            out.print(" className=\"" + tag3.getClassName() + "\"");
        if (tag3 != null && tag3.isHasImage())
            out.print(" hasImage=\"true\" ");
        if (tag != null || (tag2 != null && tag2.isHasCharacter()))
            out.print(" idref=\"" + idRef(tag.getCharacter()) + "\"");
        if (tag2 != null && tag2.isHasName())
            out.print(" name=\"" + tag2.getName() + "\"");
        out.print(" depth=\"" + tag.getDepth() + "\"");
        if (tag2 != null && tag2.isHasClipDepth())
            out.print(" clipDepth=\"" + tag2.getClipDepth() + "\"");
        if (tag3 != null && tag3.isHasCacheAsBitmap())
            out.print(" cacheAsBitmap=\"true\"");
        if (tag2 != null && tag2.isHasRatio())
            out.print(" ratio=\"" + tag2.getRatio() + "\"");
        if (tag2 != null && tag2.isHasColorTransform())
            out.print(" cxform=\"" + tag2.getColorTransform() + "\"");
        else if (tag.getColorTransform() != null)
            out.print(" cxform=\"" + tag.getColorTransform() + "\"");
        if (tag.getMatrix() != null || (tag2 != null && tag2.isHasMatrix()))
            out.print(" matrix=\"" + tag.getMatrix() + "\"");
        if (tag3 != null && tag3.isHasBlendMode())
            out.print(" blendmode=\"" + tag3.getBlendMode() + "\"");
        if (tag3 != null && tag3.isHasFilterList())
        {
View Full Code Here

TOP

Related Classes of org.apache.flex.swf.tags.PlaceObject2Tag

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.