Fullscreen gallery
Hi! Although Im extremely noobish to this I understand a little bit off how I see it complex language.
I want to create a simple but sweet flash portfolio like:http://www.jeanmalek.com/
That one is a bit over the top for me though, with al the transitions and stuff.
I want it to start with a menu with btns calling different xmls showing infullscreen my photographs.
I want the gallery to be controlled with next and prev btns on top of the picture. It would be nice to have the cursor changing to arrows when hovering over each side.
Layout jpgs:
http://http://wimmerman.se/portfolio/layout2.jpg
http://http://wimmerman.se/portfolio/layout1.jpg
I guess the first step is to make the "menu btns" calling each xml gallery.
Its based on Noponies tutorial:
example: http://www.noponies.com/dev/fullscreen/
files: http://www.noponies.com/dev/fullscreen/xmlFullCrossXML.zip
What code do I import.
Cheers!
Hi! Although Im extremely noobish to this I understand a little bit off how I see it complex language.
I want to create a simple but sweet flash portfolio like:http://www.jeanmalek.com/
That one is a bit over the top for me though, with al the transitions and stuff.
I want it to start with a menu with btns calling different xmls showing infullscreen my photographs.
I want the gallery to be controlled with next and prev btns on top of the picture. It would be nice to have the cursor changing to arrows when hovering over each side.
Layout jpgs:
http://http://wimmerman.se/portfolio/layout2.jpg
http://http://wimmerman.se/portfolio/layout1.jpg
I guess the first step is to make the "menu btns" calling each xml gallery.
Its based on Noponies tutorial:
example: http://www.noponies.com/dev/fullscreen/
files: http://www.noponies.com/dev/fullscreen/xmlFullCrossXML.zip
What code do I import.
Cheers!
Similar Messages
-
Fullscreen Gallery image gets erased when scrolling on Chrome
I'm working on a website where we have an abstract video background playing behind a transparent logo, which when clicked scrolls the page down to the main content. The logo is layed over the video background as a single image in the Fullscreen Gallery widget, so that it resizes according to the browser size. On Safari and Firefox, everything works great (although a little slowly, I'm going to compress my images before the site is announced). But on Chrome, the scrolling window erases the fullscreen image from the bottom up, leaving only the background image behind it, and it looks terrible. I've run it without the video backround, and without the scroll effects on the item beneath the video, and I've pinned the gallery in place, but nothing seems to work. My site is live, though unfinished, at adptpro.com if you'd like to see what I'm talking about.
Any help? Or is there a more robust way to create the effect I'm going for?
Thanks!Any guesses on what I need to do?
I would not want to hazard a guess until I can check the instantaneous data rate at the time of the problem. Got the URL and a time where the file stops? -
Hi!
I want to create a simple but sweet flash portfolio like:http://www.jeanmalek.com/
That one is a bit over the top for me though, with al the transitions and stuff.
I want it to start with a menu with btns calling different xmls showing infullscreen my photographs.
I want the gallery to be controlled with next and prev btns on top of the picture. It would be nice to have the cursor changing to arrows when hovering over each side.
Layout jpgs:
http://wimmerman.se/portfolio/layout1.jpg
http://wimmerman.se/portfolio/layout2.jpg
I guess the first step is to make the "menu btns" calling each xml gallery.
Its based on Noponies tutorial:
example: http://www.noponies.com/dev/fullscreen/
files: http://www.noponies.com/dev/fullscreen/xmlFullCrossXML.zip
What code do I import.
Cheers!Furianaxus wrote:
Hi There,
http://gotoandlearn.com/play.php?id=22
Watch that video tutorial. It should cover absolutely everything you need to get this done.
oh sweet thanks!
Ive been trying to implement the code but im not getting it to work right.
For the moment its working as a slideshow and I think there is something with:
bitmapFadeInterval = setInterval(_root, "loadRandomBitmap", imageTime);
That launghes the loadRandomBitmap function.
thanks for your help
Here is my code:
Terms and Conditions of use
http://www.blog.noponies.com/terms-and-conditions
//init
import flash.display.BitmapData;
Stage.scaleMode = "noscale";
import gs.TweenLite;
stop();
//load in background images XML details
var backImage:XML = new XML();
backImage.ignoreWhite = true;
var bgImages:Array = new Array();
var p:Number = 0;//track pos in arrays
//Variables pulled in from XML
var minHeight:Number;
var minWidth:Number;
var crossFadeTime:Number;
var imageTime:Number;
var order:String;
backImage.onLoad = function(success:Boolean) {
if (success) {
//get vars from XML file
minHeight = this.firstChild.attributes.minHeight;
minWidth = this.firstChild.attributes.minWidth;
crossFadeTime = this.firstChild.attributes.crossFadeTime;
imageTime = this.firstChild.attributes.imageTime;
imageTime = (1000*60)*imageTime;
order = String(this.firstChild.attributes.order);
p = 0;
bgImages = [];//reset the array var, should for some reason you want to load in a different set of images
xmlNodes = this.firstChild;
largeImages = xmlNodes.childNodes.length;
for (i=0; i<largeImages; i++) {
bgImages[i] = xmlNodes.childNodes[i].childNodes[0].firstChild.nodeValue;
//load random image when we successfully parse XML
loadRandomBitmap();
} else {
trace("Fatal Error - Loading background image XML failed");
//name of your xml file
backImage.load("backimages.xml");
/*create an empty mc to act as the background smoothed bitmap holder
change the depth etc here should you need to..Note that this is created inside the
small mc on the stage*/
bgHolder_mc.createEmptyMovieClip("bg_mc",1);
//var to track the fading, we use this to try to resize the temp bitmap with a resize, should the user be resizing the window when we fade in out
var fadingComplete:Boolean = true;
var firstRun:Boolean = true;
//BITMAP BACKGROUND LOADING///
function loadRandomBitmap():Void {
if (order == "random") {
//create the temp loader mc that we load our unsmoothed bitmap into
//a limitation of this approach is that as this top image fades in/out it looks a little jagged for 2 seconds or so..
bgHolder_mc.createEmptyMovieClip("bg_loader",2);
//random function for loaded images
randomImg = Math.floor(Math.random(bgImages.length)*bgImages.length);
bitLoader.loadClip(bgImages[randomImg],bgHolder_mc.bg_loader);
} else {
//sequential loading of images
bgHolder_mc.createEmptyMovieClip("bg_loader",2);
bitLoader.loadClip(bgImages[p],bgHolder_mc.bg_loader);
p++;
if (p == bgImages.length) {
p = 0;
//MovieClipLoader for bitmap image loading
var bitLoader:MovieClipLoader = new MovieClipLoader();
var bitlistener:Object = new Object();
bitlistener.onLoadStart = function(target:MovieClip):Void {
//alpha out our image we load our bitmap into
target._alpha = 0;
bitlistener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
//amountLoaded = Math.floor((bytesLoaded/bytesTotal)*100);//calulate a loading percentage!
//do something with this data if you want
/*here we both draw our bitmap to our offscreen MC and handle the cross fading in and out -
First we load our bitmap into our temp mc which is set to alpha 0, then we resize and fade our
temp mc in so that we achieve the cross fading effect. When the temp MC is at 100% alpha we
attach our bitmap object to our smoothed background MC and then quickly fade out and remove the temp MC.*/
bitlistener.onLoadInit = function(target:MovieClip):Void {
/*clear the timer interval each time. We do this so that each new iteration of the timer
starts from when the bitmap is loaded, this stops us from trying to fade images etc that have not loaded
and ensures that each bitmap is displayed for the required amount of time on screen. Essentially it negates
download time*/
clearInterval(bitmapFadeInterval);
//create the bitmap object, each time this is reset, keeping memory footprint fairly low..
var bitmap:BitmapData = new BitmapData(target._width, target._height, true);
//draw the bitmap
bitmap.draw(target);
//we are starting to fade, so set our var to false and let the temp resize functions run
fadingComplete = false;
//resize the temp bitmap to match the size of the bg bitmap
this.resizeTemp = function() {
if (Stage.height/Stage.width>target._height/target._width) {
img_propa = target._width/target._height;
target._height = Stage.height;
target._width = Stage.height*img_propa;
target._y = 0;
target._x = 0;
} else {
img_propa = target._height/target._width;
target._width = Stage.width;
target._height = Stage.width*img_propa;
target._y = 0;
target._x = 0;
this.resizeTemp();
//fade in the temp bitmap
TweenLite.to(target,crossFadeTime,{_alpha:100, onComplete:fadedIn, onCompleteParams:[this], onUpdate:this.resizeTemp});
function fadedIn(ref):Void {
ref.resizeTemp
//attach our loaded bitmap to our background mc when the temp totally obscures it
//this is the smoothed bitmap
bgHolder_mc.bg_mc.attachBitmap(bitmap,0,"auto",true);
//make the bg resize
fullScreenBg();//This is abit of a hack to catch user resizes
TweenLite.to(target,.1,{_alpha:0, onComplete:cleanUpTemp});
function cleanUpTemp():Void {
//remove the temp mc
removeMovieClip(bgHolder_mc.bg_loader);
//we are done fading..
fadingComplete = true;
//reset the timer
bgHolder_mc.bg_mc.attachBitmap(bitmap,0,"auto",true);
bitmapFadeInterval = setInterval(_root, "loadRandomBitmap", imageTime);
//resize the bg image
fullScreenBg();
//add the stage listener, which fixes an issue with the image being scaled out to
//some crazy size if a user is resizing as the image loads in for the first time.
if (firstRun) {
Stage.addListener(catchStage);//stage resize listener, added here after first image load.
firstRun = false;
bitLoader.addListener(bitlistener);
//stage listener to handle resizing images
var catchStage:Object = new Object();
catchStage.onResize = function() {
/*simple "OR" conditional to set a min size, if we are below that we don't do any more scaling
note that we wrap this in a if/else so that the function that we actually use to to the bg
resizing can be called independently of this check, for instance when we are below the resize
min but we are fading in a new image, obviously we would want that new image to scale*/
//**IF YOU WANT TO SCALE AT ALL STAGE SIZES, SET THE MIN HEIGHT ETC TO 0 IN THE XML
if (Stage.width<minWidth || Stage.height<minHeight) {
return;
} else {
//call the resize function
fullScreenBg();
//screen resize function
function fullScreenBg() {
if (Stage.height/Stage.width>bgHolder_mc.bg_mc._height/bgHolder_mc.bg_mc._width) {
img_prop = bgHolder_mc.bg_mc._width/bgHolder_mc.bg_mc._height;
bgHolder_mc.bg_mc._height = Stage.height;
bgHolder_mc.bg_mc._width = Stage.height*img_prop;
bgHolder_mc.bg_mc._y = 0;
bgHolder_mc.bg_mc._x = 0;
} else {
img_prop = bgHolder_mc.bg_mc._height/bgHolder_mc.bg_mc._width;
bgHolder_mc.bg_mc._width = Stage.width;
bgHolder_mc.bg_mc._height = Stage.width*img_prop;
bgHolder_mc.bg_mc._y = 0;
bgHolder_mc.bg_mc._x = 0; -
Fullscreen slideshow arrows scrolling with the page.
Why does the previous and next arrows appear disconnected to the fullscreen gallery? When I scroll the page, the previous and next arrows are stationary with the page but I want to anchor them to the gallery so they stay together when you scroll the page.
There is no option to have the previous and back buttons move when you scroll the page, they are fixed. The only option this widget gives you is to place them in another position, but they still will remain fixed to that new position.
-
Display Image in Fullscreen like in Gallery (Windows Phone 8.1 SDK)
Hello everyone,
Maybe this is a so simple Task and I should be embarassed...however I currently just don't know how to do it. I am writing an app where I Display several Images in a Pivot Template. I know nothing about These Images as I am getting them from the Internet
and every Image can have a different Resolution.
I thought of displaying them like in the Gallery - As Fullscreen as possible and a double Tap makes them Zoom- and Scrollable. I thought of doing this via a Scrollviewer but have no Idea how. My current Markup is like this:
<Grid x:Name="Scrollgrid" Margin="-20,0,-20,0">
<ScrollViewer x:Name="scrollViewer" Height="500" Width="Auto" HorizontalAlignment="Center" VerticalAlignment="Top" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" ZoomMode="Enabled" MinZoomFactor="0.5">
<StackPanel Height="500" Width="Auto" Orientation="Horizontal">
<Image x:Name="RssImage"
Source="{Binding Image}"
CacheMode="BitmapCache"
Stretch="Fill"
HorizontalAlignment="Center"
VerticalAlignment="Top">
<Image.Transitions>
<TransitionCollection>
<EntranceThemeTransition FromHorizontalOffset="200"/>
</TransitionCollection>
</Image.Transitions>
</Image>
</StackPanel>
</ScrollViewer>
</Grid>
which is just not sufficient enough.Does anybody have an Idea?
Thank you very much.
MarkusHi,
I think you have to use FlipView Control in order to render collection images into one possible UI element. It can be swiped to change the images. You make full screen also. You can use in both windows and windows phone.
Please refer this link
https://msdn.microsoft.com/en-us/library/windows/apps/xaml/jj150601.aspx
If this doesn't meet your answer. Please ask me again. Thank you.. -
im only looking to do it with single images maybe a caption , but wothout having to have teh area where the dots/nubers / sliders go
if i just drop an image son it doesnt seem to offer trhe fullscreen option
any ideas?
arbyiBooks images don't zoom or respond to pinch any way I would expect. They will expand a bit, but snap back to size when released. Even worse, you can't make a picture a link.
I have heard that you can make an empty text box, lay in on a picture, and then link that, but I haven't tried it. Even if, I don't know if you could link it to an object in the book file. I think we're out of luck for now on this. -
Hi,
can anyone please tell me how they manage to do this- http://www.herdadeda...ada.com/en.php# as you can see the background is a full screen scrolling gall??? Thanks. GI'm no JS expert but I would imagine so.
The guys here were working through the same issue, you might find something here:
http://www.dynamicdrive.com/forums/showthread.php?t=41686
I guess you'd just be swapping out the css style background image for an element (div or body tag) on the page after clicking - I'll defer to more enlightened JavaScript coders for more details however.
Cheers
Total Wargamer -
Is there a quick way to open a resident video in fullscreen mode?
Short and not-so-simple, I have a client who requires the following:
Starting from the home screen, he wants the shortest number of taps to open a video (resident on the device) in fullscreen mode. Ideally, I wanted to have a "shortcut" on his home screen that opens a directory on his iPad that contains videos. Unfortunately, iOS does not allow for this. In fact, finding resident files on the HDD at all doesn't seem so easy.
For now, I have him going to his camera, switching to video, and then opening the Video Roll to access videos I've downloaded to his iPad from various sources like email attachments or download links. This is definitely not a long-term solution.
To clarify, the client needs to be able to bring up one of several videos near-instantly, with no buffering and in many cases without an active internet connection. He wants his iPad to be a video gallery, with "a two-click process." Someone (such as myself) would be syncing/uploading the videos as they are created, updated, or replaced, so getting videos onto his iPad easily and remotely (if possible) is also a desire (Dropbox or iTunes?).
Can someone please give me some advice? I am an idiot with iOS, as I spend all of my time on Android devices.Is this a cpvc or a cptx file, when you talk about 'video'?
-
How do I add a FullScreen button to Project Playback Skin?
How do I add a fullscreen button to the project playback skin? I know how to load another skin (using Project -> Skin Editor) and how to add a custom playback skin (paste custom skin SWF into C:\Program Files\Adobe\Adobe Captivate 5\en_US\Gallery\Playbars) but I'm having a little trouble figuring out how to add a fullscreen button when editing the Flash AS3 so that it will show up in my custom playback skin when loaded into Captivate via Project->Skin Editor. Any ideas?
Hi there
I might assume that seeing as you were able to work the magick with the CC button it would be a simple task to pick apart the other elements and add the desired button without hijacking the CC button.
I mean, if you are that deep in Flash territory and all, it doesn't seem like much of a stretch to figure out how the buttons are added, no?
Cheers... Rick
Helpful and Handy Links
Captivate Wish Form/Bug Reporting Form
Adobe Certified Captivate Training
SorcererStone Blog
Captivate eBooks -
How can I change fullscreen background color, so that it is the same when viewing on mac and iPad? I want this to be able to use MathType in widget text.
As an example, html widget has white background on iPad, and black on mac. The same goes for interactive widget.
The MathType text inserted is inserted as a image, and will have the same color when in fullscreen as when not. So I need the textcolor to be the same in both views. Anyone know how to fix this?We're still not communicating. This is why I wanted an example .iba.
Here's a re-creation of my own, going off what you described. You said "all html widgets and all gallery widgets" have this problem. So I inserted a blank HTML widget and a blank Gallery widget, and typed into both. Inserted a MathType equation into both. I don't see any difference when I preview it on my Mac compared to the preview on the iPad. I want to help, but I can't help if I can't duplicate the issue.
I've attached the screen shots and the .iba file [link to .iba file].
Feel free to email me directly at bobm at dessci dot com. If you're uncomfortable giving some information here, tell me anything you want in email. I work for the "MathType company", Design Science. -
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; -
Gallery in Adobe Flash AS2.0
Hello. I decided to do my portfolio in flash (based on that clip http://www.youtube.com/watch?v=Qn3mDxDqQ1o) and everything went fine until I started doing gallery. I have no idea how to connect html and flash so that it is consistent. The gallery should look something like this http://www.pirolab.it/pirobox_v_1_2/. Summary: Have you any ideas how to do gallery which is one of the 4 tabs with fullscreen image preview (pirobox for example) in the simplest way? I use AS 2.0. Thanks and regards.
Maybe this will help to show what I mean.on (rollOver) {
_root.mouse_over_button2 = true;
on (rollOut) {
_root.mouse_over_button2 = fstartlse;
on (press) {
getURL("gallery.html",'_self');
gallery.html
<head>
<link href="css_pirobox/black/style.css" media="screen" title="black" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/pirobox.1_2_min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$().piroBox({
my_speed: 300, //animation speed
bg_alpha: 0.5, //background opacity
radius: 4, //caption rounded corner
scrollImage : false, // true == image follows the page _|_ false == image remains in the same open position
// in some cases of very large images or long description could be useful.
slideShow : 'true', // true == slideshow on, false == slideshow off
slideSpeed : 3, //slideshow
pirobox_next : 'piro_next', // Nav buttons -> piro_next == inside piroBox , piro_next_out == outside piroBox
pirobox_prev : 'piro_prev', // Nav buttons -> piro_prev == inside piroBox , piro_prev_out == outside piroBox
close_all : '.piro_close' // add class .piro_overlay(with comma)if you want overlay click close piroBox
</script>
<body>
<div class="demo"><a href="images/1_b.jpg" class="pirobox" title="Random Layout 1"><img src="images/1.jpg" /></a></div>
<div class="demo1"><a href="images/2_b.jpg" class="pirobox" title="Random Layout 2"><img src="images/2.jpg" /></a></div>
<div class="demo2"><a href="images/3_b.jpg" class="pirobox" title="Random Layout 3"><img src="images/3.jpg" /></a></div>
</body>
</html> -
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 -
I cannot "capture" the fullScreen display state
Hi,
When trying to get my head around another problem I have with altering content depending on whether the displayState is normal or fullScreen, I tried to set up a feedback/debug box that would send me messages about the displayState. I created a textbox with dynamic text and gave it a variable name, and then wrote a little AS2 tidbit as follows:
if (Stage["displayState"]="normal") {
textbox = ("you're in normal mode");
} else {
textbox = ("you're in fullscreen mode");
When I start the movie and am in normal mode then I get the correct message but when I hit a button to toggle true fullscreen on then the normal message stays on screen.
Obviously I am new to all this, what am I doing wrong?
Thanks!Hi, thanks for your answer. It cleared away some clouds for me.
I think my problem is that I don't understand how actionscript is parsed by the Flashplayer engine. I had placed my if-statement at the bottom of all AS-code, on its own - and as my Flash movie only has one frame and that is the location of all the AS - I thought that the movie would be looping this frame over and over and thus the AS would be parsed over and over. Hence, putting the if-statement at the bottom I thought it would be continually evaluated and sending the correct value to my textbox depending on the displayState.
But when I put the if-statement inside the functions to go/exit fullscreen, then it works, but of course since I intended it as a feedback mechanism it is then redundant since I can see on screen that fullscreen is activiated/disactivated.
1) Perhaps I should focus my question on the parsing issue: I thought that since it is a slideshow gallery that keeps playing and changing images then the script is parsed over and over again? But perhaps the script is only parsed once, and it is its instructions that have told the player to keep changing images? Then I can see why putting the if statement at the bottom did not produce the result I wanted.
2) If I want to change the characteristics of my movie to behave in one way in normal fixed width display and behave differently when it is displaying in fullscreen, should I put all code relating to how it is supposed to display when in fullscreen inside the function that tells it to go fullscreen? And then put all code reverting those changes inside the function that exits fullscreen? (You see the advanced state of my actionscript knowledge!!)
/G
PS. 'textbox.txt' does not produce anything on screen, 'textbox' does. 'textbox' is the variable name of my dynamic text field. -
Gallery widget backgroundcolor full screen
Hello,
I have some different pictures in my gallery widget, but i want to change the backgroundcolor when i touch a picture and this go to fullscreen.
Now is the background black?
Can i change this to a white background?
RobinThe YouTube widget in iWeb no longer functions since the demise of MobileMe. Go to YouTube, get the embed code from the video's page and add it to the HTML snippet in iWeb, not the YouTube widget.
Happy Holidays
Maybe you are looking for
-
VAT 50% availment on Capital Goods
Hi! My client is asking for 50% availament on VAT also in case of cpaital goods purcahse in additonal to normal CENVAT. As per standard now, they can avail CENVAT 50%, but client is expecting same thing to be happen in case of VAT also. how can we ac
-
Content not loading in Dev app.
Hello, I'm producing our companies first DPS publication, this is the first time I've built an app in DPS, so apologies if I'm missing something obvious. Here's the problem, everything is working fine in Adobe Content Viewer (both the emulator and ap
-
Database generating a large number of ORA-1403 errors in Alert Log & trace
Hi, Many ORA-1403: no data found messages appear in the alert log, but users are not seeing this error on their screens. The errors are only generated in the alert log along with an associated trace file. We have not set the "set events 1403 trace" f
-
Hellow, my questions concern ORACLE 11g, First topic Tell me if i'm right: if i set server parameters: memory_max_target to 1.5 GB memory_target to 1GB pga_aggregate_target to 100MB sga_target to 500MB Q1.That's mean DB will use at least 500MB for al
-
Hi Guys, We upgraded to SCCM 2012 SP1 from the RTM yesterday and now our OS Deployment has stopped working. I have tried to update the DP's with the boot images and it keep failing to add drivers. I have also tried to add a Boot Image but this failin