Help with xml flash slideshow
hi,
i have made a sildeshow in flash which loads the pictures
from an xml file and between the transition, it shows a preload
bar. i have attached the code. my problem is that on local machine
it is working absolutely fine but when i upload it on the server
and call it as an external movieclip, it hangs ie., the 1st picture
is not replaced by another. but when i refresh the page, then it
shows 2nd picture but again hangs. and it goes on like that. could
you please help. i am exporting the swf for player 6. its a code
from kirupa.com tutorial.
thanks,
gaurav
code :::
"gaurav_ch" <[email protected]> wrote in
message news:e2k8ge$gus$[email protected]..
> hi,
>
> i have made a sildeshow in flash which loads the
pictures from an xml file and
> between the transition, it shows a preload bar. i have
attached the code. my
> problem is that on local machine it is working
absolutely fine but when i
> upload it on the server and call it as an external
movieclip, it hangs ie., the
> 1st picture is not replaced by another. but when i
refresh the page, then it
> shows 2nd picture but again hangs. and it goes on like
that. could you please
> help. i am exporting the swf for player 6. its a code
from kirupa.com tutorial.
>
> thanks,
>
> gaurav
Better to ask this on the actionscript forum. Also, include
the structure of the whole thing.. the main swf, folders (if any),
how
you are loading the 2nd clip into the main swf like into a
level, or movieclip etc. Also post a link to the swf files on your
website. If you do these things I am sure someone can help
you with it.
tralfaz
Similar Messages
-
Build a web gallery with amazing flash slideshows with dynamic XML files
Build a web gallery with amazing flash slideshows with dynamic XML files
Screenshot:
Features
Features
Transitions, zooming and panning effect You can choose from Random, Wipe from Left, Fade to White, Cross Expansion and other 60-plus transition effects. Zooming and panning effect is optional for advanced flash templates.
XML-driven This flash slideshow are XML-driven. The XML document allows more personalized controls over the flash.
Auto-playback and repeat mode The flash slideshow will play automatically after preloading, and it can repeat playback.
Dynamic customization Besides XML control, the advanced templates provide many more custom options, so that you can create slideshow that fits into your existing web design: width , height, border color, background color, thumbnail size, etc. More about dynamic customization
Usage and demo visit: http://webdesigndevelopment.blog.com...swf-xml-files/Please excuse the bump...
Anyone with a LR flash gallery that starts with slideshow in play mode?
Can it even be set to do this?
The only code in the style.xml that looks like it might be realted is line 12 <playOptions playMode="pause"/>, changing that to "play" does nothing.
Thanks,
Donnie -
Looking to Download Leopard Patch File for XML Flash Slideshow Maker?
Hi I was told that I have to download and install the Leopard
patch for the extension XML Flash Slideshow to work properly with
its style wizard (it isnt loading at the moment). I cant seem to
find it. Is there a source where I can download it.atomic king wrote:
> Hi I was told that I have to download and install the
Leopard patch for the
> extension XML Flash Slideshow to work properly with its
style wizard (it isnt
> loading at the moment). I cant seem to find it. Is there
a source where I can
> download it.
Is the patch you're talking about for Leopard itself, or for
the extension? If the patch is for Leopard, I'd assume that You'd
have to get it from Apple, but I don't know where to look for that.
If the patch is for the extension, then you probably need to go to
the developer's site to see if the patch is posted there, or
contact the developer directly to see where this patch may be if
indeed it is necessary.
Danilo Celic
|
http://blog.extensioneering.com/
| WebAssist Extensioneer
| Adobe Community Expert -
Leopard Patch for XML Flash Slideshow please?
Hi all. I've been searching for hours on end trying to find a patch for the Leopard OS for the XML Flash Slideshow v3 extension (to add an image slideshow) from dwuser.com. The support area of that site leaves much to be desired, but I've read elsewhere that I need "the Leopard patch". Can anyone point me in the right direction to get the appropriate patch, please? Form submissions to dwuser.com have gone unanswered to date. Thank you in advance.....
Monk Fan wrote:
Wow! Did you ever get an answer? I'm going through this right now. The GUI on v3 doesn't display correctly on Snow Leopard with Dreamweaver CS4, so I can't do any advanced editing.
reply to [email protected]
Because this product is not developed by Adobe your best bet is to contact the original developer. -
I need help with XML Gallery Fade in out transition. somebody please help me :(
I need help with XML Gallery Fade in out transition. somebody please help me
I have my post dont want to duplicate itThe problem doesn't lie with your feed, although it does contain an error - you have given a non-existent sub-category. You need to stick to the categories and sub-categories listed here:
http://www.apple.com/itunes/podcasts/specs.html#categories
Subscribing to your feed from the iTunes Store page work as such, but the episodes throw up an error message. The problem lies with your episode media files: you are trying to stream them. Pasting the URL into a browser produces a download (where it should play the file) of a small file which does not play and in fact is a text file containing (in the case of ep.2) this:
[Reference]
Ref1=http://stream.riverratdoc.com/RiverratDoc/episode2.mp3?MSWMExt=.asf
Ref2=http://70.33.177.247:80/RiverratDoc/episode2.mp3?MSWMExt=.asf
You must provide a direct link to the actual mp3 file. Streaming won't work. The test is that if you paste the URL of the media file (as given in the feed) into the address bar of a browser it should play the file. -
Help with a flash html inserting into DW
Hello,
I have created a enquiry section in flash for one of my html DW pages for my site. When I publish the flash doc ti creates a html page (Contact.html). When I open the flash html page in DW or upload it to my server, everything works fine. I recieve an email at my prefered destination etc etc. But as its only a section of my contact page of my website i need to insert it into my site page (get_in_touch.html) soon as i try and take all the stuff from contact.html and insert it into a div in my get_in_touch.html it doesn't respond when the submit button is pressed..... Can someone please help!!!!!
DanThanks for all your help. I've managed to sort out the problem, still not
sure what it was.... My sites live now.
Just one question for you if you dont mind.
The page which has the flash on it (yes this one again!) Well if someone
goes to the page with out having flash player installed on their machine,
i'm looking for some script to detect that there computer doesn't have
Flash and redirect them to another html page I've created.
Would really appreciated any advice you may have.
many thanks,
Dan
pziecina
<[email protected]>
To
09/09/2009 16:40 Daniel Herrington
<[email protected]
m>
Please respond to cc
clearspace-571537347-50
[email protected] Subject
ums.adobe.com Help with a
flash html inserting into DW
Hi
Somewhere above your tag, you will have a line similar to this - Also in your tag the swf file -
These are the files that I said may be wrong or missing.
However if you just edit the flash generated page and include the items you
require in this, and maintain the same file position, you should have no
problems,
PZ -
Help with connection flash builder 4.5 to remote php database
help with connection flash builder 4.5 to remote php database
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader/Autoloader.php' (include_path='.;C:\php5\pear;D:/webserver/apache2/htdocs/ZendFramework/library') in D:\webserver\apache2\htdocs\giga\first-debug\gateway.php on line 27
-
Help with iPhoto '08 - Slideshow & Ken Burns
I need help with creating a slideshow using Ken Burns effects. The basic problem is that some photos are getting cut off. I know I can modify each photo for start/end place, but each time I run the show, the effects are different (one run, slide 1 goes left to right, next run it zooms out, etc.), so I can't tell which photos need to be individually modified. The show is 100+ photos, so I'd rather not modify each one. I was at the Genius Bar yesterday and the guy told me the effect would be consistent once I made the slideshow, so that I could tell which ones to fix manually, but that's not the case. Please help!!
Running: MacBook OS X 10.6.8, iPhoto 7.1.5
Thanks!You can adjust the start and end boxes. You can move them, and you can adjust the size by dragging the corners. However, the box will always be in the same shape as your aspect ratio, (e.g. 16:9 or 4:3)
To do this, click on the Gear icon in your photo to open the Inspector. Go to the Rotate, Crop, Ken Burns Tab of the Inspector.
Message was edited by: AppleMan1958 -
Help with Dreamweaver flash image viewer
Hi all
Would like some help with Dreamweavers Flash image viewer.
Everything is working properly except when i try to link a picture, and have set the imagelinkTarget value to _blank the link always navigates away from my site and does not open in a new window.
I have tried all the values for the imageLinkTarget and nothing works..
Here is my code
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0, 28,0','width','190','height','190','src','images/ad1','quality','high','flashvar s','flashlet={imageLinkTarget:\'_blank\',captionFont:\'Verdana\',titleFont:\'Verdana\',sh owCo ntrols:false,frameShow:false,slideDelay:5,captionSize:14,captionColor:#000000,ti tleSize:10,transitionsType:\'Fade\',titleColor:#333333,slideAutoPlay:true,imageU RLs:[\'images/image1.jpg\',\'images/image2.jpg\',\'images/image3.jpg\',\'images/ image4.jpg\'],slideLoop:true,frameThickness:2,imageLinks:[\'http://www.bowlsaustralia.com.au\',\'http://www.smh.com.au\'],frameColor:#333333,bgColor:# FF9966,imageCaptions:[\'Bowls Australia\',\'Sydney Morning Herald\']}','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFl ash','flash_component','ImageViewer.swc','movie','images/ad1' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0, 28,0" width="190" height="190">
<param name="flash_component" value="ImageViewer.swc" />
<param name="movie" value="images/ad1.swf" />
<param name="quality" value="high" />
<param name="FlashVars" value="flashlet={imageLinkTarget:'_blank',captionFont:'Verdana',titleFont:'Verd ana',showControls:false,frameShow:false,slideDelay:5,captionSize:14,captionColor :#000000,titleSize:10,transitionsType:'Fade',titleColor:#333333,slideAutoPlay:tr ue,imageURLs:['images/image1.jpg','images/image2.jpg','images/image3.jpg','image s/image4.jpg'],slideLoop:true,frameThickness:2,imageLinks:['http://www.bowlsaustralia.com.au','http://www.smh.com.au'],frameColor:#333333,bgColor:#FF9 966,imageCaptions:['Bowls Australia','Sydney Morning Herald']}" />
<embed src="images/ad1.swf" quality="high" flashvars="flashlet={imageLinkTarget:'_blank',captionFont:'Verdana',titleFont:' Verdana',showControls:false,frameShow:false,slideDelay:5,captionSize:14,captionC olor:#000000,titleSize:10,transitionsType:'Fade',titleColor:#333333,slideAutoPla y:true,imageURLs:['images/image1.jpg','images/image2.jpg','images/image3.jpg','i mages/image4.jpg'],slideLoop:true,frameThickness:2,imageLinks:['http://www.bowlsaustralia.com.au','http://www.smh.com.au'],frameColor:#333333,bgColor:#FF9 966,imageCaptions:['Bowls Australia','Sydney Morning Herald']}" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFl ash" type="application/x-shockwave-flash" width="190" height="190"> </embed>
</object>
</noscript>
any help would be greatly appericated
KenI just googled and found lots of folks with the same problem. One fellow wrote this as a soluton:
"All you have to do is
remove the values from the imageLinks in the flash element. That
should fix it."
Does it?
E. Michael Brandt
www.divahtml.com
www.divahtml.com/products/scripts_dreamweaver_extensions.php
Standards-compliant scripts and Dreamweaver Extensions
www.valleywebdesigns.com/vwd_Vdw.asp
JustSo PictureWindow
JustSo PhotoAlbum, et alia -
Help with XML, display data on swipe/click
Hello.
I am trying to create a moibile app that displays XML data. It's basically a phone book. I want the data to change when swiped. I can get the data in just fine. I can get it to display fine. I am not seeing the correct image first, however. I think it's a problem with my imagenum variable.
Then, I want to change what is displayed when the user clicks/swipes on the screen. How do I do that?
stop();
var nameArray:Array = new Array();
var countryArray:Array = new Array();
var portraitArray:Array = new Array();
var flagArray:Array = new Array();
var jobtitleArray:Array = new Array();
var imageNum:Number=0;
var totalImages:Number;
//Load XML
var XMLURLLoader:URLLoader = new URLLoader();
XMLURLLoader.load(new URLRequest("recbook.xml"));
XMLURLLoader.addEventListener(Event.COMPLETE, processXML);
function processXML(event:Event):void {
var theXMLData:XML = new XML(XMLURLLoader.data);
totalImages=theXMLData.name.length();
for (var i:Number =0; i < totalImages; i++){
//push xml data into the arrays
nameArray.push(theXMLData.name[i]);
countryArray.push(theXMLData.country[i]);
portraitArray.push(theXMLData.portrait[i]);
flagArray.push(theXMLData.flag[i]);
jobtitleArray.push(theXMLData.jobtitle[i]);
//data is processed
loadData();
function loadData():void {
var thisPortrait:String = portraitArray[imageNum];
var thisCountry:String = countryArray[imageNum];
var thisName:String = nameArray[imageNum];
var thisJobtitle:String = jobtitleArray[imageNum];
var thisFlag:String = flagArray[imageNum];
var dataLoader:Loader = new Loader();
dataLoader.load(new URLRequest(portraitArray[imageNum]));
dataLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, dataLoaded);
function dataLoaded(event:Event):void {
//I want to start with image 0 (img1.jpg) and cycle through with a mouse click (finger swipe on iOS)
stage.addEventListener(MouseEvent.CLICK, loadMainImage1);
function loadMainImage1(event:MouseEvent):void {
portraitUILoader.source=thisPortrait;
flagUILoader.source=thisFlag;
selectedName.text=thisName;
selectedCountry.text=thisCountry;
selectedJobtitle.text=thisJobtitle;
//add to imageNum (1);
imageNum++;
if (imageNum < totalImages) {//stopping at img2
trace("imageNum " + imageNum);
trace("image name (thisPortrait) " + thisPortrait);//losing image 4 somewhere
loadData();
trace("Total Images " + totalImages);
//click to move past the home screenI'd like to ditch this. don't know how.
homeScreen_mc.addEventListener(MouseEvent.CLICK, goNext);
function goNext(event:MouseEvent):void
nextFrame();
*/here's the output:
imageNum 1
image name (thisPortrait) images/img1.jpg
imageNum 2
image name (thisPortrait) images/img2.jpg
imageNum 3
image name (thisPortrait) images/img3.jpg
Total Images 4
Total Images 4
Total Images 4
Total Images 4
It starts the display on image 1 (the second in the series img2.jpg)*/Thank you.
That helped. I get the correct images in the output, but not in the display. I also get the following error. Any chance you could help with that?
new output after moving the increment:
imageNum 0
image name (thisPortrait) images/img1.jpg
imageNum 1
image name (thisPortrait) images/img2.jpg
imageNum 2
image name (thisPortrait) images/img3.jpg
imageNum 3
image name (thisPortrait) images/img4.jpg
TypeError: Error #2007: Parameter url must be non-null.
at flash.display::Loader/_load()
at flash.display::Loader/load()
at iOS_fla::MainTimeline/loadData()
at iOS_fla::MainTimeline/loadData()
at iOS_fla::MainTimeline/loadData()
at iOS_fla::MainTimeline/loadData()
at iOS_fla::MainTimeline/loadData()
at iOS_fla::MainTimeline/processXML()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete() -
Need Help with a Flash Web Project
Hello, everyone. I am trying to use Flash to make a two-step
system. I want the flash document to, first, allow a person to
upload multiple image files and then, second, for the flash
document be able to create a slideshow with the uploaded images and
fade in and out from each image until the slideshow is over. I want
it to be where the flash document creates its own slideshow with
the images that are uploaded in the first step that I mentioned. I
want it to do it completely on its own so I need to know how to
give it the proper AI so that it can do this task.
So, are there any tips that anyone has on how to do this? Can
anyone tell me exactly how to do this? I really need help with this
for my new website project. Thanks in advance, everyone!The problem with the text not appearing at all has to do with you setting the alpha of the movieclip to 0%. Not within the movieclip, but the movieclip itself. The same for the xray graphic, except you have that as a graphic symbol rather than a movieclip. To have that play while inhabiting one frame you'll need to change it to a movieclip symbol.
To get the text to play after the blinds (just a minor critique, I'd speed up the blinds), you will want to add some code in the frame where you added the stop in the blinds animation. You will also need to assign instance names for the text movieclips in the properties panel, as well as place a stop(); in their first frames (inside).
Let's say you name them upperText and lowerText. Then the code you'd add at the end of the blinds animation (in the stop frame) would be...
_parent.upperText.play();
_parent.lowerText.play();
The "_parent" portion of that is used to target the timeline that is containing the item making the command, basically meaning it's the guy inside the blinds telling the guy outside the blinds to do something.
You'll probably want to add stops to the ends of the text animations as well.
If you want to have the first text trigger the second text, then you'd take that second line above and place it in the last frame of the first text animation instead of the blinds animation.
Note, on occasion, undeterminably, that code above doesn't work for some odd reason... the animation plays to the next frame and stops... so if you run into that, just put a play(); in the second frame to help push it along.
PS GotoandPlay would actually be gotoAndPlay, and for the code above you could substitute play(); with gotoAndPlay(2); -
Need help with XML delay URGENT!!!
Hi i need help making a flash movie to load everything from
xml. It has to load text, images and flv, but, it has to load them
and end them at the time said in the xml. So flash loads and
unloade the text or image or video at the time specified in the
XML! PLEASE HELP I NEED THIS DONE TODAY!!!!! VERY IMPORTANT!!!
Contact me by msn [email protected] or send mail or
reply here!!It was probably a little unclear initially (no offence
intended ) whether your problem was with getting the data from XML
or with the sequencing aspect. I assume that its the sequencing
aspect based on your recent reply.
So if it was me I would parse the loaded info into Date
objects for the load and remove times and have this information
handled by some sort of sequencing code.
At its simplest, you could compare the xml-derived date/times
for load/unload with the current system date/time and use a
setInterval function to initiate the load after the calculated
difference in milliseconds has passed. Similar for the removeclip
timing. -
Hello everybody. I decided to start working with XML since it allows me to load assets externally and edit my applications later very easily without having to edit the fla file itself. So today I watched and read a few tutorials and now I'm trying to build an Event Scroll, all through XML and AS 3.0 code. Basically what I want is to have several events inside a movieclip which I will incorporate into a scroll pane when I'm done, for now I'll focus on extracting data from the XML file and parsing it with AS 3.0. The layout is simple: a thumbnail image on the left, and beside it on the right there is the title of the event, its date and some info about it and all of these should have a dark grey background while the text is in white. Each two events are 30 pixels apart and there are 5 events for now.
Ok enough talking now let's get to the code:
XML Code:
<?xml version="1.0" encoding="utf-8"?>
<EVENTSXML>
<EVENT>
<TITLE> Event 1</TITLE>
<DATE>12/04/2009</DATE>
<THUMB>thumb0.jpg</THUMB>
<INFO> Some Text Goes Here </INFO>
</EVENT>
<EVENT>
<TITLE>Event 2</TITLE>
<DATE>03/02/2009</DATE>
<THUMB>thumb1.jpg</THUMB>
<INFO>Some Text Goes Here</INFO>
</EVENT>
<EVENT>
<TITLE>Event 3</TITLE>
<DATE>18/11/2008</DATE>
<THUMB>thumb2.jpg</THUMB>
<INFO>Some Text Goes Here</INFO>
</EVENT>
<EVENT>
<TITLE>Event 4</TITLE>
<DATE>10/09/2008</DATE>
<THUMB>thumb3.jpg</THUMB>
<INFO>Some Text Goes Here</INFO>
</EVENT>
<EVENT>
<TITLE>Event 5</TITLE>
<DATE>06/08/2008</DATE>
<THUMB>thumb4.jpg</THUMB>
<INFO>Some Text Goes Here</INFO>
</EVENT>
</EVENTSXML>
Actionscript 3.0 Code:
var myXML:XML;
var req:URLRequest = new URLRequest("events.xml");
var ldr:URLLoader = new URLLoader();
ldr.load(req);
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, processXML);
function processXML(e:Event):void
myXML = new XML(e.target.data);
buildEvents(myXML.EVENT);
var eventScroll:MovieClip = new MovieClip();
var padding:Number = 30;
this.addChild(eventScroll);
eventScroll.x = eventScroll.y = padding;
function buildEvents(evnts:XMLList):void
for(var i:uint = 0; i <evnts.length(); i++) {
var eventData:MovieClip = new MovieClip();
eventData.y = (20 + padding) * i;
eventData.itemNum = i;
eventData.title = evnts[i].TITLE;
eventData.date = evnts[i].DATE;
eventData.thumb = evnts[i].THUMB;
eventData.info = evnts[i].INFO;
// thumb container
thisThumb:Sprite = new Sprite();
var ldr:Loader = new Loader()
var req:URLRequest = new URLRequest(eventData.thumb);
ldr.load(req);
thisThumb.addChild(ldr);
eventData.addChild(thisThumb);
eventScroll.addChild(eventData);
now I am stuck there... the application is not done yet and when I publish the file I keep getting errors, these are the errors:
1067: Implicit coercion of a value of type flash.display:Sprite to an unrelated type Class.
Source: thisThumb:Sprite = new Sprite();
1188: Illegal assignment to class Sprite.
Source: thisThumb:Sprite = new Sprite();
1120: Access of undefined property thisThumb.
Source: thisThumb.addChild(ldr);
1120: Access of undefined property thisThumb.
Source: eventData.addChild(thisThumb);
1119: Access of possibly undefined property contentLoaderInfo through a reference with static type flash.net:URLLoader.
Source: ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, processXML);
So where did I go wrong and how can I carry on with my code to finish my application?
P.S: I do not want someone to do it for me, so in case someone decided to help me out, please comment and explain your code because this application is for learning porpuses in the first place... Thanks in advance!oh I've just noticed one little problem, in my info field, the text doesn't break and start a new line, it just keeps going horizontally although I've set it to multiline and gave it a width and height... so what shall I do to fix this problem? here's the code:
var infoF:TextField = new TextField();
infoF.text = eventData.info;
infoF.x = 250;
infoF.y = dateF.y + padding;
infoF.multiline = true;
infoF.width = 200;
infoF.height = 100;
addChild(infoF); -
Help with building flash files for streaming
I filmed a product demonstration for a client who wanted to put it on his website. I edited the footage in PremPro CS4 and exported to Media Encoder as F4V file format. After encoding imported footage into CS4 Encore, created timeline, chose, Flash from Format and swf for output. Progressive Download which allows video to begin playing as it is downloaded (I believe), chose destinations and settings. After transcoding I had 1 file folder, Sources that contained the following files _PGC_Bpge_entryPoint_Bbp_1.f4v, and then 3 separate files, *not* in the file folder called Sources. They are
AuthoredContent.xml, FlashDVD.swf, and Index.html.
I submitted all files to client who gave them to web designer. Designer said these were the wrong files and he could not use them. I called designer and basically he said I didn't know what I was doing. I told him he needed all files to put up the flash video. Anyway, am I missing something, doing something wrong? Are there other files he needs? He said he only needed 1 file. Or is it the designer? I'm not thin skinned so if it's me please tell me so, so I don't make the same errors. Thanks. All suggestions/comments are appreciated!<The client wants a control player, i.e. play, stop, pause, etc., that's it, so the viewer can simply provide the function themselves. This is similar to youtube, blogger, etc.
The web designer can use what you provided, which does what you describe the client wanting. But the web designer may need to integrate what Encore provided onto a web page, and the client may not have made the expectations clear and may not know what is needed. As I said, the Encore to flash player gives almost no options for the player controls and colors etc may be problems.
<Encore did encode the f4v file. When I exported from PremPro what preset should I hve chosen -- mpeg2 DVD, flv/f4v. So the only file he needs in addition to what I gave him is the original f4v file?
I don't know whether the f4v you exported from Premiere was progressive. The f4v from Encore might be fine, or you might need to export from Premiere again.
The other issue is that some "player" with controls needs to be provided by you or the web designer (who may have an issue with the client not getting the designer to lay all this out to begin with). There are several threads about "flv players" you might check out. Does the client have video on his site already? If so, you can figure out what they are using, and it will help with your process.
should I have chosen "flash server" instead of "progressive". i must admit i never did this before. other clients just have me post it to youtube and provide them with embed code.
It depends on what they want. -
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;
Maybe you are looking for
-
Search Help Error while Publishing Query in Explorer
Hi All, We have upgraded BW from version 3.1 to BI 7.0. SP level is 15. When we publish query in Explorer, selection screen appears, we get error in selecting variable(Fiscal Year/Period) entries from search help. After selecting a value from a list
-
How To Stop Iphone 5S From Defaulting To Photo Mode
The default mode for the camera is Photo. Is there anyway to keep it locked on another mode? I would like to keep it locked on the Video mode for instance, but after 5 or 10 minutes it automatically defaults back to the Photo mode. So if I'm not p
-
ABAP Proxy to HTTP Synchronous
Hi All, My scenario is ABAP Proxy to HTTP POST synchronous, while I am trying to execute the scenario I get the following error in SXMB_MONI: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <!-- Call Adapter --> - <SAP:Error SOAP:must
-
Concurrence with ADF business components
I need know, how do I do the concurrence control (connection of several users ) on business components
-
S.O.S about select option in WD
hi experts I have a emergent case that I need to mark a select option as red background when error happens. could anyone give me a solution?