Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi.
I would leave each Illustrator page as an individual keyframe in the main timeline.
You can also extend common/repeated elements across multiple frames if needed.
Regards,
JC
Copy link to clipboard
Copied
thanks for the support man
Copy link to clipboard
Copied
You're welcome!
Please let us know if you need further assistance.
Regards,
JC
Copy link to clipboard
Copied
and in the middle of the pages i want to place a "home" button.......in order to go to the beginning....without
pressing preview until it gets to the beginning.......
how am i suposed to proceed ?
Copy link to clipboard
Copied
So the output will be interactive.
Is it for the web, desktop or mobile?
Copy link to clipboard
Copied
this is for win projector presentation for music class
Copy link to clipboard
Copied
each page i will make a button so when press down plays a music chord progression
and will have an youtube link with the original music
Copy link to clipboard
Copied
do you have the Action Script 3 for sliding each page with prevew and next button? i am beggining to understand......
Copy link to clipboard
Copied
what about this
Copy link to clipboard
Copied
Alright. I'll take a look at it later.
Please remind me if I end up not coming back. 😄
Copy link to clipboard
Copied
ok man
what about a home button
can i use gotoAndPlay(frame1) action script for each frame? the same home button in all frames...inserting a frame of the button
Copy link to clipboard
Copied
You can have the home button in a single keyframe that spans across the entire main timeline and add only one listener to it in the beginning.
Copy link to clipboard
Copied
ok got it
but whats action script in the home button? is it kinda Gotoframe1andplay?
Copy link to clipboard
Copied
It can be something like:
import flash.events.MouseEvent;
function gotoHome(e:MouseEvent):void
{
gotoAndStop(1);
}
homeButton.addEventListener(MouseEvent.CLICK, gotoHome);
You add it in the frame that contains your button and homeButton is its instance name (set in the Properties panel).
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi.
Here it is.
AS3 code:
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.geom.Rectangle;
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.media.StageWebView;
var youTubeVideoWidth:Number;
var youTubeVideoHeight:Number;
var youTubeVideoExternalOffset:uint = 128;
var youTubeVideoInternalOffset:uint = 32;
var webView:StageWebView;
var isAnimPlaying:Boolean = false;
var sound:Sound;
var soundChannel:SoundChannel;
var lastSoundChannelPosition:Number = 0;
function main():void
{
stop();
fade.mouseEnabled = false;
closeYouTubeButton.visible = false;
youTubeVideoWidth = stage.stageWidth - youTubeVideoExternalOffset;
youTubeVideoHeight = stage.stageHeight - youTubeVideoExternalOffset;
stage.addEventListener(MouseEvent.CLICK, clickHandler);
}
function clickHandler(e:MouseEvent):void
{
if (e.target.name == "homeButton")
{
resetFrame();
gotoAndStop(1);
}
else if (e.target.name == "prevButton")
{
resetFrame();
prevFrame();
}
else if (e.target.name == "nextButton")
{
resetFrame();
nextFrame();
}
else if (e.target.parent && e.target.parent.name == "playPause")
playAnim(e.target.parent);
else if (e.target.name == "youTubeButton")
{
stopSound();
playYouTubeVideo(e.target.parent);
}
else if (e.target.name == "closeYouTubeButton" || e.target.name == "fade")
stopYouTubeVideo();
}
function resetFrame():void
{
isAnimPlaying = false;
stopSound(true);
stopYouTubeVideo();
}
function playAnim(target:MovieClip):void
{
var anim:MovieClip = target.parent as MovieClip;
if (isAnimPlaying)
{
anim.stop();
stopSound();
}
else
{
anim.play();
playSound(anim.sound);
}
target.play();
isAnimPlaying = !isAnimPlaying;
}
function playSound(type:*):void
{
sound = new type();
soundChannel = sound.play(lastSoundChannelPosition);
}
function stopSound(reset:Boolean = false):void
{
if (soundChannel)
{
lastSoundChannelPosition = reset ? 0 : soundChannel.position;
soundChannel.stop();
}
}
function playYouTubeVideo(target:MovieClip):void
{
var posX:Number = (stage.stageWidth - youTubeVideoWidth) * 0.5;
var posY:Number = (stage.stageHeight - youTubeVideoHeight) * 0.5;
webView = new StageWebView();
webView.viewPort = new Rectangle(posX, posY, youTubeVideoWidth, youTubeVideoHeight);
webView.stage = stage;
trace(parseYoutubeEmbedCode(target.youTubeVideoSource, target.youTubeVideoTitle));
webView.loadString(parseYoutubeEmbedCode(target.youTubeVideoSource, target.youTubeVideoTitle), "text/html");
closeYouTubeButton.visible = true;
fade.visible = true;
fade.mouseEnabled = true;
}
function stopYouTubeVideo():void
{
if (webView)
{
webView.dispose();
webView = null;
}
closeYouTubeButton.visible = false;
fade.visible = false;
fade.mouseEnabled = false;
}
function parseYoutubeEmbedCode(source:String, title:String):String
{
var w:uint = youTubeVideoWidth - youTubeVideoInternalOffset;
var h:uint = youTubeVideoHeight - youTubeVideoInternalOffset;
return '<iframe width="'+ w +'" height="'+ h +'" src="'+ source +'" title="'+ title +'" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>';
}
if (!this.started)
{
main();
this.started = true;
}
File / source / download / FLA:
https://bit.ly/48ObQDC
I hope this helps.
Regards,
JC
Copy link to clipboard
Copied
it is getting claryfied....
thanks for the support
but the youtube link embed i will use with snipet code........"play the web"
i need for now just the action script for the table of contetns
that each one leads to the especific frame
whats the AC for button leading to a keyframe ?
thanks a lot
leo
Copy link to clipboard
Copied
i am not meaning next or previews
but the action for jumping to another frame from the table of contents
Copy link to clipboard
Copied
i need this so much
for my music class
Copy link to clipboard
Copied
hello man
i am just becoming aware of the content you sent me ...... right now
thank you so much....it is in github... now i see
thanks man
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi.
Make sure that you click on the FLA on GitHub and then click on the download button on the other page. If you just right click and save as, you won't get the correct file.
Also remember to set the target player to AIR (preferably a recent version) and not Flash Player.
Copy link to clipboard
Copied
ok man
thanks
Copy link to clipboard
Copied
o got little afraid of this agreement
can i use it without wondering?