Error when copying code from one file to another

This bit of code works perfectly well in a test file with a single button:
var link:URLRequest=new URLRequest("http://www.mywebsite.ca");
buttonName.addEventListener(MouseEvent.CLICK, onClick);
function onClick(event:MouseEvent):void{
navigateToURL(link);
... but when I copy it into the file I'm working on, which has no other actionscripts or buttons, just a lot of animation I get this compiler error:
Description: '{' expected  Source: function onClick()event:MouseEvent):void{ 
Description: Unexpected '}' encountered   Source: {
Any ideas?

According to your error message, your onClick function declaration line closes the parenthesis twice... you may have a typo in what you actually put in the file versus what you think you put...
function onClick()event:MouseEvent):void{

Similar Messages

  • Error when copying items from one table to another

    I am trying to copy data from 2 archive tables within an
    Access database to their twin production tables. The first table
    copies perfectly with the code:
    <CFQUERY NAME="moveArchAttach" datasource="faaco2">
    INSERT INTO tbl_Attachment ( PostID, Attachment, AttachNote,
    AttachName )
    SELECT tbl_Attachment_Archived.PostID,
    tbl_Attachment_Archived.Attachment,
    tbl_Attachment_Archived.AttachNote,
    tbl_Attachment_Archived.AttachName
    FROM tbl_Attachment_Archived
    </CFQUERY>
    However, when trying to use similar code on the other table:
    <CFQUERY NAME="moveArchPost" datasource="faaco2">
    INSERT INTO tbl_Posting ( Title, FirstName, LastName,
    PhoneNumber, RoutingSymbol, Email, IniDate, ComDate, SOLNBR,
    PhaseCode, ProcCode, Posting, Password, RegionCode )
    SELECT tbl_Posting_Archived.Title,
    tbl_Posting_Archived.FirstName, tbl_Posting_Archived.LastName,
    tbl_Posting_Archived.PhoneNumber,
    tbl_Posting_Archived.RoutingSymbol, tbl_Posting.Email,
    tbl_Posting.IniDate, tbl_Posting.ComDate, tbl_Posting.SOLNBR,
    tbl_Posting.PhaseCode, tbl_Posting.ProcCode, tbl_Posting.Posting,
    tbl_Posting.Password, tbl_Posting.RegionCode
    FROM tbl_Posting_Archived
    </CFQUERY>
    I receive the error:
    [Microsoft][ODBC Microsoft Access Driver] Too few parameters.
    Expected 9.
    Any help would be greatly appreciated, I am at a loss and
    I've tried everything. Thank you.

    I realized my error immediately after posting this topic and
    subsequently have resolved this error. On 9 of the values, I have
    listed the wrong table in the SELECT statement. This is why one
    needs to take breaks instead of staring at a screen forever :).
    Thank you anyway!

  • HELP: Copying layers from one file to another to keep structure not possible??!!!

    Hi guys,
    I have a curious question. Sounds a bit silly and highly disappointed if Illustrator is actually not capable of doing this. Hopefully I have missed something.
    I have an AI doc that has grown so large that saving it now is a major effort so trying to break out sections into multiple AI files. Allot of users will be working on these files so it is imperative that all the Artboard elements are clearly organized in the appropriate folders (layers). Im trying to simply copy and paste a layer that has multiple layers beneath and within those more layers to another empty AI file. Everything copies correctly and in place however it dumps all the elements into a single massive layer in the new file. If I go into the Layer Palette menu and check on Paste Remembers Layers it does a better job at keeping some of the structure but it still doesnt copy exactly how the structure was in the Master document.
    Please tell me Im doing something wrong. I cant believe that you cant simply drag and drop a parent layer from one file to another while maintaining its structure! Exactly like in Photoshop - copying a folder from one file to another is simply as easy as dragging and dropping ...is this same methodology not available with Illustrator? I always assumed the layer and folder concept between these two packages were somewhat interchangeable.
    Thanks for any help, comments, or suggestions
    Nick.

    Hi All,
    After much trial and error trying to locate where the problem was it ended up being the guide objects. If you have the guides set to lock and attempt to copy out any layer that a guide is sitting in the resulting copy/paste will break apart that layer structure in the destination file. Simply setting the guides unlock allows everything to translate correctly.
    You guys may have known about it already but I learnt a little something in the process. Thanks to all for your suggestions!
    Cheers

  • Indesign CS5 crashing public.dll when copying pages from one document to another

    Hello,
    I have several Lenovo W520 (Core i7-2720, 8GB ram, Quadro 1000M) and a couple Dell M6500 (Core i7, 4GB ram, Quadro FX 2800M) all running Windows 7 Pro x64, the latest video drivers and Adobe CS5, including Indesign 7.0.4.  We have several different Indesign docs that for the purpose of interactive Table of Contents, are copying pages from one to another to end up with one master document.  On the majority of the documents, copying as few as one page to another doc crashes Indesign with the windows system error below. 
    Faulting application name: InDesign.exe, version: 7.0.4.553, time stamp: 0x4d890440
    Faulting module name: Public.dll, version: 7.0.4.553, time stamp: 0x4d8903ca
    Exception code: 0xc0000005
    Fault offset: 0x00038727
    Faulting process id: 0x18c0
    Faulting application start time: 0x01ce1f68465d45de
    Faulting application path: C:\Program Files (x86)\Adobe\Adobe InDesign CS5\InDesign.exe
    Faulting module path: C:\Program Files (x86)\Adobe\Adobe InDesign CS5\Public.dll
    Report Id: fa196aee-8b5b-11e2-9afa-a088b43f1cec
    We have tried working with the documents on different machines (both specs outlined above), and copying different pages from one doc to another in varying quantities.  The documents do not have any link errors or other references that need to be corrected. 
    Any suggestions or other things to look at?
    Thanks.

    HI. Same problem Here. i will now trying to reinstall the software. hopefully it will help me.
    What could be the cause of this error? its not in english sorry for that.
    Název protokolu:Application
    Zdroj:         Application Error
    Datum:         22.4.2013 14:09:32
    ID události:   1000
    Kategorie úlohy:(100)
    Úroveň:        Chyba
    Klíčová slova: Klasické nastavení
    Uživatel:      Není k dispozici
    Počítač:       NB-CZ-1209.cz.corp.mann-hummel.com
    Popis:
    Název chybující aplikace: InDesign.exe, verze: 7.5.3.333, časové razítko: 0x4f6b9e72
    Název chybujícího modulu: Public.dll, verze: 7.5.3.333, časové razítko: 0x4f6b9c77
    Kód výjimky: 0xc0000005
    Posun chyby: 0x000df832
    ID chybujícího procesu: 0xad4
    Čas spuštění chybující aplikace: 0x01ce3f522c7f2f21
    Cesta k chybující aplikaci: C:\Program Files\Adobe\Adobe InDesign CS5.5\InDesign.exe
    Cesta k chybujícímu modulu: C:\Program Files\Adobe\Adobe InDesign CS5.5\Public.dll
    ID zprávy: 7d476cca-ab45-11e2-b201-009c02185dea
    Kód XML události:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Application Error" />
        <EventID Qualifiers="0">1000</EventID>
        <Level>2</Level>
        <Task>100</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2013-04-22T12:09:32.000000000Z" />
        <EventRecordID>12469</EventRecordID>
        <Channel>Application</Channel>
        <Computer>NB-CZ-1209.cz.corp.mann-hummel.com</Computer>
        <Security />
      </System>
      <EventData>
        <Data>InDesign.exe</Data>
        <Data>7.5.3.333</Data>
        <Data>4f6b9e72</Data>
        <Data>Public.dll</Data>
        <Data>7.5.3.333</Data>
        <Data>4f6b9c77</Data>
        <Data>c0000005</Data>
        <Data>000df832</Data>
        <Data>ad4</Data>
        <Data>01ce3f522c7f2f21</Data>
        <Data>C:\Program Files\Adobe\Adobe InDesign CS5.5\InDesign.exe</Data>
        <Data>C:\Program Files\Adobe\Adobe InDesign CS5.5\Public.dll</Data>
        <Data>7d476cca-ab45-11e2-b201-009c02185dea</Data>
      </EventData>
    </Event>

  • Error when cloning db from one machine to another

    Hi people.
    I am trying to clone a database from one machine to another. (both are linux x86_64 machines with 11g installed on both)
    I obtained the following error after a few minutes into the process. Any workarounds for this?
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00601: fatal error in recovery manager
    RMAN-03004: fatal error during execution of command
    RMAN-10041: Could not re-create polling channel context following failure.
    RMAN-10024: error setting up for rpc polling
    RMAN-10005: error opening cursor
    RMAN-10002: ORACLE error: ORA-03114: not connected to ORACLE
    RMAN-03002: failure of Duplicate Db command at 11/26/2013 23:05:42
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06136: ORACLE error from auxiliary database: ORA-01092: ORACLE instance terminated. Disconnection forced
    ORA-00704: bootstrap process failure
    ORA-39700: database must be opened with UPGRADE option
    Process ID: 9054
    Session ID: 91 Serial number: 5

    Likely the RDBMS Software version and/or Patchset level is not the same on the two servers.
    Hemant K Chitale

  • Dtp error when loading data from one cube to another cube?

    hi,experts
      it seems strange that when I tick the some characteristics as navigational attributes in the cube , the error occurs during the execution of the DTP:error while updating to target Z* (Cube name ).
    once i turn the flag off , no error appear. could anyone give me a clue ?
    thanks in advance!

    Hi,
    When u make changes in the cube u need to make necessary changes in Transformation and activate the DTP.The checking of Navigational attributes in cube will appear in u r transformation as new fields where u need to create a mapping for them and then activate, also activate your DTP and then load the data. This should resolve your issue.
    Regards

  • How do I reorganize my photos on iPad 2?  I need to move (not copy) photos from one album to another.  When I use the copy function to another album, and then try to delete an image from the original album, the system wants to delete the photos from all a

    How do I reorganize my photos on iPad 2?  I need to move (not copy) photos from one album to another.  When I use the copy function to another album, and then try to delete an image from the original album, the system wants to delete the photos from all albums.  Please help.

    You can't do it directly on the iPad - the new album functionality basically only allows you to copy photos into those new albums, you can't move them. The way that I think of it as working is that you are just creating pointers to the photos in those new albums, so if you then delete the original photo on the iPad you therefore automatically delete all the pointers to it.
    If you want to re-organise your albums then you will need to do it on your computer and then sync those albums over to the iPad

  • ! Error when copying song from Purchased to IPod play list.  How to fix?

    ! Error when copying song from Purchased to IPod play list. How to fix?

    Hi
    Try the iPod for windows forum http://discussions.apple.com/forum.jspa?forumID=826
    Tony

  • T code to Copy Data from one table to another table

    Hi,
    I want copy all data of one table to its copy table. Anyone knows transaction code to copy data from one table to another table.
    Regards,
    Jigar Thakkar.

    Hi
    Create a small program.
    Extract data from T1 - database table and put it in one internal table - itab1.
    loop the itab1 data .............
        insert itab1 into tab2.   (tab2 - second database table)
    endloop.
    try this....
    hope it works....

  • Copy custom code from one track to another track

    How can we copy only new code from one track to another track. We don't want to merge the other DCs exisitng between 2 tracks. Is it possible through track connection? Pls give your valuable suggestions.
    Thanks,
    Santha

    HI,
    you just want to copy new code?
    i really dont understand this question.
    but as per my understanding
    1. you can copy a whole track..through track connection.
    2. You can do one thing if just want to copy new code, use NWDS and copy new changes into other tracks DC. it will be good.
    3. there is option for workspace comparision and integration. think of it, if suitable.

  • Copying value from one cursor to another

    Hi,
    I have a problem while copying values from one cursor to another cursor.
    The code looks like below.
    PROCEDURE XYZ
                TransactionResultSet OUT NOCOPY types.ref_cursor,
    IS
                temp_cursor types.ref_cursor;
                wip_rec types.ref_cursor;
    BEGIN
    DECLARE
                    CURSOR temp_cursor IS
                SELECT ...........
    END;
    BEGIN     
        FOR wip_rec IN temp_cursor
        LOOP
        update tinsagr set something
        where {the condition}
            IF SQL%ROWCOUNT = 0 THEN
      dbms_output.put_line('this is test ');
            Fetch wip_rec into TransactionResultSet;
         END IF;
       END LOOP;so basically i want to iterate the "temp_cursor" and depending on the values i get it from here i shall update a table. Actually i want to exclude few records from "temp_cursor" and add it/copy rest of the records to "TransactionResultSet"
    That means say initially " temp_cursor" has 100 records and i updated 5 records in a table and same number of records should be excluded and rest should be added to the output cursor TransactionResultSet.
    How do i achieve it?
    while saving i am getting
    (1): PLS-00456: item 'WIP_REC' is not a cursor.
    Do any one has any idea what to do in such scenario?

    There are options like....
    SQL> CREATE OR REPLACE TYPE emp_obj AS OBJECT (ename VARCHAR2(50), dept NUMBER);
      2  /
    Type created.
    SQL> CREATE OR REPLACE TYPE emp_tbl IS TABLE OF emp_obj;
      2  /
    Type created.
    SQL> set serverou on
    SP2-0158: unknown SET option "serverou"
    SQL> set serverout on
    SQL> DECLARE
      2    rc      sys_refcursor;
      3    v_ename emp.ename%TYPE;
      4    v_dept  emp.deptno%TYPE;
      5    ---End Of Local Varriable Declaration
      6    --Procedire declaration !
      7    PROCEDURE TEST_CUR(pi_out_ref_cur IN OUT sys_refcursor) IS
      8      emp_rec emp_tbl;
      9    BEGIN
    10      /* This BULK COLLECT can be done with explicit cursor,Ref Cursor
    11      with some simple modification, Here I have used implicit cursor! */
    12      SELECT emp_obj(ename, deptno) --Casting as the object
    13      BULK COLLECT
    14        INTO emp_rec
    15        FROM emp
    16       WHERE deptno = 10;
    17   
    18      dbms_output.put_line('Records selected are:');
    19      FOR i in 1 .. emp_rec.COUNT LOOP
    20        dbms_output.put_line(emp_rec(i).ename || '--' || emp_rec(i).dept);
    21      END LOOP;
    22      --Now we are filtering the record and may be doing some operation with each record.
    23      FOR i in 1 .. emp_rec.COUNT LOOP
    24        IF emp_rec(i).ename = 'KING' THEN
    25          --You can change this IF according to your need.
    26          emp_rec.DELETE(i);
    27        END IF;
    28      END LOOP;
    29      OPEN pi_out_ref_cur FOR
    30        SELECT * FROM TABLE(emp_rec); --Using the TYPE AS table.
    31    END TEST_CUR;
    32    /* Main execution or procedure calling section*/
    33  BEGIN
    34    --Actual calling
    35    TEST_CUR(rc);
    36    dbms_output.new_line;
    37    dbms_output.put_line('Now in Ref Cursor');
    38    dbms_output.put_line('****************');
    39    LOOP
    40      FETCH rc
    41        INTO v_ename, v_dept;
    42      dbms_output.put_line(v_ename || '--' || v_dept);
    43      EXIT WHEN rc%NOTFOUND;
    44    END LOOP;
    45 
    46  END;
    47  /
    Records selected are:
    CLARK--10
    KING--10
    MILLER--10
    Now in Ref Cursor
    CLARK--10
    MILLER--10
    MILLER--10
    PL/SQL procedure successfully completed.
    SQL>

  • How can i copy apps from one computer to another?

    how can i copy apps from one computer to another?

    You don't mention which operating system you have so it's difficult to provide an answer since the mac and Windows stores the files differently.
    The other thing you can do is just re-download the apps from the iTunes Store. Just login to the iTunes Store on the other computer using the same Apple ID. On the right-hand side of the iTunes Store page you will see a 'Purchased' link. Clicking on that will take you to a page that will list your past purchases which you can re-download to the new computer.

  • Copying photos from one computer to another, with descriptions

    After editing photo descriptions and locations in iPhoto, it is desireable to be able to copy them to iPhoto on another computer, with the associated photo descriptions and locations.  In principle, this is possible by selecting all desired photos, then selecting File -> Export...  In the Export dialog box, in the "File Export" tab, select "Include: Titles and keywords", and "Include: Location information".  Copy the exported files to the other computer, and do a File -> Import to Library ...
    In practice, this works fine with images taken by some cameras, and not with images from others.  In my limited experience with a Fuji F80EXR and a Canon SX230HS, the above work flow works with the Fuji.  But, with the Canon, while the exported files clearly have the description data embedded in them (as seen by GraphicConverter), it is not imported into iPhoto, nor is it visible in Preview's Inspector.  The workaround I use is to run an exiftool command on the exported files.
    Exiftool is a command line utility that can read and write meta data in image files:
    http://owl.phy.queensu.ca/~phil/exiftool/
    I run the following command on the exported files to rewrite the IPTC Caption:
    exiftool −overwrite_original_in_place -tagsfromfile %f.jpg -ext jpg -"IPTC:Caption-Abstract>IPTC:Caption-Abstract" *.jpg
    Note that the above command overwrites the files that were exported from iPhoto.  If you wish to leave the original files intact, with an "_original" appended to the file name, run:
    exiftool -tagsfromfile %f.jpg -ext jpg -"IPTC:Caption-Abstract>IPTC:Caption-Abstract" *.jpg
    I'm not sure why it is necessary to copy and rewrite that data.  Perhaps there is something strange in the format of the meta data in the file as it comes from the camera, and the iPhoto export does not correct this strangeness. Copying and rewriting the data by exiftool seems to put things right.
    The above works for me, but is somewhat unwieldy.  Is there a better way to copy photos from one computer to another, if iPhoto refuses to import the description data that it was written to the exported files?

    Thanks for the pointer.  I did a test with 10 images, and confirmed the iPLM works, even with the problematic images from my Canon SX230HS.
    The workflow is to use iPLM to create a new Library on the computer that has the photos you want to copy.  Copy the photos to the new Library.  Copy the new Library to the second computer using a method of your choice (file sharing, USB flash drive, etc).  Copy the photos from the new Library to the existing iPhoto Library.
    iPLM costs $20, whereas my original solution was free (but you need to invest the time to get exiftool installed and working).  But, unlike exiftools, iPLM also copies over the Faces information, so it is likely a worthwhile investment if you use that feature. 

  • How can I copy songs from one iPod to another?

    I received a new iPod Classic (last generation) and I'm trying to transfer my songs from my old iPod Nano (also last generation).
    My iTunes library is also split up between my two parent's houses and I only have half the songs on my Nano in this computer's library.
    Is there a way to copy only the songs on the +iPod Nano+ (not the iTunes library) and drop them onto the new iPod?

    *Is there a way to copy only the songs on the iPod Nano (not the iTunes library) and drop them onto the new iPod?*
    You can't copy directly from one iPod to another, you have to copy the songs back to iTunes and update the new iPod from there. If you have any iTunes Music Store purchases the transfer of purchased content from the iPod to authorised computers was introduced with iTunes 7. You'll find details in this article: Copying iTunes Store purchases from your iPod to a computer
    The transfer of content from other sources such as songs imported from CD is designed by default to be one way from iTunes to iPod. However there are a number of third party utilities that you can use to retrieve the music files and playlists from your iPod. You'll find that they have varying degrees of functionality and some will transfer movies, videos, photos, podcasts and games as well. Have a look at the web pages and documentation, this is just a small selection of what's available, they are generally quite straightforward. You can read reviews of some of them here: Wired News - Rescue Your Stranded Tunes
    TuneJack Windows Only
    iPod2PC Windows Only
    iGadget Windows Only
    iDump Windows Only
    SharePod Windows Only
    iRepo Mac and Windows
    iPodRip Mac & Windows
    YamiPod Mac and Windows
    Music Rescue Mac & Windows
    iPodCopy Mac and Windows
    There is also a manual method of accessing the iPod's hard drive and copying songs back to iTunes on Windows or a Mac. The procedure is a bit involved and won't recover playlists but if you're interested it's available at this link: Two-way Street: Moving Music Off the iPod

  • Can I copy clips from one project to another?  The clips are still frames captured within a video event.

    Can I copy clips from one project to another?  The clips are frames saved as stills from a video event.  I try the copy & paste but it does not seem to work.

    The video was converted into MP4 and then I could get it into iMovie events.  I had right clicked and saved farmes as stills.  ABout 50 of them,  When I tried to copy and paste those stills into another project I couldn't. They came up blank.
    I ended up going to a Genius appointment at my APPLE store this afternoon and was told that those "stills" aren't really anything. Not a .jpg or video, so the program doesn't recognize them.  So instead I'm using the Project with the 50 stills and copying other .jpgs and video into it.  (This is for a 1961 Class Reunion, so it's old stuff).  Seems to work so far.
    So bottom line seems to be I can use these stills created from a video in the project in which they were created, but no where else.  Do you know a way around this?

Maybe you are looking for

  • Problem with matchcode in alv for specific field

    Hi, I have created a customer specific data element ZE_CONFTYPE, with a customer specific domain, and in this domain I have defined a value range with 3 possible single values (partial, final, automatic). Later, I have defined a field: CTYPE type ZE_

  • Integrate a BPM with a Webservice of SAP XI.

    Hi experts, We want to integrate a BPM with a Websevice published in SAP XI. The BPM sends messages synchronous (abstract interface) to a Business Service that receives a message synchronous (inbound interface). For the integration of these services

  • How can I clear out my crash reports?

    Is there a way other than finding the right directory and deleting?

  • Help transport .send(message) problem

    I am getting an error at transport.send(message) javax.mail.SendFailedException: Sending failed; nested exception is: class javax.mail.AuthenticationFailedException After eleminating all lines the error is at transport.send(msg) Please help - tell me

  • SVG support in Windows Phone store apps

    Hi, I would like to know that is SVG format supports in Windows Phone store apps. If yes , how to use svg files in xaml? Thanks -RomeshDB