Problem with Script Using New() to Create a #Vectorshape

Hello,
I am having a problem integrating an existing movie script into a movie I am building and I can't figure out why.
The single movie script, developed by JC in 2004,  appears below. It works perfectly in a movie all by itself. But I need to integrate it into an existing movie in which other sprites and behaviors must coexist.
The problem I am seeing is that gMem is created with the new command (can see it in the message window using put gMem), but it will not allow attachment of gMem.regPoint, gMem.centerRegPoint, and so on. These all return errors.
I would also be open to another solution to the problem. What I need to do is create rectangles that represent a plan view of a rooftop on an underlying grid and then be able to drag and place other images on it (it is for training purposes, not a game).
I am using MX2004 on a PC. Any help, deeply appreciated.
Rod Wolford
global gMem, gCount, gNum, gLoc, gCreateVert, gMemNum
on prepareMovie
  clearGlobals()
  _movie.puppetTempo(60)
  gCreateVert = False
  gMemNum = 5
end
on mouseDown
  if not(gCreateVert) then
    gMem = new (#vectorShape, member gMemNum of castLib 1)
    gMemNum = gMemNum + 1
    gMem.regPoint = point(0,0)
    gMem.centerRegPoint = False
    gMem.closed = False
    gMem.antialias = True
    gMem.strokeWidth = 0.25
    gMem.strokeColor = rgb(0,0,0)
    gNum = getFreeChannel()
    channel(gNum).makeScriptedSprite(gMem, point(0,0))
    sprite(gNum).ink = 36
    gCount = 0
    gCreateVert = True
  end if
  if gCreateVert then
    if the doubleClick then
      gCreateVert = False
      gCount = gCount - 1
      gMem.deleteVertex(gCount)
      gMem.closed = True
      gMem.fillMode = #solid
      gMem.fillColor = rgb(random(256) - 1,random(256) - 1,random(256) - 1)
      gFinished = True
      exit
    end if
    gCount = gCount + 1
    gMem.addVertex(gCount, the mouseLoc)
    gCount = gCount + 1
    gMem.addVertex(gCount, the mouseLoc)
    gLoc = the mouseLoc
  end if
end
on enterFrame
  if gCreateVert then
    gMem.moveVertex(gCount, the mouseH - gLoc[1], the mouseV - gLoc[2])
    theLoc = (gMem.vertexList)[gCount][1]
    if not(theLoc = the mouseLoc) then
      gMem.moveVertex(gCount, the mouseH - theLoc[1], the mouseV - theLoc[2])
    end if
    gLoc = the mouseLoc
  end if
end
on stopMovie
  theCount = castLib(1).member.count
  repeat with i = 1 to theCount
    if member(i).type = #vectorShape then member(i).erase()
  end repeat
end
on getFreeChannel
  repeat with i = 1 to the lastChannel
    if sprite(i).member.type = #empty then
      aNum = i
      exit repeat
    end if
  end repeat
  return aNum
end

Sean,
Thank you. Changing gMem handler from #new to #_movie.newmember did the trick. I still have not found the behavior or movie script that contains the #new handler that created the problem. I was not aware of the #_movie.newmember handler. Seems that because it is specific to a new member added into a movie that it may be more useful than just using #new when adding new members is needed. Is that so? Does it have any downsides?
Once again, thanks for your answer. By the way, I think the script was originally a J Chunick script.
Regards,
Rod

Similar Messages

  • HT204088 Dear sirs,  Could you please help me on my problem with my apple ID  I create new account with security questions, and when I try to purchase paid application,it ask me for answers the questions but it's not working,  My account have 50$ and stil

    Dear sirs,
    Could you please help me on my problem with my apple ID
    I create new account with security questions, and when I try to purchase paid application,it ask me for answers the questions but it's not working,
    My account have 50$ and still didn't buy anything

    You need to ask Apple to reset your security questions; ways of contacting them include clicking here and picking a method for your country, phoning AppleCare and asking for the Account Security team, and filling out and submitting this form.
    (100546)

  • Hai Matt  I have a problem with download a new app. While I bought iphone5, I take iphone to shopkeeper for download some app and videos that he used his Apple ID . That's t problem now.. Not all the time his ID is appearing but some times hi

    Hai Matt
    I have a problem with download a new app. While I bought iphone5, I take iphone to shopkeeper for download some app and videos that he used his Apple ID . That's t problem now.. Not all the time his ID is appearing but some times his Apple ID is appearing that time I can't download app, videos, songs.. So please guide me to remove that ID or how to solve that..
    Regards
    Babu

    Check Settings/iTunes and AppStore/AppleID and make sure that your AppleID is filled in. If not , sign out and sign in with the correct info.
    To make sure that no other apps or videos are on your device than the one you bought, set it up as new device, explained here: How to back up your data and set up as a new device
    Content that is not bought with your ID can't be used on your phone, that's why his ID and password is asked when you try to use those apps downloaded in the store.

  • Problem with BAPI_CUSTOMER_CREATEFROMDATA1 using JCo on IDES

    sorry, wrong board - i opened a new post
    Problem with BAPI_CUSTOMER_CREATEFROMDATA1 using JCo on IDES
    Hello everyone,
    we are working on a student project and would like to create customers (debtors) in an SAP IDES system.
    Using the ref-customer to copy from, and some personal-data below, we get the error message
    'Internal error: External no.assignment for reference customer/customer'
    We also tried with BAPI_CUSTOMER_GETINTNUMBER, and ACCOUNTGROUP ZINT (New Internet Customer, others won't work?). But CREATEFROMDATA1 takes no CustomerNo created this way, nor it wants to create one 'internal'?
    Any suggestions? Thanks a lot for your help,
    Greetings,
    Tobias Schmidbauer
              inParams = function.getImportParameterList().getStructure(
                   "PI_COPYREFERENCE");
              inParams.setValue("0000001000", "REF_CUSTMR");
              inParams.setValue("1000", "SALESORG");
              inParams.setValue("10", "DISTR_CHAN");
              inParams.setValue("00", "DIVISION");
              inParams =function.getImportParameterList().getStructure(
                   "PI_PERSONALDATA");
              inParams.setValue("Simpson", "LASTNAME");
              inParams.setValue("Homer", "FIRSTNAME");
              inParams.setValue("Jay","MIDDLENAME");
              inParams.setValue("Springfield", "CITY");
              inParams.setValue("DE", "LANGU_P");
              inParams.setValue("DE", "LANGUP_ISO");
              inParams.setValue("DE", "COUNTRY");
              inParams.setValue("EUR", "CURRENCY");
              inParams.setValue("12345", "POSTL_COD1");
    Message was edited by: Tobias Schmidbauer

    Hello Brian,
    Thanks for your pointer. Actually The customer's reference number i was providing in the PI_COPYREFERENCE structure was a sold-to party customer and it uses external customer number assignment. When i used "New Internet Customer" (that doesnt use external assignment by default) as customer's account group, the customer was created successfully and assigned customer number was returned.
    I want to ask now how could we give a customer number in the BAPI as i am unable to find any such column in any of the tables. (Customer number is an "out" parameter so it can only return the number of created customer). Secondly, how to chnage the external assignment property of a particular account group (like sold-to party). i.e, how could we change the account group configurations through SAP GUI??
    - Umair

  • Pages 08 fonts- problems with Arial, Times New Roman - how do I repair them?

    Pages 08 fonts- problems with Arial, Times New Roman - how do I repair them?
    Using 10.6.8 on MacBook Pro
    Mikeaaa

    I am running Snow Leopard. Transferring the same texts to TextEdit has no problems, so this is a Pages problem, I think.  Corruption of Times New Roman and Arial fonts, I suspect, but where? and what do I do about it? I just need to be pointed to a source of advice, I think.
    Thanks
    Mikeaaa

  • Problem with openning a new window when click news tiltle link

    After create a news item using News form created by XML form builder, i try to click title link, It always opens a new window, what i want is keep it in same window when i click the title link, not open a new one. Is there anyone know how to do that? thanks

    Hi,
       I think its not possible in case of XML Form Builder. Bcoz,
    <b>Edit Form</b>:it is for authoring like creating News
    <b>Render list Form</b>:It is for Publishing the News
    <b>Show Form</b>:It is for showing the whole content of the News
    In XML Form Builder, by default when you create a new form these forms ie. Edit Form (You will design the Form here, only authorised person or the owner only view this).
    The Second Form(Render List Item) is the one will be shown to everyone with brief information.
    The Third Form(Show Form) is the one when you click on the News page, it will show you one more screen, there you can see the detailed description about the News.
    So, when you click on the Rendered List Item Title, it will open only in the separate window.
    Regards,
    Venkatesh. K

  • Hello, I have a big batterylife problem with my brand new iPod touch 4Gen 8GB white. Please help...

    Hello, I have a big batterylife problem with my brand new iPod touch 4Gen 8GB white. Please help?

    What battery life are you getting?  Is it short when you are using the iPod? When it is sleeping?

  • Hi, I'm having problems with viewing a web page created with Adobe Muse CC latest release, I followed the various guides provided by Adobe, but the problem persists. The problem especially concerns the distorted display (the contents do not fit on the pag

    Hi, I'm having problems with viewing a web page created with Adobe Muse CC latest release, I followed the various guides provided by Adobe, but the problem persists. The problem especially concerns the distorted display (the contents do not fit on the page, so it suits size automatically) to a mobile web page to be displayed not on a normal browser, but in a WebView.

    Hi, I'm having problems with viewing a web page created with Adobe Muse CC latest release, I followed the various guides provided by Adobe, but the problem persists. The problem especially concerns the distorted display (the contents do not fit on the page, so it suits size automatically) to a mobile web page to be displayed not on a normal browser, but in a WebView.

  • Lately and i dont know why i see a pop up about a problem with script. can some1 help me?

    there is a pop up about a problem with script. it ask me end and contuniue the script. i didnt have that problem before. plz help me it gets really irritating. it asks a lot

    This issue can be caused by an extension that isn't working properly.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • Problem with scrolling using my touchpad with the new Firefox update

    I just updated Firefox to 9.o.1, I run Windows 7 and I'm using a HP G62 Notebook PC. Ever since I have updated, I can no longer scroll on webpages using my touchpad. If I use an external mouse, I have no problems. I have also not had any problems with other applications, so I assume that this problem is related to the new update. Is there anything that I can do to fix this now, or will I have to wait for the next update?

    I just updated Firefox to 9.o.1, I run Windows 7 and I'm using a HP G62 Notebook PC. Ever since I have updated, I can no longer scroll on webpages using my touchpad. If I use an external mouse, I have no problems. I have also not had any problems with other applications, so I assume that this problem is related to the new update. Is there anything that I can do to fix this now, or will I have to wait for the next update?

  • Why r we allowed to create String objects with & without using new operator

    While creating any object, usage of the new operator is a must...but only for the string object we can create it with and also without new operator how is it possible to create an object without using new operator.

    Because Mr. (Dr.?) Gosling is a kindly soul who realizes that programmers have deadlines and, when he designed Java, was not so rigid or unbending as not to realize that from time to time, certain shortcuts are warranted, even in a relatively pure language such as Java. The direct String literal assignments are a shortcut over using the new operator making Java programming (and execution; there's also a performance benefit) more streamlined.
    So look not the gift horse in the mouth, but simply bask in the simplification and ease on the eyes and directly assign your little literals to your heart's content.

  • Problem with Script Alignment for new printer

    Hi All,
       I'm printing SAP checks to LOCAL printer. Currently we are using Dell W5300n to print checks and the printer has a lot of maintenance problems.  Therefore we purchase a new printer Dell 3110cn  and would like to have it set up to print checks.  We would still keep old printer ( Dell W5300n ) for back up.We changed the printer to new as there is some problem with old printer.
    Problem is , if we print a check from using old printer, the check alignment is good.  But if we print a check from  new printer, the check alignment is off.
    I'm using DINA4 Page format.
    Can you please tell me what is the problem here?
    Thanks,
    Subha

    Hi Subhashini Kuntala,
    For your issue there are few things to check ...
    1. We need to find exact Printer (new) drivers which matches exactly the (old)  Printer.
    2. Is your cheque is in A4 size or Customised size.
    3. If it is A4 try to print in Other Printer.
    If these senerio's does't work, as a ABAPer You can't do anything else .. So, best to pass this issue to BASIS.
    That could resolve your Problem.
    Regards,
    sg

  • Problem with setting up new Ipad Air2:I can't set up my new Ipad using new Apple ID and it keeps showing the notification that wrong email or password and try again. I can log in Itune with thesame

    I can't set up my new Ipad using new Apple ID and it keeps showing the notification that wrong email or password and try again. I can log in Itune with the same ID. Please help me if you have come across the same issue. Thank you!

    Contact the App store for Apple ID help. Their support link is on the right of the App store window
    LN

  • Create a line with arcs using new SdoApi (not liniear)

    Hi
    How we create a line with arcs using sdoapi (not liniear line)?
    Philipp

    Philipp,
    You have to use the default constructor for JGeometry
    to build lines with arcs:
    public JGeometry(int gtype,
    int srid, double x, double y, double z,
    int[] elemInfo, double[] ordinates)
    Currently, this is the only way to create lines with arcs.
    siva

  • Problems with Natural Account segment while creating new SOB

    Hello everybody,
    I am testing a new GL SOB implementation in our test Instance. Below are the steps I followed.
    1)Created a new calender with 12 periods.
    2)Enabled Curriencies.
    3)Created a New AFF Structure with 4 segments.
    5)Created Value sets for those 4 segments and.
    6)Assigned Value sets to the Segments.
    7)Created LOV for the Value sets for the segments.
    8)Assigned Flexfield Qualifiers for the segments.
    segment1-Balance, SEG2-Natural Account, SEG3-Cost Center Accout &SEG-4 NO qualifier.
    9)Saved, Froze and Compiled the AFF Structure.
    10)Navigated to SETUP, FINANCIALS, BOOKS & DEFINE to create a new SOB.
    11)After entering all the details including Calender, COA, Currencies in the Closing Tab when entering the Account details for Retained Earnings, the AFF takes all the values for all the segments except for segment-2 which has been qualified as a Natural segment.
    12) I repeated the process by creating a new COA and it wont take the segment values which has been qualified as Natural Account. It gives me an error saying that No Entries Found For List Of Values and I double checked the Value List and Values and they are there.
    What am I doing wrong? I badly need some input here.
    Thank you.

    Hi
    1. How many values you have defined in Natural Account Segment Values.
    2. Could you please check while defining the Values there is check box called
    enabled. Have to checked it. Normally it is checked by default.
    Regards

Maybe you are looking for

  • How can I get Home Sharing working on my MacBook Pro?

    I've been trying to get Home Sharing and iCloud working on my MacBook Pro for a couple weeks now. It doesn't work whenever I try. iCloud is no where to be found.

  • How to track what changes made in process order?

    Hello Friends, I want to find out the changes done in process order after its creation.Right now in administration tab in process order i can find the date , time and user name who made the last change.But even i want to see what changes that user ma

  • Java/JSP app to List Directories in a Drop Down

    Hi all! I'm a Java Newbie and have an application that was written in VB / ASP that I need to convert to Java / JSP. The app is relatively simple, however my understanding of Java is even more basic. :( Here's what I need... The app needs to be able

  • You may need to set ORACLE_HOME

    I installed Oracle Client 9i with administrator user. The installation was completed successfully and TNSPING and SQLPLUS utilities also working. The administrator user done the complete control privilege to the OracleHome directory and also to his s

  • Proxy issues

    I am having some problem with the web publishing tool in a proxy network. I have kept a VI online using the web publishing tool, when in an open network it works perfectly fine. By working fine I mean when i try to open up the front panel from the li