2

Using FLVPlayback Captioning component I would like to move the subtitle text at certain parts in y-position. Is this possible in AS3?

All of my own custom arguments are ignored when subtitles are parsed and wrapping the specific part with some sort of character won't do it either as I cannot change the text during runtime.

The reason is that in my videostreams there is boxes with text content that I don't want the subtitle on top of, and rather above for reading purposes.

I was thinking of either doing an own manual subtitle function or custom flash cuepoints that I can access but want to know if anyone has done this before.

Mattias
  • 3,907
  • 4
  • 28
  • 50

1 Answers1

0

Something like this will do it. I found out that autoLayout was over overridden by the subtitle xml so I forced it to false every "change".

public function Init() : void
{
    // captions
    _captions = new FLVPlaybackCaptioning();
    _captions.autoLayout = false;
    _captions.flvPlayback = _video;
    _captions.addEventListener(CaptionChangeEvent.CAPTION_CHANGE, onCaptionChange);
    _captions.source = "mySubs.xml";

    addChild(_captions);
}

private function onCaptionChange(pEvent : CaptionChangeEvent) : void
{
    if(!_captions.captionTarget)
        return;

    _captions.autoLayout = false; // force autoLayout
    _captions.captionTarget.y = 666; // position of choice
}
Mattias
  • 3,907
  • 4
  • 28
  • 50