Help me find syntax error in AS3 code to chain FLV videos.

I posted a how to do this a couple of weeks back & someone was kind enough to offer this advice to an AS newbie...
"you should create a fla, drag an flvplayback component to the stage, create an array of your flvs, initialize an index at zero, assign the flv to start playing your first flv and increment the index in a function that executes when an flv complete and play that array element until all are played.  you'll publish your html and swf from that fla." 
And he gave me a code sample which is below... modified to show my "instance" name as FlvChain
and my flv file names... vid1.flv, vid2.flv, and vid3.flv...
My code...
import fl.video.VideoEvent;
var flvA:Array=["vid1.flv","vid2.flv","vid3.flv"];
var index:uint=0;
FlvChain.source=flvA[index];
FlvChain.addEventListener(VideoEvent.COMPLETE,completeF){
index++;
if(index<flvA.length){
FlvChain.source=flvA[index];
} else {
// all flvs played
When I attempt to Debug I get this message...
"1087: Syntax error: extra characters found after end of program."
I'm sure I made a silly error. I've never done AS before I'm running CS3 & AS3 on a PC with XP Pro.
Thanks for any help.

use:
import fl.video.VideoEvent;
var flvA:Array=["vid1.flv","vid2.flv","vid3.flv"];
var index:uint=0;
FlvChain.source=flvA[index];
FlvChain.addEventListener(VideoEvent.COMPLETE,completeF);
function completeF(e:VideoEvent)
index++;
if(index<flvA.length){
FlvChain.source=flvA[index];
} else {
// all flvs played

Similar Messages

  • Please help in finding the error in this code

    Dear Friends,
    I am trying to make the value of 'Shift' on the basis of  BLDAT CPUDT & CPUTM of MKPF but I am doing something wrong. Kindly have a look at the following code, especially the IF..ELSEIF section and help me in finding the error.
    Regards,
    Alok.
    SELECT MBLNR MJAHR BKTXT BUDAT BLDAT CPUDT CPUTM USNAM
    INTO CORRESPONDING FIELDS OF TABLE I_MKPF1
    FROM MKPF
    WHERE
    BUDAT EQ S_BUDAT AND
    TCODE2 EQ 'MFBF'.
    ********************************************************ALOK 01.02.07
    LOOP AT I_MKPF1.
           I_MKPF-MBLNR = I_MKPF1-MBLNR.
           I_MKPF-MJAHR = I_MKPF1-MJAHR.
           I_MKPF-BKTXT = I_MKPF1-BKTXT.
           I_MKPF-BUDAT = I_MKPF1-BUDAT.
           I_MKPF-BLDAT = I_MKPF1-BLDAT.
           I_MKPF-CPUDT = I_MKPF1-CPUDT.
           I_MKPF-CPUTM = I_MKPF1-CPUTM.
           I_MKPF-USNAM = I_MKPF1-USNAM.
    IF   ( ( I_MKPF1-CPUTM >= '090000' AND I_MKPF1-CPUTM < '160000' )
    AND   ( I_MKPF1-BLDAT = I_MKPF1-CPUDT ) ).
    I_MKPF-SHIFT = 'A'.
    ELSEIF ( ( I_MKPF1-CPUTM >= '090000' AND I_MKPF1-CPUTM <= '110000' )
       AND  ( I_MKPF1-BLDAT <>  I_MKPF1-CPUDT ) ).
    I_MKPF-SHIFT = 'C'.
    ELSEIF ( ( I_MKPF1-CPUTM >= '160000' AND I_MKPF1-CPUTM < '000000' )
      AND  ( I_MKPF1-BLDAT = I_MKPF1-CPUDT ) ).
    I_MKPF-SHIFT = 'B'.
    ENDIF.
    APPEND I_MKPF.
    CLEAR I_MKPF.
    ENDLOOP.

    Hi.
    IF (  I_MKPF1-CPUTM >= '090000' AND I_MKPF1-CPUTM < '160000' )
           AND ( I_MKPF1-BLDAT = I_MKPF1-CPUDT ) .
    I_MKPF-SHIFT = 'A'.
    ELSEIF  ( I_MKPF1-CPUTM >= '090000' AND I_MKPF1-CPUTM <= '110000' )
    AND ( I_MKPF1-BLDAT <> I_MKPF1-CPUDT ) .
    I_MKPF-SHIFT = 'C'.
    ELSEIF ( I_MKPF1-CPUTM >= '160000' AND I_MKPF1-CPUTM < '000000' )
    AND ( I_MKPF1-BLDAT = I_MKPF1-CPUDT ) .
    I_MKPF-SHIFT = 'B'.
    ENDIF.
    Try the above code ..
    Regards
    Sudheer

  • Help - cannot find symbol error

    Can someone help me? I am getting "cannot find symbol" error in my code and cannot figure out why. Here is my code:
    public class toyInventory
    private String[] toyInventory = {"ball", "bat", "bear", "car", "doll", "game", "glove", "playstation", "train"};
    private int[] nineArray = {0,0,0,0,0,0,0,0};
    int invItems = 0;
    public void countToy()
    String orderInput[] = {"bear", "train", "car", "ball", "doll", "ball", "train", "doll", "game", "train", "bear", "doll", "train", "car", "ball", "bat", "glove", "bat", "b", "doll", "bear", "ball", "doll", "bat", "car", "glove", "train", "doll", "bear"};
    int noMatch;
    for(int a = 0; a < orderInput.length; a++)
    noMatch = 0;
    for(int b = 0; b < toyInventory.length; b++)
    if(orderInput[a] == toyInventory)
    noMatch = 1;
    break;
    if(noMatch == 0)
    invItems = 1;
    public void printItems()
    for(int c = 0; c < toyInventory.length; c++)
    if (countToy[c] > 4)<-------- cannot find symbol error here
    System.out.print("*");
    System.out.print(toyInventory[c] + "\t" + countToy[c] + "\n"); <----cannot find symbol error here also
    System.out.print("The number of invalid items in the order is" + invItems);
    public static void main( String[] args)
    toyInventory collection = new toyInventory ();
    collection.countToy();
    collection.printItems();

    public void countToy()
    String orderInput[] = {"bear", "train", "car", "ball", "doll", "ball", "train", "doll", "game", "train", "bear", "doll", "train", "car", "ball", "bat", "glove", "bat", "b", "doll", "bear", "ball", "doll", "bat", "car", "glove", "train", "doll", "bear"};In the above code you have declared countToy() as method and while in the below lines you are calling countToy[] as an array. So please check that...
    if (countToy[c] > 4)<-------- cannot find symbol error here
    System.out.print("*");
    System.out.print(toyInventory[c] + "\t" + countToy[c] + "\n"); <----cannot find symbol error here also
    }

  • Please help me find the error in the annex VI,access

    Hello, everyone, this is a program about ACCESS, please help me find the error in the annex VI, why do I always run time error. Thank you very much.
    Attachments:
    write access test.vi ‏22 KB

    Thank you for your reply, I have an attachment process map, could you help me change it, I just want to put my number in the array can continue to update the database. And I want to create a table.
    this is my msn :[email protected]
    Waiting for your reply on line
    谢谢你的回复,我的附件中有程序图,能不能帮我改一下,我只是希望,把我的数组中的数能够持续的更新在数据库中。并且创建一个我想要的表。

  • Blu-ray Error: "invalid operation", Code: "19", Note: "primary video stream attributes must be consi

    When i try make a blu Ray (folder or image) i receive this error "
    Blu-ray Object: "<Timeline>Untitled Timeline", Error: "invalid operation", Code: "19", Note: "primary video stream attributes must be consistent with playList"
    is a specific error for blu ray?
    Whats happen?.
    Thanks a lot
    If I create a dvd, all is right, no error are showed a dvd folder is created

    Hello:
    Finally I could make the Blu Ray disc.
    The problem was in put in the same timeline two files in mpg format and psd file with 6 seconds of duration.
    (no compatible timeline, causes error code 19)
    For  a right process a put each file in sperate timeline and end action link to the next file, Then, all go right an BR plays fine.
    Maybe there was somthing diferent inside each mpg file , incompatble for a same timeline.
    The mpg files were extratecd from dvd (vob files)
    I hope that my exprerince help in the future to others persons with the same problems
    Thanks all for support
    Regards

  • ABAP Syntax error in this code - Could anyone help?

    Hi,
    I have this code which runs fine in our non-unicode SAP system.
    REPORT  ECC5_OFFSETS.
    DATA: W_KONV TYPE KONV.
    DATA: TKOMK LIKE STANDARD TABLE OF KOMK
                     WITH KEY KEY_UC
                     INITIAL SIZE 2
                     WITH HEADER LINE.
    DATA: TKOMK2 type STANDARD TABLE OF KOMK
                     WITH KEY KEY_UC
                     INITIAL SIZE 2.
    * Get some test data
    SELECT SINGLE * INTO W_KONV FROM  KONV
           WHERE  KNUMV  = '0000000061'.
    MOVE-CORRESPONDING W_KONV TO TKOMK.
    APPEND TKOMK.
    tkomk2[] = TKOMK[].
    * Original non-Unicode compliant code
    DATA: LENGTH_KEY_TKOMK(3) TYPE P.
    FIELD-SYMBOLS: <TKOMK_KEY> like TKOMK2.
    DESCRIBE DISTANCE BETWEEN TKOMK-MANDT AND TKOMK-SUPOS
              INTO LENGTH_KEY_TKOMK
    * ( Original Unicode syntax fix! )
              IN BYTE MODE.
    * Copy all the fields between these two into TKOMK_KEY field-symbol.
    * ( In Unicode this assignment fails, causing short dump at read )
    ASSIGN TKOMK2(LENGTH_KEY_TKOMK) TO <TKOMK_KEY>.
    * Read the current record.
    READ TABLE TKOMK2 WITH KEY <TKOMK_KEY>.
    But I get the following error message in our UNICODE complaint SAP system:
    <b>"<TKOMK_KEY>" cannot be a table, a reference, a string, or contain any of these objects.</b>     
    Does anyone know how I could get around this/suggest a solution?
    Thanks in advance!

    Hi,
    Sorry if I'm being unclear.
    My requirements are twofold:
    1)the line of code:
    ASSIGN TKOMK2(LENGTH_KEY_TKOMK) TO <TKOMK_KEY>
    does not assign anything to the fields symbol <TKOMK_KEY>
    2)The read statement does not like the fields symbol <TKOMK_KEY> being used as a key.
    Both these bits of code worked in our 4.6b system but now in the ECC5 environemtn I get syntax errors.
    Let me know if you need anything else!

  • How to find syntax errors in TestStand?

    Hi,
    I have about 70 sequences and I'm trying to find any syntax errors, which evaded my "error radar". How can I find these in TestStand without moving through every step (which would around 1000 and more steps!)? I'm missing something like the "syntax" check in LabVIEW, which indicates right in your face, if you brake the block diagram.
    Thanks for any help.
    Marc
    CLD
    Solved!
    Go to Solution.

    Checking expressions at edit time to make sure that they will evaluate correctly at run time is a tricky process.  For instance, what if you are dynamically creating an array at run time, and then iterating through that array.  Unless you give that array good default values (which may be difficult if it is an array of custom types), your expressions will not be correct at edit time, and could be flagged as errors.
    However, this is a request that we have heard quite a bit, and NI is investigating ways to allow customers to validate their expressions before running a sequence.
    In the meantime, one of the TestStand developers created a tool that does what Doug was describing: iterates through every property object in a file and if it is an expression, tries to evaluate it.  This tool is written as a sequence file in TestStand 4.1.  Please note that since it uses recursion to iterate through each property object, and since recursion with sequences can be rather slow, the performance of this tool may be improved by duplicating its functionality with a code module (rather than sequence steps).
    Message Edited by Josh W. on 03-30-2009 02:20 PM
    Josh W.
    Certified TestStand Architect
    Formerly blue
    Attachments:
    CheckExpressions41.seq ‏13 KB

  • Designer syntax errors in correct code.

    I have added some trigger code to a bound item. The designer syntax checker finds errors in the code but the generated form runs correctly. It appears that the syntax checker doesn't like DECLARE. The code doesn't do anything and I believe it is fine but I would like to get the syntax checker to stop complaining about it. Any suggestions on how I might arrange things to stop the syntax error messages would be appreciated. Here is the offending code with error messages:
    DECLARE
    item_id     Item;
    BEGIN
    item_id := FIND_ITEM('M1.STATE');
    END;
    The Syntax Checker found the following errors:-
    PLS-00103: (Line 1) Encountered the symbol "DECLARE" when expecting one of the following:
    begin function package pragma procedure separate subtype type
    use <an identifier> <a double-quoted delimited-identifier>
    form current cursor external language
    The symbol "begin" was substituted for "DECLARE" to continue.
    PLS-00103: (Line 20) Encountered the symbol "end-of-file" when expecting one of the following:
    begin case declare end exception exit for goto if loop mod
    null pragma raise return select update while with
    <an identifier> <a double-quoted d
    [2] error(s), [0] warning(s)

    This will not work correctly in 32-bit Windows (or 64-bit) The type of wParam *must* be WPARAM, the type of lParam *MUST* be LPARAM, and for a dialog handler the return type should be BOOL. The old _export keyword no longer exists, and is not needed in
    Win32. FAR is a macro with an empty body and its appearance in all places can be deleted. The quaint and confusing PASCAL keyword may still work, but it would be better to use the now-correct term CALLBACK. Since this is clearly antique Win16 code, there may
    be other problems dealing with size of integers. The types int, long, DWORD, UINT and others all represent 32-bit values. The return type for window handlers must have the return type LRESULT, and for dialog handlers, BOOL. All wParam and lParam types must
    be changed as I indicated. Note that for Win16, wParam was 16-bit and lParam 32-bit. For Win32, WPARAM, LPARAM and LRESULT are all 32-bit values, and for Win64 they are 64-bit values. Any place the code casts a pointer to an integer type, the code is inherently
    incorrect. You must use types like INT_PTR, UINT_PTR, DWORD_PTR and other _PTR-suffixed types for such casts; in Win32 these are pointer-sized integer types (32-bit) and in Win64 they are pointer-sized integer types (64-bit). Types like int, long, DWORD, etc.
    are 32-bit values in both Win32 and Win64. Converting code to run on Win32/64 from Win16 requires great caution, because the programming "standards" that were taught for Win16 did not plan on true platform portability, and programmers were taught
    terrible techniques such as declaring wParam as WORD and LPARAM as long. And casting pointers to ints and back. All of these techniques lead to disaster.

  • Urgent Help Cant find an error in this statement and jdk is showing

    Error:
    Exception: [Microsoft][ODBC Microsoft Access Driver] Syntax error in CONSTRAINT clause.
    `````````````````H E L P```````````````
    s1.executeUpdate("Create Table " + n + " (Sno integer, Name varchar(20),So varchar(5),Source varchar(15), TTO integer, TTH integer, Status varchar(5), Rec varchar(15), DOJ Date, Type varchar(10), Sector varchar(15), Primary varchar(15), Proj varchar(15), Skills varchar(15), Level varchar(10), Band integer, Location varchar(15), Company varchar(20), Remarks varchar(50), Test date, IV date, Qualification varchar(15), RefSal float, RIF_NO integer, RIF_DATE Date, Target_Date Date, Lead_Time date, SLA_ACH Date, R1 date, R2 date, R3 date, R4 date,R5 date, R6 date, R7 date, R8 date, RR1 date,RR2 date, RR3 date, RR4 date,RR5 date, RR6 date, RR7 date, RR8 date)");
    I am using access as backend database on a remote machine.

    n is not a numeric data but is of string typeThat was just for your information because you didn't show any of your java code.
    Did you try changing the names of those columns? I haven't used access much, but i believe there is some workaround to using reserved words by putting square brackets aroundf them. I haven't done it, I just noticed the access gui front end does it sometimes. i found it much easier to just not use words I thought might be reserved.

  • Syntax Error in Login Code PHP

    Hello,
    I am currently building my first log-in page and have come to the following issue. I am getting Syntax Error's on lines 39 & 49.
    I'm sure it's something simple that I am missing here?
    NOTE* Excuse me if I didn't post the code correctly, I am new to the forums.
    Click here to enter the members area";         $_SESSION{'username'}=dbusername;             }     else         echo"Incorrect Password";     }         else         die "that username doesnt exist";                 } else     die ("Please Enter a username and password");     } ?>

    Thanks for the reply!
    I fixed what you noted above and will look into not using the "die" command, I understand what you are saying about not using it and why
    However, here is where I am getting the syntax errors specifically:
    $_SESSION{'username'}=$dbusername;
    else
    echo"Incorrect Password";
    <syntax Error>
    else
    die "that username doesnt exist";
    else
    die ("Please Enter a username and password");
    }       <syntax Error>
    ?>

  • How best to find syntax errors in a PDF

    Hi,
    I want to find out the best way for an end user to identify syntax errors in a PDF, such as "expected a dict object", which might occur when a user opens the PDF. I usually find these when using the Acrobat SDK to parse a PDF in some way. However, for an end-user, a tool would be necessary.
    Using the Acrobat preflight tool enables you to browse the structure of a PDF and potentially see errors but that is not suitable for anyone other than an expert. What I am looking for is a way to check a load of files for these sorts of errors in a batch process so that a non-expert can identify the problem files that need fixing. Is there a good way of doing that?
    Thanks
    David

    Thanks, that seems to do just what is needed.
    David
    In message <328241050.1047331251123977205.JavaMail.jive@sgaurwa41p>,
    Leonard Rosenthol <[email protected]> writes
    >
    >Adobe Acrobat's preflight also includes a "Report Syntax Errors" option
    >that will do many types of validation on the PDF.   You can run this in
    >Batch or via a droplet.
    >

  • Syntax errors for smarty code

    I work with smarty a lot, and I mean a lot.  Every single day in fact, all day long.  Is there a way to turn off the syntax errors for my smarty code?  Basically every file I open is going to tell me there are syntax errors all over the page...
    Thanks!

    I am not familiar with smarty but the options for disabling syntax errors can be found under the view menu,
    View > Code View Options > Syntax Error Alerts in Info Bar (tick or untick)
    Richard

  • Syntax Error in Generated Code

    Hi All,
                I am facing the syntax error in WD4A.
    Web Dynpro Comp. / Intf. Z_PO_REQUEST,Web Dynpro Component Controller COMPONENTCONTROLLER
    Error in Generated Code
    The type "ZIWCI_PO_Request" is unknown, but there is a type with the
    similar name "IG_Z_PO_REQUEST". "IG_Z_PO_REQUEST". "IG_Z_PO_REQUEST".
    Any Suggestions to fix this?.
    Thanks in Advance,
    Rajen.

    Hi All,
                I am facing the syntax error in WD4A.
    Web Dynpro Comp. / Intf. Z_PO_REQUEST,Web Dynpro Component Controller COMPONENTCONTROLLER
    Error in Generated Code
    The type "ZIWCI_PO_Request" is unknown, but there is a type with the
    similar name "IG_Z_PO_REQUEST". "IG_Z_PO_REQUEST". "IG_Z_PO_REQUEST".
    Any Suggestions to fix this?.
    Thanks in Advance,
    Rajen.

  • Syntax error in my code and I can't figure out the problem

    When I try to compile a program, I get this message:
    Syntax error on token "(", "Identifier" expected
    This is the part of the code that is giving me trouble:
    JTextPane textPane = createTextPane();
              JScrollPane paneScrollPane = new JScrollPane(textPane);
              paneScrollPane.setVerticalScrollBarPolicy(
                                  JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
              paneScrollPane.setPreferredSize(new Dimension(250, 155));
              paneScrollPane.setMinimumSize(new Dimension(10, 10));Can you see what's wrong?
    Thanks

    The code's syntax is perfectly fine. The compiler is not falgging an error message in this part of your code. One silly thing you can do:
    Try out this silly change...I don't think it will make any difference but still.
    paneScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);That is, put it all in a single line.
    If it is already in a single line then you can be sure that the problem is being flagged from elsewhere in your code and this portion.
    Vijay :-)

  • Help in finding out error in include ---se37

    Hello everyone,
    This is regarding the include in the function module .
    Where we define constants , i have to define like this
    If plant EQ 'ita' OR plant EQ 'del' OR plant EQ 'net' .
            c_form LIKE itcta-tdform VALUE 'form1' .
            ELSE .
            c_form LIKE itcta-tdform VALUE 'form2' .
            ENDIF .
    The error that i get while activating is "unable to interpret PLANT -possible causes -incorrect spelling or comma error".
    I am not able to find out where i am going wrong .
    Can anyone help me find out the error or where and what i missed out .
    Any help will be appreciated .
    Thanks
    Sumit

    Hi,
    U have not defined the varibale PLANt.
    Defin ethe same in   Tcode = SE37
    Give the function module name and clcik on change.
    Use menu GOTO----
    >GLOBAL DATA.  define the plant here as below.
    data: plant type werks.
    Regards,
    Pravin

Maybe you are looking for

  • Error while running Master Data IP

    HI Xpertz Could any one tell me resolution for the following.I am running a master data Ip It gives the following error "errors in source system". Its daily load. If any docs please send it to the following id : [email protected] Any answer will appr

  • Organization structure for Case study .... need yr advice

    Hi …I am in process of preparing an org structure for one of the company. The company operations is like …. The company has four factories in different locations and have 3 Regional distribution centers (RDC) across india. Each distribution center ha

  • Changing the Label Add to Portal Favorites

    Hello All, I want to change the label " Add to Portal favotite" I have downloaded the file <b>com.sap.portal.navigation.pagetoolbar</b> and I got a zipped file out of it . Iam unable to import this file to make changes. Can anybody suggest me the way

  • Will B2B Adapter in SOA Composite receives fault when validation fails ?

    Hi Guys, Can any one clarify the following questions on B2B ? 1. Can B2B Adapter receive exception whenever validation fails on b2b console after data sent from SOA Composite? if not how can we implement fault to soa composite in case of fault in b2b

  • Failed to access remotely to cam PVC2300

    Hi, I'm having a issue accessing remotely to 5 cameras through Internet. I enable different port to each camera (1024, 1025 and so on), i'm using static LAN IP for those cameras (even try using DHCP). I enable DDNS with my current domain, user and pa