• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Javascript not functioning for all users

New Here ,
Jul 06, 2010 Jul 06, 2010

Copy link to clipboard

Copied

I've got a .cp file with an On Slide Enter:Execute Javascript action on the last slide. The javascript is this: Javascript:button23574.actionShow();

I publish the file to swf/html and import it into a Lectora title. The javascript is intended to display a transparent button over the swf file which the user clicks to close/hide the swf file.

When I publish the Lectora title, the javascript seems to work for some users and not others. I have changed the transparent button to an image which I've relocated on the page and (since my computer is one that this does not function on), when the last slide plays, the button does not display. And yet on other computers, it works just fine.

Is there something I can change in Captivate to make this work for all users? Is there a setting/add-on/plug-in that my computer requires???

Any help is appreciated! Thanks!

TOPICS
Advanced

Views

1.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 06, 2010 Jul 06, 2010

Copy link to clipboard

Copied

Gather a little more information.  In particular, is the problem related to browser versions?  Different browsers and versions have different JavaScript engines and do work somewhat differently.

In your situation (a situation I am in fact in as a Lectora/Captivate developer) I would simply create a button in Captivate to do what I want, instead of playing around trying to communicate between Captivate and Lectora.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 06, 2010 Jul 06, 2010

Copy link to clipboard

Copied

You know, at first I thought it was a browser version issue. I'm using IE 6 (the standard in our organization - yikes!) and the first colleague who tested it was using IE 8. But then I asked another colleague who has IE 6 to test it and it worked for her too. I've changed all my security settings to be the same as hers and it still doesn't work for me.

I'd consider making the change you suggest in Captivate, but I have no clue about javascript!   Perhaps you can help?  What javascript would I have to use to hide the swf file?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 06, 2010 Jul 06, 2010

Copy link to clipboard

Copied

And I don't know if it's worth mentioning, but it also doesn't work in Firefox for me either. And my version of Firefox is the most current.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 06, 2010 Jul 06, 2010

Copy link to clipboard

Copied

You don't need JavaScript. You just need a button in Captivate with the click function set to Show button23574

Steve

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 07, 2010 Jul 07, 2010

Copy link to clipboard

Copied

Steve, that sounds straightforward enough, but when I choose Show, the only options in the drop down are the existing objects on the slide. It doesn't allow me to enter Button23574. Am I missing something?

Cheers,

Erin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 07, 2010 Jul 07, 2010

Copy link to clipboard

Copied

Erin, "Button23574" should BE an object on the slide.  You can't show nonexistent objects.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 07, 2010 Jul 07, 2010

Copy link to clipboard

Copied

What I need is a button (transparent) that the user clicks to close the published swf file.

If I add the button in Captivate, I don't see an action that will close the file. I think I could add javascript that will close the window, but the swf will be embedded in an html file created in Lectora and I don't want the window to close - only the swf.

So when I have a button in Lectora and on slide enter or exit, use javascript in Captivate to show the button, it works for some users, but not on my computer...

Is there a way to have a button in captivate close the swf?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 07, 2010 Jul 07, 2010

Copy link to clipboard

Copied

Hi there

ecg2000 wrote:

What I need is a button (transparent) that the user clicks to close the published swf file.

If I add the button in Captivate, I don't see an action that will close the file. I think I could add javascript that will close the window, but the swf will be embedded in an html file created in Lectora and I don't want the window to close - only the swf.

So when I have a button in Lectora and on slide enter or exit, use javascript in Captivate to show the button, it works for some users, but not on my computer...

Is there a way to have a button in captivate close the swf?

The simplest way to accomplish this is by configuring the Start and End options for the project so the project closes after the SWF completes. Then you program the Button to jump to the last slide. The net result is that the last slide is presented, the end action attempts to close the SWF and if it can be closed (depending on how it was opened to begin with it may not close) it closes.

Cheers... Rick

Helpful and Handy Links

Captivate Wish Form/Bug Reporting Form

Adobe Certified Captivate Training

SorcererStone Blog

Captivate eBooks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 09, 2010 Jul 09, 2010

Copy link to clipboard

Copied

A Lectora button can certainly hide a SWF (or any  other animation).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 09, 2010 Jul 09, 2010

Copy link to clipboard

Copied

LATEST

Yes - I think to do what I want it to do, I need to use the button in Lectora to hide the swf. I've tried the other suggestions so far (i.e., a button on the second to last slide and the close project options) but they both close the window and not the swf file alone.

I did, however, finally figure out what the problem was. Even though I had run the swfs hundreds of times with no error messages, I finally got an error message that took me to an Adobe page. Turns out to be a problem with the global security settings in the Flash Player that occurs for content creators. Here's the gist of the page and a link to it:

---------------------------------------------------

Adobe - Flash Player : Settings Manager - Global security settings for content creators

If you create or manage content that runs in Flash Player 8 or later, the information on this page is relevant for you.

You are most likely seeing this page because you are testing your SWF or FLV content locally, and that content is trying to use older security rules to communicate with the Internet. This page provides information about how to test your content locally when it runs in Flash Player 8 or later.

As a Flash developer, you might often work on SWF or FLV content that is eventually deployed on the Internet. During development of these applications, you might need to perform testing while the SWF or FLV content is stored locally on your own computer, rather than deployed on a web server. In this local testing situation, Flash Player might show security warnings that prevent your application from functioning as intended. You can resolve this issue by using the Settings Manager to designate your own SWF or FLV content as trusted.

---------------------------------------------------

Thanks for all the help and suggestions!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources