Resizing subtitles for Flash CS4

Hi,
Does anyone have any useful code for resizing subtitles when you go to fullscreen? At the moment I have the following code, but when I go to full screen it resizes correctly on the first click, then if you go back to normal screen size, and then back to full screen again, the full screen subtitles are still in the smaller, normal screen size.
Please help - it's driving me mad!
// set up subtitles
                if (config.subtitles)
                    _subtitlesHeight = config.subtitlesHeight;
                    _subtitles = new FLVPlaybackCaptioning();
                    _subtitles.flvPlayback = _player;
                    _subtitles.source = config.subtitles;
                    _subtitles.autoLayout = false;
                    _subtitles.showCaptions = false;
                    _subtitlesArea = new CaptionArea();
                    var paddingH:Number = config.borderWidth;
                    var paddingV:Number = config.borderHeight;
                    var totalHeight:Number = bg.height;                   
                    var playerHeight:Number = totalHeight - (controlPanel.height + 2*paddingV);
                    _subtitlesArea.textField.textColor = 0xffffff;
                    _subtitlesArea.textField.selectable = false;
                    _subtitlesArea.textField.mouseEnabled = false;
                    _subtitlesArea.textField.x = player.x - paddingH;
                    _subtitlesArea.textField.y = player.y - paddingH;
                    _subtitlesArea.textField.width = player.width;
                    _subtitlesArea.textField.width = player.width;
                    var subtitlesIndex:uint = this.getChildIndex(player) +1;
                    addChildAt(_subtitles, subtitlesIndex);
                    addChildAt(_subtitlesArea, subtitlesIndex);                                         
                    _subtitles.addEventListener(ComponentEvent.HIDE, layoutPanels);
                    _subtitles.addEventListener(ComponentEvent.SHOW, layoutPanels);
                    _subtitles.addEventListener(CaptionChangeEvent.CAPTION_CHANGE, moveSubtitle);
                    stage.addEventListener(FullScreenEvent.FULL_SCREEN, moveSubtitle);
...more code here...
if (_subtitles)
                    // store showCaptions in cookie
                    _subtitles.showCaptions = Cookies.getCookie("showCaptions") ? true : false;
                    _subtitles.addEventListener(ComponentEvent.SHOW, storeCookies);
                    _subtitles.addEventListener(ComponentEvent.HIDE, storeCookies);
                    _subtitles.addEventListener(CaptionChangeEvent.CAPTION_CHANGE, moveSubtitle);
...more code here...
/*! \var subtitles
        \brief        The FLVPlaybackCaptioning object which will display the subtitles
        private var _subtitles:FLVPlaybackCaptioning;
        public function get subtitles():FLVPlaybackCaptioning { return _subtitles; }
        /*! \var subtitlesArea
        \brief        The area which the FLVPlaybackCaptioning will display subtitles in
        private var _subtitlesArea:CaptionArea;
        public function get subtitlesArea():CaptionArea { return _subtitlesArea; }
        /*! \var subtitlesHeight
        \brief        The height which the video display will be reduced to show the subtitles
        private var _subtitlesHeight:Number;
        public function get subtitlesHeight():Number { return _subtitlesHeight; }
... more code here....
//within function getVideoRect():Rectangle
if (subtitles)
                        subtitles.visible = subtitles.showCaptions;
                        player.addChild(subtitles);
                        player.addChild(subtitlesArea);
                        if (subtitles.visible)
                            var playerBottom:Number = subtitles.height;
                            subtitles.width = player.width;
                            subtitles.height = config.subtitlesHeight;
                    if (subtitles && subtitlesArea)
                        subtitlesArea.visible = subtitles.showCaptions;
                        player.addChild(subtitles);
                        player.addChild(subtitlesArea);
                        if (subtitlesArea.visible)
                            subtitlesArea.width = player.width;
                            subtitlesArea.height = config.subtitlesHeight;
.. more code...
//within function layoutPanels(event:Event = null):void
if (subtitles)
                        subtitles.visible = subtitles.showCaptions;
                        if (subtitles.visible)
                            playerBottom = subtitlesHeight;
                            subtitles.x = paddingH;
                            subtitles.y = paddingV + playerHeight - playerBottom;
                            subtitles.width = playerWidth;
                            subtitles.height = playerHeight;
                    player.registrationX = paddingH;
                    player.registrationY = paddingV;
                    player.registrationWidth = playerWidth;
                    player.registrationHeight = playerHeight;
                    if (subtitles && subtitlesArea)
                        subtitlesArea.visible = subtitles.showCaptions;
                        player.addChild(subtitles);
                        player.addChild(subtitlesArea);
                        if (subtitlesArea.visible)
                            subtitlesArea.x = player.x;
                            subtitlesArea.y = paddingV + playerHeight - playerBottom;
                            subtitlesArea.width = player.width;
                            subtitlesArea.height = playerBottom;
... more code...
/*! \fn moveSubtitle
        \brief        Move subtitles so they don't overlap the control panel
        \param[in]    event    Required for event handlers.  Ignored.
        private function moveSubtitle(event:Event = null):void
            if (subtitles &&
                subtitles.captionTarget &&
                controlPanel.visible &&
                (controlPanel.parent == player)
                var sct:DisplayObject = subtitles.captionTarget;
                var sctHeight:Number = sct.height * sct.scaleY;
                // In fullscreen, the subtitles field is sometimes scaled.
                // Sometimes it's not.  It's mad.  But we need to leave room.
                var videoRect:Rectangle = getVideoRect();
                if (videoRect.height > (playerBackground.height - subtitlesHeight))
                    sctHeight *= videoRect.height / (playerBackground.height - subtitlesHeight);
                var overlap:Number = sct.y
                                   + sctHeight
                                   - controlPanel.y;
                if (overlap > -playerBackground.y)
                    sct.y -= (overlap + playerBackground.y);

Sorry to say I can't help but wondered if you ever figured out a solution. I have a similar problem in that our subtitles look great and size just fine when we go to full screen, but we loose our placement. By that I mean when we go to full screen the subtitles drift upward - they come on in the proper position, then move upwards on the screen 1 or 2 lines. So I get floating-moving subtitles. Not sure if this is a bug or anything anyone has seen but I desparately need a fix. Maybe what you learned from you problem can help me.

Similar Messages

  • Flex Component Kit for Flash CS4

    Is there a Flex Component Kit for Flash CS4? All I have found
    is a download for Flash CS3.

    There isn't. But the CS3 kit works for CS4 too.

  • Skinning Kit for Flash CS4 ??

    Maybe I`m missing something but after spending hours searching for info on Flash CS4 skinning for Flex 3 I have come up with nothing. It seems that this feature ended with CS3.
    Anybody here know about tuts / info / resources / downloads for Flash CS4 skinning for Flex 3 ??

    You can use the same mxp that CS3 uses.
    2009/4/16 toft <[email protected]>
    Huh ?
    >
    I cant install the Skinning Kit for Flash CS3 on CS4, the component kit for
    CS3 installs but doesnt show up in CS4 as described in the readme file.
    >
    So have you tried this yourself or are you just guessing here ??
    >

  • When will Adobe release Flex Component Kit for Flash CS4?

    Any idea when will Adobe release Flex Component Kit for Flash CS4?

    There isn't. But the CS3 kit works for CS4 too.

  • 3rd Party Plugins for Flash CS4

    Are there any resources to find 3rd party plugins for Flash CS4?  I've used plugins in older versions of Flash, but I'm new to CS4.  I'm wanting to a lot of cool things with a site including photo carousels, image transitions, visual effects, etc., but I'm not sure where to get started.  Perhaps I shouldn't even be looking at plugins?   Maybe I am really looking for tutorials on how to make cool effects in Flash?

    Mari-Anne Ennor wrote:
    Is there a list of 3rd party plugins which will work in Photoshop CS4 Extended?  I am thinking - in particular - of Blade Pro, Filter Factory, KPT 3 & 5, Sinedot and Super Blade Pro.
    Haven't seen one. Anyway lists get out of date. 
    I guess the best way to get the latest information is to visit each manufacturer's web site.

  • How to use embedded font (CFF) for Flash CS4?

    Hi,
    I am trying to embed "Arial Unicode MS" for use by TLF in my Flash CS4 project. As I googled around, I am using the "Flex SWC" approach, only not having any luck. Here is what I got:
    //Code in Flex ActionScript project:
    package
        public class FontEmbeds
            [Embed(source='C:/Windows/Fonts/ARIALUNI.TTF',
                    fontFamily='ArialUnicodeMS',
                    embedAsCFF='true'
            public const Font1:Class;
    When I am trying to instantiate this class, I have AS code in my Flash main timeline:
    var font:Font = new FontEmbeds_Font1();
    Flash compiler says: "1067: Implicit coercion of a value of type FontEmbeds_Font1 to an unrelated type flash.text:Font."
    Ok. Now after I changed it to:
    var font:FontEmbeds_Font1 = new FontEmbeds_Font1();
    Flash gives 3 errors:
    "VerifyError: Error #1014: Class mx.core::FontAsset could not be found.
    ReferenceError: Error #1065: Variable TextLayout is not defined.
    ReferenceError: Error #1065: Variable MainTimeline is not defined."
    I am assuming I have to create a Font1 object in order to use the embedded font. Is this assumption correct? As I've tried to use the "fontFamily" directly but Flash didn't seem to find the font at all:
    charFormat.fontFamily = "ArialUnicodeMS";
    Thanks.

    Hi Eric,
    Thanks for the info.
    I've tried to use the "fontFamily" directly but Flash didn't seem to  find the font at all:
    charFormat.fontFamily = "ArialUnicodeMS";
    In one fla where I used pure TFL, nothing gets rendered at all in the container Sprite. Flash doesn't throw any errors either. In another fla where I used a ComboBox, etc. along with TFL, it throws an error says it can't compile since "there is no ActionScript found" and I got a screen where all the Flash components were  flickering. After several attempts, Flash crashed.
    Also as a side note, the swc gets generated by Flash Builder Beta 2, at first it was 18mb and the second time I complied it become 9mb and stayed 9mb afterwards. Not sure if that's a concern.
    Geng

  • Need help displaying images with List component for Flash CS4 (ActionScript 3.0)

    Hi folks:
    I am an inexperienced user of Flash CS4 Pro (v10.0.2). I am attempting to use the List component with ActionScript 3.0 to make a different image display when a user clicks each item in a list.
    I did find a tutorial that showed me how to make different text display using a dynamic text box and the following ActionScript:
    MyList.addEventListener(Event.CHANGE, ShowSelectedItem);
    function ShowSelectedItem(event:Event):void {
        ListText.text=MyList.selectedItem.data;
    ...where My List is the instance of the List component and ListText is the dynamix text box. In this case, the user clicks an item in the list, defined by the label value in the dataProvider parameter of the List component, and text displays as defined in the data value in the dataProvider parameter.
    However, as I mentioned to start, what I really want to do is make images display instead of text. Can anyone provide me the steps to do this?
    I appreciate your help (in advance)!!
    Cindy

    Hi...thanks for responding! I was planning on using images from the Library, but if there is a better way to do it, I'm open. So far, I just have text in the data property. This is part of my problem. I don't know what I need to put in the data value for an image to display. Do I just put the image file name and Flash will know to pull it from the Library? Do I need to place the images on the stage on different frames? I apologize for the "stupid user" questions, but as you can tell, I'm a newbie.
    Appreciate your patience and any help you can offer!
    Cindy

  • How to Build a Preloader for Flash CS4 and Actionscript 3.0

    With the wonderful help of many people on this site, I have successfully buit a nice website using Flash CS4.  I am wanting to deploy the site this weekend and I'm working on the finishing touches.  I would like to add a preloader so that the viewer will have everything loaded when the action starts.  Can anyone suggest a good tutorial that shows how to make the simple "rotary lines" that are so popular?  I've seen these and they look to be about an inch across and move like the hands of a clock.  I think it may even say "Loading..." or similar.  Since I'm still learning quite a bit, I did not know if Flash actually offers some "preloaded" tools for stuff like this?  Or am I better off going to Lynda.com and taking a tutorial?  Thanks for the help!

    Dark Armor, You mentioned the book Adobe Flash CS4 Professional Classroom in a Book, which I have.  I could not find anything in there.  Did you mean to say Actionscript 3.0 for Adobe Flash CS4 Professional?  I do have that book and it looks like there is information there.  Just wanting to make sure that you meant what you said.  Thanks!

  • Total Training for Flash CS4 ProIT,

    hello, im somewhat new to flash but i want to be good at it. im not really sure where to post this also but im looking for opinion and advise. im wondering about the package total training for adobe cs4 professional if it will good for my training and learning process. also do i have to register for an online class or do i do it on my own once i receive the package. thank you in advanced.

    Hi,
    I use Lynda.com online training. Great learning titles for every Adobe products. It's the way I learned AS3 (and books) !
    Try it. You can have access to free movies : http://www.lynda.com
    Martin
    http://www.martinc.biz

  • Need Missing Templates For Flash CS4

    I am looking for these templates:  Brew Handsets, Consumer Devices, Global Handsets, Japanese Handsets and Photo Slideshows.
    I understand that they were included in Flash CS3.  Unfortunately, I removed my Flash CS3 before installing Flash CS4.
    Does Adobe have a place to download these templates.  If not, they should!

    Apple changed the New Project Assistant in Xcode 3.2. Choose Application under Mac OS X on the left side of the New Project Assistant. Choose the Command Line Tool project from the list of application projects. Use the Type pop-up menu to specify the type of command-line tool project you want to create. Choose Foundation for an Objective-C command-line project.

  • Exporting subtitles for Flash cue points

    I want to not just create subtitles, but use them in Flash video and other cue-point supported applications for distribution on the web. Is there a way to export my subtitles created in DVDSP to a standard stf or other document? Or do I have to use external software and then export for Flash, DVDSP, etc? If I have to use a third party, which one works best? I've seen many in the Apple Downloads section...
    Thanks,
    Chris.

    Hi Sigmundo,
    At work ( disturb media ) we've finished a karaoke flash project. I haven't used Soundbooth then, we had limited time, so I wrote a few handy commands for flash that took care of the job. Hopefully we will be able to document that, right an article and share the commands as a packed extension.
    I've learned Soundbooth over the weekend and FLVCuePoints was one of the highlights. I've used FLV
    and everything worked out fine. I didn't know the Media(Flash Video) Encoder allows you open an xml
    file and insert cuepoints at that stage.
    Anyway,
    About F4V, Lee Brimelow has a more detailed post about the cue points bug here:
    http://theflashblog.com/?p=748 
    HTH,
    George

  • Need help in screen capturing for flash CS4 AS3

    Hi, i need help!!!!!!!!!!!!!!!!!!!!!! URGENT!
    I am currently doing Augmented Reality.
    I got my marker to detect my model but my problem now is how to screen capture the content that is in swf.
    (As in capture the dae model shown in the comp not from webcam.)
    & also i just want to capture the swf window not the whole desktop.
    I read online, they say its impossible?
    Or is it possible to call screen capture function in javascript to flash CS4? (LIke external data)
    (Moreover, does anyone know how to detect multiple dae models with different markers?)
    Anyone can help??? Thanks in adv!!

    My current program (Flash CS4, AS3) only can capture what the webcam sees.
    How do i change it to screen capture (something like print screen) with my .DAE models?
    In the case, when i click on the capture button, it print screen.
    Here's part of the code that capture what the webcam sees.
    private function captureImage(e:MouseEvent):void
       bmd.draw(stage);
       bmp = new Bitmap(bmd);
       bmp.x = 140;
       bmp.y = 40;
       addChild(bmp);
       capture.visible = false;
       saveButton.visible = true;
       discardButton.visible = true;
    Really really need help! URGENT!
    Thanks!

  • Looking for flash cs4 study group?

    If anybody is aware of it, please let me know.
    Thanks,
    Sathish.

    I mean flash cs4 certification study group.
    Thanks,
    Sathish.

  • New components for Flash CS4

    2tech support >> why u guys never post news about
    features/updates on the main page of adobe.com?! U've announced new
    text layout components" in CS4, and what? Where're they?
    When will they be availbale?! No announce, no news, no nothing, u
    stay mum as always. It's just not polity u know. Dah...

    Hi,
    Are you debugging AS 2 or AS 3 files?  Note that the Flash IDE uses the StandAlone Player for debugging AS 3 files.  Also, what issues are you encountering in the player used for Test Movie that is fixed in the browser/standalone players?
    Thanks,
    Nivesh

  • Intro Tutorial for Flash CS4

    I am new to Flash Professional CS4. I would like to
    view a basic introductory tutorial that shows me what the product
    does and how I can perform the basics. I am surprised that there is
    not something I can click on right on the CS4 page at Adobe. Oh
    well . . . Any help will be appreciated.

    Thank you. That helped. The "tutorial" on the startup page of
    CS4 brings me to a tutorial for CS3, which contains screens that I
    do not see, etc. The tutorials on the pages you sent are much more
    helpful. However, they are not in sequential order on the page
    (why?). I can proceed though. Thanks again.

Maybe you are looking for

  • Image Blob field can't display in designer viewer & web app

    It's very strange that my Image blob field is showing correctly in designer, but it's displaying nothing in Preview tab. After I deployed in to the web application in jboss, there is one error msg output to server console: ERROR [BlobFieldPictureCach

  • X4600 Server - No Video

    My company just purchased 3 Sun X4600 Servers. 1 unit produces video while the other 2 units do not have video (or in redirection) and just show a blank display. Serial Console & ILOM work fine. Green LED on front of server. No faults on CPU/RAM card

  • How to capitalise cost center based purchase

    Hi Friends , Presently we are buying all plant and machine and Building related on cost center based purchase with GL accounts . We want to capitalise these once project compleate , how to capitalise material with cost center based purchases . Raghu

  • Kill Execute Thread

    Is there a way to kill specific Execute Threads. We are in a situation when an MDB would not acknowledge specific messages and those MDBs(which run on default execute queue) will not terminate. We would like to kill those threads when we want to unde

  • ASA 5510 'bounces' UDP packets. Why?

    Hi. I hope to find someone who can shed a light on something that is bugging me for days now. We have an ASA (5510, running 7.2(2)) to connect our subnets to the backbone of the ISP. I received complaints about one specific connection, which I'll "dr