Error: Statement must appear within on/onClipEvent handler

I'm getting this error Scene=Scene1, Layer=Layer 3, frame=1,
Line1
Statement must appear within on/onClipEvent handler
shape.swapDepths(_root.getNextHighestDepth());
i'm using this code:
shape.swapDepths(_root.getNextHighestDepth());
//shape is a movie clip
stop();
this.attachMovie('bcPlayer','bcPlayerInstance',this.getNextHighestDepth());
//bcPlayerInstance._xscale = 75;
//bcPlayerInstance._yscale = 75;
bcPlayerInstance._y = -50;
bcPlayerInstance._x = -5;
//bcPlayerInstance is a movie clip
please help anyone knows what i'm doing wrong

>>Actually swapDepths can take either a moveclip or a
number. That isn't the
>>problem.
So it can! Sorry, just never used it with anything besides a
clip ref, and
even then I really don't use it much as I like to keep track
of things
myself.
Thanks
Dave -
www.offroadfire.com
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/

Similar Messages

  • Statement must appear within on/onClipEvent handler

    Here's my code on my main timeline; and it makes each movie
    clip (A, B, C, D, E) 'glow' when mousing-over.
    Why do I keep getting this error message?
    Thanks

    I figured out what I did wrong there kglad. You were right -
    I had the code attached to a movie clip (the parent of the movie
    clip that the correct code is on the timeline of). In other words,
    I had code in two different places, so eliminated the code from the
    parent movie clip and the error disappeared.
    Thanks!

  • Using variables: Statement must appear within on handler

    I would like to use variables in my flash app. The app is quite simple, has many buttons, and on each of those buttons I have a simple script: on-rollover and on-release. For both actions I use the same value, which I want to put in a variable. The following script results in an error message: Statement must appear within on handler. When I have to declare the variable inside the on-handler, I have to declare it twice, which makes it useless as I have to enter the value twice. How can I get this working?
    country = "uk"
    on (rollOver)
        gotoAndPlay(country)
    on (release)
        getURL("/"+country+"/", "_self");

    try:
    Select a frame on the timeline where your buttons live and then move the buttons handlers there:
    e.g.
    myButton1.onPress = onPressFunction
    myButton2.onPress = onPressFunction
    myButton3.onPress = onPressFunction
    etc.etc.
    myButton1.onRelease = onReleaseFunction
    myButton2.onRelease = onReleaseFunction
    myButton3.onRelease = onReleaseFunction
    etc.etc.
    country = "uk"
    function onPressFunction(){
         this.gotoAndPlay(country)
    function onReleaseFunction(){
        getURL("/"+country+"/", "_self");
    If you use this approach you MUST remove the scripts from buttons themselves.
    I hope this helps.

  • Statement must appear within on Handler

    Ok. So there are a lot of things asking about this already,
    but I keep getting the "statement must appear within on handler"
    error when I try to add a gotoAndPlay event to my button...and
    reading other peoples problems and solutions has not helped me at
    all. I have attached my code, but what I am really confused about
    is what I am supposed to call everything.

    so now I have it attached to a frame in a separate layer
    (after reading some other threads) and i'm getting an Expected a
    field name after '.' operator.

  • Statment must appear within on hanlder....

    when i keep this code on my button in action.. "statment must appear within on handler" erro is generating.....
    what should i do for this .,, my code is....
    nxt.onRelease = function(){
              newthumb();

    Do not put that code on your button.  Put it in the timeline that contains the button that has an instance name of "nxt" - you can create a layer specifically for actionscript and place it there so that it is easy to find.  If you do it correctly a lowercase "a" should appear in the timeline frame where you place it.  I deally the newthumb() function should also be in that same timeline frame.
    In AS2 you can place code on objects but it is written differently.  Doing that is considered bad practice though because it makes code harder to find and can confuse targeting things properly.
    The code you show is the timeline version which is better. 

  • Apache-Tomcat, How to restart automatically Tomcat if on error state?

    Hi everyone:
    Hope you can help me with this. Lately I been looking out for some kind of script that detects if a Tomcat instance is on error state and if after some time it keeps on that state (that is, does not come back to recovery and ok status) restarts the Tomcat instance. But I haven't been able to find any.
    What I have is the next.
    I'm running an Apache 2.0 with mod_ssl, mod_jk, and mod_status (this last to determine the state of the of AJP connector to Tomcat)
    I'm running (for now) just one Instance of Tomcat 5.0.28 (i need a little bit of implementation so I can load another instance of Tomcat and the Apache's balancer now integrates the new instance)
    For now, as we are having quite a hi load of users, sometimes the server cannot handle the requests, and goes on error state, so if the server does not come back after a minute, I have to go directly to the Tomcat manager console and shut down the service (my instance is currently installed as a service on windows.) and restart it again.
    I would like to automate this process, since I cannot be watching over and over the state of the server. And the service may be down for more than a minute without me noticing it, and well, that is quite bad.
    For your help, Thank you very much.

    Hi,
    I'm struggling with the same problem. I tried the approach you mention in your post but in my case the server.montor.state does not even change (stays on running).
    Then I tried to capture the communication exception in the rfcservererror event and shutdown/start from within this event. The problem is there is no easy way of knowing when the network comes back (otherwise the start fails...).
    So basically I did not yet find an elegant solution neither, but I think there should be one. This is really needed for building erro-proof RFCServer functionality and in NCO-2 it was possible so ...
    I'm working with .net3.5/connector3.0.2/windows xp/32 bit and I did not experience the exception you describe, which could also depend on how it's coded.
    (If you care you can always send me a small codesnippet and I'll try it on my side to see if I get the same error in a different environment...)
    Best regards,
    Marnik
    Edited by: Marnik Overbergh on Jun 24, 2011 6:32 PM

  • "The CREATE USER statement must be the only statement in the batch" in SQL Azure - why? what to do?

    I'm getting an error on a line in the middle of a larger sql script, only in SQL Azure.
    IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'foouser')
    CREATE USER [foouser] FOR LOGIN [foouser] WITH DEFAULT_SCHEMA=[dbo]
    GO
    Error: "The CREATE USER statement must be the only statement in the batch."
    I don't actually understand what 'the only statement in the batch' means.
    What is a batch? Is it a SQL file? Is it related to a 'GO' statement or an 'IF' statement? What is the reason for the error? And how do I avoid it?
    Thanks,
    Tim

    >IF...ELSE imposes conditions on the execution of a Transact-SQL statement
    I understand the general purpose of an If statement. I could let go of our definition of statement counting disagreeing too except that because of the error I'm stuck.
    It's less important for Create User but what I am really puzzled over now is a very similar issue how am I supposed to do a safe version of CREATE LOGIN, when I don't know whether a login has been previously created on the server or whether I
    am setting up the database on a clean server?
    IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = N'foouser')
    CREATE LOGIN [foouser] WITH PASSWORD = 'asdfasdf'
    GO
    If I try and execute this script, it throws the same error as above.
    The first unworkable workaround idea is to omit the if statement
    CREATE LOGIN [foouser] WITH PASSWORD = 'asdfasdf'
    GO
    But if the login already exists on the server (because a similar script was already run), then the script throws an error.
    The second unworkable workaround idea is to do
    DROP LOGIN [foouser]
    GO
    CREATE LOGIN [foouser] WITH PASSWORD = 'asdfasdf'
    GO
    Obviously this throws an error in the second block if the login doesn't already exist on the server.
    The third workaround idea I have is to go conditional by putting an IF condition around DROP instead of CREATE:
    Unfortunately that doesn't work for me either!
    "The DROP LOGIN statement must be the only statement in the batch"
    (This is despite the fact that 'drop login' is listed on the
    supported commands page, not the partially supported page..?! Which disagrees with the notes on
    this page.)
    Anyway the real question I am interesting in addressing is: is there actually a way to have a 'Create/Delete login
    if exists' operation which is SQL-Azure compatible and doesn't throw me error messages (which messes with the sql execution tool I am using)?
    If there is no way, I would like to believe it's because it would be a bad idea to do this. But in that case why is it a bad idea?
    Tim

  • The video player is in the connection error state.

    Flash cS 5.5 / Win 7. Inserting video into movieclip both with 'import video' wizard and via component. FLV that plays fine on a number of different servers. On opening (after gathering metadata) the message 'The video player is in the connection error state. It enters this state when a video stream attempted to load but was unsuccessful. There are two possible reasons for the error: no connection to the server or the stream was not found.' Firstly I am treating this as a progressive download, not streaming. Second this plays fine locally, it's only when I upload to a server it fails. The FLV is in a folder directly below the SWF. Result is same with FLV in same location as SWF. MIME type set to vide/x-flv although I've also set it to applicaiton/octet-stream.
    This is a very basic requirement to call the video directly from Flash, the default parameters of the component are adequate and work locally. However the video does not play. Is it fair to assume this functionality simply does not work correctly within Flash CS5.5? I'm unclear as to what >less< I could be doing with this file.

    You can place the Flash and any Flash assets in any folder location that you want.... provided that you understand how Flash assets (like .flv files) are "Pathed" or located by the .swf that is calling them. The underlying principle is that the Flash assets need to be pathed relative to the Web page that the .swf is located on, NOT the actual, physical location of the .swf.
    For review:
    Pathing issues
    Almost always when it works on the local machine and not the server, it's a pathing problem.
    You can put your Flash related files in whatever folders you want, they do NOT have to be in the root, they do NOT all have to be in the same folder. But if you have a problem and if sticking them all in the root folder works, then you know that the issue was a pathing problem.
    Just remember that paths used in the .swf become relative to the Web page on which the .swf is placed, NOT it’s physical location.  So for example, if your .swf is in the flash/data folder and you use that .swf on a Web page in the root folder, you are in effect, removing that .swf from flash/data and putting it in root. So if the .swf is loading any related files (xml, images, video, etc), the path used inside the .swf to load the .xml file has to be relative to it's new location in root and then back down into flash/data. This is true even though when testing the .swf by itself, it can be inside flash/data and work just fine, since relative to it's location, the path is just fine, they are in the same folder. But if that same path is used when the .swf is placed on a page two folder levels up, the relative path has changed, the old "same folder" path will not work.
    In fact if you are placing the .swf on a web page in a different folder than the .swf is stored in, and that .swf calls external assets, then direct clicking and opening of the .swf in it’s folder should NOT work! That’s because the paths to the external assets should be relative to the Web page and not the physical location of the .swf.
    So just be sure that you use addresses relative to the final Web page locations (not physical file locations) and you can put the Flash related files in what ever folders you want.
    Best wishes,
    Eye for Video
    www.cidigitalmedia.com
    So you can place the .flv wherever you want, but you can't just go and move the .flv without also correcting the path to the .flv inside the .swf.
    So be sure that you have the .flv in the correct subfolder before you do any insert of the Flash player.
    Also I'm not a great fan of requiring my viewers use the latest and greatest (and most bug filled version) of any pluggin or software for that matter.
    <param name="swfversion" value="11.0.0.0" />
    I refer NOT to upgrade to ver 11 so will not be seeing your Flash anytime soon. If you want to appeal to a large audience, change that to version 10.
    Best wishes,
    Adninjastrator

  • HP Laserjet 6L is error state in Windows 8.1

    Hi everyone,
    I need your help on this one.
    I bought a new PC (Dell Inspiron 3000) which has Windows 8.1
    I installed my HP Hewlett Packard Laserjet 6L using Windows printer install (Windows update button to find the right printer).
    The printer is in error state. For some reason, I was able to print the test page, but any other file is in queue and itès not printed.
    Thank you so much for your help!

    Many thanks for your reply.  I did try all of your suggested solutions and I am afraid none woked for more than an hour or two and then I had the error printing message back again. I suspect it may be a problem with by BT Router and despite hours of calls with them, we have got no further, but they have  despatched a new router to see if that might be the cause. When printing works (sometimes it doesn't for days - until today i had been nearly a week without any printing and last night I went out and bout a PC to HP pronter cable in desperation.  That does work Ok, but is a temporary work around as it cannot be used by more than one PC at a time.  Today, with the BT engineer on the phone, we tried everything we could think of, including static IP addressing, and nothing would work. After we finished, I deleted the printer from the network and re-installed it again and both cabled and wireless connection to the router started working again. However, this has happened sometimes before and then stops again later. I have deleted and re-installed HP drivers so many times over the last 8 weeks, I have lost track of the number of times, changed router configurations, but the same problem either re-occurs or doen't work at all. The HP Printer can see the Router name and its IP Address, even when the Error Printing message appears on my laptop, but when that occuts, the PC cannot see the HP Printer via the Router.  This is why I have been thinking the Router might be causing the fault. If you have any thoughts on this, I would be most grateful for any advice,  But at the moment, my hopes are that a new Router, which is due to arrive next Monday or Tuesday, may help !!!! Thanks again. Colin Faragher

  • A fatal error occurred while creating an SSL client credential. The internal error state is 10013.

    Hi All
    I am seeing the below event appearing in the system log on all our Exchange 2013 servers regularly. I am not seeing any connectivity issues between any clients and the servers and no other issues have been reported at this stage.
    Log Name:      System
    Source:        Schannel
    Date:          10/04/2015 9:21:17 AM
    Event ID:      36871
    Task Category: None
    Level:         Error
    Keywords:     
    User:          SYSTEM
    Computer:     
    Description:
    A fatal error occurred while creating an SSL client credential. The internal error state is 10013.
    I am not sure if its related to the public certificate we are using or if its related to the one provided from the local CA.I have searched and found other links that suggest it could be related to SSL versions being disabled etc.
    All servers are running Windows 2012 R2 Datacenter. The Exchange CAS servers do also sit behind a pair of F5 BIG IP Load Balancers 
    Any suggestions on where to look?
    Thanks

    Hi,
    According to the event log, the issue is related to Schannel instead of Exchange.
    Please try the following steps:
    1.In Control Panel, click Administrative Tools, and then double-click Local Security Policy.
    2.In Local Security Settings, expand Local Policies, and then click Security Options.
    3.Under Policy in the right pane, double-click System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing, and then click Enabled.
    4. Ran gpupdate /force
    If it doesn’t work, please go to C:\ProgramData\Microsoft\Crypto\RSA and grant "Network Services" Read permission to "MachineKeys" folder. Then restart server to have a try.
    Here is a similar thread for your reference:
    https://social.technet.microsoft.com/Forums/lync/en-US/e70a8dbc-6f48-4fde-a93b-783554344822/a-fatal-error-occurred-when-attempting-to-access-the-ssl-client-credential-private-key?forum=ocscertificates
    Regards,
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Winnie Liang
    TechNet Community Support

  • Error C1189: #error : ERROR: You must use a GNU Compiler.

    Hi everyone!
    I have just ran into an error in which I don't know how to resolve. I'm trying to compile some code I have but it gives me the following : error C1189: #error :  ERROR: You must use a GNU Compiler.
    Before receiving this error I had received one stating that the header file "_mingw.h" was missing. I located that file and placed it in the correct folder. I also updated the project properties to locate the header file. The error itself says
    that I must use a GNU Compiler but I'm not exactly sure how to do this.I do have mingw installed on the PC though
    The error points to this part of the code :
    #define __MINGW32_VERSION           3.2
    #define __MINGW32_MAJOR_VERSION     3
    #define __MINGW32_MINOR_VERSION     20
    #define __MINGW32_PATCHLEVEL        0
    #ifndef __GNUC__
    #error ERROR: You must use a GNU Compiler.
    #endif
    #if (__GNUC__ < 3 || !defined(__GNUC_MINOR__) || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) || (__GNUC__ == 3 && __GNUC_MINOR__ == 4 && __GNUC_PATCHLEVEL__ < 5))
    #error ERROR: You must use a GNU Compiler version >= 3.4.5.
    #endif
    Also to note, I have the most recent version 4.8.4.1 of the compiler.
    Any ideas on what I should so to fix this? Did placing the _mingw.h file in the folder have anything to do with it?
    I would appreciate any help!! :-)

    It appears that the author of the code you are compiling intended it to be compiled with the GNU compiler, not the Visual C++ compiler.  So they manually inserted an error message (guarded by the #ifndef __GNUC__ check) so that if you compiled it on
    Visual Studio, you'd be alerted to that fact.
    I'm afraid you are now faced with either porting this code or finding a Windows distribution of it that is compatible with Visual Studio.
    *NOT RECOMMENDED*, but to begin the process of porting it , simply delete the #error line from the source code and recompile with visual studio.  You can expect millions of specific issues will need further attention.  After all, it's probably
    there for a reason.  If you are new to this, that's probably NOT what you want to do.
    On the other hand, what were you trying to compile that needed _mingw.h?  That's the piece that needs to be configured correctly.  You are likely not building it as the author intended.

  • LOVE Firefox! I have just launched a website. One designer told me it takes 7-10 days for any changes to appear. Why? I have cleared caches and cookies etc. I need to be more responsive than 7-1o days. I need changes to appear within 24hrs.

    LOVE Firefox! I have just launched a website: www.animalhealingandhumans.com. My web designer told me it takes 7-10 days for any changes to appear. Why? I have cleared caches and cookies etc. I need to be more responsive than 7-1o days. I need changes to appear within 24hrs. How can I achieve a much better response time to good feedback?

    Hello binbingogoABC,
    Shopping on BestBuy.com should be easy and fun and not fraught with the kind of trouble that you describe. I regret very much that this has been your experience.
    Using the information you provided when you signed up for Best Buy Unboxed I was able to locate your cancelled orders. I have requested more information from my back-office partners. As soon as I have additional details about your situation, I will reply again to this message. In the interim, I'm sorry that I must impose upon your patience.
    I'm very grateful that you wrote to us with your concerns.
    Sincerely,

  • Error in critical report ERROR Text is appearing in the dollar

    Hi guru's,
    i'm having issue in a report . ERROR Text is appearing in the dollar amount  field(Column) inods level andDB level its working fine  but in the reporting it displays  with the "ERROR" text
    in production system  this issue starts from this month only till june its working fine
    the report looks like in the production system in july is
    state /provinence           country
    2.17 ERROR                  0.00
    3.45 ERROR                 0.00
    0.00                              2.11ERROR
    Kindly let me know......Helpful answers will be rewarded

    Hi,,
    Have u correctly assigned 0CURRENCY to ur R/3 source field which has currency units liek WAERS
    Check if there data in them
    In reporting side,,
    Can u give this NODIM(Key figure), then execute the query again.
    It shud nt show up
    thanks

  • ORA-24333: zero iteration count  Cause: An iteration count of zero was specified for the statement Action: Specify the number of times this statement must be executed

    Get the following error from Oracle 
    ORA-24333: zero iteration count
    Cause: An iteration count of zero was specified for the statement
    Action: Specify the number of times this statement must be executed
    Any suggestions on whether is this a Oracle bug or if not what should be set to avoid this failure.

    Hello get this from executing the following.
    Occurs intermitently.
    select MAX(LENGTH(lxVal)) from lxString_74501fb6 where lxType=910231053
    Find the MaxLenght(LxVal) returned is null for this query.
    Did google it but says the iterator not initialized. But not the case here
    Thanks

  • [svn:osmf:] 14758: Fix FM-556: When MediaPlayer enters error state, capabilities should be set to false, and capability change events should be dispatched.

    Revision: 14758
    Revision: 14758
    Author:   [email protected]
    Date:     2010-03-15 12:27:47 -0700 (Mon, 15 Mar 2010)
    Log Message:
    Fix FM-556: When MediaPlayer enters error state, capabilities should be set to false, and capability change events should be dispatched.  Also fixed typo in one of the capability change event names.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-556
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/events/MediaPlayerCapabilityChangeEvent.as
        osmf/trunk/framework/OSMF/org/osmf/media/MediaPlayer.as
        osmf/trunk/framework/OSMF/org/osmf/net/NetStreamLoadTrait.as
        osmf/trunk/framework/OSMFTest/org/osmf/media/TestMediaPlayer.as

    Well, I can tell you that this kind of error is not OS related, but rather a HW thing.  It happens where there is a general detection of something going wrong.  Sometimes it can happen randomly and might not be an indication of a problem.  But sometimes it can be caused by things that are improperly functioning within the system like bad capacitors. 
    Unfortunately I don't really know what to do about such things except give you machine a proper inspection.  But if things are working fine, and continue to do so, I wouldn't worry about it.  If it becomes a regular occurance, then I'd worry.

Maybe you are looking for

  • How to do it  ............simple  ???

    hi all, i stuck in one problem that is i have a select box displaying the options of "departements" (where i have been populating them from data base).then i have a text box where user has to enter the file number value. Then in the next text box val

  • HELP ME!!! I always get an error when clicking the activation link!!!!

    Hi, friends, please help me I got the email containing the activation code, when I follow the instructions, by clicking the activation link in the email, logining with my AppleID, I got an error: We are unable to process your request. Please go back

  • Need clarification on doing bulk updates

    Hi All, I got a requirement where I need to insert around 100 Million records and do updates on the entire content of the table. Requirement is I have a customer order table as given below CREATE TABLE customer_order(group_no number, order_no number)

  • Bookmarks and History gone from sidebar

    I use FF 11.0 and my History and my Bookmarks are NOT deleted or cleared from Firefox. They can still be accessed via the Menu Bar. However, when I activate the sidebar to access my history and bookmarks the side bar is completely empty! Deleting the

  • Metro apps crash!

    Hi! Just got my new  Windows 8.1 pro N and all the metro(you know modern windows apps) work, but all the defaults only. These that I download from windows store crash! I tried some methods resetting cache disabling my antivirus temporarily from no ef