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

Similar Messages

  • Help with XML and video

    im creating a site that uses xml...right now the images are
    in a carousel affect, and when you click on one of them, the rest
    disappear and the one you click slides to the left and some text
    appears (all from XML doc). Instead of the text showing up, i want
    to pull in either quicktime or .flv movies where the text is now.
    ill give AS and XML..if you need any more info, please ask.. Thanks
    anyone/everyone
    Here is AS:
    import mx.utils.Delegate;
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    var numOfItem:Number = new Number();
    var radiusX:Number = new Number();
    var radiusY:Number = new Number();
    var centerX:Number = new Number();
    var centerY:Number = new Number();
    var speed:Number = new Number();
    var perspective:Number = new Number();
    var home:MovieClip = new MovieClip();
    home = this;
    //numOfItem = 12;
    radiusX = 400;
    radiusY = 75;
    centerX = Stage.width/2;
    centerY = (Stage.height/3);
    speed = 0.045;
    perspective = 120;
    theText._alpha = 0;
    var xml:XML = new XML();
    xml.ignoreWhite = true;
    xml.onLoad = function() {
    var nodes = this.firstChild.childNodes;
    numOfItem = nodes.length;
    for(var i=0; i<numOfItem; i++) {
    var t = home.attachMovie("logo", "logo"+i, i+1);
    t.angle = i * ((Math.PI*2)/numOfItem);
    t.onEnterFrame = mover;
    t.toolText = nodes
    .attributes.tooltip;
    t.content = nodes.attributes.content;
    t.icon.inner.loadMovie(nodes
    .attributes.image);
    t.ref.inner.loadMovie(nodes.attributes.image);
    t.icon.onRollOver = over;
    t.icon.onRollOut = out;
    t.icon.onRelease = released;
    xml.load("image/icons.xml");
    function over() {
    home.tooltip.test_txt.text = this._parent.toolText;
    home.tooltip._x = this._parent._x;
    home.tooltip._y = this._parent._y - this._parent._height/2;
    home.tooltip.onEnterFrame = Delegate.create(this, moveTip);
    home.tooltip._alpha = 100;
    function out() {
    delete home.tooltip.onEnterFrame;
    home.tooltip._alpha = 0;
    function moveTip() {
    home.tooltip._x = this._parent._x;
    home.tooltip._y = this._parent._y - this._parent._height/2;
    function released() {
    home.tooltip._alpha = 0;
    trace(home.tooltip.test_txt.text);
    for(var i=0; i<numOfItem; i++) {
    var t:MovieClip = home["logo"+i];
    t.xPos = t._x;
    t.yPos = t._y;
    t.theScale = t._xscale;
    delete t.icon.onRollOver;
    delete t.icon.onRollOut;
    delete t.icon.onRelease;
    delete t.onEnterFrame;
    if(t != this._parent) {
    var tw:Tween = new Tween(t, "_xscale",
    Strong.easeOut,t._xscale, 0, 1, true);
    var tw2:Tween = new Tween(t, "_yscale",
    Strong.easeOut,t._yscale, 0, 1, true);
    var tw3:Tween = new Tween(t, "_alpha", Strong.easeOut,100,
    0, 1, true);
    } else {
    var tw:Tween = new Tween(t, "_xscale",
    Strong.easeOut,t._xscale, 100, 1, true);
    var tw2:Tween = new Tween(t, "_yscale",
    Strong.easeOut,t._yscale, 100, 1, true);
    var tw3:Tween = new Tween(t, "_x", Strong.easeOut,t._x, 100,
    1, true);
    var tw4:Tween = new Tween(t, "_y", Strong.easeOut,t._y, 320,
    1, true);
    var tw5:Tween = new Tween(theText, "_alpha", Strong.easeOut,
    0, 100, 1, true);
    theText.text = t.content;
    var s:Object = this;
    tw.onMotionStopped = function() {
    s.onRelease = unReleased;
    function unReleased() {
    delete this.onRelease;
    var tw:Tween = new Tween(theText, "_alpha",
    Strong.easeOut,100, 0, .5, true);
    for(var i=0; i<numOfItem; i++) {
    var t:MovieClip = home["logo"+i];
    if(t != this._parent) {
    var tw:Tween = new Tween(t, "_xscale", Strong.easeOut,0,
    t.theScale, 1, true);
    var tw2:Tween = new Tween(t, "_yscale", Strong.easeOut,0,
    t.theScale, 1, true);
    var tw3:Tween = new Tween(t, "_alpha", Strong.easeOut,0,
    100, 1, true);
    } else {
    var tw:Tween = new Tween(t, "_xscale", Strong.easeOut,100,
    t.theScale, 1, true);
    var tw2:Tween = new Tween(t, "_yscale", Strong.easeOut,100,
    t.theScale, 1, true);
    var tw3:Tween = new Tween(t, "_x", Strong.easeOut,t._x,
    t.xPos, 1, true);
    var tw4:Tween = new Tween(t, "_y", Strong.easeOut,t._y,
    t.yPos, 1, true);
    tw.onMotionStopped = function() {
    for(var i=0; i<numOfItem; i++) {
    var t:MovieClip = home["logo"+i];
    t.icon.onRollOver = Delegate.create(t.icon,over);
    t.icon.onRollOut = Delegate.create(t.icon,out);
    t.icon.onRelease = Delegate.create(t.icon,released);
    t.onEnterFrame = mover;
    function mover() {
    this._x = Math.cos(this.angle) * radiusX + centerX;
    this._y = Math.sin(this.angle) * radiusY + centerY;
    var s:Number = new Number();
    s = (this._y-perspective)/(centerY+radiusY-perspective);
    this._xscale = this._yscale = s*100;
    this.angle += this._parent.speed;
    this.swapDepths(Math.round(this._xscale)+100);
    this.onMouseMove = function() {
    speed = (this._xmouse-centerX)/7500;
    Here is XML:
    <?xml version="1.0"?>
    <icons>
    <icon image="image/Dunne_Lexan.png" content="
    I put the text here"/>
    <icon image="image/Eley,-Howard_Lexan.png"/>
    <icon image="image/Gagne_Lexan.png"/>
    <icon image="image/Hackney_Lexan.png"/>
    <icon image="image/Hastings_Lexan.png"/>
    <icon image="image/Klee,-Randall_Lexan.png"/>
    <icon image="image/Rasmussen_Lexan.png" />
    <icon image="image/Snyder,-Chris_Lexan.png"/>
    <icon image="image/Steckle,-Larry_Lexan.png" />
    <icon image="image/Torres,-Jack_Lexan.png"/>
    <icon image="image/Crumley_Lexan.png" />
    <icon image="image/Chung_Lexan.png"/>
    <icon image="image/Buckles_Lexan.png"/>
    <icon image="image/Buchholz_lexan.png"/>
    <icon image="image/Brooks_Lexan.png"/>
    <icon image="image/Beall_Lexan.png"/>
    <icon image="image/Bailey_Lexan.png"/>
    <icon image="image/Anderson,-Bill_Lexan.png"/>
    <icon image="image/Alexander,-Lyn_Lexan.png"/>
    </icons>

    nevermind i got it. but if someone can help me figure out how
    to make it pull up the correct swf when the image is clicked, id
    appreciate it

  • Help with XML and Oracle 8i

    Hi Oracle XML Team,
    I really need to understand clearly about how 8i supports XML.
    Please help to answer the following questions quickly.
    1) Using the available components such as XML SQL utilities, XML
    Class gen, Parser and the Servlet. Can I use all this to develop
    an application to retrieve, store and query XML doc in 8i (do I
    need any components such as intermedia)?
    2) The licensing scheme for all the above 4 four components
    stated that it is not for commercial use? But what if I need to
    deploy my application soon ? Is there a separate licensing
    scheme for deployment?
    3) I am using 8i standard edition now, if I would to use
    iFS/intermedia....do I need to get the Enterprise Edition?
    Please help me. Thank you very much
    Sam
    null

    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 xml and combo boxes

    Basically what im doing is a ui for a electronic book.
    The book is broken into 3 parts and each part has its own set
    of chapters.
    My xml schema is pasted below.
    And what i would like is to have two comboBoxes .
    The first one would list the names of the parts available,
    ie.. Part I, Part II, Part III.
    the Second one would list the chapters avalable under that
    part. For example, If Part i, is sected then the secodn combo box
    would list chapter 1-5, while if the second part is selected, the
    second combo box would list chapters 6-10.
    Im using flash 8 pro, and the xmlconnector and comboboxes.
    Maybe there is an easier way. PLEASE HALLP! This is driving me
    nuts.
    XML Schema:

    Hi
    I have just done this for another guy in this forum, I can
    send you an example using UI Components - 3 Comboboxes each shows
    the sub-options of its parent, one more than what you want. The
    secret is in the construct of the XML file and how this creates the
    correct Schema for binding.
    Post me an email address and I can send you the files.

  • Need help with XML response to refresh document with context and prompts

    I've been working with the Restful api for a few weeks now and have been able to figure out most of what I need to automate testing of our reports. However, one task that I have not been able to figure out is how to refresh a document that contains both a context and two prompts for dates.
    Here is what I have tried, and what the API responds with.
    1) I queried the API for this document's parameters using the following call after logging in -
    headers = {:accept=>'application/xml', :content_type=>'application/xml', :x_sap_logontoken=>@token}
    url = "http://our.url.net:6405/biprws/raylight/v1/documents/12345/parameters"
    RestClient.get(url, headers)
    The response from the API is:
    <parameters>
        <parameter dpId="DP0" type="context" optional="false">
            <id>0</id>
            <technicalName>cQuery 1</technicalName>
            <name>Select a context</name>
            <answer type="Text" constrained="true">
                <info cardinality="Single">
                    <lov partial="false">
                        <values>
                            <value id="CTX_1">LOAN</value>
                            <value id="CTX_9">LOAN_APPLICATION</value>
                        </values>
                    </lov>
                    <values>
                        <value id="CTX_1">LOAN</value>
                        <value id="CTX_9">LOAN_APPLICATION</value>
                    </values>
                    <previous>
                        <value id="CTX_9">LOAN_APPLICATION</value>
                    </previous>
                </info>
                <values>
                    <value id="CTX_9">LOAN_APPLICATION</value>
                </values>
            </answer>
        </parameter>
    </parameters>
    2) This tells me I need to supply a context, so I then replace my RestClient.get call with a RestClient.put call with the following payload:
    <parameters>
         <parameter>
                <id>0</id>
                <answer>
                      <values>
                            <value id=\"CTX_9\"/>
                      </values>
                </answer>
          </parameter>
    </parameters>
    3) This satisfies the context portion of the refresh. The API replies with the following response, telling me I need to answer two prompts -
    <parameters>
         <parameter dpId=\"DP0\" type=\"prompt\" optional=\"false\">
              <id>1</id>
              <technicalName>psEnter value(s) for Start Date of Application Received Date</technicalName>
              <name>Enter value(s) for Start Date of Application Received Date</name>
               <answer type=\"DateTime\" constrained=\"false\">\
                    <info cardinality=\"Single\"/>
               </answer>
         </parameter>
         <parameter dpId=\"DP0\" type=\"prompt\" optional=\"false\">
                <id>2</id>
                <technicalName>psEnter value for End Date of Application Received Date</technicalName>
                <name>Enter value for End Date of Application Received Date</name>\
                <answer type=\"DateTime\" constrained=\"false\">
                    <info cardinality=\"Single\"/>
                </answer>
          </parameter>
    </parameters>
    4) Here is where I am having problems. I have tried all kinds of permutations of the below payload/response body. All I ever get from the API is a 400 - BadResponse error.
    <parameters>
         <parameter>
              <id>0</id>
              <answer>
                   <values>
                        <value id=\"CTX_9\"/>
                   </values>
              </answer>
         </parameter>
    </parameters>
    <parameters>
         <parameter type=\"prompt\">
              <id > 1 </ id>
              <answer type=\"DateTime\">
                   <values>
                        <value>2012-06-11T09:50:54.000-04:00</value>
                   </values>
               </answer>
         </parameter>
         <parameter type=\"prompt\">
               <id > 2 </ id>
               <answer type=\"DateTime\">
                    <values>
                         <value>2014-07-11T09:50:54.967-04:00</value>
                    </values>
               </answer>
         </parameter>
    </parameters>
    I am not very good with XML and the terminology around it, and I haven't received much training around using the Restful API other than the SDK documentation. I have a feeling there is something very basic that Im missing here. What is the correct XML needed in the response body to properly refresh the document?

    If you are more confortable with JSON, Raylight supports it as well.
    Best regards,
    Anthony

  • 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.

  • Working with XML and Button

    Hi,
    How are all of you. Well I am new to Flex. But I have started
    building simple applications. One of the top most problem I am
    facing is working with XML and Button. Can you please assist me in
    this. I am explaining my problem:
    I have an external XML file like this:
    <Menu>
    <button>
    <idnt>0</idnt>
    <label>General Health</label>
    <text>General Health pages is currently under
    construction</text>
    </button>
    <button>
    <idnt>1</idnt>
    <label>Mental Health</label>
    <text>Mental Health pages is currently under
    construction</text>
    </button>
    </Menu>
    Now I want to generate Buttons Dynamically from this XML. And
    the second thing which is the most problematic is that how I code
    it so that when I press the Button labled "General Health", it will
    show the same text as in the XML tag coresponding to tag
    "<label>General Health</label>" ?
    I badly need this. I am realy confused on this. Kindly help
    me.
    Regards
    ..::DeX

    Let's assume that variable "node" contains one element of the
    XML. For example,
    <button>
    <idnt>0</idnt>
    <label>General Health</label>
    <text>General Health pages is currently under
    construction</text>
    </button>
    such that node.label would be "General Health", node.idnt
    would be 0, etc.
    You can build a Button like this:
    var b:Button = new Button();
    b.label = node.label;
    b.data = node; // more on this later
    b.width = 60;
    b.height = 26;
    addChild(b); // critical - adds the button to the display
    list so you can see it
    b.addEventHandler( MouseEvent.CLICK, handleClick );
    You must set the button's width and height unless the button
    will be in a container that will size its own children (like Tile).
    Every Flex component has a data property. You can set it to
    whatever you like. For your needs it makes sense to set each
    Button's data property to the node it relates to.
    Now suppose that code above is in a function, createButton:
    private function createButton( node:XML ) : void {
    // code from above
    Here's how to make all the buttons where "menu" is a variable
    that contains your XML:
    for(var k:int=0; k < menu.button; k++) { // menu.button is
    an XMLList
    createButton( menu.button[k] );
    Now to handle the event:
    private function handleEvent( event:MouseEvent ) : void
    var b:Button = event.currentTarget as Button;
    trace( b.data.text);
    When a button is picked, the description element will print
    in the debug console. Replace the trace with whatever code you
    need.

  • Help with writing and retrieving data from a table field with type "LCHR"

    Hi Experts,
    I need help with writing and reading data from a database table field which has a type of "LCHR". I have given an example of the original code but don't know what to change it to in order to fix it and still read in the original data that's stored in the LCHR field.
    Basically we have two Function modules, one that saves list data to a database table and one that reads in this data. Both Function modules have an identicle table which has an array of fields from type INT4, CHAR, and type P. The INT4 field is the first one.
    Incidentally this worked in the 4.7 non-unicode system but is now dumping in the new ECC6 Unicode system.
    Thanks in advance,
    C
    SAVING THE LIST DATA TO DB
    DATA: L_WA(800).
    LOOP AT T_TAB into L_WA.
    ZDBTAB-DATALEN = STRLEN( L_WA ).
    MOVE: L_WA to ZDBTAB-RAWDATA.
    ZDBTAB-LINENUM = SY-TABIX.
    INSERT ZDBTAB.
    READING THE DATA FROM DB
    DATA: BEGIN OF T_DATA,
                 SEQNR type ZDBTAB-LINENUM,
                 DATA type ZDBTAB-RAWDATA,
               END OF T_TAB.
    Select the data.
    SELECT linenum rawdata from ZDBTAB into table T_DATA
         WHERE repid = w_repname
         AND rundate = w_rundate
         ORDER BY linenum.
    Populate calling Internal Table.
    LOOP AT T-DATA.
    APPEND T_DATA to T_TAB.
    ENDLOOP.

    Hi Anuj,
    The unicode flag is active.
    When I run our report and then to try and save the list data a dump is happening at the following point
    LOOP AT T_TAB into L_WA.
    As I say, T_TAB consists of different fields and field types whereas L_WA is CHAR 800. The dump mentions UC_OBJECTS_NOT_CONVERTIBLE
    When I try to load a saved list the dump is happening at the following point
    APPEND T_DATA-RAWDATA to T_TAB.
    T_DATA-RAWDATA is type LCHR and T_TAB consists of different fields and field types.
    In both examples the dumps mention UC_OBJECTS_NOT_CONVERTIBLE
    Regards
    C

  • PO output with XML and PDF format

    Hi All,
    I need PO output with XML and PDF format. when I give print it shld go to vendor with xml and pdf format through mail. please kindly guide me on this .
    Thanks in advance
    JK

    hi,
    try this code to get in pdf form
    REPORT zsuresh_test.
    Variable declarations
    DATA:
    w_form_name TYPE tdsfname VALUE 'ZSURESH_TEST',
    w_fmodule TYPE rs38l_fnam,
    w_cparam TYPE ssfctrlop,
    w_outoptions TYPE ssfcompop,
    W_bin_filesize TYPE i, " Binary File Size
    w_FILE_NAME type string,
    w_File_path type string,
    w_FULL_PATH type string.
    Internal tables declaration
    Internal table to hold the OTF data
    DATA:
    t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
    Internal table to hold OTF data recd from the SMARTFORM
    t_otf_from_fm TYPE ssfcrescl,
    Internal table to hold the data from the FM CONVERT_OTF
    T_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
    This function module call is used to retrieve the name of the Function
    module generated when the SMARTFORM is activated
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = w_form_name
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    fm_name = w_fmodule
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Calling the SMARTFORM using the function module retrieved above
    GET_OTF parameter in the CONTROL_PARAMETERS is set to get the OTF
    format of the output
    w_cparam-no_dialog = 'X'.
    w_cparam-preview = space. " Suppressing the dialog box
                                                        " for print preview
    w_cparam-getotf = 'X'.
    Printer name to be used is provided in the export parameter
    OUTPUT_OPTIONS
    w_outoptions-tddest = 'LP01'.
    CALL FUNCTION w_fmodule
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    control_parameters = w_cparam
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    output_options = w_outoptions
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    job_output_info = t_otf_from_fm
    JOB_OUTPUT_OPTIONS =
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    t_otf[] = t_otf_from_fm-otfdata[].
    Function Module CONVERT_OTF is used to convert the OTF format to PDF
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    FORMAT = 'PDF'
    MAX_LINEWIDTH = 132
    ARCHIVE_INDEX = ' '
    COPYNUMBER = 0
    ASCII_BIDI_VIS2LOG = ' '
    PDF_DELETE_OTFTAB = ' '
    IMPORTING
    BIN_FILESIZE = W_bin_filesize
    BIN_FILE =
    TABLES
    otf = T_OTF
    lines = T_pdf_tab
    EXCEPTIONS
    ERR_MAX_LINEWIDTH = 1
    ERR_FORMAT = 2
    ERR_CONV_NOT_POSSIBLE = 3
    ERR_BAD_OTF = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    To display File SAVE dialog window
    CALL METHOD cl_gui_frontend_services=>file_save_dialog
    EXPORTING
    WINDOW_TITLE =
    DEFAULT_EXTENSION =
    DEFAULT_FILE_NAME =
    FILE_FILTER =
    INITIAL_DIRECTORY =
    WITH_ENCODING =
    PROMPT_ON_OVERWRITE = 'X'
    CHANGING
    filename = w_FILE_NAME
    path = w_FILE_PATH
    fullpath = w_FULL_PATH
    USER_ACTION =
    FILE_ENCODING =
    EXCEPTIONS
    CNTL_ERROR = 1
    ERROR_NO_GUI = 2
    NOT_SUPPORTED_BY_GUI = 3
    others = 4
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
    presentation server
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = W_bin_filesize
    filename = w_FULL_PATH
    FILETYPE = 'BIN'
    APPEND = ' '
    WRITE_FIELD_SEPARATOR = ' '
    HEADER = '00'
    TRUNC_TRAILING_BLANKS = ' '
    WRITE_LF = 'X'
    COL_SELECT = ' '
    COL_SELECT_MASK = ' '
    DAT_MODE = ' '
    CONFIRM_OVERWRITE = ' '
    NO_AUTH_CHECK = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    WRITE_BOM = ' '
    TRUNC_TRAILING_BLANKS_EOL = 'X'
    WK1_N_FORMAT = ' '
    WK1_N_SIZE = ' '
    WK1_T_FORMAT = ' '
    WK1_T_SIZE = ' '
    IMPORTING
    FILELENGTH =
    tables
    data_tab = T_pdf_tab
    FIELDNAMES =
    EXCEPTIONS
    FILE_WRITE_ERROR = 1
    NO_BATCH = 2
    GUI_REFUSE_FILETRANSFER = 3
    INVALID_TYPE = 4
    NO_AUTHORITY = 5
    UNKNOWN_ERROR = 6
    HEADER_NOT_ALLOWED = 7
    SEPARATOR_NOT_ALLOWED = 8
    FILESIZE_NOT_ALLOWED = 9
    HEADER_TOO_LONG = 10
    DP_ERROR_CREATE = 11
    DP_ERROR_SEND = 12
    DP_ERROR_WRITE = 13
    UNKNOWN_DP_ERROR = 14
    ACCESS_DENIED = 15
    DP_OUT_OF_MEMORY = 16
    DISK_FULL = 17
    DP_TIMEOUT = 18
    FILE_NOT_FOUND = 19
    DATAPROVIDER_EXCEPTION = 20
    CONTROL_FLUSH_ERROR = 21
    OTHERS = 22
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    reward points if useful,
    siri

  • Guidance with XML and templates

    I am currently saving metadata in separate xml files, each of which pertains to a particular image.
    (They all resemble the sample XML file above, but with different data, and possibly empty values
    in some fields). Currently, no fields are required (but may be in the future).
    I am now trying to define a template for the xml files...However, I am a novice with XML and am
    having trouble creating a template and its constraints.
    I would like the template to:
    - Impose an order on the metadata fields, so when I read it in, I can get the appropriate field
    at the appropriate time.
    - Validate that the type of data entered into those fields are correct.
    - If no xml file exists for that image, I will be able to pull in the field names (in order)
    into my program, and create a GUI with the field names and no data
    - If an xml file does exists for that image, I will be able to pull in the field names (in order)
    into my program, and create a GUI with the field names and the data in the xml file
    I'm assuming that this template would have to be read in each time a user requests to see the
    information associated with an image.
    SAMPLE XML FILE
    <?xml version="1.0" encoding="UTF-8"?>
    <Image>
    <metadata>
      <Miscellaneous>Here is more Jibberish to fill space</Miscellaneous>
      <Photographer>Mayor McCheese</Photographer>
      <Date>Sat, Sep 22, 1922</Date>
      <Project>44an5</Project>
      <Supervisor>Colonel Sanders</Supervisor>
      <Location>The Moon</Location>
    </metadata>
    </Image>/*
    I'm assuming the template would take on a form similar to below...
    "order" would be the order that they would be placed into the GUI.
    "type" would be the type of data allowed in that field (string, int, long, date, etc...)
    in this case 'long' is Oracles definition of long and not Javas.
    SAMPLE TEMPLATE
    <Image>
    <metadata>
      <Project order=0 type=String></Project>
      <Date order=1 type=Date></Date>
      <Photographer order=2 type=String></Photographer>
      <Supervisor order=3 type=String></Supervisor>
      <Miscellaneous order=4 type=Long></Miscellaneous>
      <Location order=5 type=String></Location>
    </metadata>
    </Image>Can anyone guide me in the right direction or offer some hints?
    Thanks,
    Dustpan

    bump?

  • Help with count and sum query

    Hi I am using oracle 10g. Trying to aggregate duplicate count records. I have so far:
    SELECT 'ST' LEDGER,
    CASE
    WHEN c.Category = 'E' THEN 'Headcount Exempt'
    ELSE 'Headcount Non-Exempt'
    END
    ACCOUNTS,
    CASE WHEN a.COMPANY = 'ZEE' THEN 'OH' ELSE 'NA' END MARKET,
    'MARCH_12' AS PERIOD,
    COUNT (a.empl_id) head_count
    FROM essbase.employee_pubinfo a
    LEFT OUTER JOIN MMS_DIST_COPY b
    ON a.cost_ctr = TRIM (b.bu)
    INNER JOIN MMS_GL_PAY_GROUPS c
    ON a.pay_group = c.group_code
    WHERE a.employee_status IN ('A', 'L', 'P', 'S')
    AND FISCAL_YEAR = '2012'
    AND FISCAL_MONTH = 'MARCH'
    GROUP BY a.company,
    b.district,
    a.cost_ctr,
    c.category,
    a.fiscal_month,
    a.fiscal_year;
    which gives me same rows with different head_counts. I am trying to combine the same rows as a total (one record). Do I use a subquery?

    Hi,
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    user610131 wrote:
    ... which gives me same rows with different head_counts.If they have different head_counts, then the rows are not the same.
    I am trying to combine the same rows as a total (one record). Do I use a subquery?Maybe. It's more likely that you need a different GROUP BY clause, since the GROUP BY clause determines how many rows of output there will be. I'll be able to say more after you post the sample data, results, and explanation.
    You may want both a sub-query and a different GROUP BY clause. For example:
    WITH    got_group_by_columns     AS
         SELECT  a.empl_id
         ,     CASE
                        WHEN  c.category = 'E'
                  THEN  'Headcount Exempt'
                        ELSE  'Headcount Non-Exempt'
                END          AS accounts
         ,       CASE
                        WHEN a.company = 'ZEE'
                        THEN 'OH'
                        ELSE 'NA'
                END          AS market
         FROM              essbase.employee_pubinfo a
         LEFT OUTER JOIN  mms_dist_copy             b  ON   a.cost_ctr     = TRIM (b.bu)
         INNER JOIN       mms_gl_pay_groups        c  ON   a.pay_group      = c.group_code
         WHERE     a.employee_status     IN ('A', 'L', 'P', 'S')
         AND        fiscal_year           = '2012'
         AND        fiscal_month          = 'MARCH'
    SELECT    'ST'               AS ledger
    ,       accounts
    ,       market
    ,       'MARCH_12'          AS period
    ,       COUNT (empl_id)       AS head_count
    FROM       got_group_by_columns
    GROUP BY  accounts
    ,            market
    ;But that's just a wild guess.
    You said you wanted "Help with count and sum". I see the COUNT, but what do you want with SUM? No doubt this will be clearer after you post the sample data and results.
    Edited by: Frank Kulash on Apr 4, 2012 5:31 PM

  • MOVED: [Athlon64] Need Help with X64 and Promise 20378

    This topic has been moved to Operating Systems.
    [Athlon64] Need Help with X64 and Promise 20378

    I'm moving this the the Administration Forum.  It seems more apporpiate there.

  • SWF with xml and css to flv format..need help

    I have slideshow that is your typical stand alone .swf with accompanying .xml and .css configuration files along with a folder for the images. I don't have the .fla
    I need to flatten this or merge it all together to create an flv. Is this possible and if so how do I do this?
    Because this is a client I can't just re-create another slide show..it needs to be exactly the same. For me to redo it entirely in fla would be so very time consuming as the slides have 2-3 different effects each and to get the timing exactly right would be near impossible.
    I hope someone has a magical solution for me.

    Actually Rob, right after posting I came across a post mentioning screen
    recorders and tried 5 of them. However, I am either not using the right
    settings or the progs I tried weren't good enough cause all of them have
    some freeze and jump during recording and the vids don't come out smooth. I
    think this may be because although they allow you to set frames per seconds
    for recording, they all vary that setting during the actual recording. I can
    see the frames per second going from 18 to 12. I am not really experienced
    in video.
    Here's the list of those I tried: CamStudio, Free screen recorder, BB
    Flashback2 express, BSR screen recorder 4 and ZealSoft.
    If you happen to know of a really good one or what the right settings might
    be I'd be glad to hear it.
    By the way, so far, you seem to be the only one who got my question
    right..all other replies I got from varying forums tell me to google swf
    converters.
    Thanks bud.
    Griffin

  • Help with WindowsDesktopSSO and AMIdentity.getAttributes

    Hi guys and girls,
    I need some help from you experts.
    I successfully setup, thanks to this guide
    http://blogs.oracle.com/knittel/entry/opensso_windowsdesktopsso
    and a lot of trial & errors and googling a Kerberos authentication between OpenAM version 9.5.2 and an Active Directory Server.
    When I navigate to openAM page (from a domain machine) http://<openAMhost>:<port>/opensso, it doesn't ask for credentials ...
    and I can see, with ieHttpHeaders, kerberos data exchange.
    Without creating an Active Directory DataStore (pointing to the same domain where I use kerberos data) in openAM,
    when I navigate (from a domain machine) to /opensso/idm/EndUser page, it always gives me:
    "Plug-in com.sun.identity.idm.plugins.ldapv3.LDAPv3Repo encountered an ldap exception. LDAP Error 32: The entry specified in the request does not exist."
    Since my aim was to get user information from a web app ... I thought I could have done this with an agent/SDK call as I usually do with "classic" authentication.
    Now I created a J2EE Agent (on openAM) to protect one of my application deployed on a JBoss 4.2.1-GA server.
    Agent configured with default options and these changes:
    Agent Filter Mode: J2EE_POLICY
    User Mapping Mode: USER_ID
    User Attribute Name: tried both with employeenumber and uid
    User Principal Flag: enabled
    User Token Name: UserToken
    FQDN Check: tried both with enabled and disabled
    WebAuthentication Available : Enabled
    In my application WEB-INF/jboss-web.xml looks like this:
         <?xml version="1.0" encoding="UTF-8"?>
         <jboss-web>
              <security-domain>java:/jaas/AMRealm</security-domain>
         </jboss-web>Usually, when I authenticate with "classic" (internal datastore) login, I can get user attributes programmatically with a code like this:
           private String getCredenzialiUtente(HttpServletRequest request)
                String                 SSOUsername      = null;
                SSOToken               ssoToken      = null;
                SSOTokenManager        manager           = null;
                  try
                    manager = SSOTokenManager.getInstance();
                    if ( manager == null)
                         throw new RuntimeException("Unable to Get: SSOTokenManager");
                    String ssoTokenID = AmFilterManager.getAmSSOCache().getSSOTokenForUser(request);
                    ssoToken = manager.createSSOToken(ssoTokenID);
                    if ( ssoToken == null )
                          throw new RuntimeException("Unable to Get: TokenForUser");
                    AMIdentity amid = new AMIdentity(ssoToken);
                    if(amid == null)
                       throw new RuntimeException("Unable to Get: UserIdentity");
                    SSOUsername  = amid.getName();
                    System.out.println("######### USERNAME FROM SSO: " + SSOUsername);
                    Set<String> info = new HashSet<String>();
                    info.add("uid");
                    info.add("givenName");
                    java.util.Map mappa = amid.getAttributes(info);
                    if ( mappa != null )
                        java.util.Set insieme = mappa.keySet();
                        java.util.Iterator it = insieme.iterator();
                        while ( it.hasNext() )
                            String n = it.next().toString();
                            System.out.println( n + " ==> " + mappa.get(n) );
                    else
                        System.err.println(" DAMN - NO ATTR ");
              catch (Exception exception)
                exception.getMessage();
                exception.printStackTrace();
              System.out.println("OUT getCredenzialiUtente: " + SSOUsername);
              return SSOUsername;
            }        When I log to console with default "ldapService" module (outside the domain), I can get something like:
         2011-09-29 13:14:38,733 INFO  [STDOUT]  ####################################### USER = amadmin
         2011-09-29 13:15:32,250 INFO  [STDOUT] IN getCredenzialiLAit
         2011-09-29 13:15:32,260 INFO  [STDOUT] ######### USERNAME DA SSO: a2zarrillo
         2011-09-29 13:15:32,291 INFO  [STDOUT] uid ==> [a2zarrillo]
         2011-09-29 13:15:32,291 INFO  [STDOUT] givenName ==> [Antonio2]
         2011-09-29 13:15:32,311 INFO  [STDOUT] OUT getCredenziali: a2zarrillo
         2011-09-29 13:15:32,321 INFO  [STDOUT]  ####################################### USER = a2zarrillobut when i try to login from inside the domain (with kerberos, so no credentials) with a domain user, I get:
         2011-09-29 13:15:39,496 INFO  [STDOUT] IN getCredenzialiLAit
         2011-09-29 13:15:39,503 INFO  [STDOUT] ######### USERNAME DA SSO: tonyweb
         2011-09-29 13:15:39,550 ERROR [STDERR] Message:Plug-in  encountered an ldap exception.  LDAP Error 32: The entry specified in the request does not exist.
         2011-09-29 13:15:39,554 ERROR [STDERR]      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         2011-09-29 13:15:39,560 ERROR [STDERR]      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         2011-09-29 13:15:39,562 ERROR [STDERR]      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         2011-09-29 13:15:39,566 ERROR [STDERR]      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         2011-09-29 13:15:39,574 ERROR [STDERR]      at com.sun.identity.shared.jaxrpc.SOAPClient$SOAPContentHandler.createResourceBasedException(SOAPClient.java:834)
         2011-09-29 13:15:39,575 ERROR [STDERR]      at com.sun.identity.shared.jaxrpc.SOAPClient$SOAPContentHandler.endDocument(SOAPClient.java:800)
         2011-09-29 13:15:39,578 ERROR [STDERR]      at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source)
         2011-09-29 13:15:39,582 ERROR [STDERR]      at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)
         2011-09-29 13:15:39,587 ERROR [STDERR]      at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
         2011-09-29 13:15:39,592 ERROR [STDERR]      at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
         2011-09-29 13:15:39,598 ERROR [STDERR]      at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
         2011-09-29 13:15:39,600 ERROR [STDERR]      at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source)
         2011-09-29 13:15:39,604 ERROR [STDERR]      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         2011-09-29 13:15:39,607 ERROR [STDERR]      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         2011-09-29 13:15:39,609 ERROR [STDERR]      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         2011-09-29 13:15:39,613 ERROR [STDERR]      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         2011-09-29 13:15:39,616 ERROR [STDERR]      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         2011-09-29 13:15:39,621 ERROR [STDERR]      at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
         2011-09-29 13:15:39,625 ERROR [STDERR]      at com.sun.identity.shared.jaxrpc.SOAPClient.send(SOAPClient.java:343)
         2011-09-29 13:15:39,633 ERROR [STDERR]      at com.sun.identity.shared.jaxrpc.SOAPClient.send(SOAPClient.java:311)
         2011-09-29 13:15:39,636 ERROR [STDERR]      at com.sun.identity.idm.remote.IdRemoteServicesImpl.getAttributes(IdRemoteServicesImpl.java:229)
         2011-09-29 13:15:39,639 ERROR [STDERR]      at com.sun.identity.idm.remote.IdRemoteCachedServicesImpl.getAttributes(IdRemoteCachedServicesImpl.java:402)
         2011-09-29 13:15:39,642 ERROR [STDERR]      at com.sun.identity.idm.AMIdentity.getAttributes(AMIdentity.java:344)
         2011-09-29 13:15:39,645 ERROR [STDERR]      at org.apache.jsp.MainPageJSP_jsp.getCredenzialiUtente(MainPageJSP_jsp.java:63)
         2011-09-29 13:15:39,648 ERROR [STDERR]      at org.apache.jsp.MainPageJSP_jsp._jspService(MainPageJSP_jsp.java:217)
         2011-09-29 13:15:39,653 ERROR [STDERR]      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         2011-09-29 13:15:39,660 ERROR [STDERR]      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         2011-09-29 13:15:39,664 ERROR [STDERR]      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
         2011-09-29 13:15:39,666 ERROR [STDERR]      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         2011-09-29 13:15:39,669 ERROR [STDERR]      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         2011-09-29 13:15:39,673 ERROR [STDERR]      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         2011-09-29 13:15:39,676 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         2011-09-29 13:15:39,678 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         2011-09-29 13:15:39,683 ERROR [STDERR]      at com.sun.identity.agents.filter.AmAgentBaseFilter.allowRequestToContinue(AmAgentBaseFilter.java:127)
         2011-09-29 13:15:39,685 ERROR [STDERR]      at com.sun.identity.agents.filter.AmAgentBaseFilter.doFilter(AmAgentBaseFilter.java:76)
         2011-09-29 13:15:39,690 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         2011-09-29 13:15:39,697 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         2011-09-29 13:15:39,701 ERROR [STDERR]      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
         2011-09-29 13:15:39,705 ERROR [STDERR]      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
         2011-09-29 13:15:39,710 ERROR [STDERR]      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
         2011-09-29 13:15:39,713 ERROR [STDERR]      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
         2011-09-29 13:15:39,716 ERROR [STDERR]      at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
         2011-09-29 13:15:39,725 ERROR [STDERR]      at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
         2011-09-29 13:15:39,729 ERROR [STDERR]      at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
         2011-09-29 13:15:39,730 ERROR [STDERR]      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:178)
         2011-09-29 13:15:39,734 ERROR [STDERR]      at com.cid.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:92)
         2011-09-29 13:15:39,741 ERROR [STDERR]      at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:295)
         2011-09-29 13:15:39,744 ERROR [STDERR]      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
         2011-09-29 13:15:39,747 ERROR [STDERR]      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
         2011-09-29 13:15:39,750 ERROR [STDERR]      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
         2011-09-29 13:15:39,753 ERROR [STDERR]      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
         2011-09-29 13:15:39,761 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         2011-09-29 13:15:39,765 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         2011-09-29 13:15:39,768 ERROR [STDERR]      at com.cid.faces.webapp.CidWebUIFilter._invokeDoFilter(CidWebUIFilter.java:239)
         2011-09-29 13:15:39,776 ERROR [STDERR]      at com.cid.faces.webapp.CidWebUIFilter._doFilterImpl(CidWebUIFilter.java:196)
         2011-09-29 13:15:39,780 ERROR [STDERR]      at com.cid.faces.webapp.CidWebUIFilter.doFilter(CidWebUIFilter.java:80)
         2011-09-29 13:15:39,788 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         2011-09-29 13:15:39,793 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         2011-09-29 13:15:39,797 ERROR [STDERR]      at com.sun.identity.agents.filter.AmAgentBaseFilter.allowRequestToContinue(AmAgentBaseFilter.java:127)
         2011-09-29 13:15:39,803 ERROR [STDERR]      at com.sun.identity.agents.filter.AmAgentBaseFilter.doFilter(AmAgentBaseFilter.java:76)
         2011-09-29 13:15:39,807 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         2011-09-29 13:15:39,810 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         2011-09-29 13:15:39,813 ERROR [STDERR]      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
         2011-09-29 13:15:39,820 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         2011-09-29 13:15:39,825 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         2011-09-29 13:15:39,829 ERROR [STDERR]      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
         2011-09-29 13:15:39,833 ERROR [STDERR]      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         2011-09-29 13:15:39,836 ERROR [STDERR]      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
         2011-09-29 13:15:39,843 ERROR [STDERR]      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
         2011-09-29 13:15:39,846 ERROR [STDERR]      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         2011-09-29 13:15:39,851 ERROR [STDERR]      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
         2011-09-29 13:15:39,854 ERROR [STDERR]      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
         2011-09-29 13:15:39,857 ERROR [STDERR]      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         2011-09-29 13:15:39,860 ERROR [STDERR]      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
         2011-09-29 13:15:39,862 ERROR [STDERR]      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         2011-09-29 13:15:39,866 ERROR [STDERR]      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
         2011-09-29 13:15:39,870 ERROR [STDERR]      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         2011-09-29 13:15:39,874 ERROR [STDERR]      at java.lang.Thread.run(Thread.java:619)
         2011-09-29 13:15:39,877 INFO  [STDOUT] OUT getCredenziali: tonywebAs you can see I'm using the "sample" agentApp.war.     
    What am I missing ? It "crashes" as for getAttributes() call :/
    I thought it could be because I didn't setup LDAP DataStore ... so I set up Active Directory Data Store.
    While in openAM console (from outside domain) I can see (from Subjects tab) Active Directory users and relative information
    (like FirstName (=givenName), Surname (=sn), Full Name (=cn), etc.) ... when I try again with idm/EndUser (from a domain machine)
    I get the same error:
         Message:Plug-in  encountered an ldap exception.  LDAP Error 32: The entry specified in the request does not exist.What should I do now ?
    If you need more clarifications ... just ask :)
    Thank you in advance and sorry for the big post.
    Best Regards,
    Tony
    P.D. By the way, my OpenAM configuration does not create any "amAuthWindowsDesktopSSO.log" :(
    I setup, from opensso/Debug.jsp message level for Authentication ... but it still doesn't create this log ... can you please tell me how to let openAM write it ?
    Again thank you

    Weird enough, changing to ADAM data store (and not "standard" AD datastore) solved the problem :D
    I still wonder why since both plugins share the same java [implementing] class...
    Regards,
    Tony

  • 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

  • Is CISCO AP 1200 mountable on the ceiling ?

    I am unable to find any reference to mounting the AP 1200 on the ceiling. Does anyone know or have any experience with mounting the AP 1200 on the ceiling. We need to install about 22 of them all on the ceiling. I would appreciate a quick reply. Than

  • Firefox 3 CSS issues.

    Hello, We haven't seen any big issues either with the Firefox 3 beta's or Firefox 3 but now that FF 3 is out in the wild and no longer beta there are many more people using it. If you see any strange new CSS issue , in the Application Builder , SQL W

  • Administrator Account unavailable

    Two days ago when I woke up and open my MacBook Pro (OS Maverick), I started with a strange windows (than we can get with cmd+r). My hard drive was broken so I followed the proposed steps. I made a backup with TimeMachine. I lost a lot of data 'cause

  • Policies - how to best "protect" an LDAP installation?

    Hello. This isn't as much a technical question. I've been looking "all over the Internet" to see what people might have found to work before. If only there was some "How to run and protect your LDAP installation - best practices" guide somewhere :D W

  • Subcontracting PO for account assignment M & E

    Need Urgent help.... Dear Gurus, Require your expertise for the following senario:- While running MRP for MTO sale order , The planned orders created with account assignment category M. We do have one Planned order for Subcontracting as well and is c