Video Gallery
I'm trying to make a video gallery application like the
tutorial on the adobe website.
basically I have a folder on my desktop containing these
files
AC_RunActiveContent.js
FlashVideoGallery.html
video
thumbnails
Settings.xml
fvg
Readme.txt
FlashVideoGallery.swf
FlashVideoGallery.flp
FlashVideoGallery.fla
Settings_streaming.xml
they all test fine in browser preview but I'm wondering how
to place them in Dreamweaver to make a working page
When i do, only the preloader shows up on the webpage.
the page is www.kriswoodonline.com and click on the video
gallery picture
thanks to anyone who can help
Look at Wimpy Streaming audio/video Player. One player can
handle all your
flash videos and MP3 audio clips. Very easy to install, dirt
simple to
update playlists later.
http://www.wimpyplayer.com/affiliates/idevaffiliate.php?id=836
Nancy O.
Alt-Web Design & Publishing
www.alt-web.com
Similar Messages
-
How can I make a "Youtube" style video gallery for offline, '.air' use?
I work for a language company and we've put together a set of videos for use in computers, not online. Currently we're using Apple's Keynote to present our videos to to the student. This has the advantage of allowing us to put videos in a sequential order, with absolutely no work in the development department, and most importantly was easy for any student to control and navigate.
Things have now changed.
Keynote can no longer hold the size of our videos and we are constantly adding and changing videos all the time. Now that CS5 is out, I would like to build a stand alone flash application for our system modeled after the same look and functionality of youtube.
Key features would be:
• Main video player that links to our resident video files
• Something that generates and displays a title for the current video
• A text box below the main video player for notes and instructions
• a side bar of thumbnails for all related videos, with titles displayed
Future features would be an easy way for us to change videos in and out of the library (by "uploading" and "downloading" using a form for the videos, although not to the net, but again, on the resident computer).
It looks like CS5 would make this possible. My plan is to make a youtube-like site using flash catalyst. I think I can do it myself since the first version only needs basic elements and design, but I know I'm going to run into some problems because I'm not sure the limitations of catalyst for this style of interactive video gallery.
What I'm looking for is someone to just quickly guide, tell, or yell me in the right direction, and I'm really keen (hell-bent?) on trying it out using Flash Catalyst... is this the way?
Keeping in mind that my first draft only has to be a simple working version of the system, and I can play with the rest later, is any of what I said possible using flash catalyst?
Thanks in advance to whoever can help me out!I doubt MU can do this. It's pretty limited in scope & I don't think it supports server-side code which you would need to parse feeds. But feel free to post your question in the MU forum. Maybe somebody there has a workaround.
http://forums.adobe.com/community/muse/help_with_using_adobe_muse
Nancy O. -
Need help with xml video gallery
Hello everyone
I recently bought a xml video gallery. I'm loading the movie externally into another movie. When the xml gallery loads, it cancels all sounds.
I need to figure out where in the actionscription can i reverse the cancellation of sounds. Can anyone help? if possible, I can email, whomever is willing to help, the xml gallery to see if theres another reason the sound is being canceled.
Also, the sound of the gallery doesn't work til you click the volume scroller.
Here are two parts of actionscript included in the gallery:
part one:
// Import filter classes
import mx.transitions.Tween;
import mx.transitions.easing.*;
// Set flash variables
var xmlFileUrl:String = "playlist.xml";
var auto_play:String = "true";
// Set xml file URL
if (_root.xmlfile) {
xmlFileUrl = _root.xmlfile;
var V_SRC;
var thuArray:Array = new Array();
var currentVideo:Number = 0;
var totalItems;
var numOfItems:Number;
var itemDistance:Number = 120+5;
var itemHeight:Number = 80+2;
var Value:Number = 1;
var boundry:Number = 1;
var ratio:Number = 1;
var diff:Number = 1;
var collectionWidth:Number = 1;
var buffer:Number = 135*2;
this.createEmptyMovieClip("video_txt",this.getNextHighestDepth());
video_txt.createTextField("theText",video_txt.getNextHighestDepth(),0,0,584,36);
video_txt.theText.selectable = false;
video_txt.theText.autoSize = "left";
//The Format
myFormat = new TextFormat();
myFormat.font = _root.font_format;
myFormat.size = _root.font_size;
myFormat.color = _root.font_color;
myFormat.align = "center";
video_txt.theText.setNewTextFormat(myFormat);
// Create a new movieclip to load the thumbs
var thumbLoader:MovieClipLoader = new MovieClipLoader();
var thumbListener:Object = new Object();
thumbLoader.addListener(thumbListener);
thumbListener.onLoadInit = function(target_mc:MovieClip, httpStatus:Number)
new Tween(target_mc, "_alpha", Regular.easeOut, 0, 100, 1, true);
target_mc._parent.preloader_mc._alpha = 0;
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = xmlLoaded;
xml.load(xmlFileUrl);
// Load the xml file into the player
function xmlLoaded(b:Boolean) {
if (b) {
auto_play = this.firstChild.firstChild.attributes.auto_play;
scrollSpeed = parseInt(this.firstChild.firstChild.attributes.scrollSpeed);
totalItems = this.firstChild.firstChild.childNodes;
numOfItems = totalItems.length;
for (j=0; j<numOfItems; j++) {
var i = player_mc.main_mc.collection_mc.attachMovie("mc_Thumb", "thumb_"+j, j);
i._x = itemDistance*j;
thumbLoader.loadClip(totalItems[j].attributes.thumb,i.loader_mc);
i.id = j;
i.videoTitle = totalItems[j].attributes.title;
i.videoUrl = totalItems[j].attributes.src;
// Create an event for thumb rollover
i.onRollOver = iRoll;
i.onRollOut = i.onReleaseOutside=iOut;
i.onRelease = iRelease;
thuArray[j] = i;
// default first video
collectionWidth = player_mc.main_mc.collection_mc._width;
currentVideo = 0;
V_SRC = thuArray[0].videoUrl;
changeVideo();
//scope._alpha = 100;
new Tween(scope, "_alpha", Regular.easeOut, 0, 100, 0.5, true);
else
trace("Error! xml file not loaded");
// onRollOver Events
function iRoll() {
player_mc.mc_title.title_txt.htmlText = totalItems[this.id].attributes.title;
this.light_mc.play();
function iRelease() {
currentVideo = this.id;
changeVideo();
function changeVideo() {
V_SRC = thuArray[currentVideo].videoUrl;
player_mc.loadVideo();
currentThumb();
player_mc.mc_title.title_txt.htmlText = thuArray[currentVideo].videoTitle;
video_txt.theText.text = totalItems[currentVideo].attributes.title;
player_mc.so.getVolume();
player_mc.playStatus = 1;
player_mc.checkStatus();
function nextVideo() {
if (currentVideo<(numOfItems-1)) {
currentVideo++;
} else {
currentVideo = 0;
changeVideo();
function currentThumb() {
for (i=0; i<thuArray.length; i++) {
if (i == currentVideo) {
thuArray[i].enabled = true;
// Mouse movement on rollover
this.onMouseMove = function() {
collectionWidth = player_mc.main_mc.collection_mc._width;
boundry = player_mc.main_mc.area_mc._width;
if ((player_mc.main_mc._ymouse>0) && (player_mc.main_mc._ymouse<itemHeight)) {
if ((player_mc.main_mc._xmouse>0) && (player_mc.main_mc._xmouse<boundry)) {
ratio = player_mc.main_mc._xmouse/boundry;
diff = (collectionWidth-boundry)+buffer;
Value = Math.floor((-ratio)*diff)+(buffer/2);
updateAfterEvent();
this.onEnterFrame = function() {
// Define movement area and speed
if (player_mc.main_mc.collection_mc._width>player_mc.main_mc.area_mc._width) {
player_mc.main_mc.collection_mc._x = Math.round((player_mc.main_mc.collection_mc._x)+((Value-player_mc.main_mc.collection_mc._ x)/scrollSpeed));
if (player_mc.main_mc.collection_mc._x>0) {
player_mc.main_mc.collection_mc._x = 0;
} else if (player_mc.main_mc.collection_mc._x<(player_mc.main_mc.area_mc._width-(player_mc.main_mc. collection_mc._width))) {
player_mc.main_mc.collection_mc._x = Math.round(player_mc.main_mc.area_mc._width-(player_mc.main_mc.collection_mc._width));
} else {
player_mc.main_mc.collection_mc._x = 0;
updateAfterEvent();
part two:
// Define flash variables
var video_url:String = "";
var tempx:Number = this._parent._x;
var tempy:Number = this._parent._y;
var timeCounter:Number = 0;
var timeInSeconds:Number = _root.time_counter;
// Object to listen to onStage Event
videoObj = vid.videoObj;
// Setting up the connection
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
// Buffer time
ns.setBufferTime (10);
videoObj.attachVideo (ns);
function loadVideo () {
video_url = _parent.V_SRC;
trace(video_url);
ns.play (video_url);
function checkStatus()
if (playStatus == 1)
controls_mc.playPause.gotoAndStop("pause");
mc_playAgain._visible = false;
thumbs_out = false;
title_out = false;
else
controls_mc.playPause.gotoAndStop("play");
mc_playAgain._visible = true;
} // end else if
if (so.getVolume() == 0)
controls_mc.mute_mc.gotoAndStop("mute");
else
controls_mc.mute_mc.gotoAndStop("on");
}; // End of the function
mc_playAgain._visible = false;
// Check Status of video
ns.onStatus = function (info)
if (info.code == "NetStream.Buffer.Empty")
mc_buffer._visible = true;
else if (info.code == "NetStream.Buffer.Full")
mc_buffer._visible = false;
else if (info.code == "NetStream.Play.Stop")
ns.seek(0);
if (playStatus == 1)
ns.pause();
playStatus = 0;
else
trace;
} // end else if
mc_playAgain._visible = true;
mc_buffer._visible = false;
thumbs_out = true;
title_out = true;
checkStatus();
} // end else if
// Get info about video
ns.onMetaData = function(infoObject:Object)
FLVduration = infoObject["duration"];
relationshipW = infoObject.height / infoObject.width;
relationshipH = infoObject.width / infoObject.height;
if (Stage["displayState"] == "fullScreen")
largeSize ();
else
regularSize ();
if (_parent.auto_play == "false")
ns.seek(0);
if (playStatus == 1)
ns.pause();
playStatus = 0;
mc_buffer._visible = false;
controls_mc.playPause.gotoAndStop("play");
mc_playAgain._visible = true;
thumbs_out = true;
title_out = true;
_parent.auto_play = "true";
}// end else if
var videoInterval = setInterval(videoStatus, 100);
var amountLoaded;
var duration;
// videoStatus on load Event
function videoStatus()
amountLoaded = ns.bytesLoaded / ns.bytesTotal;
controls_mc.mc_progress.mc_buff._width = amountLoaded * 250;
controls_mc.mc_progress.mc_played._x = ns.time / duration * 250;
controls_mc.mc_progress.mc_played._xscale = Math.round(ns.time*100/FLVduration);
}; // End of the function
function scrubIt()
ns.seek(Math.floor(controls_mc.mc_progress.mc_played._x / 250 * duration));
}; // End of the function
// video time
var time_interval:Number = setInterval(checkTime, 500, ns);
function checkTime(ns:NetStream) {
//current time
var ns_seconds:Number = ns.time;
var minutes:Number = Math.floor(ns_seconds/60);
var seconds = Math.floor(ns_seconds%60);
sec = seconds;
min = minutes;
if (sec<10) {
sec = "0"+sec;
if (min<10) {
min = "0"+min;
controls_mc.time_txt.time_1.text = min+":"+sec;
//total time
var minutes2:Number = Math.floor(FLVduration/60);
var seconds2 = Math.floor(FLVduration%60);
sec2 = seconds2;
min2 = minutes2;
if (sec2<10) {
sec2 = "0"+sec2;
if (min2<10) {
min2 = "0"+min2;
controls_mc.time_txt.time_2.text = min2+":"+sec2;
if (controls_mc.time_txt.time_2.text == "NaN:NaN") {
controls_mc.time_txt.time_2.text = "00:00";
setStage ();
// Object to listen onStage Event
var stageL:Object = new Object ();
// function respnsible for content alignment
function setStage ()
if (Stage["displayState"] == "fullScreen") {
tempx = this._parent._x;
tempy = this._parent._y;
this._parent._x = 0;
this._parent._y = 0;
vidBg_mc._x = 0;
vidBg_mc._y = 0;
mc_title._x = 0;
mc_title._y = -30;
slide_me._x = 0;
slide_me._y = 0;
vidBg_mc._width = Stage.width;
vidBg_mc._height = Stage.height;
mc_title._width = Stage.width;
mc_title._height = Stage.height / 20;
slide_me._width = Stage.width;
slide_me._height = Stage.height / 20;
vid._x = vid._y = 0;
largeSize ();
controls_mc._x = Math.round ((Stage.width / 2) - (controls_mc._width / 2));
controls_mc._y = Math.round (Stage.height - 36);
mc_playAgain._x = Math.round ((Stage.width / 2) - (mc_playAgain._width / 2));
mc_playAgain._y = Math.round (Stage.height - 572);
thumbs_mc._x = Math.round ((Stage.width / 2) - (thumbs_mc._width / 2));
thumbs_mc._y = Math.round (Stage.height - 115);
main_mc._x = Math.round ((Stage.width / 2) - (controls_mc._width / 2));;
hide_mc.onEnterFrame = function () {
timeCounter = timeCounter + 1;
if (timeCounter >= timeInSeconds * 30) {
timeCounter = 0;
controls_mc._alpha = 0;
this.onMouseMove = function () {
timeCounter = 0;
controls_mc._alpha = 100;
else
delete hide_mc.onEnterFrame;
delete this.onMouseMove;
controls_mc._alpha = 100;
this._parent._x = tempx;
this._parent._y = tempy;
vidBg_mc._width = 600;
vidBg_mc._height = 360;
mc_title._width = 600;
mc_title._height = 30;
slide_me._width = 600;
slide_me._height = 30;
vidBg_mc._x = vid._x = 0;
vidBg_mc._y = vid._y = 35;
mc_title._x = vid._x = 0;
mc_title._y = vid._x = -30;
slide_me._x = vid._x = 0;
slide_me._y = vid._y = 35;
regularSize ();
controls_mc._x = 0;
controls_mc._y = 395;
mc_playAgain._x = 243;
mc_playAgain._y = 158;
thumbs_mc._x = 0;
thumbs_mc._y = 316;
main_mc._x = 0;
main_mc._y = 406;
mc_buffer._x = Math.round (vidBg_mc._x + (vidBg_mc._width / 2));
mc_buffer._y = Math.round (vidBg_mc._y + (vidBg_mc._height / 2));
// to apply when stage (browser window) is resized or modified
stageL.onResize = function () {
setStage ();
// attaching object to the stage
Stage.addListener (stageL);
MovieClip.prototype.slide = function(yPos) {
this._y -= (this._y-yPos)/5;
// tilte actions
mc_title.onEnterFrame = function()
if (Stage["displayState"] == "normal" && title_out == false)
this.slide(5);
else if (Stage["displayState"] == "normal" && title_out == true)
this.slide(35);
if (Stage["displayState"] == "fullScreen" && title_out == false)
this._y -= (this._y+106)/5;
else if (Stage["displayState"] == "fullScreen" && title_out == true)
this.slide(0);
// thumbs actions
main_mc.onEnterFrame = function()
if (Stage["displayState"] == "normal" && thumbs_out == false)
this.slide(406);
else if (Stage["displayState"] == "normal" && thumbs_out == true)
this.slide(299);
if (Stage["displayState"] == "fullScreen" && thumbs_out == false)
this._y = Math.round (Stage.height - 0);
else if (Stage["displayState"] == "fullScreen" && thumbs_out == true)
this._y = Math.round (Stage.height - 133);
// Playlist button
controls_mc.playlist_mc.onRollOver = function ()
this.gotoAndStop("playlistOver");
controls_mc.playlist_mc.onRollOut = controls_mc.playlist_mc.onReleaseOutside = function ()
this.gotoAndStop("playlist");
// Toggle playlist button
controls_mc.playlist_mc.onRelease = function ()
if (thumbs_out == false)
thumbs_out = true;
title_out = true;
else if (thumbs_out == true)
thumbs_out = false;
title_out = false;
} // end if else
// Define hit area for playPause button
vid.onPress = controls_mc.playPause.onRelease = function ()
ns.pause();
if (playStatus == 1)
controls_mc.playPause.gotoAndStop("play")
playStatus = 0;
checkStatus();
else if (playStatus == 0)
controls_mc.playPause.gotoAndStop("pause");
playStatus = 1;
checkStatus();
// playPause button
controls_mc.playPause.onRollOver = function ()
if (playStatus == 1)
this.gotoAndStop("pauseOver");
else
this.gotoAndStop("playOver");
} // end else if
controls_mc.playPause.onRollOut = controls_mc.playPause.onReleaseOutside = function ()
if (playStatus == 1)
this.gotoAndStop("pause");
else
this.gotoAndStop("play");
} // end else if
// Toggle playPause button
controls_mc.playPause.onRelease = function ()
ns.pause();
if (playStatus == 1)
this.gotoAndStop("play");
playStatus = 0;
checkStatus();
else if (playStatus == 0)
this.gotoAndStop("pause");
playStatus = 1;
checkStatus();
controls_mc.skip_mc.onRollOver = function ()
this.gotoAndStop("skipOver");
controls_mc.skip_mc.onRollOut = controls_mc.skip_mc.onReleaseOutside = function ()
this.gotoAndStop("skip");
controls_mc.skip_mc.onRelease = function ()
_parent.nextVideo()
// Play Again button
mc_playAgain.onRollOver = function ()
this.gotoAndStop("playAgainOver");
mc_playAgain.onRollOut = mc_playAgain.onReleaseOutside = function ()
this.gotoAndStop("playAgain");
// Toggle Play Again button
mc_playAgain.onRelease = function ()
this._visible = false;
ns.pause();
playStatus = 1;
checkStatus();
// make the seek bar clickable
controls_mc.mc_progress.mc_buff.onPress = function()
xpos = controls_mc.mc_progress._xmouse;
percent = Math.round(xpos/controls_mc.mc_progress._width*100);
seekTime = percent/100*FLVduration;
seekTime = Math.round(seekTime*100)/100;
ns.seek(seekTime);
// Set volume level
var s:Sound = new Sound();
s.setVolume(_root.volume_value);
controls_mc.mc_soundLevel.mc_volume._xscale = _root.volume_value;
// Volume control
controls_mc.mc_soundLevel.onPress = function()
volumeTo = (this._xmouse / this._width)*100;
this.mc_volume._xscale = volumeTo;
s.setVolume(volumeTo);
// Volume
_parent.createEmptyMovieClip("vSound", _parent.getNextHighestDepth());
vSound.attachAudio(ns);
var so = new Sound(vSound);
so.setVolume(_root.volume_value);
// Mute button
controls_mc.mute_mc.onRollOver = function ()
if (so.getVolume() >= 1)
this.gotoAndStop("onOver");
else
this.gotoAndStop("muteOver");
} // end else if
controls_mc.mute_mc.onRollOut = controls_mc.mute_mc.onReleaseOutside = function ()
if (so.getVolume() >= 1)
this.gotoAndStop("on");
else
this.gotoAndStop("mute");
} // end else if
// Toggle mute button
controls_mc.mute_mc.onRelease = function ()
if (so.getVolume() >= 1)
controls_mc.mc_soundLevel.mc_volume._xscale = 0;
so.setVolume(0);
this.gotoAndStop("muteOver");
else
controls_mc.mc_soundLevel.mc_volume._xscale = 70;
so.setVolume(_root.volume_value);
this.gotoAndStop("onOver");
} // end else if
// Resize video proportionaly
function regularSize ()
videoObj._width = 600;
videoObj._height = videoObj._width * relationshipW;
if (videoObj._height > 360)
videoObj._height = 360;
videoObj._width = videoObj._height * relationshipH;
videoObj.smoothing = true;
//var scale:Number;
videoObj._x = (600 - videoObj._width) / 2;
videoObj._y = (360 - videoObj._height) / 2;
function largeSize ()
videoObj._width = Stage.width;
videoObj._height = videoObj._width * relationshipW;
if (videoObj._height > Stage.height)
videoObj._height = Stage.height;
videoObj._width = videoObj._height * relationshipH;
videoObj.smoothing = true;
//var scale:Number;
videoObj._x = (Stage.width - videoObj._width) / 2;
videoObj._y = (Stage.height - videoObj._height) / 2;
// Fullscreen button
controls_mc.fullscreen_mc.onRollOver = function ()
if (Stage["displayState"] == "normal")
this.gotoAndStop("fullOver");
else
this.gotoAndStop("fullCloseOver");
} // end else if
controls_mc.fullscreen_mc.onRollOut = controls_mc.fullscreen_mc.onReleaseOutside = function ()
if (Stage["displayState"] == "normal")
this.gotoAndStop("full");
else
this.gotoAndStop("fullClose");
} // end else if
// Toggle fullscreen button
controls_mc.fullscreen_mc.onRelease = function ()
if (Stage["displayState"] == "normal")
Stage["displayState"] = "fullscreen";
_parent.video_txt.theText._visible = false;
else
Stage["displayState"] = "normal";
_parent.video_txt.theText._visible = true;if you mean sound works well when the gallery is tested without being loaded into another swf but fails when loaded, change the highlighted line:
// Import filter classes
import mx.transitions.Tween;
import mx.transitions.easing.*;
// Set flash variables
var xmlFileUrl:String = "playlist.xml";
var auto_play:String = "true";
// Set xml file URL
if (_root.xmlfile) {
xmlFileUrl = _root.xmlfile;
var V_SRC;
var thuArray:Array = new Array();
var currentVideo:Number = 0;
var totalItems;
var numOfItems:Number;
var itemDistance:Number = 120+5;
var itemHeight:Number = 80+2;
var Value:Number = 1;
var boundry:Number = 1;
var ratio:Number = 1;
var diff:Number = 1;
var collectionWidth:Number = 1;
var buffer:Number = 135*2;
this.createEmptyMovieClip("video_txt",this.getNextHighestDepth());
video_txt.createTextField("theText",video_txt.getNextHighestDepth(),0,0,584,36);
video_txt.theText.selectable = false;
video_txt.theText.autoSize = "left";
//The Format
myFormat = new TextFormat();
myFormat.font = _root.font_format;
myFormat.size = _root.font_size;
myFormat.color = _root.font_color;
myFormat.align = "center";
video_txt.theText.setNewTextFormat(myFormat);
// Create a new movieclip to load the thumbs
var thumbLoader:MovieClipLoader = new MovieClipLoader();
var thumbListener:Object = new Object();
thumbLoader.addListener(thumbListener);
thumbListener.onLoadInit = function(target_mc:MovieClip, httpStatus:Number)
new Tween(target_mc, "_alpha", Regular.easeOut, 0, 100, 1, true);
target_mc._parent.preloader_mc._alpha = 0;
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = xmlLoaded;
xml.load(xmlFileUrl);
// Load the xml file into the player
function xmlLoaded(b:Boolean) {
if (b) {
auto_play = this.firstChild.firstChild.attributes.auto_play;
scrollSpeed = parseInt(this.firstChild.firstChild.attributes.scrollSpeed);
totalItems = this.firstChild.firstChild.childNodes;
numOfItems = totalItems.length;
for (j=0; j<numOfItems; j++) {
var i = player_mc.main_mc.collection_mc.attachMovie("mc_Thumb", "thumb_"+j, j);
i._x = itemDistance*j;
thumbLoader.loadClip(totalItems[j].attributes.thumb,i.loader_mc);
i.id = j;
i.videoTitle = totalItems[j].attributes.title;
i.videoUrl = totalItems[j].attributes.src;
// Create an event for thumb rollover
i.onRollOver = iRoll;
i.onRollOut = i.onReleaseOutside=iOut;
i.onRelease = iRelease;
thuArray[j] = i;
// default first video
collectionWidth = player_mc.main_mc.collection_mc._width;
currentVideo = 0;
V_SRC = thuArray[0].videoUrl;
changeVideo();
//scope._alpha = 100;
new Tween(scope, "_alpha", Regular.easeOut, 0, 100, 0.5, true);
else
trace("Error! xml file not loaded");
// onRollOver Events
function iRoll() {
player_mc.mc_title.title_txt.htmlText = totalItems[this.id].attributes.title;
this.light_mc.play();
function iRelease() {
currentVideo = this.id;
changeVideo();
function changeVideo() {
V_SRC = thuArray[currentVideo].videoUrl;
player_mc.loadVideo();
currentThumb();
player_mc.mc_title.title_txt.htmlText = thuArray[currentVideo].videoTitle;
video_txt.theText.text = totalItems[currentVideo].attributes.title;
player_mc.so.getVolume();
player_mc.playStatus = 1;
player_mc.checkStatus();
function nextVideo() {
if (currentVideo<(numOfItems-1)) {
currentVideo++;
} else {
currentVideo = 0;
changeVideo();
function currentThumb() {
for (i=0; i<thuArray.length; i++) {
if (i == currentVideo) {
thuArray[i].enabled = true;
// Mouse movement on rollover
this.onMouseMove = function() {
collectionWidth = player_mc.main_mc.collection_mc._width;
boundry = player_mc.main_mc.area_mc._width;
if ((player_mc.main_mc._ymouse>0) && (player_mc.main_mc._ymouse<itemHeight)) {
if ((player_mc.main_mc._xmouse>0) && (player_mc.main_mc._xmouse<boundry)) {
ratio = player_mc.main_mc._xmouse/boundry;
diff = (collectionWidth-boundry)+buffer;
Value = Math.floor((-ratio)*diff)+(buffer/2);
updateAfterEvent();
this.onEnterFrame = function() {
// Define movement area and speed
if (player_mc.main_mc.collection_mc._width>player_mc.main_mc.area_mc._width) {
player_mc.main_mc.collection_mc._x = Math.round((player_mc.main_mc.collection_mc._x)+((Value-player_mc.main_mc.colle ction_mc._x)/scrollSpeed));
if (player_mc.main_mc.collection_mc._x>0) {
player_mc.main_mc.collection_mc._x = 0;
} else if (player_mc.main_mc.collection_mc._x<(player_mc.main_mc.area_mc._width-(player_m c.main_mc.collection_mc._width))) {
player_mc.main_mc.collection_mc._x = Math.round(player_mc.main_mc.area_mc._width-(player_mc.main_mc.collection_mc._w idth));
} else {
player_mc.main_mc.collection_mc._x = 0;
updateAfterEvent();
part two:
// Define flash variables
var video_url:String = "";
var tempx:Number = this._parent._x;
var tempy:Number = this._parent._y;
var timeCounter:Number = 0;
var timeInSeconds:Number = _root.time_counter;
// Object to listen to onStage Event
videoObj = vid.videoObj;
// Setting up the connection
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
// Buffer time
ns.setBufferTime (10);
videoObj.attachVideo (ns);
function loadVideo () {
video_url = _parent.V_SRC;
trace(video_url);
ns.play (video_url);
function checkStatus()
if (playStatus == 1)
controls_mc.playPause.gotoAndStop("pause");
mc_playAgain._visible = false;
thumbs_out = false;
title_out = false;
else
controls_mc.playPause.gotoAndStop("play");
mc_playAgain._visible = true;
} // end else if
if (so.getVolume() == 0)
controls_mc.mute_mc.gotoAndStop("mute");
else
controls_mc.mute_mc.gotoAndStop("on");
}; // End of the function
mc_playAgain._visible = false;
// Check Status of video
ns.onStatus = function (info)
if (info.code == "NetStream.Buffer.Empty")
mc_buffer._visible = true;
else if (info.code == "NetStream.Buffer.Full")
mc_buffer._visible = false;
else if (info.code == "NetStream.Play.Stop")
ns.seek(0);
if (playStatus == 1)
ns.pause();
playStatus = 0;
else
trace;
} // end else if
mc_playAgain._visible = true;
mc_buffer._visible = false;
thumbs_out = true;
title_out = true;
checkStatus();
} // end else if
// Get info about video
ns.onMetaData = function(infoObject:Object)
FLVduration = infoObject["duration"];
relationshipW = infoObject.height / infoObject.width;
relationshipH = infoObject.width / infoObject.height;
if (Stage["displayState"] == "fullScreen")
largeSize ();
else
regularSize ();
if (_parent.auto_play == "false")
ns.seek(0);
if (playStatus == 1)
ns.pause();
playStatus = 0;
mc_buffer._visible = false;
controls_mc.playPause.gotoAndStop("play");
mc_playAgain._visible = true;
thumbs_out = true;
title_out = true;
_parent.auto_play = "true";
}// end else if
var videoInterval = setInterval(videoStatus, 100);
var amountLoaded;
var duration;
// videoStatus on load Event
function videoStatus()
amountLoaded = ns.bytesLoaded / ns.bytesTotal;
controls_mc.mc_progress.mc_buff._width = amountLoaded * 250;
controls_mc.mc_progress.mc_played._x = ns.time / duration * 250;
controls_mc.mc_progress.mc_played._xscale = Math.round(ns.time*100/FLVduration);
}; // End of the function
function scrubIt()
ns.seek(Math.floor(controls_mc.mc_progress.mc_played._x / 250 * duration));
}; // End of the function
// video time
var time_interval:Number = setInterval(checkTime, 500, ns);
function checkTime(ns:NetStream) {
//current time
var ns_seconds:Number = ns.time;
var minutes:Number = Math.floor(ns_seconds/60);
var seconds = Math.floor(ns_seconds%60);
sec = seconds;
min = minutes;
if (sec<10) {
sec = "0"+sec;
if (min<10) {
min = "0"+min;
controls_mc.time_txt.time_1.text = min+":"+sec;
//total time
var minutes2:Number = Math.floor(FLVduration/60);
var seconds2 = Math.floor(FLVduration%60);
sec2 = seconds2;
min2 = minutes2;
if (sec2<10) {
sec2 = "0"+sec2;
if (min2<10) {
min2 = "0"+min2;
controls_mc.time_txt.time_2.text = min2+":"+sec2;
if (controls_mc.time_txt.time_2.text == "NaN:NaN") {
controls_mc.time_txt.time_2.text = "00:00";
setStage ();
// Object to listen onStage Event
var stageL:Object = new Object ();
// function respnsible for content alignment
function setStage ()
if (Stage["displayState"] == "fullScreen") {
tempx = this._parent._x;
tempy = this._parent._y;
this._parent._x = 0;
this._parent._y = 0;
vidBg_mc._x = 0;
vidBg_mc._y = 0;
mc_title._x = 0;
mc_title._y = -30;
slide_me._x = 0;
slide_me._y = 0;
vidBg_mc._width = Stage.width;
vidBg_mc._height = Stage.height;
mc_title._width = Stage.width;
mc_title._height = Stage.height / 20;
slide_me._width = Stage.width;
slide_me._height = Stage.height / 20;
vid._x = vid._y = 0;
largeSize ();
controls_mc._x = Math.round ((Stage.width / 2) - (controls_mc._width / 2));
controls_mc._y = Math.round (Stage.height - 36);
mc_playAgain._x = Math.round ((Stage.width / 2) - (mc_playAgain._width / 2));
mc_playAgain._y = Math.round (Stage.height - 572);
thumbs_mc._x = Math.round ((Stage.width / 2) - (thumbs_mc._width / 2));
thumbs_mc._y = Math.round (Stage.height - 115);
main_mc._x = Math.round ((Stage.width / 2) - (controls_mc._width / 2));;
hide_mc.onEnterFrame = function () {
timeCounter = timeCounter + 1;
if (timeCounter >= timeInSeconds * 30) {
timeCounter = 0;
controls_mc._alpha = 0;
this.onMouseMove = function () {
timeCounter = 0;
controls_mc._alpha = 100;
else
delete hide_mc.onEnterFrame;
delete this.onMouseMove;
controls_mc._alpha = 100;
this._parent._x = tempx;
this._parent._y = tempy;
vidBg_mc._width = 600;
vidBg_mc._height = 360;
mc_title._width = 600;
mc_title._height = 30;
slide_me._width = 600;
slide_me._height = 30;
vidBg_mc._x = vid._x = 0;
vidBg_mc._y = vid._y = 35;
mc_title._x = vid._x = 0;
mc_title._y = vid._x = -30;
slide_me._x = vid._x = 0;
slide_me._y = vid._y = 35;
regularSize ();
controls_mc._x = 0;
controls_mc._y = 395;
mc_playAgain._x = 243;
mc_playAgain._y = 158;
thumbs_mc._x = 0;
thumbs_mc._y = 316;
main_mc._x = 0;
main_mc._y = 406;
mc_buffer._x = Math.round (vidBg_mc._x + (vidBg_mc._width / 2));
mc_buffer._y = Math.round (vidBg_mc._y + (vidBg_mc._height / 2));
// to apply when stage (browser window) is resized or modified
stageL.onResize = function () {
setStage ();
// attaching object to the stage
Stage.addListener (stageL);
MovieClip.prototype.slide = function(yPos) {
this._y -= (this._y-yPos)/5;
// tilte actions
mc_title.onEnterFrame = function()
if (Stage["displayState"] == "normal" && title_out == false)
this.slide(5);
else if (Stage["displayState"] == "normal" && title_out == true)
this.slide(35);
if (Stage["displayState"] == "fullScreen" && title_out == false)
this._y -= (this._y+106)/5;
else if (Stage["displayState"] == "fullScreen" && title_out == true)
this.slide(0);
// thumbs actions
main_mc.onEnterFrame = function()
if (Stage["displayState"] == "normal" && thumbs_out == false)
this.slide(406);
else if (Stage["displayState"] == "normal" && thumbs_out == true)
this.slide(299);
if (Stage["displayState"] == "fullScreen" && thumbs_out == false)
this._y = Math.round (Stage.height - 0);
else if (Stage["displayState"] == "fullScreen" && thumbs_out == true)
this._y = Math.round (Stage.height - 133);
// Playlist button
controls_mc.playlist_mc.onRollOver = function ()
this.gotoAndStop("playlistOver");
controls_mc.playlist_mc.onRollOut = controls_mc.playlist_mc.onReleaseOutside = function ()
this.gotoAndStop("playlist");
// Toggle playlist button
controls_mc.playlist_mc.onRelease = function ()
if (thumbs_out == false)
thumbs_out = true;
title_out = true;
else if (thumbs_out == true)
thumbs_out = false;
title_out = false;
} // end if else
// Define hit area for playPause button
vid.onPress = controls_mc.playPause.onRelease = function ()
ns.pause();
if (playStatus == 1)
controls_mc.playPause.gotoAndStop("play")
playStatus = 0;
checkStatus();
else if (playStatus == 0)
controls_mc.playPause.gotoAndStop("pause");
playStatus = 1;
checkStatus();
// playPause button
controls_mc.playPause.onRollOver = function ()
if (playStatus == 1)
this.gotoAndStop("pauseOver");
else
this.gotoAndStop("playOver");
} // end else if
controls_mc.playPause.onRollOut = controls_mc.playPause.onReleaseOutside = function ()
if (playStatus == 1)
this.gotoAndStop("pause");
else
this.gotoAndStop("play");
} // end else if
// Toggle playPause button
controls_mc.playPause.onRelease = function ()
ns.pause();
if (playStatus == 1)
this.gotoAndStop("play");
playStatus = 0;
checkStatus();
else if (playStatus == 0)
this.gotoAndStop("pause");
playStatus = 1;
checkStatus();
controls_mc.skip_mc.onRollOver = function ()
this.gotoAndStop("skipOver");
controls_mc.skip_mc.onRollOut = controls_mc.skip_mc.onReleaseOutside = function ()
this.gotoAndStop("skip");
controls_mc.skip_mc.onRelease = function ()
_parent.nextVideo()
// Play Again button
mc_playAgain.onRollOver = function ()
this.gotoAndStop("playAgainOver");
mc_playAgain.onRollOut = mc_playAgain.onReleaseOutside = function ()
this.gotoAndStop("playAgain");
// Toggle Play Again button
mc_playAgain.onRelease = function ()
this._visible = false;
ns.pause();
playStatus = 1;
checkStatus();
// make the seek bar clickable
controls_mc.mc_progress.mc_buff.onPress = function()
xpos = controls_mc.mc_progress._xmouse;
percent = Math.round(xpos/controls_mc.mc_progress._width*100);
seekTime = percent/100*FLVduration;
seekTime = Math.round(seekTime*100)/100;
ns.seek(seekTime);
// Set volume level
var s:Sound = new Sound(this);
s.setVolume(_root.volume_value);
controls_mc.mc_soundLevel.mc_volume._xscale = _root.volume_value;
// Volume control
controls_mc.mc_soundLevel.onPress = function()
volumeTo = (this._xmouse / this._width)*100;
this.mc_volume._xscale = volumeTo;
s.setVolume(volumeTo);
// Volume
_parent.createEmptyMovieClip("vSound", _parent.getNextHighestDepth());
vSound.attachAudio(ns);
var so = new Sound(vSound);
so.setVolume(_root.volume_value);
// Mute button
controls_mc.mute_mc.onRollOver = function ()
if (so.getVolume() >= 1)
this.gotoAndStop("onOver");
else
this.gotoAndStop("muteOver");
} // end else if
controls_mc.mute_mc.onRollOut = controls_mc.mute_mc.onReleaseOutside = function ()
if (so.getVolume() >= 1)
this.gotoAndStop("on");
else
this.gotoAndStop("mute");
} // end else if
// Toggle mute button
controls_mc.mute_mc.onRelease = function ()
if (so.getVolume() >= 1)
controls_mc.mc_soundLevel.mc_volume._xscale = 0;
so.setVolume(0);
this.gotoAndStop("muteOver");
else
controls_mc.mc_soundLevel.mc_volume._xscale = 70;
so.setVolume(_root.volume_value);
this.gotoAndStop("onOver");
} // end else if
// Resize video proportionaly
function regularSize ()
videoObj._width = 600;
videoObj._height = videoObj._width * relationshipW;
if (videoObj._height > 360)
videoObj._height = 360;
videoObj._width = videoObj._height * relationshipH;
videoObj.smoothing = true;
//var scale:Number;
videoObj._x = (600 - videoObj._width) / 2;
videoObj._y = (360 - videoObj._height) / 2;
function largeSize ()
videoObj._width = Stage.width;
videoObj._height = videoObj._width * relationshipW;
if (videoObj._height > Stage.height)
videoObj._height = Stage.height;
videoObj._width = videoObj._height * relationshipH;
videoObj.smoothing = true;
//var scale:Number;
videoObj._x = (Stage.width - videoObj._width) / 2;
videoObj._y = (Stage.height - videoObj._height) / 2;
// Fullscreen button
controls_mc.fullscreen_mc.onRollOver = function ()
if (Stage["displayState"] == "normal")
this.gotoAndStop("fullOver");
else
this.gotoAndStop("fullCloseOver");
} // end else if
controls_mc.fullscreen_mc.onRollOut = controls_mc.fullscreen_mc.onReleaseOutside = function ()
if (Stage["displayState"] == "normal")
this.gotoAndStop("full");
else
this.gotoAndStop("fullClose");
} // end else if
// Toggle fullscreen button
controls_mc.fullscreen_mc.onRelease = function ()
if (Stage["displayState"] == "normal")
Stage["displayState"] = "fullscreen";
_parent.video_txt.theText._visible = false;
else
Stage["displayState"] = "normal";
_parent.video_txt.theText._visible = true; -
I have multi videos and like to do video gallery
is there a thickbox for video gallery in dreamweaver as there is a thickbox for photo gallery...what is the best software to do video gallery...or how but not sophisticated way im not programmer?
thanx a lotI've tested all of them and this is the only HTML5 player that supports playlists and WORKS out of the box in iPhone, iPad, Android, Firefox, Internet Explorer, Chrome, Safari, etc... with one file type (MP4).
You can customize the player appearance any way you wish with the optional Skin Designer.
Beyond that, your options for ease of use are practically none because this player deploys with 3 lines of code in your HTML page. If you can't handle copying and pasting 3 lines of code, I honestly don't know what else to suggest. Sorry.
Nancy O. -
NEED HELP remove Video Gallery
I am importing the video gallery dynamically via Flash professional and in need of help how to remove the sound and where to put the code so the sound stops playing while viewing the otehr pages.
package
import flash.events.*;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.ui.Keyboard;
import flash.filters.DropShadowFilter;
import flash.net.URLLoader;
import flash.text.*;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.Font;
import flash.net.*;
import flash.events.MouseEvent;
import flash.display.Loader;
import flash.display.BitmapData;
import flash.events.ProgressEvent;
import flash.display.Graphics;
import flash.net.URLRequest;
import fl.video.*;
//import gs.*;
// import gs.easing.*;
//Classes for guesture support for mobile devices
import flash.ui.Multitouch;
import flash.ui.MultitouchInputMode;
import flash.events.TransformGestureEvent;
//Custom classes
import com.other.TextHandle;
import com.other.Mp3Player;
//Greensock tween class for better tweens
import com.greensock.*;
import com.greensock.TweenMax;
import com.greensock.TweenLite;
import com.greensock.easing.*;
import flash.media.Sound;
import flash.media.SoundChannel;
import com.greensock.events.LoaderEvent;
import com.greensock.plugins.*;
TweenPlugin.activate([VolumePlugin]);
public class Portfolio extends MovieClip
//Declare movieclips for backgrounds
var myBg1:MovieClip;
var myBg2:MovieClip;
var myBg3:MovieClip;
var myBg4:MovieClip;
var myBg5:MovieClip;
var myBgHome:MovieClip;
//Declare movieclips for nav buttons
var myBtn01:MovieClip;
var myBtn02:MovieClip;
var myBtn03:MovieClip;
var myBtn04:MovieClip;
var myBtn05:MovieClip;
var mybackBtn:MovieClip;
var player:Mp3Player
//var slideItem:SlideItem;
var tempContainer:Sprite;
var hiddenOptions:Boolean;
var optionsMenu:MovieClip;
var myXML:XML;
var myLoader:URLLoader = new URLLoader();
var myThumb:Loader;
var myTextField:TextField;
var myTxt:TextField;
// Video Classes
var thumbWidth:Number;
var thumbHeight:Number;
var thumbX:Number;
var thumbY:Number;
var videoX:Number;
var videoY:Number;
var myVideos:XMLList;
var totalVideos:int;
var videoContainer:MovieClip;
var thumbs:MovieClip;
var titles:MovieClip;
var videoPlayer:FLVPlayback;
// ImageGallery Classes
public function Portfolio()
myLoader.load(new URLRequest("myFirstXML.xml"));
myLoader.addEventListener(Event.COMPLETE, processXML);
// constructor code
firstPage();
makeMenu();
homePage();
/* EXAMPLE OF USING GESTURE SUPPORT ON A MOBILE DEVICE */
Multitouch.inputMode = MultitouchInputMode.GESTURE;
//slideItem = new SlideItem();
/* Center the image */
//slideItem.x = stage.stageWidth * 0.5;
//slideItem.y = stage.stageHeight * 0.5;
//addChild(slideItem);
//listeners('add', slideItem); //see function for more detail
// TextHandle Class for TextFields
var Intro:TextHandle = new TextHandle("My Portfolio","Arial");
//OR with more optional details e.g. var a:TextHandle = new TextHandle("some text","Cooper Black",150);
addChild(Intro);
//Mp3Player Class for loading in sounds
player = new Mp3Player();
player.play('DwightQ3.mp3');
/*Blur filter API*/
var dropShadow:DropShadowFilter = new DropShadowFilter();
dropShadow.color = 0x000000;
dropShadow.blurX = 3;
dropShadow.blurY = 3;
dropShadow.angle = 45;
dropShadow.alpha = 0.5;
dropShadow.distance = 5;
var filtersArray:Array = new Array(dropShadow);
Intro.filters = filtersArray;
// VIDEO GALLERY
public function VideoGallery()
// constructor code
var myXMLLoader:URLLoader = new URLLoader();
myXMLLoader.load (new URLRequest("myVideoXML.xml"));
myXMLLoader.addEventListener (Event.COMPLETE, processXML);
function processXML (e:Event):void
myXML = new XML(e.target.data);
//Get attributes from XML document
thumbWidth = myXML.@THUMB_WIDTH;
thumbHeight = myXML.@THUMB_HEIGHT;
thumbX = myXML.@THUMB_X;
thumbY = myXML.@THUMB_Y;
thumbX = myXML.@VIDEO_X;
thumbY = myXML.@VIDEO_Y;
//Get Element information from VIDEO tags
myVideos = myXML.VIDEO;
//Count the number of Elements with VIDEO tags
totalVideos = myVideos.length();
makeContainers();
callThumbs();
makePlayer();
function makeContainers():void
videoContainer = new MovieClip();
addChild (videoContainer);
thumbs = new MovieClip();
thumbs.x = 20;
thumbs.y = 400;
thumbs.buttonMode = true;
videoContainer.addChild(thumbs);
thumbs.addEventListener(MouseEvent.CLICK,playVideo);
thumbs.addEventListener(MouseEvent.MOUSE_OVER,onOverThumb);
thumbs.addEventListener(MouseEvent.MOUSE_OUT,onOutThumb);
titles = new MovieClip();
titles.x = 20;
titles.y = 330;
videoContainer.addChild(titles);
function callThumbs ():void
for (var i:Number = 0; i <totalVideos; i++)
trace(myVideos[i].THUMB);
var thumbURL = myVideos[i].THUMB;
var thumbLoader = new Loader();
thumbLoader.name = i;
thumbLoader.load(new URLRequest(thumbURL));
thumbLoader.contentLoaderInfo.addEventListener (Event.COMPLETE,thumbLoaded);
//Change spaces for thumnails vertically
thumbLoader.x = (thumbHeight+90)*i;
var thumbTitle = myVideos[i].TITLE;
var titleTXT:TextField = new TextField();
titleTXT.text = thumbTitle;
titleTXT.y = thumbTitle;
//Change spaces for thumbnails horizontally
titleTXT.x = (thumbWidth + 1)*i;
titleTXT.width = thumbWidth;
titleTXT.height = thumbHeight;
titleTXT.wordWrap = true;
titles.addChild (titleTXT);
function thumbLoaded (e:Event):void
var myThumb:Loader = Loader (e.target.loader);
thumbs.addChild(myThumb);
function makePlayer():void
videoPlayer = new FLVPlayback();
videoPlayer.skin ="SkinUnderPlaySeekStop.swf";trace("noerror");
videoPlayer.skinBackgroundColor = 0x0099FF;
videoPlayer.skinBackgroundAlpha = 0.85;
videoPlayer.x = 100;
videoPlayer.y = 30;
//240p settings for 16:9 resolution
//width would = 320 on 4:3 resoloution
videoPlayer.width = 432;
videoPlayer.height=240;
//480p settings for 16:9 resolution
//.width would = 640 on 4:3 resoloution
//videoPlayer.width = 854;
//videoPlayer.height = 480;
//1280x720p or 1920x1080p are unliely on most current mobile devices
videoContainer.addChild(videoPlayer);
videoPlayer.source = myXML.VIDEO.URL[0];
//Skip some time in the video (Do not need this if you want to start at the beginning of video)
videoPlayer.playheadTime = Math.random()*0;
smoothVideo()
videoPlayer.addEventListener(fl.video.VideoEvent.COMPLETE,completePlay);
//Once recieved metadata then do something
videoPlayer.addEventListener(MetadataEvent.METADATA_RECEIVED,onVideoDataRecived);
//videoPlayer.addEventListener(VideoEvent.STATE_CHANGE,videoHandler);
function smoothVideo()
var myVideo = videoPlayer.getVideoPlayer(0);
myVideo.smoothing = true;
function onVideoDataRecived(e:MetadataEvent)
trace(videoPlayer.totalTime);
//trace(videoPlayer.bytesLoaded);
//trace(videoPlayer.bytesTotal);
//videoPlayer.playheadTime = 50;
function playVideo (e:MouseEvent):void
var videoURL = myVideos[e.target.name].URL;
trace (videoURL);
videoPlayer.source = videoURL;
//videoPlayer.autoPlay = false;
function onOverThumb (e:MouseEvent):void
var myThumb:Loader = Loader(e.target);
myThumb.alpha = 0.5;
function onOutThumb (e:MouseEvent):void
var myThumb:Loader = Loader (e.target);
myThumb.alpha = 1;
function completePlay (e:fl.video.VideoEvent):void
videoPlayer.alpha = 0.2;
function stopVideo(evt:MouseEvent): void {
FUNCTIONS THAT:
RECEIVE THE MOUSE EVENTS FROM THE MENU
CLEAR THE MENU EVENT LISTENERS
CLEAR THE SCREEN
GOTO THE REQUIRED PAGE FUNCTION
function gotoPage1(e:MouseEvent)
clearMenuListeners()
clearScreen();
firstPage();
loadImage(0);
loadImage2(1);
maketext()
function gotoPage2(e:MouseEvent)
clearMenuListeners()
clearScreen();
secondPage();
function gotoPage3(e:MouseEvent)
clearMenuListeners()
clearScreen();
thirdPage();
function gotoPage4(e:MouseEvent)
clearMenuListeners()
clearScreen();
fourthPage();
function gotoPage5(e:MouseEvent)
clearMenuListeners()
clearScreen();
fifthPage();
makeContainers(); trace ("moo");
callThumbs(); trace ("boo");
VideoGallery(); trace ("weee");
function gotoHomePage(e:MouseEvent)
clearMenuListeners()
clearScreen();
homePage();
//player.play("DwightQ3.mp3");
FUNCTIONS THAT:
MAKE THE PAGES
function homePage()
myBgHome = new BgStripes();
addChild(myBgHome);
makeMenu();
trace("Homepage");
function firstPage()
myBgHome = new bgAll();
addChild(myBgHome);
mybackBtn = new backBtn();
mybackBtn.x = 720;
mybackBtn.y = 40;
addChild(mybackBtn);
mybackBtn.addEventListener(MouseEvent.CLICK, gotoHomePage); trace("firstpage");
function secondPage()
myBgHome = new bgAll();
addChild(myBgHome);
mybackBtn = new backBtn();
mybackBtn.x = 720;
mybackBtn.y = 40;
addChild(mybackBtn);
mybackBtn.addEventListener(MouseEvent.CLICK, gotoHomePage); trace("secondpage");
myBtn04 = new btnDesign();
myBtn04.x = 100;
myBtn04.y = 100;
addChild(myBtn04);
myBtn04.addEventListener(MouseEvent.CLICK, gotoPage4);
myBtn05 = new btnMedia();
myBtn05.x = 400;
myBtn05.y = 100;
addChild(myBtn05);
myBtn05.addEventListener(MouseEvent.CLICK, gotoPage5);
function thirdPage()
myBgHome = new bgAll();
addChild(myBgHome);
mybackBtn = new backBtn();
mybackBtn.x = 720;
mybackBtn.y = 40;
addChild(mybackBtn);
mybackBtn.addEventListener(MouseEvent.CLICK, gotoHomePage); trace("thirdpage");
function fourthPage()
myBgHome = new bgAll();
addChild(myBgHome);
mybackBtn = new backBtn();
mybackBtn.x = 720;
mybackBtn.y = 40;
addChild(mybackBtn);
mybackBtn.addEventListener(MouseEvent.CLICK, gotoHomePage); trace("fourthpage");
videoContainer = new MovieClip();
addChild (videoContainer);
thumbs = new MovieClip();
thumbs.x = thumbX;
thumbs.y = thumbY;
thumbs.buttonMode = true;
videoContainer.addChild(thumbs);
thumbs.addEventListener(MouseEvent.CLICK,playVideo);
thumbs.addEventListener(MouseEvent.MOUSE_OVER,onOverThumb);
thumbs.addEventListener(MouseEvent.MOUSE_OUT,onOutThumb);
function fifthPage()
myBgHome = new bgAll();
addChild(myBgHome);
mybackBtn = new backBtn();
mybackBtn.x = 720;
mybackBtn.y = 40;
addChild(mybackBtn);
mybackBtn.addEventListener(MouseEvent.CLICK, gotoHomePage); trace("fifthpage");
function clearScreen()
//Clear all movieclips from the display list
while (numChildren > 0){ removeChildAt(0); }
function clearMenuListeners()
//Remove event listeners to prevent double ups when menu is added again
myBtn01.removeEventListener(MouseEvent.CLICK, gotoPage1);
myBtn02.removeEventListener(MouseEvent.CLICK, gotoPage2);
myBtn03.removeEventListener(MouseEvent.CLICK, gotoPage3);
mybackBtn.removeEventListener(MouseEvent.CLICK, gotoHomePage);
function makeMenu()
//Place buttons and add event listeners to receive mouse clicks
myBtn01 = new mcAbout();
myBtn01.x = 260;
myBtn01.y = 500;
addChild(myBtn01);
myBtn01.addEventListener(MouseEvent.CLICK, gotoPage1);
TweenMax.to(myBtn01, 0.5, {x:260, y:450});
myBtn02 = new mcPortfolio();
myBtn02.x = 400;
myBtn02.y = 500;
addChild(myBtn02);
myBtn02.addEventListener(MouseEvent.CLICK, gotoPage2);
TweenMax.to(myBtn02, 0.5, {x:400, y:450});
myBtn03 = new mcContact();
myBtn03.x = 540;
myBtn03.y = 500;
addChild(myBtn03);
myBtn03.addEventListener(MouseEvent.CLICK, gotoPage3);
TweenMax.to(myBtn03, 0.5, {x:540, y:450});use:
package
import flash.events.*;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.ui.Keyboard;
import flash.filters.DropShadowFilter;
import flash.net.URLLoader;
import flash.text.*;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.Font;
import flash.net.*;
import flash.events.MouseEvent;
import flash.display.Loader;
import flash.display.BitmapData;
import flash.events.ProgressEvent;
import flash.display.Graphics;
import flash.net.URLRequest;
import fl.video.*;
//import gs.*;
// import gs.easing.*;
//Classes for guesture support for mobile devices
import flash.ui.Multitouch;
import flash.ui.MultitouchInputMode;
import flash.events.TransformGestureEvent;
//Custom classes
import com.other.TextHandle;
import com.other.Mp3Player;
//Greensock tween class for better tweens
import com.greensock.*;
import com.greensock.TweenMax;
import com.greensock.TweenLite;
import com.greensock.easing.*;
import flash.media.Sound;
import flash.media.SoundChannel;
import com.greensock.events.LoaderEvent;
import com.greensock.plugins.*;
TweenPlugin.activate([VolumePlugin]);
public class Portfolio extends MovieClip
//Declare movieclips for backgrounds
var myBg1:MovieClip;
var myBg2:MovieClip;
var myBg3:MovieClip;
var myBg4:MovieClip;
var myBg5:MovieClip;
var myBgHome:MovieClip;
//Declare movieclips for nav buttons
var myBtn01:MovieClip;
var myBtn02:MovieClip;
var myBtn03:MovieClip;
var myBtn04:MovieClip;
var myBtn05:MovieClip;
var mybackBtn:MovieClip;
var player:Mp3Player
//var slideItem:SlideItem;
var tempContainer:Sprite;
var hiddenOptions:Boolean;
var optionsMenu:MovieClip;
var myXML:XML;
var myLoader:URLLoader = new URLLoader();
var myThumb:Loader;
var myTextField:TextField;
var myTxt:TextField;
// Video Classes
var thumbWidth:Number;
var thumbHeight:Number;
var thumbX:Number;
var thumbY:Number;
var videoX:Number;
var videoY:Number;
var myVideos:XMLList;
var totalVideos:int;
var videoContainer:MovieClip;
var thumbs:MovieClip;
var titles:MovieClip;
var videoPlayer:FLVPlayback;
// ImageGallery Classes
public function Portfolio()
myLoader.load(new URLRequest("myFirstXML.xml"));
myLoader.addEventListener(Event.COMPLETE, processXML);
// constructor code
firstPage();
makeMenu();
homePage();
/* EXAMPLE OF USING GESTURE SUPPORT ON A MOBILE DEVICE */
Multitouch.inputMode = MultitouchInputMode.GESTURE;
//slideItem = new SlideItem();
/* Center the image */
//slideItem.x = stage.stageWidth * 0.5;
//slideItem.y = stage.stageHeight * 0.5;
//addChild(slideItem);
//listeners('add', slideItem); //see function for more detail
// TextHandle Class for TextFields
var Intro:TextHandle = new TextHandle("My Portfolio","Arial");
//OR with more optional details e.g. var a:TextHandle = new TextHandle("some text","Cooper Black",150);
addChild(Intro);
//Mp3Player Class for loading in sounds
player = new Mp3Player();
player.play('DwightQ3.mp3');
/*Blur filter API*/
var dropShadow:DropShadowFilter = new DropShadowFilter();
dropShadow.color = 0x000000;
dropShadow.blurX = 3;
dropShadow.blurY = 3;
dropShadow.angle = 45;
dropShadow.alpha = 0.5;
dropShadow.distance = 5;
var filtersArray:Array = new Array(dropShadow);
Intro.filters = filtersArray;
// VIDEO GALLERY
public function VideoGallery()
// constructor code
var myXMLLoader:URLLoader = new URLLoader();
myXMLLoader.load (new URLRequest("myVideoXML.xml"));
myXMLLoader.addEventListener (Event.COMPLETE, processXML);
function processXML (e:Event):void
myXML = new XML(e.target.data);
//Get attributes from XML document
thumbWidth = myXML.@THUMB_WIDTH;
thumbHeight = myXML.@THUMB_HEIGHT;
thumbX = myXML.@THUMB_X;
thumbY = myXML.@THUMB_Y;
thumbX = myXML.@VIDEO_X;
thumbY = myXML.@VIDEO_Y;
//Get Element information from VIDEO tags
myVideos = myXML.VIDEO;
//Count the number of Elements with VIDEO tags
totalVideos = myVideos.length();
makeContainers();
callThumbs();
makePlayer();
function makeContainers():void
videoContainer = new MovieClip();
addChild (videoContainer);
thumbs = new MovieClip();
thumbs.x = 20;
thumbs.y = 400;
thumbs.buttonMode = true;
videoContainer.addChild(thumbs);
thumbs.addEventListener(MouseEvent.CLICK,playVideo);
thumbs.addEventListener(MouseEvent.MOUSE_OVER,onOverThumb);
thumbs.addEventListener(MouseEvent.MOUSE_OUT,onOutThumb);
titles = new MovieClip();
titles.x = 20;
titles.y = 330;
videoContainer.addChild(titles);
function callThumbs ():void
for (var i:Number = 0; i <totalVideos; i++)
trace(myVideos[i].THUMB);
var thumbURL = myVideos[i].THUMB;
var thumbLoader = new Loader();
thumbLoader.name = i;
thumbLoader.load(new URLRequest(thumbURL));
thumbLoader.contentLoaderInfo.addEventListener (Event.COMPLETE,thumbLoaded);
//Change spaces for thumnails vertically
thumbLoader.x = (thumbHeight+90)*i;
var thumbTitle = myVideos[i].TITLE;
var titleTXT:TextField = new TextField();
titleTXT.text = thumbTitle;
titleTXT.y = thumbTitle;
//Change spaces for thumbnails horizontally
titleTXT.x = (thumbWidth + 1)*i;
titleTXT.width = thumbWidth;
titleTXT.height = thumbHeight;
titleTXT.wordWrap = true;
titles.addChild (titleTXT);
function thumbLoaded (e:Event):void
var myThumb:Loader = Loader (e.target.loader);
thumbs.addChild(myThumb);
function makePlayer():void
videoPlayer = new FLVPlayback();
videoPlayer.skin ="SkinUnderPlaySeekStop.swf";trace("noerror");
videoPlayer.skinBackgroundColor = 0x0099FF;
videoPlayer.skinBackgroundAlpha = 0.85;
videoPlayer.x = 100;
videoPlayer.y = 30;
//240p settings for 16:9 resolution
//width would = 320 on 4:3 resoloution
videoPlayer.width = 432;
videoPlayer.height=240;
//480p settings for 16:9 resolution
//.width would = 640 on 4:3 resoloution
//videoPlayer.width = 854;
//videoPlayer.height = 480;
//1280x720p or 1920x1080p are unliely on most current mobile devices
videoContainer.addChild(videoPlayer);
videoPlayer.source = myXML.VIDEO.URL[0];
//Skip some time in the video (Do not need this if you want to start at the beginning of video)
videoPlayer.playheadTime = Math.random()*0;
smoothVideo()
videoPlayer.addEventListener(fl.video.VideoEvent.COMPLETE,completePla y);
//Once recieved metadata then do something
videoPlayer.addEventListener(MetadataEvent.METADATA_RECEIVED,onVideoD ataRecived);
//videoPlayer.addEventListener(VideoEvent.STATE_CHANGE,videoHandler);
function smoothVideo()
var myVideo = videoPlayer.getVideoPlayer(0);
myVideo.smoothing = true;
function onVideoDataRecived(e:MetadataEvent)
trace(videoPlayer.totalTime);
//trace(videoPlayer.bytesLoaded);
//trace(videoPlayer.bytesTotal);
//videoPlayer.playheadTime = 50;
function playVideo (e:MouseEvent):void
var videoURL = myVideos[e.target.name].URL;
trace (videoURL);
videoPlayer.source = videoURL;
//videoPlayer.autoPlay = false;
function onOverThumb (e:MouseEvent):void
var myThumb:Loader = Loader(e.target);
myThumb.alpha = 0.5;
function onOutThumb (e:MouseEvent):void
var myThumb:Loader = Loader (e.target);
myThumb.alpha = 1;
function completePlay (e:fl.video.VideoEvent):void
videoPlayer.alpha = 0.2;
function stopVideo(evt:MouseEvent): void {
FUNCTIONS THAT:
RECEIVE THE MOUSE EVENTS FROM THE MENU
CLEAR THE MENU EVENT LISTENERS
CLEAR THE SCREEN
GOTO THE REQUIRED PAGE FUNCTION
function gotoPage1(e:MouseEvent)
clearMenuListeners()
clearScreen();
firstPage();
loadImage(0);
loadImage2(1);
maketext()
function gotoPage2(e:MouseEvent)
clearMenuListeners()
clearScreen();
secondPage();
function gotoPage3(e:MouseEvent)
clearMenuListeners()
clearScreen();
thirdPage();
function gotoPage4(e:MouseEvent)
clearMenuListeners()
clearScreen();
fourthPage();
function gotoPage5(e:MouseEvent)
clearMenuListeners()
clearScreen();
fifthPage();
makeContainers(); trace ("moo");
callThumbs(); trace ("boo");
VideoGallery(); trace ("weee");
function gotoHomePage(e:MouseEvent)
clearMenuListeners()
clearScreen();
homePage();
videoPlayer.stop();
//player.play("DwightQ3.mp3");
FUNCTIONS THAT:
MAKE THE PAGES
function homePage()
myBgHome = new BgStripes();
addChild(myBgHome);
makeMenu();
trace("Homepage");
function firstPage()
myBgHome = new bgAll();
addChild(myBgHome);
mybackBtn = new backBtn();
mybackBtn.x = 720;
mybackBtn.y = 40;
addChild(mybackBtn);
mybackBtn.addEventListener(MouseEvent.CLICK, gotoHomePage); trace("firstpage");
function secondPage()
myBgHome = new bgAll();
addChild(myBgHome);
mybackBtn = new backBtn();
mybackBtn.x = 720;
mybackBtn.y = 40;
addChild(mybackBtn);
mybackBtn.addEventListener(MouseEvent.CLICK, gotoHomePage); trace("secondpage");
myBtn04 = new btnDesign();
myBtn04.x = 100;
myBtn04.y = 100;
addChild(myBtn04);
myBtn04.addEventListener(MouseEvent.CLICK, gotoPage4);
myBtn05 = new btnMedia();
myBtn05.x = 400;
myBtn05.y = 100;
addChild(myBtn05);
myBtn05.addEventListener(MouseEvent.CLICK, gotoPage5);
function thirdPage()
myBgHome = new bgAll();
addChild(myBgHome);
mybackBtn = new backBtn();
mybackBtn.x = 720;
mybackBtn.y = 40;
addChild(mybackBtn);
mybackBtn.addEventListener(MouseEvent.CLICK, gotoHomePage); trace("thirdpage");
function fourthPage()
myBgHome = new bgAll();
addChild(myBgHome);
mybackBtn = new backBtn();
mybackBtn.x = 720;
mybackBtn.y = 40;
addChild(mybackBtn);
mybackBtn.addEventListener(MouseEvent.CLICK, gotoHomePage); trace("fourthpage");
videoContainer = new MovieClip();
addChild (videoContainer);
thumbs = new MovieClip();
thumbs.x = thumbX;
thumbs.y = thumbY;
thumbs.buttonMode = true;
videoContainer.addChild(thumbs);
thumbs.addEventListener(MouseEvent.CLICK,playVideo);
thumbs.addEventListener(MouseEvent.MOUSE_OVER,onOverThumb);
thumbs.addEventListener(MouseEvent.MOUSE_OUT,onOutThumb);
function fifthPage()
myBgHome = new bgAll();
addChild(myBgHome);
mybackBtn = new backBtn();
mybackBtn.x = 720;
mybackBtn.y = 40;
addChild(mybackBtn);
mybackBtn.addEventListener(MouseEvent.CLICK, gotoHomePage); trace("fifthpage");
function clearScreen()
//Clear all movieclips from the display list
while (numChildren > 0){ removeChildAt(0); }
function clearMenuListeners()
//Remove event listeners to prevent double ups when menu is added again
myBtn01.removeEventListener(MouseEvent.CLICK, gotoPage1);
myBtn02.removeEventListener(MouseEvent.CLICK, gotoPage2);
myBtn03.removeEventListener(MouseEvent.CLICK, gotoPage3);
mybackBtn.removeEventListener(MouseEvent.CLICK, gotoHomePage);
function makeMenu()
//Place buttons and add event listeners to receive mouse clicks
myBtn01 = new mcAbout();
myBtn01.x = 260;
myBtn01.y = 500;
addChild(myBtn01);
myBtn01.addEventListener(MouseEvent.CLICK, gotoPage1);
TweenMax.to(myBtn01, 0.5, {x:260, y:450});
myBtn02 = new mcPortfolio();
myBtn02.x = 400;
myBtn02.y = 500;
addChild(myBtn02);
myBtn02.addEventListener(MouseEvent.CLICK, gotoPage2);
TweenMax.to(myBtn02, 0.5, {x:400, y:450});
myBtn03 = new mcContact();
myBtn03.x = 540;
myBtn03.y = 500;
addChild(myBtn03);
myBtn03.addEventListener(MouseEvent.CLICK, gotoPage3);
TweenMax.to(myBtn03, 0.5, {x:540, y:450}); -
How to do a video gallery page
Hi everyone
when you create a new page iWeb lets you choose from some preset pages like the homepage, the blog, the video and the photo gallery.
But the video page lets you put one or more videos in just one page.
If you have many videos and you want to divide them in different categories like the photo gallery page do for photos, how can you do it?
If you select the photo gallery and if you put videos instead of photos from your iTunes inside of it, it seems to do the job, but I can't use this trick cause I have not enough hosting space to store the videos, and infact I uploaded them in youtube and with the youtube widget the photo gallery doesn't work and shows nothing...
Did someone know how to create a video gallery page (or something like that) with videos from youtube?
Thanks
Message was edited by: PaoloPhinoThis is one way you could do it: PhotoPresenter Animated Slideshow Themes. The thumbnails can be as small as you'd like. This way none of the video files have to load before they play button is selected. Otherwise the page would take forever to load.
How the button is created is described in this demo page: Opening Item in a New, Precisely Sized Window
OR you could use a video jutebox like the one on this page: http://www.holyredeemernorthbend.org/HRWeb/Our_Videos.html.
His tutorial on how to implement it is here: http://www.holyredeemernorthbend.org/HRWeb/jukebox.html.
OT -
I am creating a video gallery for a website. I am quite new
to Flash 8 and I am wondering whether it is possible to do the
following:
The file will contain a video player at the top that will
play all the video clips. Underneath will be a library that will
start off as four thumbnails and their will be an 'Expand All'
button. Once clicked, the gallery will expand in flash to show
however many thumbnails that are needed, and once you click on the
thumbnails the video will load up in the above player.
I have created the library so that it expands and collapses,
but I am struggling (have no idea) on how to make the thumbnails
link to play the corresponding videos at the top!
Is it possible?Thanks for the advice, I must have done something wrong
though as it has not worked.
In my SWF, I have imported the videos separately using the
wizard. I have named one of the videos with the instance name vid
and then added the code you have listed. When I preview the file,
the top video plays, but when I click on the thumbnails they do not
do anything.
Have I done something wrong? -
Create FLV Video Gallery In Dreamweaver?
Hi and thanks in advance to those who can offer some advice.
I'd like to create a Flash Video Gallery with thumbnails that link to video and play on the page. Only one video screen. Something like Youtube.
I'm new to Dreamweaver and have built everything else for the site and the portfolio is the last page where I need to have the video gallery.
Any tutorials and direction is appreciated.
Again, I'd like to have one page with thumbnails that plays the video on the page in one window, not multiple windows.
Thanks!Wimpy Rave is absolutely perfect for this type of video gallery. One media player can handle all your video and audio files seemlessly from a playlist.
See Examples, Rave Video Playlist.
http://www.wimpyplayer.com/affiliates/idevaffiliate.php?id=836
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
www.alt-web.com/
www.twitter.com/altweb -
Flash Video Gallery Add more thumbnails
referring to the Flash Video Gallery , If I had more than 36
thumbnails and did not want to increase the space marked out for
the
thumbnails.. and Instead wanted to have a new set of images
load, jus like in a picture gallery when we click on more... What
would I do?? The ability to have next and prev to load the
thumbnails is what I am tryin to achieve. I have gone through all
of the .as files.. but how to I integrate this feature??
I am a beginner and and need help.Here is a good round up of video galleries:
http://www.lemlinh.com/as3-video-player-tutorials-roundup/
Also google it for more. -
AS 3.0 Video Gallery adaptation
I'm creating a site which utilizes an adaptation of Dan
Carr's Flash Video Gallery (AS 3.0). And it functions properly when
I test it locally on my machine, but once I upload it to our server
it doesn't load the video galleries. ...well, it appears to load
the galleries, because it goes to the second frame of the Flash
Video Gallery SWF where the video application is, but it won't load
my thumbnails or video and the loader stays on screen.
The site consists of:
1- main SWF that is my interface
1 - dynamically loaded SWF digital clock (uses AS 2.0)
4 - dynamically loaded SWFs that are each separate instances
of the Flash Video Gallery
Like I said it works fine when testing it locally, but it
doesn't seem to work online.
The file structure remains the same on the server as it was
on my local machine, so I don't think it's a problem of finding
files and I don't receive any errors when testing.
Any help would be great.
The other problem that I'm having is that when I test the
application locally the fullscreen button on my videos won't work.
Is this because it is a dynamicaly loaded SWF nested into the main
SWF? If I load the Gallery SWF into it's own browser by itself the
fullscreen function works fine, but not when it's loaded into my
main SWF.
Can somebody help with this as well?
Thanks,
MattI had the same problem. Dan Carr was kind enough to send a
reply. Here it is:
quote:
Getting stuck on the loading screen is a symptom that may
happen for a number of reasons.
The loading screen sits above the gallery and obscures the
screen while the thumbnails and screen assets are loading. The
loading screen stays in place until all the video thumbnails have
loaded - so what you're seeing is an issue where 1 or more of your
videos isn't loading.
Most commonly this is because the server isn't recognizing
the FLV mime type or one or more videos didn't get uploaded to the
path listed in the XMLfile. (Actually, the first time I saw
something like this it was because there were spaces in the video
file names - local playback worked as expected, but my server was
URL-encoding the file names which replaced the spaces with
different characters and broke the expected paths...)
I'd recommend that you do the following... In the FLA file,
select the white rectangle graphic on the "Preloading" layer and
make it invisible by turning its alpha to 0. This will allow you to
see which videos are not loading on the server. If none of the
videos load, this would hint that either the server isn't seeing
the FLV mime type, the XML file isn't loading, or there is a global
problem with file naming. (If you see all the labels on the
filters, you know the XML file loaded.) If most of the videos are
loading, look for the specific problem videos and check to see that
the naming is correct and that the files were uploaded to the
correct location.
My own issue, as Dan suggested, was that FLV wasn't
registered on the server.
Hope this helps others.
Paul -
Video gallery in Business Catalyst
Hello everyone. I really like how this video gallery looks on this site. What should I study or look for in order to implement something like this that would work for vimeo or youtube videos? I appreciate the help.
http://crooksncastles.com/videos/Your best bet might be to use an HTML5 player framework that lets you use vimeo and youtube videos like http://popcornjs.org/
Using popcornjs you might be able to take a lot of the headache out of building all this stuff manually since it's HTML5 ready and works with youtube videos and vimeo videos.
Getting the thumbnails on the fly might be harder than it's worth if you don't have a lot of videos or need a client to simply add a video web app item by URL or ID of the video. Youtube thumbnails are easier to get as it's just a URL you can plugin to your code but for Vimeo you have to go out to the Vimeo API via javascript and parse the JSON it returns to get the video URL to use in your "img" preview.
Check out this URL: http://vimeo.com/api/oembed.json?url=http%3A//vimeo.com/7100569
If you're comfortable with javacript and parsing JSON to get at data you can build this with a little effort. It's too much to give you an example but it can be done with javascript and the popcornjs player pretty easily. Check out the popcornjs docs-- popcorn also makes it easy to sync events with a video. For instance, you could show some accompanying text like a closed caption based at different times during the video, 2 seconds in, 30 seconds in, whatever. -
ActionScript 3.0 Flash video gallery Tweak
Hi,
Is there a way to remove the 2nd filter option on the
ActionScript 3.0 Flash video gallery ?
Sadly our coding guru is away on holiday and we need to try
and find a solution asap.
(commenting section out etc just makes it fall over)
Any help would be most appreciated.
Cheers,
AndrewTo do it in AS2 you need just install the remoting classes again. You can either copy them fro your old install or get them:
http://drupal.org/node/258605
Scroll down a bit and you'll see a link to the as2 remoting classes: Remoting_FlashCS3.zip
In AS3 there are a few ways. Some people have made classes for it, or you can use the built in methods of NetConnection. Here's a couple examples of that:
http://www.oscartrelles.com/archives/as3_flash_remoting_example
http://www.flash-db.com/Tutorials/helloAS3/ -
My NASA Multimedia News App is exhibiting behavior that I would very much like to change. The app is in the store at
http://apps.microsoft.com/windows/en-us/app/nasa-multimedia-news/7e74f3fb-b550-4ac6-b437-388f034ee6df
If you look at one of the three video galleries, here is the scenario:
1. Start one of the videos, for example the most recent one.
2. without MANUALLY pausing the first video and before it finishes, scroll to the next item in the same gallery and PLAY it.
3. two streams are now playing, audio overlapping.
4. move on to the next item in the gallery OR GO TO A DIFFERENT PAGE/SCREEN, cover your ears....
in fact the stream needs to stop if you navigate away from it by either starting a different video in the same gallery or when you navigate to a different screen/page in the app. and it doesn't.
5. in fact, if you close the app by dragging it down and don't final close it by drag/hold flip or using taskmgr, if you re-open it the multiple audio streams will still be playing from where they left off.
I don't honestly know if it is the video control or something I didn't do in the syntax (or even if something CAN be done), but with the overlapping cacophony that results, it is less than optimal. My expectations/hopes, were that if one stream was already
playing, that moving to a new item and starting THAT stream would automatically terminate the original one that was playing so that only a single audio stream can be heard.
I hope the issue is clear.
Is this a bug? If it is by design, ugh. And is there a work around?
-- Barb BowmanOn Sat, 5 Apr 2014 01:20:04 +0000, thorwm wrote:
>All kidding aside, I did some searching in the forum and I found this post that may help?
>
>http://social.technet.microsoft.com/Forums/en-US/6037342d-2575-411b-a496-90d306f82b00/unable-to-stop-a-video-playing-using-updatecontextvideopause-true?forum=projectsiena
>
>Btw, what you're talking about sounds very similar to how Adobe Flash works - it figures that you (the end user) must know what you're doing when you start another audio file / video so it keeps adding to the stream. The way I helped
the end user was to add the code to stop the media file playing when another one was selected.
>
>Hopefully the thread above gives you some ideas how you might do this in your situation.
>
>
>I look forward to hearing what you find - sounds like a neat app (no pun intended!)
Thor, it is my NASA Multimedia App - I resubmitted it last night and I guess a
different tester got it and the update went through. But the issue still exists.
The difference between what I have in my app and that other thread is that I
have a video GALLERY as opposed to individual players. I did try messing around
with that syntax
UpdateContext({videoPause: false}); UpdateContext({videoPause: true});
Navigate(scrHome, ScreenTransition!Fade)
But it didn't work between screens in my App and anyway, half of the issue is
that it wouldn't work on a single screen that contains a video gallery that has
say 10 videos, there is no OnSelect function used. I tried experimenting to see
if I could get syntax working at least for when the navigation is to a different
screen, but it doesn't work for me. Probably because it is a gallery.
Hoping that Robin has a solution...
-- Barb Bowman
Maybe you are looking for
-
Can I link an OS10.4.11 Mini to a new Mini with Lion?
After lightning fried the video card in my Mini, which runs Tiger, I'm looking at a new Mini. My question is: Can I link the old Mini to the new one and use it as a back-up hard drive and CD/DVD burner? What do I need to do to make it work? Aside fro
-
My visa card seems to be getting charged a monthly fee of around $13 to $14 and it recurs at the end of each month. I rang my bank and they told me to try to sort it out first with Skype. However, everytime I try to follow the link to report this fra
-
Why i can view many llb's in functions pallete if i login to PC not as administrator.
-
I am not able to open purchased In design CS5.
Hi, Some time ago I purchased CS5 Creative suite. So far I used Photoshop. I desided to learn In design now. I am not able to open my In design. I downloaded In design again. Every thing seems Ok under downloading and installation, but I am still not
-
Networking 3 Macs with 2 on Airport and 1 hardwired
I have a cable modem going into a non-wireless router. Out of the router I have a cable going to a mac mini hard wired (does not have a wireless card). I also have a cable going to an airport express which 2 other macs run off of. Here's the question