Flash Video Gallery

Hi,does anyone know how to make a Flash Video Gallery that I can add new videos dynamically? just like how XML photo gallery works? Thanks.

Here is a good round up of video galleries:
http://www.lemlinh.com/as3-video-player-tutorials-roundup/
Also google it for more.

Similar Messages

  • Flash Video Gallery Add more thumbnails

    referring to the Flash Video Gallery , If I had more than 36
    thumbnails and did not want to increase the space marked out for
    the
    thumbnails.. and Instead wanted to have a new set of images
    load, jus like in a picture gallery when we click on more... What
    would I do?? The ability to have next and prev to load the
    thumbnails is what I am tryin to achieve. I have gone through all
    of the .as files.. but how to I integrate this feature??
    I am a beginner and and need help.

    Here is a good round up of video galleries:
    http://www.lemlinh.com/as3-video-player-tutorials-roundup/
    Also google it for more.

  • ActionScript 3.0 Flash video gallery Tweak

    Hi,
    Is there a way to remove the 2nd filter option on the
    ActionScript 3.0 Flash video gallery ?
    Sadly our coding guru is away on holiday and we need to try
    and find a solution asap.
    (commenting section out etc just makes it fall over)
    Any help would be most appreciated.
    Cheers,
    Andrew

    To do it in AS2 you need just install the remoting classes again. You can either copy them fro your old install or get them:
    http://drupal.org/node/258605
    Scroll down a bit and you'll see a link to the as2 remoting classes: Remoting_FlashCS3.zip
    In AS3 there are a few ways. Some people have made classes for it, or you can use the built in methods of NetConnection. Here's a couple examples of that:
    http://www.oscartrelles.com/archives/as3_flash_remoting_example
    http://www.flash-db.com/Tutorials/helloAS3/

  • Flash Video Gallery – link to specific video upon launch

    I saw this question asked before when first doing a search on
    this topic, but have yet to see any replies, let alone any that
    work.
    How can I link from within a web page to a specific video
    that is contained within a modified version of
    Adobe's
    Flash video Gallery tutorial?
    When a user clicks on a link that says "View Dr. Jones
    Lecture", I want the Flash Video Gallery to launch with Dr. Jones'
    video loading and playing immediately. As it stands now, the video
    player just wants to wait until someone locates and then clicks on
    the video of their choice WITHIN the video player itself. That is
    fine if a generic "Launch our Video Gallery" link is clicked, but
    not if the user is expecting a specific video to play.
    Any help is very much appreciated.
    Cheers!

    I normally don't like "bumping," but I am still looking for a
    solution to this problem. Thank you in advance.

  • Flash Video Gallery Problem

    Hi All
    I am developing a video Gallery in AS 3.0.
    * I am providing thumbnails and XML is loading external FLvs
    in those thumbnails .
    * The user can either double click or click and drag
    thumbnail to play the main video above the particular line.
    * I am calling external SWFs in the UIloader component for
    playing the main video. That UIloader will be called when the user
    either double clicks on thumbnail or click and drag the thumbnail.
    * Also user can drag the main video wherever he wants, and
    he can drop the main back to the thumbnails too( which will unload
    the video player).
    My problem is that everything is working fine when i run the FLA
    file, but when i closed my application and try to run the
    individual SWF file, the file does not work ( its just
    crashing).
    There are no frames I am using so that's for sure that i did
    not forget to put stop frame.
    All of my code is in the main time line and I haven't used
    any custom classes yet, which means everything is in the actions
    window.
    Am i using the right tool for such a big application? Should I
    switch to FLEX for compiling this file. i am not that familiar with
    FLEX working environment too.
    Please help me out what i am doing wrong and i apologize that
    I could not mail you the code because the file is very very big.
    Also if any better tool is available for this please let me
    know.
    Any kind of help will be highly appreciated.
    Thanks a lot
    Anuj

    Interesting problem.
    I thought initially that this could be easily solved with Action Sequences on the imported SWF file.   Action Sequences will control the visibility, play(), stop() and go to frame, it doesn't stop the audio that has already started playing in the imported SWF.
    I worked around this by
    placing an empty frame "0" in my Flash .fla with SoundMixer.stopAll(); in the ActionScript - then reoutput the SWF
    Imported the SWF and then set an ActionSequence to go to Frame 0 and Stop when I exited the state where I wanted my SWF playing
    Also set an ActionSequence to go to Frame 0 and Play when I wanted my SWF to start playing again
    See the source .fla and .fxp here: TestingSwfSoundStopStart.zip
    Best wishes,
    Tanya

  • Create FLV Video Gallery In Dreamweaver?

    Hi and thanks in advance to those who can offer some advice.
    I'd like to create a Flash Video Gallery with thumbnails that link to video and play on the page.  Only one video screen.  Something like Youtube.
    I'm new to Dreamweaver and have built everything else for the site and the portfolio is the last page where I need to have the video gallery.
    Any tutorials and direction is appreciated.
    Again, I'd like to have one page with thumbnails that plays the video on the page in one window, not multiple windows.
    Thanks!

    Wimpy Rave is absolutely perfect for this type of video gallery.  One media player can handle all your video and audio files seemlessly from a playlist.
    See Examples, Rave Video Playlist.
    http://www.wimpyplayer.com/affiliates/idevaffiliate.php?id=836
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb

  • 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,
    Matt

    I had the same problem. Dan Carr was kind enough to send a
    reply. Here it is:
    quote:
    Getting stuck on the loading screen is a symptom that may
    happen for a number of reasons.
    The loading screen sits above the gallery and obscures the
    screen while the thumbnails and screen assets are loading. The
    loading screen stays in place until all the video thumbnails have
    loaded - so what you're seeing is an issue where 1 or more of your
    videos isn't loading.
    Most commonly this is because the server isn't recognizing
    the FLV mime type or one or more videos didn't get uploaded to the
    path listed in the XMLfile. (Actually, the first time I saw
    something like this it was because there were spaces in the video
    file names - local playback worked as expected, but my server was
    URL-encoding the file names which replaced the spaces with
    different characters and broke the expected paths...)
    I'd recommend that you do the following... In the FLA file,
    select the white rectangle graphic on the "Preloading" layer and
    make it invisible by turning its alpha to 0. This will allow you to
    see which videos are not loading on the server. If none of the
    videos load, this would hint that either the server isn't seeing
    the FLV mime type, the XML file isn't loading, or there is a global
    problem with file naming. (If you see all the labels on the
    filters, you know the XML file loaded.) If most of the videos are
    loading, look for the specific problem videos and check to see that
    the naming is correct and that the files were uploaded to the
    correct location.
    My own issue, as Dan suggested, was that FLV wasn't
    registered on the server.
    Hope this helps others.
    Paul

  • Video Gallery Action Script 3

    I am creating a video gallery off of the demo action script
    3, video gallery, that is shown on this site. I have updated the
    XML file that contains the link to the thumbnails and videos to the
    appropriate url. When I test the project out, I get the following
    error:
    TypeError: Error #1085: The element type "video" must be
    terminated by the matching end-tag "</video>".
    at
    fvg::FlashVideoGallery/fvg:FlashVideoGallery::onDataHandler()
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/flash.net:URLLoader::onComplete()
    I am fairly new to Action Scripts and would really appreciate
    overcoming this hurdle.
    Thanks
    Ari

    arikanoa wrote:
    > I am creating a video gallery off of the demo action
    script 3, video gallery,
    > that is shown on this site. I have updated the XML file
    that contains the link
    > to the thumbnails and videos to the appropriate url.
    When I test the project
    > out, I get the following error:
    >
    > TypeError: Error #1085: The element type "video" must be
    terminated by the
    > matching end-tag "</video>".
    > at
    fvg::FlashVideoGallery/fvg:FlashVideoGallery::onDataHandler()
    > at
    >
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunctio
    > n()
    > at flash.events::EventDispatcher/dispatchEvent()
    > at
    flash.net::URLLoader/flash.net:URLLoader::onComplete()
    >
    > I am fairly new to Action Scripts and would really
    appreciate overcoming this
    > hurdle.
    >
    > Thanks
    >
    > Ari
    >
    > <?xml version="1.0" encoding="utf-8"?>
    > <!--
    > ***************************************
    > Settings.xml
    > Provides a configurable data source for the Flash Video
    > Gallery application.
    >
    > Configurable Settings:
    > - labels: exposes labels for localization.
    > - links: configure main screen links and resulting urls.
    > - filters(1): creates a list for filtering (up to 4
    filters).
    > - filters(2): creates an alternate list for filtering
    (up to 4 filters).
    > - videos: creates a list of video display information.
    >
    > Note: Text nodes are for localization and node
    attributes
    > are not. The exception is the 'url' attributes...
    >
    > Last Modified: March 2, 2007
    > ***************************************
    > -->
    > <flashvideogallery>
    >
    > <!-- Labels for localization -->
    > <labels>
    > <label name="title"><![CDATA[ActionScript 3.0
    Flash Video Gallery]]></label>
    > <label name="welcome"><![CDATA[<b>Click
    on a thumbnail to view
    > details</b>]]></label>
    > <label name="videoPreview"><![CDATA[Webvideo
    Preview]]></label>
    > </labels>
    >
    > <!-- Links for the main screen (up to 8 sidebar
    links) -->
    > <links>
    > <link name="textLink1"
    > url="
    http://www.adobe.com/products/flash/video/"><![CDATA[Learn
    more about
    > Flash video >]]></link>
    > <link name="textLink2"
    > url="
    http://www.adobe.com/devnet/flash/"><![CDATA[Visit
    the Flash Developer
    > Center >]]></link>
    > <link name="textLink3"
    > url="
    http://www.adobe.com/devnet/flash/articles/video_gallery.html"><![CDATA[Exa
    > mine the gallery source files >]]></link>
    > <link name="textLink4" url="
    http://www.adobe.com"><![CDATA[View
    more
    > examples of Flash video >]]></link>
    > <link name="textLink5"
    > url="
    http://www.adobe.com/products/flash/"><![CDATA[Learn
    about Flash CS3
    > Professional >]]></link>
    > <link name="textLink6" url=""/>
    > <link name="textLink7" url=""/>
    > <link name="textLink8" url=""/>
    > </links>
    >
    > <!-- Filter by list #1 (category radio button and up
    to 4 checkbox filters)
    > -->
    > <filters>
    > <filter name="radio1" view="1"><![CDATA[Filter
    videos by industry]]></filter>
    > <filter name="checkbox1" id="i0"
    view="1"><![CDATA[Content]]></filter>
    > <filter name="checkbox2" id="i1"
    view="1"><![CDATA[Entertainment]]></filter>
    > <filter name="checkbox3" id="i2"
    view="1"><![CDATA[Marketing]]></filter>
    > <filter name="checkbox4" id="i3" view="0"/>
    > </filters>
    >
    > <!-- Filter by list #2 (category radio button and up
    to 4 checkbox filters)
    > -->
    > <filters>
    > <filter name="radio2" view="0"><![CDATA[Filter
    videos by region]]></filter>
    > <filter name="checkbox5" id="r0"
    view="1"><![CDATA[Europe]]></filter>
    > <filter name="checkbox6" id="r1"
    view="1"><![CDATA[North America]]></filter>
    > <filter name="checkbox7" id="r2" view="0"/>
    > <filter name="checkbox8" id="r3" view="0"/>
    > </filters>
    >
    > <!-- List up to 36 videos for display in the gallery
    -->
    > <videos>
    > <video
    preview="thumbnails/Qlippit_3_Adam3_pix_to_grandP-26May07-0523PM.flv"
    >
    flv="video/Qlippit_3_Adam3_pix_to_grandP-26May07-0523PM.flv"
    filter2="r1"
    > filter1="i2">
    > <title><![CDATA[Creative
    Bubble]]></title>
    > <description><![CDATA[Creative Bubble needed a
    way to show their demo reels
    > to the largest audience possible with the best
    experience. Their solution is a
    > Flash-based UI that instantly streams video to their
    home page.]]></description>
    > <moreInfo url="
    http://www.adobe.com"><![CDATA[More
    info...]]></moreInfo>
    > </video>
    > </flashvideogallery>
    >
    1st. If you haven't already, get a nice xml editor such as
    http://www.wmhelp.com/download.htm
    free xmlpad editor for windows. Why? because it supports
    editing the
    dating in 3 different ways: Source <which has syntax/tag
    hilighting ,
    Grid , Table.. the grid is easiest to use and helps avoid
    deleting tags
    by mistake, which is what it sounds like you did based on the
    error
    message. If the above was a straight cut and paste of your
    xml file then
    you are missing
    the </videos> tag that belongs between
    </video> and </flashvideogallery>
    I have personally spent the last week playing with the
    example and
    modifying it to have a scrollbar so that i can show more than
    36 videos,
    and have edited the xml files to add more entries.

  • Newbie Flash integration question, for video gallery

    Well I'm a video editor not a web designer, but I get the basic concepts.  Am using Dreamweaver CS4 and Flash CS3 and I have my head around CSS based design and have also managed to get my head around designing an interactive video gallery in Flash.
    I want a HTML based site for web search indexing reasons but I need a video gallery that is broken up into sections, (eg. corporate, public sector, Arts... you get the idea).  If I design a standard web site with navigation bars, do I include three or more categories (e.g., corporate etc) on the main site navigation bar and incorporate separate flash files on each page to show the relevant content for that category or do I include just a general video button on the web site's navigation bar and then navigate to the individual categories within the Flash movie file itself.  The later seems the most logical, but do you experienced web designers find that adding another layer of navigation confuses the end user?  Is there a way maybe of addressing individual sections of the Flash movie from HTML buttons?  What is the best logic to solve this problem and then I can work on a solution?
    Lastly, and I'm sorry for the long post, my site will be very basic so do I really need to incorporate Flash at all; can I address multiple external .flv movies with various buttons within Dreamweaver.    

    Is there a way maybe of addressing individual sections of the Flash
    movie from HTML buttons?
    No.
    Think of it this way:
    Your site has a Nav menu that leads to individual html pages.
    Each page contains a Flash Video Player with a playlist.
    The Playlist contains links to all the FLV clips relating to this page's topic.
    Notice I said clips.  Don't try to use one long playing video on the web.
    This recent discussion may be of interest to you...
    http://forums.adobe.com/message/2760142#2760142
    WWD FLV Player is pretty nice. It's compact, easy to set-up.
    Read the  installation.html that comes with it.
    http://www.woosterwebdesign.com/flvplayer/
    Good luck with your project,
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

  • How can I make a "Youtube" style video gallery for offline, '.air' use?

    I work for a language company and we've put together a set of videos for use in computers, not online.  Currently we're using Apple's Keynote to present our videos to to the student.  This has the advantage of allowing us to put videos in a sequential order, with absolutely no work in the development department, and most importantly was easy for any student to control and navigate.
    Things have now changed.
    Keynote can no longer hold the size of our videos and we are constantly adding and changing videos all the time.  Now that CS5 is out, I would like to build a stand alone flash application for our system modeled after the same look and functionality of youtube. 
    Key features would be:
    • Main video player that links to our resident video files
    • Something that generates and displays a title for the current video
    • A text box below the main video player for notes and instructions
    • a side bar of thumbnails for all related videos, with titles displayed
    Future features would be an easy way for us to change videos in and out of the library (by "uploading" and "downloading" using a form for the videos, although not to the net, but again, on the resident computer).
    It looks like CS5 would make this possible.  My plan is to make a youtube-like site using flash catalyst.  I think I can do it myself since the first version only needs basic elements and design, but I know I'm going to run into some problems because I'm not sure the limitations of catalyst for this style of interactive video gallery. 
    What I'm looking for is someone to just quickly guide, tell, or yell me in the right direction, and I'm really keen (hell-bent?) on trying it out using Flash Catalyst... is this the way?
    Keeping in mind that my first draft only has to be a simple working version of the system, and I can play with the rest later, is any of what I said possible using flash catalyst?
    Thanks in advance to whoever can help me out!

    I doubt MU can do this.  It's pretty limited in scope &  I don't think it supports server-side code which you would need to parse feeds.  But feel free to post your question in the MU forum.  Maybe somebody there has a workaround.
    http://forums.adobe.com/community/muse/help_with_using_adobe_muse
    Nancy O.

  • Need help with xml video gallery

    Hello everyone
    I recently bought a xml video gallery. I'm loading the movie externally into another movie. When the xml gallery loads, it cancels all sounds.
    I need to figure out where in the actionscription can i reverse the cancellation of sounds. Can anyone help? if possible, I can email, whomever is willing to help, the xml gallery to see if theres another reason the sound is being canceled.
    Also, the sound of the gallery doesn't work til you click the volume scroller.
    Here are two parts of actionscript included in the gallery:
    part one:
    // Import filter classes
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    // Set flash variables
    var xmlFileUrl:String = "playlist.xml";
    var auto_play:String = "true";
    // Set xml file URL
    if (_root.xmlfile) {
        xmlFileUrl = _root.xmlfile;
    var V_SRC;
    var thuArray:Array = new Array();
    var currentVideo:Number = 0;
    var totalItems;
    var numOfItems:Number;
    var itemDistance:Number = 120+5;
    var itemHeight:Number = 80+2;
    var Value:Number = 1;
    var boundry:Number = 1;
    var ratio:Number = 1;
    var diff:Number = 1;
    var collectionWidth:Number = 1;
    var buffer:Number = 135*2;
    this.createEmptyMovieClip("video_txt",this.getNextHighestDepth());
    video_txt.createTextField("theText",video_txt.getNextHighestDepth(),0,0,584,36);
    video_txt.theText.selectable = false;
    video_txt.theText.autoSize = "left";
    //The Format
    myFormat = new TextFormat();
    myFormat.font = _root.font_format;
    myFormat.size = _root.font_size;
    myFormat.color = _root.font_color;
    myFormat.align = "center";
    video_txt.theText.setNewTextFormat(myFormat);
    // Create a new movieclip to load the thumbs
    var thumbLoader:MovieClipLoader = new MovieClipLoader();
    var thumbListener:Object = new Object();
    thumbLoader.addListener(thumbListener);
    thumbListener.onLoadInit = function(target_mc:MovieClip, httpStatus:Number)
        new Tween(target_mc, "_alpha", Regular.easeOut, 0, 100, 1, true);
        target_mc._parent.preloader_mc._alpha = 0;
    var xml:XML = new XML();
    xml.ignoreWhite = true;
    xml.onLoad = xmlLoaded;
    xml.load(xmlFileUrl);
    // Load the xml file into the player
    function xmlLoaded(b:Boolean) {
        if (b) {
            auto_play = this.firstChild.firstChild.attributes.auto_play;
            scrollSpeed = parseInt(this.firstChild.firstChild.attributes.scrollSpeed);
            totalItems = this.firstChild.firstChild.childNodes;
            numOfItems = totalItems.length;
            for (j=0; j<numOfItems; j++) {
                var i = player_mc.main_mc.collection_mc.attachMovie("mc_Thumb", "thumb_"+j, j);
                i._x = itemDistance*j;
                thumbLoader.loadClip(totalItems[j].attributes.thumb,i.loader_mc);
                i.id = j;
                i.videoTitle = totalItems[j].attributes.title;
                i.videoUrl = totalItems[j].attributes.src;
                // Create an event for thumb rollover
                i.onRollOver = iRoll;
                i.onRollOut = i.onReleaseOutside=iOut;
                i.onRelease = iRelease;
                thuArray[j] = i;
            // default first video
            collectionWidth = player_mc.main_mc.collection_mc._width;
            currentVideo = 0;
            V_SRC = thuArray[0].videoUrl;
            changeVideo();
            //scope._alpha = 100;
            new Tween(scope, "_alpha", Regular.easeOut, 0, 100, 0.5, true);
        else
            trace("Error! xml file not loaded");
    // onRollOver Events
    function iRoll() {
        player_mc.mc_title.title_txt.htmlText = totalItems[this.id].attributes.title;
        this.light_mc.play();
    function iRelease() {
        currentVideo = this.id;
        changeVideo();
    function changeVideo() {
        V_SRC = thuArray[currentVideo].videoUrl;
        player_mc.loadVideo();
        currentThumb();
        player_mc.mc_title.title_txt.htmlText = thuArray[currentVideo].videoTitle;
        video_txt.theText.text = totalItems[currentVideo].attributes.title;
        player_mc.so.getVolume();
        player_mc.playStatus = 1;
        player_mc.checkStatus();
    function nextVideo() {
        if (currentVideo<(numOfItems-1)) {
            currentVideo++;
        } else {
            currentVideo = 0;
        changeVideo();
    function currentThumb() {
        for (i=0; i<thuArray.length; i++) {
            if (i == currentVideo) {
                thuArray[i].enabled = true;
    // Mouse movement on rollover
    this.onMouseMove = function() {
        collectionWidth = player_mc.main_mc.collection_mc._width;
        boundry = player_mc.main_mc.area_mc._width;
        if ((player_mc.main_mc._ymouse>0) && (player_mc.main_mc._ymouse<itemHeight)) {
            if ((player_mc.main_mc._xmouse>0) && (player_mc.main_mc._xmouse<boundry)) {
                ratio = player_mc.main_mc._xmouse/boundry;
                diff = (collectionWidth-boundry)+buffer;
                Value = Math.floor((-ratio)*diff)+(buffer/2);
        updateAfterEvent();
    this.onEnterFrame = function() {
        // Define movement area and speed
        if (player_mc.main_mc.collection_mc._width>player_mc.main_mc.area_mc._width) {
            player_mc.main_mc.collection_mc._x = Math.round((player_mc.main_mc.collection_mc._x)+((Value-player_mc.main_mc.collection_mc._ x)/scrollSpeed));
            if (player_mc.main_mc.collection_mc._x>0) {
                player_mc.main_mc.collection_mc._x = 0;
            } else if (player_mc.main_mc.collection_mc._x<(player_mc.main_mc.area_mc._width-(player_mc.main_mc. collection_mc._width))) {
                player_mc.main_mc.collection_mc._x = Math.round(player_mc.main_mc.area_mc._width-(player_mc.main_mc.collection_mc._width));
        } else {
            player_mc.main_mc.collection_mc._x = 0;
        updateAfterEvent();
    part two:
    // Define flash variables
    var video_url:String = "";
    var tempx:Number = this._parent._x;
    var tempy:Number = this._parent._y;
    var timeCounter:Number = 0;
    var timeInSeconds:Number = _root.time_counter;
    // Object to listen to onStage Event
    videoObj = vid.videoObj;
    // Setting up the connection
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    var ns:NetStream = new NetStream(nc);
    // Buffer time
    ns.setBufferTime (10);
    videoObj.attachVideo (ns);
    function loadVideo () {
        video_url = _parent.V_SRC;
        trace(video_url);
        ns.play (video_url);
    function checkStatus()
        if (playStatus == 1)
            controls_mc.playPause.gotoAndStop("pause");
            mc_playAgain._visible = false;
            thumbs_out = false;
            title_out = false;
        else
            controls_mc.playPause.gotoAndStop("play");
            mc_playAgain._visible = true;
        } // end else if
        if (so.getVolume() == 0)
            controls_mc.mute_mc.gotoAndStop("mute");
        else
            controls_mc.mute_mc.gotoAndStop("on");
    }; // End of the function
    mc_playAgain._visible = false;
    // Check Status of video
    ns.onStatus = function (info)
        if (info.code == "NetStream.Buffer.Empty")
            mc_buffer._visible = true;
        else if (info.code == "NetStream.Buffer.Full")
            mc_buffer._visible = false;
        else if (info.code == "NetStream.Play.Stop")
            ns.seek(0);
            if (playStatus == 1)
                ns.pause();
                playStatus = 0;
            else
                trace;
            } // end else if
            mc_playAgain._visible = true;
            mc_buffer._visible = false;
            thumbs_out = true;
            title_out = true;
            checkStatus();
        } // end else if
    // Get info about video
    ns.onMetaData = function(infoObject:Object)
        FLVduration = infoObject["duration"];
        relationshipW = infoObject.height / infoObject.width;
        relationshipH = infoObject.width / infoObject.height;
        if (Stage["displayState"] == "fullScreen")
            largeSize ();
        else
            regularSize ();
        if (_parent.auto_play == "false")
            ns.seek(0);
            if (playStatus == 1)
                ns.pause();
                playStatus = 0;
            mc_buffer._visible = false;
            controls_mc.playPause.gotoAndStop("play");
            mc_playAgain._visible = true;
            thumbs_out = true;
            title_out = true;
            _parent.auto_play = "true";
        }// end else if
    var videoInterval = setInterval(videoStatus, 100);
    var amountLoaded;
    var duration;
    // videoStatus on load Event
    function videoStatus()
        amountLoaded = ns.bytesLoaded / ns.bytesTotal;
        controls_mc.mc_progress.mc_buff._width = amountLoaded * 250;
        controls_mc.mc_progress.mc_played._x = ns.time / duration * 250;
        controls_mc.mc_progress.mc_played._xscale = Math.round(ns.time*100/FLVduration);
    }; // End of the function
    function scrubIt()
        ns.seek(Math.floor(controls_mc.mc_progress.mc_played._x / 250 * duration));
    }; // End of the function
    // video time
    var time_interval:Number = setInterval(checkTime, 500, ns);
    function checkTime(ns:NetStream) {
        //current time
        var ns_seconds:Number = ns.time;
        var minutes:Number = Math.floor(ns_seconds/60);
        var seconds = Math.floor(ns_seconds%60);
        sec = seconds;
        min = minutes;
        if (sec<10) {
            sec = "0"+sec;
        if (min<10) {
            min = "0"+min;
        controls_mc.time_txt.time_1.text = min+":"+sec;
        //total time
        var minutes2:Number = Math.floor(FLVduration/60);
        var seconds2 = Math.floor(FLVduration%60);
        sec2 = seconds2;
        min2 = minutes2;
        if (sec2<10) {
            sec2 = "0"+sec2;
        if (min2<10) {
            min2 = "0"+min2;
        controls_mc.time_txt.time_2.text = min2+":"+sec2;
        if (controls_mc.time_txt.time_2.text == "NaN:NaN") {
            controls_mc.time_txt.time_2.text = "00:00";
    setStage ();
    // Object to listen onStage Event
    var stageL:Object = new Object ();
    // function respnsible for content alignment
    function setStage ()
        if (Stage["displayState"] == "fullScreen") {
            tempx = this._parent._x;
            tempy = this._parent._y;
            this._parent._x = 0;
            this._parent._y = 0;
            vidBg_mc._x = 0;
            vidBg_mc._y = 0;
            mc_title._x = 0;
            mc_title._y = -30;
            slide_me._x = 0;
            slide_me._y = 0;
            vidBg_mc._width = Stage.width;
            vidBg_mc._height = Stage.height;
            mc_title._width = Stage.width;
            mc_title._height = Stage.height / 20;
            slide_me._width = Stage.width;
            slide_me._height = Stage.height / 20;
            vid._x = vid._y = 0;
            largeSize ();
            controls_mc._x = Math.round ((Stage.width / 2) - (controls_mc._width / 2));
            controls_mc._y = Math.round (Stage.height - 36);
            mc_playAgain._x = Math.round ((Stage.width / 2) - (mc_playAgain._width / 2));
            mc_playAgain._y = Math.round (Stage.height - 572);
            thumbs_mc._x = Math.round ((Stage.width / 2) - (thumbs_mc._width / 2));
            thumbs_mc._y = Math.round (Stage.height - 115);
            main_mc._x = Math.round ((Stage.width / 2) - (controls_mc._width / 2));;
            hide_mc.onEnterFrame = function () {
                timeCounter = timeCounter + 1;
                if (timeCounter >= timeInSeconds * 30) {
                    timeCounter = 0;
                    controls_mc._alpha = 0;
            this.onMouseMove = function () {
                timeCounter = 0;
                controls_mc._alpha = 100;
        else
            delete hide_mc.onEnterFrame;
            delete this.onMouseMove;
            controls_mc._alpha = 100;
            this._parent._x = tempx;
            this._parent._y = tempy;
            vidBg_mc._width = 600;
            vidBg_mc._height = 360;
            mc_title._width = 600;
            mc_title._height = 30;
            slide_me._width = 600;
            slide_me._height = 30;
            vidBg_mc._x = vid._x = 0;
            vidBg_mc._y = vid._y = 35;
            mc_title._x = vid._x = 0;
            mc_title._y = vid._x = -30;
            slide_me._x = vid._x = 0;
            slide_me._y = vid._y = 35;
            regularSize ();
            controls_mc._x = 0;
            controls_mc._y = 395;
            mc_playAgain._x = 243;
            mc_playAgain._y = 158;
            thumbs_mc._x = 0;
            thumbs_mc._y = 316;
            main_mc._x = 0;
            main_mc._y = 406;
        mc_buffer._x = Math.round (vidBg_mc._x + (vidBg_mc._width / 2));
        mc_buffer._y = Math.round (vidBg_mc._y + (vidBg_mc._height / 2));
    // to apply when stage (browser window) is resized or modified
    stageL.onResize = function () {
        setStage ();
    // attaching object to the stage
    Stage.addListener (stageL);
    MovieClip.prototype.slide = function(yPos) {
        this._y -= (this._y-yPos)/5;
    // tilte actions
    mc_title.onEnterFrame = function()
        if (Stage["displayState"] == "normal" && title_out == false)
            this.slide(5);
        else if (Stage["displayState"] == "normal" && title_out == true)
            this.slide(35);
        if (Stage["displayState"] == "fullScreen" && title_out == false)
            this._y -= (this._y+106)/5;
        else if (Stage["displayState"] == "fullScreen" && title_out == true)
            this.slide(0);
    // thumbs actions
    main_mc.onEnterFrame = function()
        if (Stage["displayState"] == "normal" && thumbs_out == false)
            this.slide(406);
        else if (Stage["displayState"] == "normal" && thumbs_out == true)
            this.slide(299);
        if (Stage["displayState"] == "fullScreen" && thumbs_out == false)
            this._y = Math.round (Stage.height - 0);
        else if (Stage["displayState"] == "fullScreen" && thumbs_out == true)
            this._y = Math.round (Stage.height - 133);
    // Playlist button
    controls_mc.playlist_mc.onRollOver = function ()
        this.gotoAndStop("playlistOver");
    controls_mc.playlist_mc.onRollOut = controls_mc.playlist_mc.onReleaseOutside = function ()
        this.gotoAndStop("playlist");
    // Toggle playlist button
    controls_mc.playlist_mc.onRelease = function ()
        if (thumbs_out == false)
            thumbs_out = true;
            title_out = true;
        else if (thumbs_out == true)
            thumbs_out = false;
            title_out = false;
        } // end if else
    // Define hit area for playPause button
    vid.onPress = controls_mc.playPause.onRelease = function ()
        ns.pause();
        if (playStatus == 1)
            controls_mc.playPause.gotoAndStop("play")
            playStatus = 0;
            checkStatus();
        else if (playStatus == 0)
            controls_mc.playPause.gotoAndStop("pause");
            playStatus = 1;
            checkStatus();
    // playPause button
    controls_mc.playPause.onRollOver = function ()
        if (playStatus == 1)
            this.gotoAndStop("pauseOver");
        else
            this.gotoAndStop("playOver");
        } // end else if
    controls_mc.playPause.onRollOut = controls_mc.playPause.onReleaseOutside = function ()
        if (playStatus == 1)
            this.gotoAndStop("pause");
        else
            this.gotoAndStop("play");
        } // end else if
    // Toggle playPause button
    controls_mc.playPause.onRelease = function ()
        ns.pause();
        if (playStatus == 1)
            this.gotoAndStop("play");
            playStatus = 0;
            checkStatus();
        else if (playStatus == 0)
            this.gotoAndStop("pause");
            playStatus = 1;
            checkStatus();
    controls_mc.skip_mc.onRollOver = function ()
        this.gotoAndStop("skipOver");
    controls_mc.skip_mc.onRollOut = controls_mc.skip_mc.onReleaseOutside = function ()
        this.gotoAndStop("skip");
    controls_mc.skip_mc.onRelease = function ()
        _parent.nextVideo()
    // Play Again button
    mc_playAgain.onRollOver = function ()
        this.gotoAndStop("playAgainOver");
    mc_playAgain.onRollOut = mc_playAgain.onReleaseOutside = function ()
        this.gotoAndStop("playAgain");
    // Toggle Play Again button
    mc_playAgain.onRelease = function ()
        this._visible = false;
        ns.pause();
        playStatus = 1;
        checkStatus();
    // make the seek bar clickable
    controls_mc.mc_progress.mc_buff.onPress = function()
        xpos = controls_mc.mc_progress._xmouse;
        percent = Math.round(xpos/controls_mc.mc_progress._width*100);
        seekTime = percent/100*FLVduration;
        seekTime = Math.round(seekTime*100)/100;
        ns.seek(seekTime);
    // Set volume level
    var s:Sound = new Sound();
    s.setVolume(_root.volume_value);
    controls_mc.mc_soundLevel.mc_volume._xscale = _root.volume_value;
    // Volume control
    controls_mc.mc_soundLevel.onPress = function()
        volumeTo = (this._xmouse / this._width)*100;
        this.mc_volume._xscale = volumeTo;
        s.setVolume(volumeTo);
    // Volume
    _parent.createEmptyMovieClip("vSound", _parent.getNextHighestDepth());
    vSound.attachAudio(ns);
    var so = new Sound(vSound);
    so.setVolume(_root.volume_value);
    // Mute button
    controls_mc.mute_mc.onRollOver = function ()
        if (so.getVolume() >= 1)
            this.gotoAndStop("onOver");
        else
            this.gotoAndStop("muteOver");
        } // end else if
    controls_mc.mute_mc.onRollOut = controls_mc.mute_mc.onReleaseOutside = function ()
        if (so.getVolume() >= 1)
            this.gotoAndStop("on");
        else
            this.gotoAndStop("mute");
        } // end else if
    // Toggle mute button
    controls_mc.mute_mc.onRelease = function ()
        if (so.getVolume() >= 1)
            controls_mc.mc_soundLevel.mc_volume._xscale = 0;
            so.setVolume(0);
            this.gotoAndStop("muteOver");
        else
            controls_mc.mc_soundLevel.mc_volume._xscale = 70;
            so.setVolume(_root.volume_value);
            this.gotoAndStop("onOver");
        } // end else if
    // Resize video proportionaly
    function regularSize ()
        videoObj._width = 600;
        videoObj._height = videoObj._width * relationshipW;
        if (videoObj._height > 360)
            videoObj._height = 360;
            videoObj._width = videoObj._height * relationshipH;
        videoObj.smoothing = true;
        //var scale:Number;
        videoObj._x = (600 - videoObj._width) / 2;
        videoObj._y = (360 - videoObj._height) / 2;
    function largeSize ()
        videoObj._width = Stage.width;
        videoObj._height = videoObj._width * relationshipW;
        if (videoObj._height > Stage.height)
            videoObj._height = Stage.height;
            videoObj._width = videoObj._height * relationshipH;
        videoObj.smoothing = true;
        //var scale:Number;
        videoObj._x = (Stage.width - videoObj._width) / 2;
        videoObj._y = (Stage.height - videoObj._height) / 2;
    // Fullscreen button
    controls_mc.fullscreen_mc.onRollOver = function ()
        if (Stage["displayState"] == "normal")
            this.gotoAndStop("fullOver");
        else
            this.gotoAndStop("fullCloseOver");
        } // end else if
    controls_mc.fullscreen_mc.onRollOut = controls_mc.fullscreen_mc.onReleaseOutside = function ()
        if (Stage["displayState"] == "normal")
            this.gotoAndStop("full");
        else
            this.gotoAndStop("fullClose");
        } // end else if
    // Toggle fullscreen button
    controls_mc.fullscreen_mc.onRelease = function ()
        if (Stage["displayState"] == "normal")
            Stage["displayState"] = "fullscreen";
            _parent.video_txt.theText._visible = false;
        else
            Stage["displayState"] = "normal";
            _parent.video_txt.theText._visible = true;

    if you mean sound works well when the gallery is tested without being loaded into another swf but fails when loaded, change the highlighted line:
    // Import filter classes
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    // Set flash variables
    var xmlFileUrl:String = "playlist.xml";
    var auto_play:String = "true";
    // Set xml file URL
    if (_root.xmlfile) {
        xmlFileUrl = _root.xmlfile;
    var V_SRC;
    var thuArray:Array = new Array();
    var currentVideo:Number = 0;
    var totalItems;
    var numOfItems:Number;
    var itemDistance:Number = 120+5;
    var itemHeight:Number = 80+2;
    var Value:Number = 1;
    var boundry:Number = 1;
    var ratio:Number = 1;
    var diff:Number = 1;
    var collectionWidth:Number = 1;
    var buffer:Number = 135*2;
    this.createEmptyMovieClip("video_txt",this.getNextHighestDepth());
    video_txt.createTextField("theText",video_txt.getNextHighestDepth(),0,0,584,36);
    video_txt.theText.selectable = false;
    video_txt.theText.autoSize = "left";
    //The Format
    myFormat = new TextFormat();
    myFormat.font = _root.font_format;
    myFormat.size = _root.font_size;
    myFormat.color = _root.font_color;
    myFormat.align = "center";
    video_txt.theText.setNewTextFormat(myFormat);
    // Create a new movieclip to load the thumbs
    var thumbLoader:MovieClipLoader = new MovieClipLoader();
    var thumbListener:Object = new Object();
    thumbLoader.addListener(thumbListener);
    thumbListener.onLoadInit = function(target_mc:MovieClip, httpStatus:Number)
        new Tween(target_mc, "_alpha", Regular.easeOut, 0, 100, 1, true);
        target_mc._parent.preloader_mc._alpha = 0;
    var xml:XML = new XML();
    xml.ignoreWhite = true;
    xml.onLoad = xmlLoaded;
    xml.load(xmlFileUrl);
    // Load the xml file into the player
    function xmlLoaded(b:Boolean) {
        if (b) {
            auto_play = this.firstChild.firstChild.attributes.auto_play;
            scrollSpeed = parseInt(this.firstChild.firstChild.attributes.scrollSpeed);
            totalItems = this.firstChild.firstChild.childNodes;
            numOfItems = totalItems.length;
            for (j=0; j<numOfItems; j++) {
                var i = player_mc.main_mc.collection_mc.attachMovie("mc_Thumb", "thumb_"+j, j);
                i._x = itemDistance*j;
                thumbLoader.loadClip(totalItems[j].attributes.thumb,i.loader_mc);
                i.id = j;
                i.videoTitle = totalItems[j].attributes.title;
                i.videoUrl = totalItems[j].attributes.src;
                // Create an event for thumb rollover
                i.onRollOver = iRoll;
                i.onRollOut = i.onReleaseOutside=iOut;
                i.onRelease = iRelease;
                thuArray[j] = i;
            // default first video
            collectionWidth = player_mc.main_mc.collection_mc._width;
            currentVideo = 0;
            V_SRC = thuArray[0].videoUrl;
            changeVideo();
            //scope._alpha = 100;
            new Tween(scope, "_alpha", Regular.easeOut, 0, 100, 0.5, true);
        else
            trace("Error! xml file not loaded");
    // onRollOver Events
    function iRoll() {
        player_mc.mc_title.title_txt.htmlText = totalItems[this.id].attributes.title;
        this.light_mc.play();
    function iRelease() {
        currentVideo = this.id;
        changeVideo();
    function changeVideo() {
        V_SRC = thuArray[currentVideo].videoUrl;
        player_mc.loadVideo();
        currentThumb();
        player_mc.mc_title.title_txt.htmlText = thuArray[currentVideo].videoTitle;
        video_txt.theText.text = totalItems[currentVideo].attributes.title;
        player_mc.so.getVolume();
        player_mc.playStatus = 1;
        player_mc.checkStatus();
    function nextVideo() {
        if (currentVideo<(numOfItems-1)) {
            currentVideo++;
        } else {
            currentVideo = 0;
        changeVideo();
    function currentThumb() {
        for (i=0; i<thuArray.length; i++) {
            if (i == currentVideo) {
                thuArray[i].enabled = true;
    // Mouse movement on rollover
    this.onMouseMove = function() {
        collectionWidth = player_mc.main_mc.collection_mc._width;
        boundry = player_mc.main_mc.area_mc._width;
        if ((player_mc.main_mc._ymouse>0) && (player_mc.main_mc._ymouse<itemHeight)) {
            if ((player_mc.main_mc._xmouse>0) && (player_mc.main_mc._xmouse<boundry)) {
                ratio = player_mc.main_mc._xmouse/boundry;
                diff = (collectionWidth-boundry)+buffer;
                Value = Math.floor((-ratio)*diff)+(buffer/2);
        updateAfterEvent();
    this.onEnterFrame = function() {
        // Define movement area and speed
        if (player_mc.main_mc.collection_mc._width>player_mc.main_mc.area_mc._width) {
            player_mc.main_mc.collection_mc._x = Math.round((player_mc.main_mc.collection_mc._x)+((Value-player_mc.main_mc.colle ction_mc._x)/scrollSpeed));
            if (player_mc.main_mc.collection_mc._x>0) {
                player_mc.main_mc.collection_mc._x = 0;
            } else if (player_mc.main_mc.collection_mc._x<(player_mc.main_mc.area_mc._width-(player_m c.main_mc.collection_mc._width))) {
                player_mc.main_mc.collection_mc._x = Math.round(player_mc.main_mc.area_mc._width-(player_mc.main_mc.collection_mc._w idth));
        } else {
            player_mc.main_mc.collection_mc._x = 0;
        updateAfterEvent();
    part two:
    // Define flash variables
    var video_url:String = "";
    var tempx:Number = this._parent._x;
    var tempy:Number = this._parent._y;
    var timeCounter:Number = 0;
    var timeInSeconds:Number = _root.time_counter;
    // Object to listen to onStage Event
    videoObj = vid.videoObj;
    // Setting up the connection
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    var ns:NetStream = new NetStream(nc);
    // Buffer time
    ns.setBufferTime (10);
    videoObj.attachVideo (ns);
    function loadVideo () {
        video_url = _parent.V_SRC;
        trace(video_url);
        ns.play (video_url);
    function checkStatus()
        if (playStatus == 1)
            controls_mc.playPause.gotoAndStop("pause");
            mc_playAgain._visible = false;
            thumbs_out = false;
            title_out = false;
        else
            controls_mc.playPause.gotoAndStop("play");
            mc_playAgain._visible = true;
        } // end else if
        if (so.getVolume() == 0)
            controls_mc.mute_mc.gotoAndStop("mute");
        else
            controls_mc.mute_mc.gotoAndStop("on");
    }; // End of the function
    mc_playAgain._visible = false;
    // Check Status of video
    ns.onStatus = function (info)
        if (info.code == "NetStream.Buffer.Empty")
            mc_buffer._visible = true;
        else if (info.code == "NetStream.Buffer.Full")
            mc_buffer._visible = false;
        else if (info.code == "NetStream.Play.Stop")
            ns.seek(0);
            if (playStatus == 1)
                ns.pause();
                playStatus = 0;
            else
                trace;
            } // end else if
            mc_playAgain._visible = true;
            mc_buffer._visible = false;
            thumbs_out = true;
            title_out = true;
            checkStatus();
        } // end else if
    // Get info about video
    ns.onMetaData = function(infoObject:Object)
        FLVduration = infoObject["duration"];
        relationshipW = infoObject.height / infoObject.width;
        relationshipH = infoObject.width / infoObject.height;
        if (Stage["displayState"] == "fullScreen")
            largeSize ();
        else
            regularSize ();
        if (_parent.auto_play == "false")
            ns.seek(0);
            if (playStatus == 1)
                ns.pause();
                playStatus = 0;
            mc_buffer._visible = false;
            controls_mc.playPause.gotoAndStop("play");
            mc_playAgain._visible = true;
            thumbs_out = true;
            title_out = true;
            _parent.auto_play = "true";
        }// end else if
    var videoInterval = setInterval(videoStatus, 100);
    var amountLoaded;
    var duration;
    // videoStatus on load Event
    function videoStatus()
        amountLoaded = ns.bytesLoaded / ns.bytesTotal;
        controls_mc.mc_progress.mc_buff._width = amountLoaded * 250;
        controls_mc.mc_progress.mc_played._x = ns.time / duration * 250;
        controls_mc.mc_progress.mc_played._xscale = Math.round(ns.time*100/FLVduration);
    }; // End of the function
    function scrubIt()
        ns.seek(Math.floor(controls_mc.mc_progress.mc_played._x / 250 * duration));
    }; // End of the function
    // video time
    var time_interval:Number = setInterval(checkTime, 500, ns);
    function checkTime(ns:NetStream) {
        //current time
        var ns_seconds:Number = ns.time;
        var minutes:Number = Math.floor(ns_seconds/60);
        var seconds = Math.floor(ns_seconds%60);
        sec = seconds;
        min = minutes;
        if (sec<10) {
            sec = "0"+sec;
        if (min<10) {
            min = "0"+min;
        controls_mc.time_txt.time_1.text = min+":"+sec;
        //total time
        var minutes2:Number = Math.floor(FLVduration/60);
        var seconds2 = Math.floor(FLVduration%60);
        sec2 = seconds2;
        min2 = minutes2;
        if (sec2<10) {
            sec2 = "0"+sec2;
        if (min2<10) {
            min2 = "0"+min2;
        controls_mc.time_txt.time_2.text = min2+":"+sec2;
        if (controls_mc.time_txt.time_2.text == "NaN:NaN") {
            controls_mc.time_txt.time_2.text = "00:00";
    setStage ();
    // Object to listen onStage Event
    var stageL:Object = new Object ();
    // function respnsible for content alignment
    function setStage ()
        if (Stage["displayState"] == "fullScreen") {
            tempx = this._parent._x;
            tempy = this._parent._y;
            this._parent._x = 0;
            this._parent._y = 0;
            vidBg_mc._x = 0;
            vidBg_mc._y = 0;
            mc_title._x = 0;
            mc_title._y = -30;
            slide_me._x = 0;
            slide_me._y = 0;
            vidBg_mc._width = Stage.width;
            vidBg_mc._height = Stage.height;
            mc_title._width = Stage.width;
            mc_title._height = Stage.height / 20;
            slide_me._width = Stage.width;
            slide_me._height = Stage.height / 20;
            vid._x = vid._y = 0;
            largeSize ();
            controls_mc._x = Math.round ((Stage.width / 2) - (controls_mc._width / 2));
            controls_mc._y = Math.round (Stage.height - 36);
            mc_playAgain._x = Math.round ((Stage.width / 2) - (mc_playAgain._width / 2));
            mc_playAgain._y = Math.round (Stage.height - 572);
            thumbs_mc._x = Math.round ((Stage.width / 2) - (thumbs_mc._width / 2));
            thumbs_mc._y = Math.round (Stage.height - 115);
            main_mc._x = Math.round ((Stage.width / 2) - (controls_mc._width / 2));;
            hide_mc.onEnterFrame = function () {
                timeCounter = timeCounter + 1;
                if (timeCounter >= timeInSeconds * 30) {
                    timeCounter = 0;
                    controls_mc._alpha = 0;
            this.onMouseMove = function () {
                timeCounter = 0;
                controls_mc._alpha = 100;
        else
            delete hide_mc.onEnterFrame;
            delete this.onMouseMove;
            controls_mc._alpha = 100;
            this._parent._x = tempx;
            this._parent._y = tempy;
            vidBg_mc._width = 600;
            vidBg_mc._height = 360;
            mc_title._width = 600;
            mc_title._height = 30;
            slide_me._width = 600;
            slide_me._height = 30;
            vidBg_mc._x = vid._x = 0;
            vidBg_mc._y = vid._y = 35;
            mc_title._x = vid._x = 0;
            mc_title._y = vid._x = -30;
            slide_me._x = vid._x = 0;
            slide_me._y = vid._y = 35;
            regularSize ();
            controls_mc._x = 0;
            controls_mc._y = 395;
            mc_playAgain._x = 243;
            mc_playAgain._y = 158;
            thumbs_mc._x = 0;
            thumbs_mc._y = 316;
            main_mc._x = 0;
            main_mc._y = 406;
        mc_buffer._x = Math.round (vidBg_mc._x + (vidBg_mc._width / 2));
        mc_buffer._y = Math.round (vidBg_mc._y + (vidBg_mc._height / 2));
    // to apply when stage (browser window) is resized or modified
    stageL.onResize = function () {
        setStage ();
    // attaching object to the stage
    Stage.addListener (stageL);
    MovieClip.prototype.slide = function(yPos) {
        this._y -= (this._y-yPos)/5;
    // tilte actions
    mc_title.onEnterFrame = function()
        if (Stage["displayState"] == "normal" && title_out == false)
            this.slide(5);
        else if (Stage["displayState"] == "normal" && title_out == true)
            this.slide(35);
        if (Stage["displayState"] == "fullScreen" && title_out == false)
            this._y -= (this._y+106)/5;
        else if (Stage["displayState"] == "fullScreen" && title_out == true)
            this.slide(0);
    // thumbs actions
    main_mc.onEnterFrame = function()
        if (Stage["displayState"] == "normal" && thumbs_out == false)
            this.slide(406);
        else if (Stage["displayState"] == "normal" && thumbs_out == true)
            this.slide(299);
        if (Stage["displayState"] == "fullScreen" && thumbs_out == false)
            this._y = Math.round (Stage.height - 0);
        else if (Stage["displayState"] == "fullScreen" && thumbs_out == true)
            this._y = Math.round (Stage.height - 133);
    // Playlist button
    controls_mc.playlist_mc.onRollOver = function ()
        this.gotoAndStop("playlistOver");
    controls_mc.playlist_mc.onRollOut = controls_mc.playlist_mc.onReleaseOutside = function ()
        this.gotoAndStop("playlist");
    // Toggle playlist button
    controls_mc.playlist_mc.onRelease = function ()
        if (thumbs_out == false)
            thumbs_out = true;
            title_out = true;
        else if (thumbs_out == true)
            thumbs_out = false;
            title_out = false;
        } // end if else
    // Define hit area for playPause button
    vid.onPress = controls_mc.playPause.onRelease = function ()
        ns.pause();
        if (playStatus == 1)
            controls_mc.playPause.gotoAndStop("play")
            playStatus = 0;
            checkStatus();
        else if (playStatus == 0)
            controls_mc.playPause.gotoAndStop("pause");
            playStatus = 1;
            checkStatus();
    // playPause button
    controls_mc.playPause.onRollOver = function ()
        if (playStatus == 1)
            this.gotoAndStop("pauseOver");
        else
            this.gotoAndStop("playOver");
        } // end else if
    controls_mc.playPause.onRollOut = controls_mc.playPause.onReleaseOutside = function ()
        if (playStatus == 1)
            this.gotoAndStop("pause");
        else
            this.gotoAndStop("play");
        } // end else if
    // Toggle playPause button
    controls_mc.playPause.onRelease = function ()
        ns.pause();
        if (playStatus == 1)
            this.gotoAndStop("play");
            playStatus = 0;
            checkStatus();
        else if (playStatus == 0)
            this.gotoAndStop("pause");
            playStatus = 1;
            checkStatus();
    controls_mc.skip_mc.onRollOver = function ()
        this.gotoAndStop("skipOver");
    controls_mc.skip_mc.onRollOut = controls_mc.skip_mc.onReleaseOutside = function ()
        this.gotoAndStop("skip");
    controls_mc.skip_mc.onRelease = function ()
        _parent.nextVideo()
    // Play Again button
    mc_playAgain.onRollOver = function ()
        this.gotoAndStop("playAgainOver");
    mc_playAgain.onRollOut = mc_playAgain.onReleaseOutside = function ()
        this.gotoAndStop("playAgain");
    // Toggle Play Again button
    mc_playAgain.onRelease = function ()
        this._visible = false;
        ns.pause();
        playStatus = 1;
        checkStatus();
    // make the seek bar clickable
    controls_mc.mc_progress.mc_buff.onPress = function()
        xpos = controls_mc.mc_progress._xmouse;
        percent = Math.round(xpos/controls_mc.mc_progress._width*100);
        seekTime = percent/100*FLVduration;
        seekTime = Math.round(seekTime*100)/100;
        ns.seek(seekTime);
    // Set volume level
    var s:Sound = new Sound(this);
    s.setVolume(_root.volume_value);
    controls_mc.mc_soundLevel.mc_volume._xscale = _root.volume_value;
    // Volume control
    controls_mc.mc_soundLevel.onPress = function()
        volumeTo = (this._xmouse / this._width)*100;
        this.mc_volume._xscale = volumeTo;
        s.setVolume(volumeTo);
    // Volume
    _parent.createEmptyMovieClip("vSound", _parent.getNextHighestDepth());
    vSound.attachAudio(ns);
    var so = new Sound(vSound);
    so.setVolume(_root.volume_value);
    // Mute button
    controls_mc.mute_mc.onRollOver = function ()
        if (so.getVolume() >= 1)
            this.gotoAndStop("onOver");
        else
            this.gotoAndStop("muteOver");
        } // end else if
    controls_mc.mute_mc.onRollOut = controls_mc.mute_mc.onReleaseOutside = function ()
        if (so.getVolume() >= 1)
            this.gotoAndStop("on");
        else
            this.gotoAndStop("mute");
        } // end else if
    // Toggle mute button
    controls_mc.mute_mc.onRelease = function ()
        if (so.getVolume() >= 1)
            controls_mc.mc_soundLevel.mc_volume._xscale = 0;
            so.setVolume(0);
            this.gotoAndStop("muteOver");
        else
            controls_mc.mc_soundLevel.mc_volume._xscale = 70;
            so.setVolume(_root.volume_value);
            this.gotoAndStop("onOver");
        } // end else if
    // Resize video proportionaly
    function regularSize ()
        videoObj._width = 600;
        videoObj._height = videoObj._width * relationshipW;
        if (videoObj._height > 360)
            videoObj._height = 360;
            videoObj._width = videoObj._height * relationshipH;
        videoObj.smoothing = true;
        //var scale:Number;
        videoObj._x = (600 - videoObj._width) / 2;
        videoObj._y = (360 - videoObj._height) / 2;
    function largeSize ()
        videoObj._width = Stage.width;
        videoObj._height = videoObj._width * relationshipW;
        if (videoObj._height > Stage.height)
            videoObj._height = Stage.height;
            videoObj._width = videoObj._height * relationshipH;
        videoObj.smoothing = true;
        //var scale:Number;
        videoObj._x = (Stage.width - videoObj._width) / 2;
        videoObj._y = (Stage.height - videoObj._height) / 2;
    // Fullscreen button
    controls_mc.fullscreen_mc.onRollOver = function ()
        if (Stage["displayState"] == "normal")
            this.gotoAndStop("fullOver");
        else
            this.gotoAndStop("fullCloseOver");
        } // end else if
    controls_mc.fullscreen_mc.onRollOut = controls_mc.fullscreen_mc.onReleaseOutside = function ()
        if (Stage["displayState"] == "normal")
            this.gotoAndStop("full");
        else
            this.gotoAndStop("fullClose");
        } // end else if
    // Toggle fullscreen button
    controls_mc.fullscreen_mc.onRelease = function ()
        if (Stage["displayState"] == "normal")
            Stage["displayState"] = "fullscreen";
            _parent.video_txt.theText._visible = false;
        else
            Stage["displayState"] = "normal";
            _parent.video_txt.theText._visible = true;

  • Photoshop's FLASH web gallery - let's make it better

    hello there,
    I have spent many hours trying to solve this problem so any
    time you could spare to take a look at this would be great - i'm
    out of ideas/knowledge.
    Photoshop can produce flash web gallerys through it's
    automate function. These look great and are a very quick and
    elegant solution. If you edit the XML files it produces you can get
    it to load swfs which is fantastic - you can now use the flash
    gallery automate function to load images, animation, and even
    games. But here's the thing that stops it being truly wonderful.
    The gallerys are produced as Flash 6 files which means they refuse
    to load Flash 8 files. If it could produce Flash 8 files then you
    could edit the XML and have it load swfs that contained Flash 8
    video. This means I could do pretty much everything i want to do
    for my website simply by using the flash photo gallery function in
    photoshop and tweeking the XML. Anybody think this might be a
    doddle for them? Help

    hi. i have a problem that i think it is similar.
    i have a gallery on my website made in psd cs3 and if you
    look at the page (
    http://signsofkauai.com/WEBSITE/PictureGallery/gallery.html
    ) you will see the .sfw or the image centering the whole page
    vertically. therefore creating a large space between the navigation
    buttons and the first image. is there a way to make the .sfw to
    align top? i just need the pictures to get closer to top of the
    website so that people dont have to scroll down to see the
    pictures. which file am i supposed to edit and where should i add
    what? (yes i am not experienced in coding :( )

  • NEED HELP remove Video Gallery

    I am importing the video gallery dynamically via Flash professional and in need of help how to remove the sound and where to put the code so the sound stops playing while viewing the otehr pages.
    package 
        import flash.events.*;
        import flash.display.MovieClip;
        import flash.display.Sprite;
        import flash.ui.Keyboard;
        import flash.filters.DropShadowFilter;
        import flash.net.URLLoader;
        import flash.text.*;
        import flash.text.TextField;
        import flash.text.TextFormat;
        import flash.text.Font;
        import flash.net.*;
        import flash.events.MouseEvent;
        import flash.display.Loader;
        import flash.display.BitmapData;
        import flash.events.ProgressEvent;
        import flash.display.Graphics;
        import flash.net.URLRequest;
        import fl.video.*;
        //import gs.*;
    //    import gs.easing.*;
        //Classes for guesture support for mobile devices
        import flash.ui.Multitouch;
        import flash.ui.MultitouchInputMode;
        import flash.events.TransformGestureEvent;
        //Custom classes
        import com.other.TextHandle;
        import com.other.Mp3Player;
        //Greensock tween class for better tweens
        import com.greensock.*;
        import com.greensock.TweenMax;
        import com.greensock.TweenLite;
        import com.greensock.easing.*;
        import flash.media.Sound;
        import flash.media.SoundChannel;
        import com.greensock.events.LoaderEvent;
        import com.greensock.plugins.*;
        TweenPlugin.activate([VolumePlugin]);
        public class Portfolio extends MovieClip
            //Declare movieclips for backgrounds
            var myBg1:MovieClip;
            var myBg2:MovieClip;
            var myBg3:MovieClip;
            var myBg4:MovieClip;
            var myBg5:MovieClip;
            var myBgHome:MovieClip;
            //Declare movieclips for nav buttons
            var myBtn01:MovieClip;
            var myBtn02:MovieClip;
            var myBtn03:MovieClip;
            var myBtn04:MovieClip;
            var myBtn05:MovieClip;
            var mybackBtn:MovieClip;
            var player:Mp3Player
            //var slideItem:SlideItem;
            var tempContainer:Sprite;
            var hiddenOptions:Boolean;
            var optionsMenu:MovieClip;
            var myXML:XML;
            var myLoader:URLLoader = new URLLoader();
            var myThumb:Loader;
            var myTextField:TextField;
            var myTxt:TextField;
            // Video Classes
            var thumbWidth:Number;
            var thumbHeight:Number;
            var thumbX:Number;
            var thumbY:Number;
            var videoX:Number;
            var videoY:Number;
            var myVideos:XMLList;
            var totalVideos:int;
            var videoContainer:MovieClip;
            var thumbs:MovieClip;
            var titles:MovieClip;
            var videoPlayer:FLVPlayback;
            // ImageGallery Classes
            public function Portfolio()
                myLoader.load(new URLRequest("myFirstXML.xml"));
                myLoader.addEventListener(Event.COMPLETE, processXML);
                // constructor code
                firstPage();
                makeMenu();
                homePage();
                /* EXAMPLE OF USING GESTURE SUPPORT ON A MOBILE DEVICE */
                Multitouch.inputMode = MultitouchInputMode.GESTURE;
                //slideItem = new SlideItem();
                /* Center the image */
                //slideItem.x = stage.stageWidth * 0.5;
                //slideItem.y = stage.stageHeight * 0.5;
                //addChild(slideItem);
                //listeners('add', slideItem); //see function for more detail
                // TextHandle Class for TextFields
                var Intro:TextHandle = new TextHandle("My Portfolio","Arial");
                //OR with more optional details e.g. var a:TextHandle = new TextHandle("some text","Cooper Black",150);
                addChild(Intro);
                //Mp3Player Class for loading in sounds
                player = new Mp3Player();
                player.play('DwightQ3.mp3');
                /*Blur filter API*/
                var dropShadow:DropShadowFilter = new DropShadowFilter();
                dropShadow.color = 0x000000;
                dropShadow.blurX = 3;
                dropShadow.blurY = 3;
                dropShadow.angle = 45;
                dropShadow.alpha = 0.5;
                dropShadow.distance = 5;
                var filtersArray:Array = new Array(dropShadow);
                Intro.filters = filtersArray;
            // VIDEO GALLERY
            public function VideoGallery()
                // constructor code
                var myXMLLoader:URLLoader = new URLLoader();
                myXMLLoader.load (new URLRequest("myVideoXML.xml"));
                myXMLLoader.addEventListener (Event.COMPLETE, processXML);
            function processXML (e:Event):void
                myXML = new XML(e.target.data);
                //Get attributes from XML document
                thumbWidth = myXML.@THUMB_WIDTH;
                thumbHeight = myXML.@THUMB_HEIGHT;
                thumbX = myXML.@THUMB_X;
                thumbY = myXML.@THUMB_Y;
                thumbX = myXML.@VIDEO_X;
                thumbY = myXML.@VIDEO_Y;
                //Get Element information from VIDEO tags
                myVideos = myXML.VIDEO;
                //Count the number of Elements with VIDEO tags
                totalVideos = myVideos.length();
                makeContainers();
                callThumbs();
                makePlayer();
            function makeContainers():void
                videoContainer = new MovieClip();
                addChild (videoContainer);
                thumbs = new MovieClip();
                thumbs.x = 20;
                thumbs.y = 400;
                thumbs.buttonMode = true;
                videoContainer.addChild(thumbs);
                thumbs.addEventListener(MouseEvent.CLICK,playVideo);
                thumbs.addEventListener(MouseEvent.MOUSE_OVER,onOverThumb);
                thumbs.addEventListener(MouseEvent.MOUSE_OUT,onOutThumb);
                titles = new MovieClip();
                titles.x = 20;
                titles.y = 330;
                videoContainer.addChild(titles);
            function callThumbs ():void
                for (var i:Number = 0; i <totalVideos; i++)
                    trace(myVideos[i].THUMB);
                    var thumbURL = myVideos[i].THUMB;
                    var thumbLoader = new Loader();
                    thumbLoader.name = i;
                    thumbLoader.load(new URLRequest(thumbURL));
                    thumbLoader.contentLoaderInfo.addEventListener (Event.COMPLETE,thumbLoaded);
                    //Change spaces for thumnails vertically
                    thumbLoader.x = (thumbHeight+90)*i;
                    var thumbTitle = myVideos[i].TITLE;
                    var titleTXT:TextField = new TextField();
                    titleTXT.text = thumbTitle;
                    titleTXT.y = thumbTitle;
                    //Change spaces for thumbnails horizontally
                    titleTXT.x = (thumbWidth + 1)*i;
                    titleTXT.width = thumbWidth;
                    titleTXT.height = thumbHeight;
                    titleTXT.wordWrap = true;
                    titles.addChild (titleTXT);
            function thumbLoaded (e:Event):void
                var myThumb:Loader = Loader (e.target.loader);
                thumbs.addChild(myThumb);
            function makePlayer():void
                videoPlayer = new FLVPlayback();
                videoPlayer.skin ="SkinUnderPlaySeekStop.swf";trace("noerror");
                videoPlayer.skinBackgroundColor = 0x0099FF;
                videoPlayer.skinBackgroundAlpha = 0.85;
                videoPlayer.x = 100;
                videoPlayer.y = 30;
                //240p settings for 16:9 resolution
                //width would = 320 on 4:3 resoloution
                videoPlayer.width = 432;
                videoPlayer.height=240;
                //480p settings for 16:9 resolution
                //.width would = 640 on 4:3 resoloution
                //videoPlayer.width = 854;
                //videoPlayer.height = 480;
                //1280x720p or 1920x1080p are unliely on most current mobile devices
                videoContainer.addChild(videoPlayer);
                videoPlayer.source = myXML.VIDEO.URL[0];
                //Skip some time in the video (Do not need this if you want to start at the beginning of video)
                videoPlayer.playheadTime = Math.random()*0;
                smoothVideo()
                videoPlayer.addEventListener(fl.video.VideoEvent.COMPLETE,completePlay);
                //Once recieved metadata then do something
                videoPlayer.addEventListener(MetadataEvent.METADATA_RECEIVED,onVideoDataRecived);
                //videoPlayer.addEventListener(VideoEvent.STATE_CHANGE,videoHandler);
            function smoothVideo()
                var myVideo = videoPlayer.getVideoPlayer(0);
                myVideo.smoothing = true;
            function onVideoDataRecived(e:MetadataEvent)
                trace(videoPlayer.totalTime);
                //trace(videoPlayer.bytesLoaded);
                //trace(videoPlayer.bytesTotal);
                //videoPlayer.playheadTime = 50;
            function playVideo (e:MouseEvent):void
                var videoURL = myVideos[e.target.name].URL;
                trace (videoURL);
                videoPlayer.source = videoURL;
                //videoPlayer.autoPlay = false;
            function onOverThumb (e:MouseEvent):void
                var myThumb:Loader = Loader(e.target);
                myThumb.alpha = 0.5;
            function onOutThumb (e:MouseEvent):void
                var myThumb:Loader = Loader (e.target);
                myThumb.alpha = 1;
            function completePlay (e:fl.video.VideoEvent):void
                videoPlayer.alpha = 0.2;
            function stopVideo(evt:MouseEvent): void {
            FUNCTIONS THAT:
                     RECEIVE THE MOUSE EVENTS FROM THE MENU
                     CLEAR THE MENU EVENT LISTENERS
                     CLEAR THE SCREEN
                     GOTO THE REQUIRED PAGE FUNCTION
            function gotoPage1(e:MouseEvent)
                clearMenuListeners()
                clearScreen();
                firstPage();
                loadImage(0);
                loadImage2(1);
                maketext()   
            function gotoPage2(e:MouseEvent)
                clearMenuListeners()
                clearScreen();
                secondPage();
            function gotoPage3(e:MouseEvent)
                clearMenuListeners()
                clearScreen();
                thirdPage();
            function gotoPage4(e:MouseEvent)
                clearMenuListeners()
                clearScreen();
                fourthPage();
            function gotoPage5(e:MouseEvent)
                clearMenuListeners()
                clearScreen();
                fifthPage();
                makeContainers(); trace ("moo");
                callThumbs(); trace ("boo");
                VideoGallery(); trace ("weee");
            function gotoHomePage(e:MouseEvent)
                clearMenuListeners()
                clearScreen();
                homePage();
                //player.play("DwightQ3.mp3");
            FUNCTIONS THAT:
                     MAKE THE PAGES
            function homePage()
                myBgHome = new BgStripes();
                addChild(myBgHome);
                makeMenu();
                trace("Homepage");
            function firstPage()
                myBgHome = new bgAll();
                addChild(myBgHome);
                mybackBtn = new backBtn();
                mybackBtn.x = 720;
                mybackBtn.y = 40;
                addChild(mybackBtn);
                mybackBtn.addEventListener(MouseEvent.CLICK, gotoHomePage); trace("firstpage");
            function secondPage()
                myBgHome = new bgAll();
                addChild(myBgHome);
                mybackBtn = new backBtn();
                mybackBtn.x = 720;
                mybackBtn.y = 40;
                addChild(mybackBtn);
                mybackBtn.addEventListener(MouseEvent.CLICK, gotoHomePage); trace("secondpage");
                myBtn04 = new btnDesign();
                myBtn04.x = 100;
                myBtn04.y = 100;
                addChild(myBtn04);
                myBtn04.addEventListener(MouseEvent.CLICK, gotoPage4);
                myBtn05 = new btnMedia();
                myBtn05.x = 400;
                myBtn05.y = 100;
                addChild(myBtn05);
                myBtn05.addEventListener(MouseEvent.CLICK, gotoPage5);
            function thirdPage()
                myBgHome = new bgAll();
                addChild(myBgHome);
                mybackBtn = new backBtn();
                mybackBtn.x = 720;
                mybackBtn.y = 40;
                addChild(mybackBtn);
                mybackBtn.addEventListener(MouseEvent.CLICK, gotoHomePage); trace("thirdpage");
            function fourthPage()
                myBgHome = new bgAll();
                addChild(myBgHome);
                mybackBtn = new backBtn();
                mybackBtn.x = 720;
                mybackBtn.y = 40;
                addChild(mybackBtn);
                mybackBtn.addEventListener(MouseEvent.CLICK, gotoHomePage); trace("fourthpage");
                videoContainer = new MovieClip();
                addChild (videoContainer);
                thumbs = new MovieClip();
                thumbs.x = thumbX;
                thumbs.y = thumbY;
                thumbs.buttonMode = true;
                videoContainer.addChild(thumbs);
                thumbs.addEventListener(MouseEvent.CLICK,playVideo);
                thumbs.addEventListener(MouseEvent.MOUSE_OVER,onOverThumb);
                thumbs.addEventListener(MouseEvent.MOUSE_OUT,onOutThumb);
            function fifthPage()
                myBgHome = new bgAll();
                addChild(myBgHome);
                mybackBtn = new backBtn();
                mybackBtn.x = 720;
                mybackBtn.y = 40;
                addChild(mybackBtn);
                mybackBtn.addEventListener(MouseEvent.CLICK, gotoHomePage); trace("fifthpage");
                    function clearScreen()
                //Clear all movieclips from the display list
                    while (numChildren > 0){ removeChildAt(0); }
            function clearMenuListeners()
                //Remove event listeners to prevent double ups when menu is added again
                myBtn01.removeEventListener(MouseEvent.CLICK, gotoPage1);
                myBtn02.removeEventListener(MouseEvent.CLICK, gotoPage2);
                myBtn03.removeEventListener(MouseEvent.CLICK, gotoPage3);
                mybackBtn.removeEventListener(MouseEvent.CLICK, gotoHomePage);
            function makeMenu()
                //Place buttons and add event listeners to receive mouse clicks
                myBtn01 = new mcAbout();
                myBtn01.x = 260;
                myBtn01.y = 500;
                addChild(myBtn01);
                myBtn01.addEventListener(MouseEvent.CLICK, gotoPage1);
                TweenMax.to(myBtn01, 0.5, {x:260, y:450});
                myBtn02 = new mcPortfolio();
                myBtn02.x = 400;
                myBtn02.y = 500;
                addChild(myBtn02);
                myBtn02.addEventListener(MouseEvent.CLICK, gotoPage2);
                TweenMax.to(myBtn02, 0.5, {x:400, y:450});
                myBtn03 = new mcContact();
                myBtn03.x = 540;
                myBtn03.y = 500;
                addChild(myBtn03);
                myBtn03.addEventListener(MouseEvent.CLICK, gotoPage3);
                TweenMax.to(myBtn03, 0.5, {x:540, y:450});

    use:
    package 
        import flash.events.*;
        import flash.display.MovieClip;
        import flash.display.Sprite;
        import flash.ui.Keyboard;
        import flash.filters.DropShadowFilter;
        import flash.net.URLLoader;
        import flash.text.*;
        import flash.text.TextField;
        import flash.text.TextFormat;
        import flash.text.Font;
        import flash.net.*;
        import flash.events.MouseEvent;
        import flash.display.Loader;
        import flash.display.BitmapData;
        import flash.events.ProgressEvent;
        import flash.display.Graphics;
        import flash.net.URLRequest;
        import fl.video.*;
        //import gs.*;
    //    import gs.easing.*;
        //Classes for guesture support for mobile devices
        import flash.ui.Multitouch;
        import flash.ui.MultitouchInputMode;
        import flash.events.TransformGestureEvent;
        //Custom classes
        import com.other.TextHandle;
        import com.other.Mp3Player;
        //Greensock tween class for better tweens
        import com.greensock.*;
        import com.greensock.TweenMax;
        import com.greensock.TweenLite;
        import com.greensock.easing.*;
        import flash.media.Sound;
        import flash.media.SoundChannel;
        import com.greensock.events.LoaderEvent;
        import com.greensock.plugins.*;
        TweenPlugin.activate([VolumePlugin]);
        public class Portfolio extends MovieClip
            //Declare movieclips for backgrounds
            var myBg1:MovieClip;
            var myBg2:MovieClip;
            var myBg3:MovieClip;
            var myBg4:MovieClip;
            var myBg5:MovieClip;
            var myBgHome:MovieClip;
            //Declare movieclips for nav buttons
            var myBtn01:MovieClip;
            var myBtn02:MovieClip;
            var myBtn03:MovieClip;
            var myBtn04:MovieClip;
            var myBtn05:MovieClip;
            var mybackBtn:MovieClip;
            var player:Mp3Player
            //var slideItem:SlideItem;
            var tempContainer:Sprite;
            var hiddenOptions:Boolean;
            var optionsMenu:MovieClip;
            var myXML:XML;
            var myLoader:URLLoader = new URLLoader();
            var myThumb:Loader;
            var myTextField:TextField;
            var myTxt:TextField;
            // Video Classes
            var thumbWidth:Number;
            var thumbHeight:Number;
            var thumbX:Number;
            var thumbY:Number;
            var videoX:Number;
            var videoY:Number;
            var myVideos:XMLList;
            var totalVideos:int;
            var videoContainer:MovieClip;
            var thumbs:MovieClip;
            var titles:MovieClip;
            var videoPlayer:FLVPlayback;
            // ImageGallery Classes
            public function Portfolio()
                myLoader.load(new URLRequest("myFirstXML.xml"));
                myLoader.addEventListener(Event.COMPLETE, processXML);
                // constructor code
                firstPage();
                makeMenu();
                homePage();
                /* EXAMPLE OF USING GESTURE SUPPORT ON A MOBILE DEVICE */
                Multitouch.inputMode = MultitouchInputMode.GESTURE;
                //slideItem = new SlideItem();
                /* Center the image */
                //slideItem.x = stage.stageWidth * 0.5;
                //slideItem.y = stage.stageHeight * 0.5;
                //addChild(slideItem);
                //listeners('add', slideItem); //see function for more detail
                // TextHandle Class for TextFields
                var Intro:TextHandle = new TextHandle("My Portfolio","Arial");
                //OR with more optional details e.g. var a:TextHandle = new TextHandle("some text","Cooper Black",150);
                addChild(Intro);
                //Mp3Player Class for loading in sounds
                player = new Mp3Player();
                player.play('DwightQ3.mp3');
                /*Blur filter API*/
                var dropShadow:DropShadowFilter = new DropShadowFilter();
                dropShadow.color = 0x000000;
                dropShadow.blurX = 3;
                dropShadow.blurY = 3;
                dropShadow.angle = 45;
                dropShadow.alpha = 0.5;
                dropShadow.distance = 5;
                var filtersArray:Array = new Array(dropShadow);
                Intro.filters = filtersArray;
            // VIDEO GALLERY
            public function VideoGallery()
                // constructor code
                var myXMLLoader:URLLoader = new URLLoader();
                myXMLLoader.load (new URLRequest("myVideoXML.xml"));
                myXMLLoader.addEventListener (Event.COMPLETE, processXML);
            function processXML (e:Event):void
                myXML = new XML(e.target.data);
                //Get attributes from XML document
                thumbWidth = myXML.@THUMB_WIDTH;
                thumbHeight = myXML.@THUMB_HEIGHT;
                thumbX = myXML.@THUMB_X;
                thumbY = myXML.@THUMB_Y;
                thumbX = myXML.@VIDEO_X;
                thumbY = myXML.@VIDEO_Y;
                //Get Element information from VIDEO tags
                myVideos = myXML.VIDEO;
                //Count the number of Elements with VIDEO tags
                totalVideos = myVideos.length();
                makeContainers();
                callThumbs();
                makePlayer();
            function makeContainers():void
                videoContainer = new MovieClip();
                addChild (videoContainer);
                thumbs = new MovieClip();
                thumbs.x = 20;
                thumbs.y = 400;
                thumbs.buttonMode = true;
                videoContainer.addChild(thumbs);
                thumbs.addEventListener(MouseEvent.CLICK,playVideo);
                thumbs.addEventListener(MouseEvent.MOUSE_OVER,onOverThumb);
                thumbs.addEventListener(MouseEvent.MOUSE_OUT,onOutThumb);
                titles = new MovieClip();
                titles.x = 20;
                titles.y = 330;
                videoContainer.addChild(titles);
            function callThumbs ():void
                for (var i:Number = 0; i <totalVideos; i++)
                    trace(myVideos[i].THUMB);
                    var thumbURL = myVideos[i].THUMB;
                    var thumbLoader = new Loader();
                    thumbLoader.name = i;
                    thumbLoader.load(new URLRequest(thumbURL));
                    thumbLoader.contentLoaderInfo.addEventListener (Event.COMPLETE,thumbLoaded);
                    //Change spaces for thumnails vertically
                    thumbLoader.x = (thumbHeight+90)*i;
                    var thumbTitle = myVideos[i].TITLE;
                    var titleTXT:TextField = new TextField();
                    titleTXT.text = thumbTitle;
                    titleTXT.y = thumbTitle;
                    //Change spaces for thumbnails horizontally
                    titleTXT.x = (thumbWidth + 1)*i;
                    titleTXT.width = thumbWidth;
                    titleTXT.height = thumbHeight;
                    titleTXT.wordWrap = true;
                    titles.addChild (titleTXT);
            function thumbLoaded (e:Event):void
                var myThumb:Loader = Loader (e.target.loader);
                thumbs.addChild(myThumb);
            function makePlayer():void
                videoPlayer = new FLVPlayback();
                videoPlayer.skin ="SkinUnderPlaySeekStop.swf";trace("noerror");
                videoPlayer.skinBackgroundColor = 0x0099FF;
                videoPlayer.skinBackgroundAlpha = 0.85;
                videoPlayer.x = 100;
                videoPlayer.y = 30;
                //240p settings for 16:9 resolution
                //width would = 320 on 4:3 resoloution
                videoPlayer.width = 432;
                videoPlayer.height=240;
                //480p settings for 16:9 resolution
                //.width would = 640 on 4:3 resoloution
                //videoPlayer.width = 854;
                //videoPlayer.height = 480;
                //1280x720p or 1920x1080p are unliely on most current mobile devices
                videoContainer.addChild(videoPlayer);
                videoPlayer.source = myXML.VIDEO.URL[0];
                //Skip some time in the video (Do not need this if you want to start at the beginning of video)
                videoPlayer.playheadTime = Math.random()*0;
                smoothVideo()
                videoPlayer.addEventListener(fl.video.VideoEvent.COMPLETE,completePla y);
                //Once recieved metadata then do something
                videoPlayer.addEventListener(MetadataEvent.METADATA_RECEIVED,onVideoD ataRecived);
                //videoPlayer.addEventListener(VideoEvent.STATE_CHANGE,videoHandler);
            function smoothVideo()
                var myVideo = videoPlayer.getVideoPlayer(0);
                myVideo.smoothing = true;
            function onVideoDataRecived(e:MetadataEvent)
                trace(videoPlayer.totalTime);
                //trace(videoPlayer.bytesLoaded);
                //trace(videoPlayer.bytesTotal);
                //videoPlayer.playheadTime = 50;
            function playVideo (e:MouseEvent):void
                var videoURL = myVideos[e.target.name].URL;
                trace (videoURL);
                videoPlayer.source = videoURL;
                //videoPlayer.autoPlay = false;
            function onOverThumb (e:MouseEvent):void
                var myThumb:Loader = Loader(e.target);
                myThumb.alpha = 0.5;
            function onOutThumb (e:MouseEvent):void
                var myThumb:Loader = Loader (e.target);
                myThumb.alpha = 1;
            function completePlay (e:fl.video.VideoEvent):void
                videoPlayer.alpha = 0.2;
            function stopVideo(evt:MouseEvent): void {
            FUNCTIONS THAT:
                     RECEIVE THE MOUSE EVENTS FROM THE MENU
                     CLEAR THE MENU EVENT LISTENERS
                     CLEAR THE SCREEN
                     GOTO THE REQUIRED PAGE FUNCTION
            function gotoPage1(e:MouseEvent)
                clearMenuListeners()
                clearScreen();
                firstPage();
                loadImage(0);
                loadImage2(1);
                maketext()   
            function gotoPage2(e:MouseEvent)
                clearMenuListeners()
                clearScreen();
                secondPage();
            function gotoPage3(e:MouseEvent)
                clearMenuListeners()
                clearScreen();
                thirdPage();
            function gotoPage4(e:MouseEvent)
                clearMenuListeners()
                clearScreen();
                fourthPage();
            function gotoPage5(e:MouseEvent)
                clearMenuListeners()
                clearScreen();
                fifthPage();
                makeContainers(); trace ("moo");
                callThumbs(); trace ("boo");
                VideoGallery(); trace ("weee");
            function gotoHomePage(e:MouseEvent)
                clearMenuListeners()
                clearScreen();
                homePage();
    videoPlayer.stop();
                //player.play("DwightQ3.mp3");
            FUNCTIONS THAT:
                     MAKE THE PAGES
            function homePage()
                myBgHome = new BgStripes();
                addChild(myBgHome);
                makeMenu();
                trace("Homepage");
            function firstPage()
                myBgHome = new bgAll();
                addChild(myBgHome);
                mybackBtn = new backBtn();
                mybackBtn.x = 720;
                mybackBtn.y = 40;
                addChild(mybackBtn);
                mybackBtn.addEventListener(MouseEvent.CLICK, gotoHomePage); trace("firstpage");
            function secondPage()
                myBgHome = new bgAll();
                addChild(myBgHome);
                mybackBtn = new backBtn();
                mybackBtn.x = 720;
                mybackBtn.y = 40;
                addChild(mybackBtn);
                mybackBtn.addEventListener(MouseEvent.CLICK, gotoHomePage); trace("secondpage");
                myBtn04 = new btnDesign();
                myBtn04.x = 100;
                myBtn04.y = 100;
                addChild(myBtn04);
                myBtn04.addEventListener(MouseEvent.CLICK, gotoPage4);
                myBtn05 = new btnMedia();
                myBtn05.x = 400;
                myBtn05.y = 100;
                addChild(myBtn05);
                myBtn05.addEventListener(MouseEvent.CLICK, gotoPage5);
            function thirdPage()
                myBgHome = new bgAll();
                addChild(myBgHome);
                mybackBtn = new backBtn();
                mybackBtn.x = 720;
                mybackBtn.y = 40;
                addChild(mybackBtn);
                mybackBtn.addEventListener(MouseEvent.CLICK, gotoHomePage); trace("thirdpage");
            function fourthPage()
                myBgHome = new bgAll();
                addChild(myBgHome);
                mybackBtn = new backBtn();
                mybackBtn.x = 720;
                mybackBtn.y = 40;
                addChild(mybackBtn);
                mybackBtn.addEventListener(MouseEvent.CLICK, gotoHomePage); trace("fourthpage");
                videoContainer = new MovieClip();
                addChild (videoContainer);
                thumbs = new MovieClip();
                thumbs.x = thumbX;
                thumbs.y = thumbY;
                thumbs.buttonMode = true;
                videoContainer.addChild(thumbs);
                thumbs.addEventListener(MouseEvent.CLICK,playVideo);
                thumbs.addEventListener(MouseEvent.MOUSE_OVER,onOverThumb);
                thumbs.addEventListener(MouseEvent.MOUSE_OUT,onOutThumb);
            function fifthPage()
                myBgHome = new bgAll();
                addChild(myBgHome);
                mybackBtn = new backBtn();
                mybackBtn.x = 720;
                mybackBtn.y = 40;
                addChild(mybackBtn);
                mybackBtn.addEventListener(MouseEvent.CLICK, gotoHomePage); trace("fifthpage");
                    function clearScreen()
                //Clear all movieclips from the display list
                    while (numChildren > 0){ removeChildAt(0); }
            function clearMenuListeners()
                //Remove event listeners to prevent double ups when menu is added again
                myBtn01.removeEventListener(MouseEvent.CLICK, gotoPage1);
                myBtn02.removeEventListener(MouseEvent.CLICK, gotoPage2);
                myBtn03.removeEventListener(MouseEvent.CLICK, gotoPage3);
                mybackBtn.removeEventListener(MouseEvent.CLICK, gotoHomePage);
            function makeMenu()
                //Place buttons and add event listeners to receive mouse clicks
                myBtn01 = new mcAbout();
                myBtn01.x = 260;
                myBtn01.y = 500;
                addChild(myBtn01);
                myBtn01.addEventListener(MouseEvent.CLICK, gotoPage1);
                TweenMax.to(myBtn01, 0.5, {x:260, y:450});
                myBtn02 = new mcPortfolio();
                myBtn02.x = 400;
                myBtn02.y = 500;
                addChild(myBtn02);
                myBtn02.addEventListener(MouseEvent.CLICK, gotoPage2);
                TweenMax.to(myBtn02, 0.5, {x:400, y:450});
                myBtn03 = new mcContact();
                myBtn03.x = 540;
                myBtn03.y = 500;
                addChild(myBtn03);
                myBtn03.addEventListener(MouseEvent.CLICK, gotoPage3);
                TweenMax.to(myBtn03, 0.5, {x:540, y:450});

  • DW8 - Need help with Flash Mirror Gallery by Flashdevelopment24

    I just purchased an image viewer called Flash Mirror Gallery by Flashdevelopment24:
    http://www.flashdevelopment24.com/extensions/flash_photo_gallery_06.aspx
    I use DW8. Unfortunately the wizard and the instructions are WAY beyond me. I can insert the object on my page but I have no clue how to import images into it, do I need to create separate thumbnails?, etc. Its a European company and the English isn't taht great either which doesn't help.I went through all their FAQs and examples and I don't have a clue.
    I'm doing something very simple, all I need are VERY simple directions on how to make this work. It would be best if there was a YouTube or other video tutorial available. I paid 45 buck for this and it useless to me right now. Help!

    I paid 45 buck for this and it useless to me right now. Help!
    Sorry can't help, don't know the product at all.
    If you are having problems with it, then it's best to contact the people you purchased it from no?  They should either help you with support issues, you you should get a refund if it doesn't work as expected.
    Nadia
    Adobe® Community Expert : Dreamweaver
    Unique CSS Templates | Tutorials | SEO Articles
    http://www.DreamweaverResources.com
    Web Design & Development
    http://www.perrelink.com.au
    http://twitter.com/nadiap

  • Creating a Video Gallery

    I am creating a video gallery for a website. I am quite new
    to Flash 8 and I am wondering whether it is possible to do the
    following:
    The file will contain a video player at the top that will
    play all the video clips. Underneath will be a library that will
    start off as four thumbnails and their will be an 'Expand All'
    button. Once clicked, the gallery will expand in flash to show
    however many thumbnails that are needed, and once you click on the
    thumbnails the video will load up in the above player.
    I have created the library so that it expands and collapses,
    but I am struggling (have no idea) on how to make the thumbnails
    link to play the corresponding videos at the top!
    Is it possible?

    Thanks for the advice, I must have done something wrong
    though as it has not worked.
    In my SWF, I have imported the videos separately using the
    wizard. I have named one of the videos with the instance name vid
    and then added the code you have listed. When I preview the file,
    the top video plays, but when I click on the thumbnails they do not
    do anything.
    Have I done something wrong?

Maybe you are looking for

  • Failed to detect if this server is joined to a server farm

    Hi, We run our intranet on a virtual server. the other day it crashed and we restored it from a previous point However when we launch the intranet we just get a an unexpected error has occurred. I am able to get into central admin but that's about it

  • Webmethods or XI

    How to decide if I wnat to go ahead with my current webmethods setup or move to XI3? Is there some doc that Ic an look at that helps me dcide? Thanks, Bhaskar

  • Data pump error olease help

    DECLARE ind NUMBER; -- Loop index h1 NUMBER; -- Data Pump job handle percent_done NUMBER; -- Percentage of job complete job_state VARCHAR2(30); -- To keep track of job state le ku$_LogEntry; -- For WIP and error messages js ku$_JobStatus; -- The job

  • Burning tiff-photos to the CD´s- error

    I have tried to export photos from Aperture 2.0.1 as tiff´s to the desktop and after that I burn those photos to the CD. I repeatedly get the error message: error 0x8002006E. The burning doesn´t succeed. I use the new Nikon D3. Earlier when I photogr

  • IPod works on one computer not the other

    I have all the latest software. iPod shows up and connects ever since I did factory restore on my laptop. But my iMac at home still doesn't work with iPod. what can I do?