Problem: Animation publishing incorrectly, but working in Cp preview.

Hi,
I created an animation in Flash CS5 with some code in it (see below for the code). What the code does is it allows the user to play/pause the movie by pressing the spacebar. It allows that keyboard shortcut to be used on all slides except certain ones (in this case: slides 9, 13, and 15). I just need to drop this animation onto the first slide of my Cp project, and the function works throughout the rest of the project. When I hit F4 to preview, it works great, but when I publish it, it has problems: It won't work, for starters, but also, when I go to a slide, press the spacebar, and then go back to the previous slide, the play/pause button down on the playbar shows the 'play' icon (meaning the video should be paused), but the video continues to play. The play/pause button in the playbar and the keyboard shortcut do nothing. Keep in mind that it works perfectly when I 'F4' it, just not when I publish it and open the SWF. Usually when stuff works in Cp but not when published, its something in the publish settings that's the problem, but I can't find anything in there that would help. Plus, F4ing the project within Cp should factor in the publish settings. Just to be clear, all I need help with is making the published file work exactly like the F4 preview. The code is below, and thanks to anyone that can help.
// Keyboard Shortcut: Play/Pause (Space)
stage.addEventListener(KeyboardEvent.KEY_DOWN, keypressPause);
function keypressPause(event:KeyboardEvent):void
    switch(event.keyCode)
            case Keyboard.SPACE :
            var myRoot:MovieClip = MovieClip(root);
            var mainmov:MovieClip = MovieClip(myRoot.parent.root);
            if (mainmov.cpInfoCurrentSlide != 9 &&
                mainmov.cpInfoCurrentSlide != 13 &&
                mainmov.cpInfoCurrentSlide != 15)
                    if (mainmov.rdcmndPause == 1)
                        {mainmov.rdcmndResume = 1;}
                        else
                        {mainmov.rdcmndPause = 1;}
                    break;

The issue is the way the code is obtaining Captivate's main time line (mainmov).  When you F4 the movie, it's being loaded differently than when you F12 web preview... thus the main time line is obtained differently.  Here's a way to search for the main time line and the rest of the code:
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.utils.describeType;
import flash.display.MovieClip;
var mainmov:MovieClip = findMainMovie();
// Keyboard Shortcut: Play/Pause (Space)
stage.addEventListener(KeyboardEvent.KEY_DOWN, keypressPause);
function keypressPause(event:KeyboardEvent):void
    switch(event.keyCode)
                    case Keyboard.SPACE :
                    if (mainmov.cpInfoCurrentSlide != 9 &&
                              mainmov.cpInfoCurrentSlide != 13 &&
                              mainmov.cpInfoCurrentSlide != 15){
                                        if (mainmov.rdcmndPause == 1){
                                                  mainmov.rdcmndPause = 0;
                                                  mainmov.rdcmndResume = 1;
                                        }else{
                                                  mainmov.rdcmndPause = 1;
                                                  mainmov.rdcmndResume = 0;
                    break;
//Returns the Captivate MainTimeLine
function findMainMovie():MovieClip
          var cpMovie:MovieClip;
          //cpMovie = parent.parent.parent;
          cpMovie = findParentByType(this.parent, "CaptivateMainTimeline") as MovieClip;
          return cpMovie;
//Iteratively finds a parent object by type
function findParentByType(source:DisplayObject, parentType:String):DisplayObjectContainer {
          var currentTarget:DisplayObjectContainer = source.parent;
          while (currentTarget != null) {
                    if (describeType(currentTarget)[email protected](parentType) >= 0) return currentTarget;
                    currentTarget = currentTarget.parent;
          return null; // We're at the root
The code to search for the main time line was gleaned from CpGears written by Whyves
I'd encourage you to think about making this into a Captivate static widget using the CpGears framework or the WidgetFactory framework by Tristan Ward.  Either framework will make your life much easier.
I usually set the two variables in tandem: rdcmndPause and rdcmndResume so that all variables stay in sync.
When I dropped the animation into the Cp project, I had to set it to display for "rest of project" in order for it to work across all slides.
Report back and let us know how it goes.
Jim Leichliter

Similar Messages

  • Text  rendering in Java swing textfield is incorrect but works fine in awt

    Hi
    I am having a specific problem regarding
    Malayalam Language (An indian language) rendering in Java swing textfield rendering is incorrect for some specific malayalam chars
    റ്റ ട്ട
    But for awt text filed every thing looks fine
    Any clue regarding this issue
    Pl help
    John India

    Thank you
    I too think in the same way , but I am trying with very popular malayalam fonts and
    Windows 7 is works fine with default malayalam font karthika in apps like note pad ,word , iexplorerer
    I tried a set of other fonts also some problem or other is with swt but
    awt it works very nice
    Is there any tool available to check all glyphs are , available or not ,
    regards
    john
    Edited by: user3656685 on Jul 20, 2012 9:53 AM

  • ADFS SSO not working correctly on 'old' portal, but works fine on preview portal

    We recently configured an AADSYNC and ADFS 'connection' between Azure and our on-premise environment.
    When i log into the preview portal everything works fine, I'm being redirected to our ADFS proxy server and I get authenticated and logged into the portal.
    However, when i try to login to the 'old' portal (manage.windowsazure.com), after entering my username i get redirected to a forms based webpage of our ADFS environment. When i enter my credentials there i get logged in to the portal so, however I houldn't
    be getting a web based login page.
    I am ofcourse trying this from the internal netwerk, the address of our ADFS server is being resolved to the ip address of the internal ADFS server (otherwise logging into the preview portal should also display the web based login page).
    When i go to portal.office.com ADFS is also working fine, no web based login page is being displayed, so it's really just the manage.windowsazure.com portal thats acting strange.
    (I'm trying all this from the same computer, in the same netwerk environment roughly at the same time, and this also happens on other systems and with other users).
    Any ideas?

    I'm having the exact same issue.  If you look at the AD FS server, you'll see a 164 event logged when you try to log in to the old portal.  Something to the effect of:
    Relying Party:
    urn:federation:MicrosoftOnline
    Exception details:
    Microsoft.IdentityServer.Service.Policy.PolicyServer.Engine.InvalidAuthenticationTypePolicyException: MSIS7102: Requested Authentication Method is not supported on the STS
    I have a case opened with Microsoft, awaiting a call back.  This just started, and I don't understand AD FS enough yet to know what to change, or if I should.

  • Title & Menu Buttons not working correctly on remote control/ set top player but work in preview.

    Title & Menu Buttons not working correctly on remote control/ set top player but work in encore preview. This only happens for a Blu ray project. When a user presses the menu button it should go to the previous menu they were on but it goes to the main menu. When they press the title button they should go to the main menu but it doesn't do anything. My DVD projects work as expected.I've tried creating a new "test" project with different footage and still get the same undesirable results.
    Overrides grayed out and set to "not set" for timelines and menus.Project settings and build are set to blu ray. Also I've noticed when I preview a Bluray project the preview window shows a red colored disc next to the Title button when viewing the timelines and green when playing the menus but not so for a DVD project it displays red if motion menus and or timelines are not rendered/encoded. I'm not using motion menus and all the media is encoded according to the project specs.
    I've searched this forum but couldn't find the answer. Any help or redirects to a solution would be appreciated. Working with CS5. Thanks.

    I found out on my Samsung Blu ray player the remote has a tools button on it that brings up audio, angle, chapter selection etc.and also title selection which is actually the menus and the timelines unfortunately. It's not as easy or direct as last menu selected but it's a workaround at least. I also plan on using a pop up menu. I'll let you know.

  • My new Macbook won't connect to my wifi network - it keeps saying "password incorrect" - but I've tested it on my phone and works fine, I've checked the password I enter is correct digit for digit - what could the problem be?

    My new Macbook won't connect to my wifi network - it keeps saying "password incorrect" - but I've tested it on my phone and works fine, I've checked the password I enter is correct digit for digit - what could the problem be?

    you need to open the keychain access located in your utilities folder in the applications and once in the keychain on the left side click on the words system at the top and in the lower section click on passwords
    next look in the striped area for any passwords that say airport network password next to kind and highlight those and hit delete on the keyboard to remove them from the keychain.
    once you remove all of these airport passwords, quit the keychain
    turn wifi off then back on, select your wifi network from the list and enter the password telling it to save to keychain this should resolve your issue!

  • HT1430 Cannot send email from iPhone 4S ..it keeps saying smpt password is incorrect but it is correct and I receive email no problem

    Cannot send email from iPhone...keeps saying smpt password is incorrect but it is correct.. I recieve email no problem

    On my own, I discovered the following, which worked (one responder got the solution part correct for Google): For Yahoo, where I just use a standard login with no extra verification, I had to go into Yahoo and change my password. Once I did this, the new iPhone had no problem registering accepting my Yahoo account. I WAS, however, using the correct password and user name all along, for those who did not think that was the case. The problem is on the iPhone software side. For Google, I use a two step verification, and for that, one must go to Google Mail and obtain a specific, unique password, that is designed to work only on iPhones. Hope this helps anyone else with this dilemma.

  • Top Nav buttons not working after publish, but works in app. WHY?

    I have tried to find out why these buttons will not work after publishing. They work fine while in the iWeb app, but not when publishing. I do not have any objects near the top nav buttons. The first site went off without a hitch
    <www.serenitycustompools.net> the second site began the problem with the last page, the nav buttons would not work. Now this 3rd site, none of the nav buttons at top will work after publish, but will work in app. Anyone else having the same probs? None of my pages have the same names or any punctuation marks, and they are simple one word named pages.
    mini intel   Mac OS X (10.4.9)  

    They all work for me, try clearing your browser cache or using another browser.

  • Every time I try to download an app it says billing info is incorrect but its all correct it won't let me sign in using a diff apple id even when I reset my phone anyone else had this problem if so how do I fix it?

    Every time I try to download an app it says billing info is incorrect but its all correct it won't let me sign in using a diff apple id even when I reset my phone anyone else had this problem if so how do I fix it?

    Amylovelyy wrote:
    Every time I try to download an app it says billing info is incorrect but its all correct ...
    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact
    Amylovelyy wrote:
    ...  it won't let me sign in using a diff apple id ...
    Settings > iTunes and App store > Apple ID = Sign Out... Then Sign In using the preferred Apple ID.
    It should be Noted that anything Downloaded with a Particular Apple ID is tied to that Apple ID and Cannot be Merged or Transferred to a Different Apple ID.

  • I've searched to no avail for this problem. Similar posts but none that tell me what to do. I can't add or delete any bookmarks on my iPad 2 running the newest iOS. I know how it's suppose to work, it just isn't working!

    I've searched to no avail for this problem. Similar posts but none that tell me what to do. I can't add or delete any bookmarks on my iPad 2 running the newest iOS. I know how it's suppose to work, it just isn't working!
    It started after the major update to iOS 7.
    I can't believe that this is so hard to do. It's just not letting me. I can add a bookmark to the home screen just fine, just not in a bookmarks folder anywhere I try.
    I've used Apple products since 2001 and have always loved how intuitive they are. But the Safari browser since iOS 7 has been the worst I've experienced. At least right in the beginning after that update.
    I'd really appreciate any help that doesn't just tell me how it's suppose to work...I know that.
    My iPad 4 is not affected with the problem and works as it should.

    To delete, tap "Edit" (tap to enlarge image)

  • I am having problems gettting my mail to work ... Mac telling me that my start up disk id full and to delete some files to free up space ... have done this but when i open mail from the dock it just brings up the colour wheel and nothing happening

    I am having problems gettting my mail to work ... Mac telling me that my start up disk id full and to delete some files to free up space ... have done this but when i open mail from the dock it just brings up the colour wheel and nothing happening ... it shows when you right click on the mail icon that " application not responding"

    If your hard drive is getting full, you need to free up, at least, 20 GBs of space on your iMac's hard drive.
    If your Mac is running a fairly recent version of OS X, here are some general guidelines.
    Follow some of my tips for cleaning out, deleting and archiving data from your Mac's internal hard drive.
    Have you emptied your iMac's Trash icon in the Dock?
    If you use iPhoto, iPhoto has its own trash that needs to be emptied, also.
    If you use Apple Mail app, Apple Mail also has its own trash area that needs to be emptied, too!
    Other things you can do to gain space.
    Delete any old or no longer needed emails and/or archive to disc, flash drives or external hard drive, older emails you want to save.
    Look through your Documents folder and delete any type of old useless type files like "Read Me" type files.
    Again, archive to disc, flash drives, ext. hard drives or delete any old documents you no longer use or immediately need.
    Download an app called OnyX for your version of OS X.
    When you install and launch it, let it run the automatic ans S.M,A.R.T. tests,  then go to the cleaning and maintenance tabs and run the tabs that have the ability to clean out all web browser cache files, web browser histories, system cache files, delete old error log files.
    Typically, iTunes and iPhoto libraries are the biggest users of HD space.
    move these files/data off of your internal drive to the external hard drive and deleted off of the internal hard drive.
    If you have any other large folders of personal data or projects, these should be archived or moved, also, to the optical discs, flash drives or external hard drive and then either archived to disc and/or deleted off your internal hard drive.
    Good Luck!

  • HT4623 I have an ipad3, iPhone3gs and iPhone5, my problem is my apple ID works all 3 devices but I need a second ID for the iPhone 5. How do I delete my ID and set up a new one for the iPhone5 but keeping my own apple ID for the iPad and iPhone 3GS

    I have an ipad3, iPhone3gs and iPhone5, my problem is my apple ID works all 3 devices but I need a second ID for the iPhone 5. How do I delete my ID and set up a new one for the iPhone5 but keeping my own apple ID for the iPad and iPhone 3GS.

    http://support.apple.com/kb/he37

  • My ipod touch just shows the charge symbol on the screen and i checked whether there is a problem in the charger but it works perfectly on my iphone 4 and when my ipod is connected to the computer itunes is not recognising my device pls help me

    my ipod touch just shows the charge symbol on the screen and i checked whether there is a problem in the charger but it works perfectly on my iphone 4 and when my ipod is connected to the computer itunes is not recognising my device pls help me

    tmplHi pranoop,
    If you are having an issue with your iPod touch not being recognized by iTunes when connected to your Windows computer, I would suggest that you troubleshoot using the steps in this article - 
    iPhone, iPad, or iPod not recognized in iTunes for Windows - Apple Support
    Thanks for using Apple Support Communities.
    Sincerely,
    Brett L 

  • I m trying to send a email and sms alert using php and it works fine on all systems except on Iphone,the problem is swedish charcters doesn't show on iphones used by people in sweden but works absolutely fine on iphones in india. plz help

    I m trying to send a email and sms alert to people and it works fine on all systems expect on Iphone,the problem is swedish charcters doesn't show on iphones used by people in sweden but works absolutely fine on iphones in india.
    the code i m using is right below,plz have a look and not into the problem as problem is a bit strange.
    $headers = "MIME-Version: 1.0\n" ;
                $headers .= "Content-Type: text/plain; charset=\"UTF-8\"\n";
                $headers .= "X-Priority: 1 (Highest)\n";
                $headers .= "X-MSMail-Priority: High\n";
                $headers .= "Importance: High\n";
                // Additional headers
                $headers .= 'From: Rakesh <[email protected]>' . "\r\n";
                foreach($disemail as $email)
                    $to = $email;
                    $subject = $succMessage['email_subject'];
                    $message = $smsText;
                    mail($to,'=?UTF-8?B?'.base64_encode($subject).'?=',$message,$header);
            if (stripos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) {
            $smsText = utf8_encode($smsText);

    i have tried this new charset combination specifically for iphone and i m waiting for response from sweden alliance.....i hope this works fine as iso works great for 8-bit characters.
    would like to have your thoughts though.
    $headers .= "Content-Type:text/plain; charset=\"iso-8859-1\"\n  format=flowed Content-Transfer-Encoding: quoted-printable";

  • TS2972 First night I was able to watch 2 TV shows (45 min each) with no problems, but thereafter programs will not stream without constant pause to buffer. Weather conditions are ideal and my internet comes from crappy hugesnet, but worked fine the first

    First night I was able to watch 2 TV shows (45 min each) with no problems, but thereafter programs will not stream without constant pause to buffer. Weather conditions are ideal and my internet comes from crappy hugesnet, but worked fine the first night.

    The speed may have been ok at that time and is too inconsistent/too slow overall. interference may have proven to be more of an issue since as well. If using public DNS that will provide Intermittant results
    I'm sure using a hotspot would be fine but it depends on your viewing habits. An HD movie is around 4-5GB. It would also be subject to speed. requirements so best to test to see how it compares.
    You would have to check with your Carrier if hotspot it's enabled then just to into your settings and toggle it ON

  • Button hyperlinks work in project preview but not in published .swf

    Captivate 6, button hyperlinks work in project preview but not in published .swf, the cursor changes the “the hand” but the hyperlink does not redirect.
    Any ideas?
    Like I said my buttons work great in preview mode after publishing, one click and the PDF opens in a new browser window. Open the project through the published .swf files and the links will not work.
    Using Captivate 6 on WIndows 7

    Hello,
    Welcome to Adobe Forums.
    Once your project published, add the .swf file in Flash Global Setting :
    1) Right Click on the content (Published .swf file) and click on Global Settings
    2) Go to Advanced Tab and Click on Trusted Location Settings  (Scrool down to see this button)
    3) Click on "Add" button and then "Add file", browse for the Captivate 6 published file and click on OK
    4) Launch the .htm file again (Location where Captivate publish your project)
    Hope this helps !!
    Thanks,
    Vikram

Maybe you are looking for