Help with XML PDF creation

Hi can anyone help or point me in the right direction. I am developing an event management system, part of this is the dynamic creation on name badges which will be printed at the events.
I want to do this by exporting all the data as XML then loading it into the pdf which will create the name badges. I have done this and it works fine in the PDF preview mode, but when the pdf is saved and opened in reader or in a browser the data dosent load into the PDF.
Do i have to call the XML on load, or do anything to get it to work outside of LIveCycle?? Any help would be much appreciated.
Many thanks
Simon

I am having the same problem. Did you happen to resolve this issue at all or is there someone out there that knows the solution to this problem. I have been researching this prob for a day or so. Any help would be great
Dave

Similar Messages

  • I need help with a PDF file that is an image, the "Read Out Loud' option does not work, please help!

    I need help with a PDF file that is an image, the "Read Out Loud' option does not work, please help!

    You mean an image such as a scanned document?
    If that is the case, the file doesn't contain any text for Reader Out Loud to read. In order to fix that, you would need an application such as Adobe Acrobat that does Optical Character Recognition to convert the images to actual text.
    You can also try to export the file as a Word document or something else using ExportPDF which I believe offers OCR and is cheaper than Acrobat.

  • I need help with XML Gallery Fade in out transition. somebody please help me :(

    I need help with XML Gallery Fade in out transition. somebody please help me
    I have my post dont want to duplicate it

    The problem doesn't lie with your feed, although it does contain an error - you have given a non-existent sub-category. You need to stick to the categories and sub-categories listed here:
    http://www.apple.com/itunes/podcasts/specs.html#categories
    Subscribing to your feed from the iTunes Store page work as such, but the episodes throw up an error message. The problem lies with your episode media files: you are trying to stream them. Pasting the URL into a browser produces a download (where it should play the file) of a small file which does not play and in fact is a text file containing (in the case of ep.2) this:
    [Reference]
    Ref1=http://stream.riverratdoc.com/RiverratDoc/episode2.mp3?MSWMExt=.asf
    Ref2=http://70.33.177.247:80/RiverratDoc/episode2.mp3?MSWMExt=.asf
    You must provide a direct link to the actual mp3 file. Streaming won't work. The test is that if you paste the URL of the media file (as given in the feed) into the address bar of a browser it should play the file.

  • I need help with creating PDF with Preview...

    Hello
    I need help with creating PDF documetns with Preview. Just a few days ago, I was able to create PDF files composed of scanned images (notes) and everything worked perfectly fine. However, today I was having trouble with it. I scanned my notebook and saved 8 images/pages in jpeg format. I did the usual routine with Preview (select all files>print>PDF>save as PDF>then save). Well this worked a few days ago, but when I tried it today, I was able to save it, but the after opening the PDF file that I have saved, only the first page was there. The other pages weren't included. I really don't see anything wrong with what I'm doing. I really need help. Any help would be greatly appreciated.

    I can't find it.  I went into advanced and then document processing but no batch sequence is there and everything is grayed out.
    EDIT: I realized that you cant do batch sequences in standard.  Any other ideas?

  • Need some help with downloading PDF's from the net.

    need some help with downloading PDF's from the net.  Each time I try to click on a link from a website, if it takes me to a new screen to view a pdf, it just comes up as a blank black screen?  any suggestions?

    Back up all data.
    Triple-click the line of text below to select it, the copy the selected text to the Clipboard (command-C):
    /Library/Internet Plug-ins
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens (command-V), then press return.
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
    The "Silverlight" web plugin distributed by Microsoft can also interfere with PDF display in Safari, so you may need to remove it as well, if it's present.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • Need Help with this PDF generation

    Greetings,
    Our company had a subcontractor (that is no longer
    available) create a small system for a client that allows the
    client to input some text in a flash form, and the system places
    the text at a certain spot on a previosly created PDF document. For
    80% of the users, this works perfectly and then can print and save
    the customized pdf document. For 20% of users, they can see and
    print the customized pdf, but when they save it, there is no
    customization (area is blank). Can anyone help us understand why
    this happens, and how to fix?
    HERE ARE DIRECT NOTES FROM OUR CLIENT:
    Users are able to input their customized info.
    The customized info shows up in the PDF on the brochure.
    Users can print the brochure with the customized info.
    Users can save the BLANK PDF (without their info)
    Users can NOT save the PDF with their info in it.
    The exact message is in the top of the window with the PDF
    brochure and says "please fill out the following form. You can not
    save data typed into this form. Please print your completed form if
    you would like a copy for your records."
    Here is the input
    form, feel free to test.
    When you input into the brochure1.cfm Form, it sends the data
    to
    http://www.caduceuswebs.net/brochure1output.cfm
    , which then spanwns the customized pdf to open.
    If you want to see the native pdf, it is here:
    CLICK
    HERE
    HERE IS THE CODE FOR BROCHURE1.CFM
    <CFFORM ACTION="brochure1output.cfm" METHOD="POST"
    ENABLECAB="YES" format="flash" width="470" height="550">
    <div align="center">
    <table width="470" border="0" align="center"
    cellpadding="0" cellspacing="0" bordercolor="#990066">
    <tr>
    <td><cfinput type="TEXT" name="name" id="name"
    label="Name" maxlength="60"></td>
    </tr>
    <tr>
    <td><CFINPUT TYPE="TEXT" NAME="address1"
    id="address1" label="Address" hspace="470">
    </P></td>
    </tr>
    <tr>
    <td><CFinput type="text" name="address2"
    id="address2" label="Address Cont." /></td>
    </tr>
    <tr>
    <td><CFinput type="text" name="state" id="state"
    label="City / State"/></td>
    </tr>
    <tr>
    <td><CFinput type="text" name="zip" id="zip"
    label="Zip Code"/></td>
    </tr>
    <tr>
    <td><CFinput type="text" name="phone" id="phone"
    label="Phone Number"/></td>
    </tr>
    <tr>
    <td><table width="470" border="0" cellspacing="0"
    cellpadding="0">
    <tr>
    <td width="100"><img src="img/transparent.gif"
    width="100" height="1" border="0" /></td>
    <td width="373"><cfinput type="SUBMIT"
    value="Generate Customized Brochure 1" name="Submit"></td>
    </tr>
    </table></td>
    </tr>
    </table>
    </div>
    </CFFORM>
    HERE IS THE CODE FOR BROCHURE1OUTPUT.CFM:
    <CFOUTPUT><CFSET
    date="#DateFormat(now())#"></CFOUTPUT>
    <CFSETTING ENABLECFOUTPUTONLY="YES"
    SHOWDEBUGOUTPUT="NO">
    <CFCONTENT TYPE="APPLICATION/vnd.fdf">
    <CFOUTPUT>%FDF-1.2
    1 0 obj <<
    /FDF <<
    /Fields
    <<
    /T(name)
    /V(#form.name#)
    >>
    <<
    /T(address1)
    /V(#form.address1#)
    >>
    <<
    /T(address2)
    /V(#form.address2#)
    >>
    <<
    /T(state)
    /V(#form.state#)
    >>
    <<
    /T(zip)
    /V(#form.zip#)
    >>
    <<
    /T(phone)
    /V(#form.phone#)
    >>
    /F(
    http://www.caduceuswebs.net/pdfs/brochure1.pdf)
    >>
    >>
    endobj
    trailer
    <</Root 1 0 R>>
    %%EOF
    </CFOUTPUT>

    rogers42 wrote:
    Hi,
    Thanks for the suggestion.
    While getting rid of the ";" helps, but the output of the select statement is not displayed?When you do a SELECT statement in PL/SQL, you have to select the results into variables or arrays.
    Try something like this:
    DECLARE
         CURSOR C1 IS
                       SELECT  TABLE_NAME
                FROM    DB_MGMT.CTRL_TAB_RETENTION
                WHERE   RETENTION_PERIOD_IN_MONTHS = 11
                AND     rownum                  < 2;
         min_dt_skey    NUMBER;
         max_dt_skey    NUMBER;
         stmt            VARCHAR2 (100);
    BEGIN
        FOR i IN C1
         LOOP
            -- dbms_output.put_line('Table Name: ' || i.TABLE_NAME);
            stmt :='SELECT min(DT_SKEY), max(DT_SKEY) FROM DWH_RSRC_PERF.' || i.TABLE_NAME;
            dbms_output.put_line(stmt);
            EXECUTE IMMEDIATE stmt
             INTO min_dt_skey, max_dt_skey;
         dbms_output.put_line (  min_dt_skey   || ' = MIN (dt_skey), '
                        || max_dt_skey   || ' = MAX (dt_skey) for table '
                        || i.table_name
        END LOOP;
    END;

  • Help with XML, display data on swipe/click

    Hello.
    I am trying to create a moibile app that displays XML data. It's basically a phone book. I want the data to change when swiped. I can get the data in just fine. I can get it to display fine. I am not seeing the correct image first, however. I think it's a problem with my imagenum variable.
    Then, I want to change what is displayed when the user clicks/swipes on the screen. How do I do that?
    stop();
    var nameArray:Array = new Array();
    var countryArray:Array = new Array();
    var portraitArray:Array = new Array();
    var flagArray:Array = new Array();
    var jobtitleArray:Array = new Array();
    var imageNum:Number=0;
    var totalImages:Number;
    //Load XML
    var XMLURLLoader:URLLoader = new URLLoader();
    XMLURLLoader.load(new URLRequest("recbook.xml"));
    XMLURLLoader.addEventListener(Event.COMPLETE, processXML);
    function processXML(event:Event):void {
    var theXMLData:XML = new XML(XMLURLLoader.data);
    totalImages=theXMLData.name.length();
    for (var i:Number =0; i < totalImages; i++){
      //push xml data into the arrays
      nameArray.push(theXMLData.name[i]);
      countryArray.push(theXMLData.country[i]);
      portraitArray.push(theXMLData.portrait[i]);
      flagArray.push(theXMLData.flag[i]);
      jobtitleArray.push(theXMLData.jobtitle[i]);
    //data is processed
    loadData();
    function loadData():void {
    var thisPortrait:String = portraitArray[imageNum];
    var thisCountry:String = countryArray[imageNum];
    var thisName:String = nameArray[imageNum];
    var thisJobtitle:String = jobtitleArray[imageNum];
    var thisFlag:String = flagArray[imageNum];
    var dataLoader:Loader = new Loader();
    dataLoader.load(new URLRequest(portraitArray[imageNum]));
    dataLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, dataLoaded);
    function dataLoaded(event:Event):void {
      //I want to start with image 0 (img1.jpg) and cycle through with a mouse click (finger swipe on iOS)
      stage.addEventListener(MouseEvent.CLICK, loadMainImage1);
      function loadMainImage1(event:MouseEvent):void {
       portraitUILoader.source=thisPortrait;
       flagUILoader.source=thisFlag;
       selectedName.text=thisName;
       selectedCountry.text=thisCountry;
       selectedJobtitle.text=thisJobtitle;
    //add to imageNum (1);
    imageNum++;
    if (imageNum < totalImages) {//stopping at img2
      trace("imageNum " + imageNum);
      trace("image name (thisPortrait) " + thisPortrait);//losing image 4 somewhere
      loadData();
      trace("Total Images " + totalImages);
    //click to move past the home screenI'd like to ditch this. don't know how.
    homeScreen_mc.addEventListener(MouseEvent.CLICK, goNext);
    function goNext(event:MouseEvent):void
    nextFrame();
    */here's the output:
    imageNum 1
    image name (thisPortrait) images/img1.jpg
    imageNum 2
    image name (thisPortrait) images/img2.jpg
    imageNum 3
    image name (thisPortrait) images/img3.jpg
    Total Images 4
    Total Images 4
    Total Images 4
    Total Images 4
    It starts the display on image 1 (the second in the series img2.jpg)*/

    Thank you.
    That helped. I get the correct images in the output, but not in the display. I also get the following error. Any chance you could help with that?
    new output after moving the increment:
    imageNum 0
    image name (thisPortrait) images/img1.jpg
    imageNum 1
    image name (thisPortrait) images/img2.jpg
    imageNum 2
    image name (thisPortrait) images/img3.jpg
    imageNum 3
    image name (thisPortrait) images/img4.jpg
    TypeError: Error #2007: Parameter url must be non-null.
    at flash.display::Loader/_load()
    at flash.display::Loader/load()
    at iOS_fla::MainTimeline/loadData()
    at iOS_fla::MainTimeline/loadData()
    at iOS_fla::MainTimeline/loadData()
    at iOS_fla::MainTimeline/loadData()
    at iOS_fla::MainTimeline/loadData()
    at iOS_fla::MainTimeline/processXML()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()

  • Need help with XML transformation

    I am not sure this is the right place for this. But i will try it here. I am very troubled with my XSLT. Trying to transform a text Coupon which has the following html for it. So,
    _1. INPUT is:_
    <html>
    <head>
    </head>
    <body>
    <p>
    This coupon is for a good guy whose first name is :
    </p>
    <p>
    </p>
    <p align="center">
    Sadd
    </p>
    <p align="center">
    </p>
    <p align="right">
    <b>also</b> whose <var>full_name</var> is Sadd Hossain
    </p>
    <p align="left">
    </p>
    <p align="left">
    He is a <font size="3">software </font><font size="4">engineer for</font><font size="5">
    S&H</font>
    </p>
    </body>
    </html>
    *2. output needed  is:*
    <?xml version="1.0" encoding="UTF-8"?>
    <POSMESSAGE>
    <TextMSG >
    This coupon is for a good guy whose first name is :
    </TextMSG>
    <TextMSG >
    </TextMSG>
    <TextMSG align="center">
    <emph>SADD</emph>
    </TextMSG>
    <TextMSG >
    </TextMSG>
    <TextMSG align="right" >
    also whose full_name is Sadd Hossain
    </TextMSG>
    <TextMSG>
    </TextMSG>
    <TextMSG align="left" >
    He is a software engineer
    for S&H
    </TextMSG>
    </POSMESSAGE>
    *3. XSLT for this*
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml"/>
    <xsl:template match="body">
    <POSMESSAGE>
    <xsl:for-each select="p">
    <TextMSG>
    <!--xsl:if test="not[@align='']"-->
    <xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute>
    <!--/xsl:if-->
    <xsl:attribute name="font"><xsl:value-of select="@size"/></xsl:attribute>
    <xsl:value-of select="."/>
    </TextMSG>
    <xsl:for-each select="b">
    <emph>
    <xsl:value-of select="."/>
    </emph>
    </xsl:for-each>
    </xsl:for-each>
    </POSMESSAGE>
    </xsl:template>
    </xsl:stylesheet>
    *4: the above xslt generating this output*
    <?xml version="1.0" encoding="UTF-8"?>
    <POSMESSAGE><TextMSG align="" font="">
    This coupon is for a good guy whose first name is :
    </TextMSG><TextMSG align="" font="">
    </TextMSG><TextMSG align="center" font="">
    SADD
    </TextMSG><TextMSG align="center" font="">
    </TextMSG><TextMSG align="right" font="">
    also whose full_name is Sadd Hossain
    </TextMSG><TextMSG align="left" font="">
    </TextMSG><TextMSG align="left" font="">
    He is a software engineer
    for S&H
    </
    *5: Need help with this. what should my xslt look like to get the desired output???????????????*
    any help or direction will be very much appreciated. Thank you_

    I have below suggestions:
    1. Please use code option given in message editor toolbar for posting any formatted content like XML, Java code snippet etc.
    2. replace & in your source XML with _& a m p ;_ (Without spaces, I have put spaces to make it visible here).
    3. I have modified your XSLT according output XML you have given. I am not sure what you want to do with some elements like <b>, <font>, <var> etc. change below XSLT as you require for these elements.
    Modified XSLT:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
            <xsl:output method="xml"/>
         <xsl:template match="body">
              <POSMESSAGE>
                   <xsl:for-each select="p">
                        <TextMSG>
                             <xsl:if test=". != ''">
                                  <xsl:for-each select="@align">
                                       <xsl:attribute name="align">
                                            <xsl:value-of select="."></xsl:value-of>
                                       </xsl:attribute>
                                  </xsl:for-each>
                                  <xsl:value-of select="."/>
                             </xsl:if>
                        </TextMSG>
                   </xsl:for-each>
              </POSMESSAGE>
         </xsl:template>
    </xsl:stylesheet>
    OUTPUT:
    <?xml version="1.0"?>
    <POSMESSAGE>
         <TextMSG>This coupon is for a good guy whose first name is :</TextMSG>
         <TextMSG/>
         <TextMSG align="center">Sadd</TextMSG>
         <TextMSG/>
         <TextMSG align="right">alsowhose full_name is Sadd Hossain</TextMSG>
         <TextMSG/>
         <TextMSG align="left">He is a softwareengineer forS&H</TextMSG>
    </POSMESSAGE>

  • Need help with XML structure

    Hello, I would like to create an extention that will help to
    manage a
    glossary.
    First I need to decide on the structure of the xml document
    that will
    contain all glossary entries. Since I don't have much
    experience with XML in
    extention content, I was wondering if there are certain
    recommendations I
    should follow.
    What is preferable: using attributes that will holt the
    content or rather
    having xml-elements. What is easy to parce?
    I would greatly appreciate any tips, help and suggestions.
    Olyalyu

    .oO(olga)
    >First I need to decide on the structure of the xml
    document that will
    >contain all glossary entries. Since I don't have much
    experience with XML in
    >extention content, I was wondering if there are certain
    recommendations I
    >should follow.
    I would start as simple as possible, for example with
    something like
    this:
    <glossary>
    <entry>
    <term>...</term>
    <explanation>...</explanation>
    </entry>
    <entry>
    <term>...</term>
    <explanation>...</explanation>
    </entry>
    </glossary>
    Of course it also depends on what you want to do with this
    structure and
    if you need additional informations.
    >What is preferable: using attributes that will holt the
    content or rather
    >having xml-elements. What is easy to parce?
    There's no real rule-of-thumb whether to use elements or
    attributes.
    If unsure, use elements.
    Micha

  • Help with XML - AS 3.0

    Hello everybody. I decided to start working with XML since it allows me to load assets externally and edit my applications later very easily without having to edit the fla file itself. So today I watched and read a few tutorials and now I'm trying to build an Event Scroll, all through XML and AS 3.0 code. Basically what I want is to have several events inside a movieclip which I will incorporate into a scroll pane when I'm done, for now I'll focus on extracting data from the XML file and parsing it with AS 3.0. The layout is simple: a thumbnail image on the left, and beside it on the right there is the title of the event, its date and some info about it and all of these should have a dark grey background while the text is in white. Each two events are 30 pixels apart and there are 5 events for now.
    Ok enough talking now let's get to the code:
    XML Code:
    <?xml version="1.0" encoding="utf-8"?>
    <EVENTSXML>
         <EVENT>
              <TITLE> Event 1</TITLE>
             <DATE>12/04/2009</DATE>
            <THUMB>thumb0.jpg</THUMB>
            <INFO> Some Text Goes Here </INFO>
        </EVENT>
         <EVENT>
               <TITLE>Event 2</TITLE>
             <DATE>03/02/2009</DATE>
            <THUMB>thumb1.jpg</THUMB>
            <INFO>Some Text Goes Here</INFO>
         </EVENT>
         <EVENT>
               <TITLE>Event 3</TITLE>
             <DATE>18/11/2008</DATE>
            <THUMB>thumb2.jpg</THUMB>
            <INFO>Some Text Goes Here</INFO>
         </EVENT>
         <EVENT>
               <TITLE>Event 4</TITLE>
             <DATE>10/09/2008</DATE>
            <THUMB>thumb3.jpg</THUMB>
            <INFO>Some Text Goes Here</INFO>
         </EVENT>
         <EVENT>
               <TITLE>Event 5</TITLE>
             <DATE>06/08/2008</DATE>
            <THUMB>thumb4.jpg</THUMB>
            <INFO>Some Text Goes Here</INFO>
         </EVENT>
    </EVENTSXML>
    Actionscript 3.0 Code:
    var myXML:XML;
    var req:URLRequest = new URLRequest("events.xml");
    var ldr:URLLoader = new URLLoader();
    ldr.load(req);
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, processXML);
    function processXML(e:Event):void
         myXML = new XML(e.target.data);
         buildEvents(myXML.EVENT);
    var eventScroll:MovieClip = new MovieClip();
    var padding:Number = 30;
    this.addChild(eventScroll);
    eventScroll.x = eventScroll.y = padding;
    function buildEvents(evnts:XMLList):void
         for(var i:uint = 0; i <evnts.length(); i++) {
              var eventData:MovieClip = new MovieClip();
              eventData.y = (20 + padding) * i;
              eventData.itemNum = i;
              eventData.title = evnts[i].TITLE;
              eventData.date = evnts[i].DATE;
              eventData.thumb = evnts[i].THUMB;
              eventData.info = evnts[i].INFO;
              // thumb container
              thisThumb:Sprite = new Sprite();
              var ldr:Loader = new Loader()
              var req:URLRequest = new URLRequest(eventData.thumb);
              ldr.load(req);
              thisThumb.addChild(ldr);
              eventData.addChild(thisThumb);
              eventScroll.addChild(eventData);
    now I am stuck there... the application is not done yet and when I publish the file I keep getting errors, these are the errors:
    1067: Implicit coercion of a value of type flash.display:Sprite to an unrelated type Class.
    Source: thisThumb:Sprite = new Sprite();
    1188: Illegal assignment to class Sprite.
    Source: thisThumb:Sprite = new Sprite();
    1120: Access of undefined property thisThumb.
    Source: thisThumb.addChild(ldr);
    1120: Access of undefined property thisThumb.
    Source: eventData.addChild(thisThumb);
    1119: Access of possibly undefined property contentLoaderInfo through a reference with static type flash.net:URLLoader.
    Source: ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, processXML);
    So where did I go wrong and how can I carry on with my code to finish my application?
    P.S: I do not want someone to do it for me, so in case someone decided to help me out, please comment and explain your code because this application is for learning porpuses in the first place... Thanks in advance!

    oh I've just noticed one little problem, in my info field, the text doesn't break and start a new line, it just keeps going horizontally although I've set it to multiline and gave it a width and height... so what shall I do to fix this problem? here's the code:
    var infoF:TextField = new TextField();
              infoF.text = eventData.info;
              infoF.x = 250;
              infoF.y = dateF.y + padding;
              infoF.multiline = true;
              infoF.width = 200;
              infoF.height = 100;
              addChild(infoF);

  • Help with saved pdf' s,"more request cannot be completed.Service book information not found"

    Hey from south africa,I'm using the curve 8520 on MTN service provider.I came across a problem a while ago where I had to setup my email address again,I had an email with some pdf's saved.They were working well until the re-setup,now when I try to load ones that I haven't read it gives me the error "More request cannot be completed.Service book information not found".I've sent the email back to myself but no luck,help.Thanks in advance.

    You need to reset your email account again on your device & send the service books from the same interface on your device. Wait for the 30mins & register now yourself from the handset itself by following the below steps-click on Option Application-click on Advanced - Click on Host Routing table - Click menu key - select Register now option & Click, Follow these steps twice. Now go into your email application & click on it. Then press the menu key & scroll down,you can see Reconcile now option, Click on it twice !
    Now try to open that PDF again !

  • Please Help with Converting PDF document to Word Document

    I have downloaded our PDF document to be converted to a word document --- it did not work correctly--we need help with this
    Scott Munsen
    Abbott House -- Mitchell, SD

    Good day Scott,
    I received your document via our File Conversion Issue form.  The root of the problem you're facing is the quality of the scan.  I'm not sure if you were starting with a poor quality hard-copy or simply low DPI settings on your scanner, but the reason the results you received were so different than the PDF was the quality of the input.
    If you're hard copy looks clearer than the PDF file you created, I would suggest increasing the resolution settings on your scanner.
    Please let me know if you have any questions.
    Kind regards,
    David

  • Help with xml and getNextHighestDepth

    I have a thumbnail gallery that is called in with xml- On
    stage is a movieClip that covers the entire thumbnail area with the
    alpha set to 0. what I'm trying to do is onRelease- have that mc
    brought to the front and it's alpha state tween to 100- i've not
    much experience using 'getNextHighestDepth' so I'm assuming
    something is wrong here... if anyone can help I'd really appreciate
    it!
    Thanks!

    i think you want something along the lines of :
    stageFade_mc.swapDepths(theMovieOnTopAtTheMoment);
    Note that only dynamically created movies have depths. So if
    either of the movieclips in question are just sitting in your
    timeline you cant swap their depths.
    In that case you either need to duplicateMovieClip() or just
    set things _visible property where apropriate.
    good luck
    jon

  • Need help with complex column creation command

    Hello, all
    I need help with a complex column creation command and SQL anywhere help is not sufficient for it.
    Here is the situation:
    I need to write a generic DDL "alter table" command, which can add/modify columns without knowing in advance if they already exist in the destination table.
    Is there a command, which looks like:
    alter table "table1" add (on existing modify) column1 <datatype> <default> ?
    Thank you,
    Arcady

    Hi.
    I don't think this is supported in alter table command. But you can code that inside an if statement which queries systables & syscolumns. Your code should be something like that:
    if (select count(*) from sysobjects, syscolumns where sysobjects.id = syscolumns.id and sysobjects.name = 'some_table' and syscolumns.name = 'some_column') < 1
    begin
        alter table some_table add some_column numeric(12) not null
    end
    This is an example..
    Andreas.

  • Need help with xml video gallery

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

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

Maybe you are looking for