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

HTML5/JavaScript (WebObject) Communication with Captivate 9

Community Beginner ,
Feb 04, 2016 Feb 04, 2016

Hello

Me and my company i work for, trying now for 2 days how that can work... I hope someone can help me or we can do it together

My goal is to have an imported-zipped HTML5 file, with an animation created in Adobe Flash, that can e.g. jump to a next slide. (To keep it simple for now )

What i did so far:

1. I created a HTML5 Canvas in Adobe Flash CC. There i created the animation i want and published it into a HTML5 folder/project.

2. I zipped it and imported it into Captivate, it works pretty fine.

3. I can click on it with a simple EventListener (which i added in Flash) via this.myMovieClip.addEventListener("click", fl_MouseClickHandler.bind(this)); in Captivate. It works nice!


4. Now i wanted to add the possibilty to Click on it and go to next slide through the JavaScript that is created when i publish the Flash file. Since HTML5 and ActionScript3 hasn't the same syntax i am wondering how its is possible...

In AS3 i was able to it through (to access the Captivate:


var myRoot:MovieClip = MovieClip(root);

var mainmov:MovieClip = MovieClip(myRoot.parent.root);


And thats pretty much the problem... I don't know how to let the JavaScript communicate with Captivate when i import the HTML5 Files...

I tried it through "window. ...",  "this.parent. ..." and some other ideas that didn't work.

I have a basic understand of JavaScript, but can't figure it out by myself...

Thx for help. (Or ideas i can try)!!!

721
Translate
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

correct answers 1 Correct answer

People's Champ , Feb 04, 2016 Feb 04, 2016

window.parent.window.cpAPIInterface.next();

Translate
People's Champ ,
Feb 04, 2016 Feb 04, 2016

window.parent.window.cpAPIInterface.next();

Translate
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
Community Beginner ,
Feb 05, 2016 Feb 05, 2016

Yeah! That worked! So close ... Thanks!

And am i right to say, that i can access via "window.parent.window" everything i want in Captivate?

By the way, do you have any recommendations for learning things like that? (I study the w3school site, i think theres pretty much all basics...)

Greetings.

Translate
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
People's Champ ,
Feb 05, 2016 Feb 05, 2016
LATEST

Most everything is in the window object.

w3s is a great place for examples and learning the DOM and JavaScript basics. Most of my experience came from AS2, AS3, Authorware and Visual Basic. JavaScript and ActionScript  are both based on the ECMA standard.

adripofjavascript.com is a good resource also.

Translate
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