Caurina in SWF!
Dec 21, 2011
Hi,
Used Caurina Tweener and AS2.
But the swf file still does not load in Articulate... :(
Anybody please guide!
import caurina.transitions.Tweener;
blue_2.arrow_2._visible = false;
blue_1.arrow_1._visible = false;
message_txt._visible = false;
child_1._alpha = 0;
child_2._alpha = 0;
trace(child_2);
blue_1.one_btn.enabled = false;
blue_2.two_btn.enabled = false;
var introduction = new Sound();
var firstAudioClip = new Sound();
var secondAudioClip = new Sound();
firstAudioClip.attachSound("firstAudio");
secondAudioClip.attachSound("secondAudio");
introduction.attachSound("introAudio");
introduction.start();
introduction.onSoundComplete = function()
{
trace("Done");
blue_1.one_btn.enabled = true;
blue_2.two_btn.enabled = true;
blue_2.arrow_2._visible = true;
blue_1.arrow_1._visible = true;
message_txt._visible = true;
};
var child_1_open:Boolean = false;
blue_1.one_btn.onRelease = function()
{
stopAllSounds();
if (child_2_open)
{
Tweener.addTween(_root.child_2,{_y:-20, _alpha:0, time:0.5, transition:"easeInQuad"});
child_2_open = false;
}
if (!child_1_open)
{
Tweener.addTween(_root.child_1,{_y:100, _alpha:100, time:0.5, transition:"easeOutQuad"});
child_1_open = true;
firstAudioClip.start();
}
else if (child_1_open)
{
Tweener.addTween(_root.child_1,{_y:-20, _alpha:0, time:0.5, transition:"easeInQuad"});
child_1_open = false;
}
};
var child_2_open:Boolean = false;
blue_2.two_btn.onRelease = function()
{
stopAllSounds();
if (child_1_open)
{
Tweener.addTween(_root.child_1,{_y:-20, _alpha:0, time:0.5, transition:"easeInQuad"});
child_1_open = false;
}
if (!child_2_open)
{
Tweener.addTween(_root.child_2,{_y:100, _alpha:100, time:0.5, transition:"easeOutQuad"});
child_2_open = true;
secondAudioClip.start();
}
else if (child_2_open)
{
Tweener.addTween(_root.child_2,{_y:-20, _alpha:0, time:0.5, transition:"easeInQuad"});
child_2_open = false;
}
};
7 Replies
Hi, Chetan:
Off the top of my head, I would rethink your use of _root. Refer to this document for Flash best practices. Specifically:
Don’t use references to _root or _level0
Any references to _root and _level0 can cause issues with the Presenter ’09 player and should not be used.
Agree with Brian root is probably the problem
Hi Brian, Thanks for replying!
I tried removing all the tween. No Caurina at all! and no _root. I have also seen to it that I set the Flash Player version to 9. Even then, once I import this into Articulate, doesnt play at all. Is the use of sound element correct. Is it supported in Articulate.
I have spent almost 4days creating several files like these and none of these are working now... :(
******************************************
blue_2.arrow_2._visible = false;
blue_1.arrow_1._visible = false;
message_txt._visible = false;
child_1._alpha = 0;
child_2._alpha = 0;
trace(child_2);
blue_1.one_btn.enabled = false;
blue_2.two_btn.enabled = false;
var introduction = new Sound();
var firstAudioClip = new Sound();
var secondAudioClip = new Sound();
firstAudioClip.attachSound("firstAudio");
secondAudioClip.attachSound("secondAudio");
introduction.attachSound("introAudio");
introduction.start();
introduction.onSoundComplete = function()
{
trace("Done");
blue_1.one_btn.enabled = true;
blue_2.two_btn.enabled = true;
blue_2.arrow_2._visible = true;
blue_1.arrow_1._visible = true;
message_txt._visible = true;
};
var child_1_open:Boolean = false;
blue_1.one_btn.onRelease = function()
{
stopAllSounds();
if (child_2_open)
{
child_2._alpha=0;
child_2_open = false;
}
if (!child_1_open)
{
child_1._alpha = 100;
child_1_open = true;
firstAudioClip.start();
}
else if (child_1_open)
{
child_1._alpha=0
child_1_open = false;
}
};
var child_2_open:Boolean = false;
blue_2.two_btn.onRelease = function()
{
stopAllSounds();
if (child_1_open)
{
child_1._alpha=0
child_1_open = false;
}
if (!child_2_open)
{
child_2._alpha = 100;
child_2_open = true;
secondAudioClip.start();
}
else if (child_2_open)
{
child_2._alpha=0
child_2_open = false;
}
};
Hi Chetan,
Not sure if this will help you, but I've had great luck using the Greensock library (http://www.greensock.com). I haven't used Caurina.
Hi Chetan,
at a glance, your modifications to remove _root referrals could be broken because flash movies loaded by articulate player swf should have their own ref. clip instances...
so for example your first lines could be:
_this.blue_2.arrow_2._visible = false;
_this.blue_1.arrow_1._visible = false;
_this.message_txt._visible = false;
... I'm not sure, I could be wrong, but I would get into much deeper analysis before using caurina transitions...
Is this Flash file being inserted on the first slide of the presentation? How large are the audio clips? It could be that the Flash file is taking a long time to load. It's hard to say without seeing the actual fla.
You might want to look into adding the SWF just as a web object:
https://player.vimeo.com/video/143914206
This discussion is closed. You can start a new discussion or contact Articulate Support.