Dilemma Adding SWF Files to Slide
Oct 18, 2016
By
Aaron King
I'm creating SWF in Animate CC that contain interaction such as clickable items that reveal info and Q&A animations. The problem is if I insert them into the slide using the insert video function, I can control the pause button and volume button in the player but the onscreen interactions no longer work. If I insert a SWF using insert flash then I get the opposite effect whereas the on screen interactions work but I have no control over the pause and volume functions.
How do I get both to work?
10 Replies
Hi Aaron. I'm afraid that this is not possible. When you insert swf as video, you can control volume and play/pause but there is no possibility to have interaction inside of that video. On the other hand, if you add something as flash, you can have a possibility to have interaction, but you lose control of volume nad stop and play. I have one extra idea, but its a bit complicated:
- you can use JS;
- you should create variable f.e. "play"
- you should build inside of your swf something like listener and check if play is false, stop your swf, if true, play your swf
- the same situation with sound (attached example).
Hi Kamil,
Thanks for the assistance. I tried out the file you sent me and for some reason it didn't work. When I tried clicking on the buttons, nothing happened.
Please advise
Aaron
It works when you publish content and try it using browser (I recommend check it from server/website, not locally).
Thanks Buddy, it worked...I'm gonna try it out on my project.
Kamil, can you send me the code or the fla file you used to create the SWF?
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.utils.*;
import flash.external.*;
var s:SoundTransform;
var myTimer:Timer;
function timerListener(_arg1:TimerEvent):void
{
var _local2:String = ExternalInterface.call("GetPlayer().GetVar", "muteToggle");
if (_local2 == "false")
{
this.s.volume = 0;
SoundMixer.soundTransform = this.s;
}
else
{
this.s.volume = 1;
SoundMixer.soundTransform = this.s;
}
}
s = new SoundTransform();
myTimer = new Timer(250);
myTimer.addEventListener(TimerEvent.TIMER,timerListener);
myTimer.start();
Dude you're saving lives over here...thanks!!!
So, if I want to learn how to do this myself, where would I begin?
Practice :)
Hey Kamil I add that code to the animate cc actions panel and I couldn't get it to trigger in storyline 2. Was the code Javascript or actionscript? The fla files I am working with (I'm not the creator of the animations) is written in actionscript 3.0
In SL you should only change your variable muteToggle.
This discussion is closed. You can start a new discussion or contact Articulate Support.