Need help with Mark Origin on spiriteimage

How do I exactly use this new method ? my entire game is using imagesprite and its no longer working I got an error called - Error from Companion: invoke: no method named MarkOrigin' in class com.google.appinventor.components.runtime.ImageSprite

Have you updated your Companion App to 2.71/2.71u ?

for what it is worth, I get this if I click on mark Origin:

image

1 Like

So you need to upload an image for the image sprite before you attempt to mark the origin.

However, if you don't set an image, you should get an appropriate message, not a "We found a bug" message!

P.S. Mark Origin does require the newer Companion (2.71 or 2.71u)

Yes, using the latest companion 2.71u, and an image is set on initialise, but still get that message.

What is a draggable marker ?

Do you have to set this beforehand ?

image

ImageSprite's Behavior MarkOrigin turns to button and corrupts file.

I was wondering if anyone else has seen this error I'm getting now. It happened when I was removing an extension and saving. I'm getting an error now anytime I have an ImageSprite on a Canvas -- even opening existing project files that included previously worked with ImageSprites. I can recreate by the following steps:

  • Start New Project
  • Add Canvas
  • Add ImageSprite
    Immediately I get a Mark Origin buton in the Behavior Section, MarkOrigin property:
    designer
    I click the button Mark Origin and I get a browser dialog:
    dialogWhenButtonClicked
    When I switch to blocks, I receive the following Runtime Error:

Any assistance would be great. I haven't looked at every item on the palette to see if a similar error occurs, it's only been the ImageSprite so far. I've tried Google Chrome Version 126.0.6478.127 (Official Build) (64-bit), Incognito, Firefox 127.0.2 (64-bit) even. It will not allow me to re-add the extension. I thought I might readd the extension and then re-remove it. Nothings worked and I'm dead in the water when it comes to ImageSprites :frowning:

Sample project used to get the screenshots:
MichaelImageSpriteCorrupt.aia (1.2 KB)

Thank you,

1 Like

Thank you. I searched for ImageSprite before posting and found nothing relative.

Bug confirmed using Companion 2.71u

Mark Origin Designer bug

notes = Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
foundIn = nb197
faultData = com.google.gwt.event.shared.UmbrellaException: Exception caught: uri is null
projectId = 5413019637055488

Maybe just change the text on that Designer attribute control to
"Don't Click this Button"?

Adding a Picture to the Sprite stopped the error:

but is seems the image has to be in the media folder as an asset for this to work, and for the image to be set in the designer. Setting an image from a readable location on the device, also does not work on initialise.

@Michael_Keller

First check you are using companion app 2.71 or 2.71u.

Second

I had no issue adding an extension to the project.

1 Like

Yes, I am. v2.71. The errors did go away once I set the ImageSprite's picture property to an already uploaded file. I was also able to add and remove an extension without any errors.

2 Likes

Thanks, everyone it seems like it's just not updated.

1 Like

Upgrading the Companion app from version 2.70 to 2.71 solved the issue for me.

I Hello everyone, inserting an imagesprite into a canvas I get this error:
Runtime Error
Error from Companion: invoke: no method named Mark Origin in class com.google.appinventor.components.runtime.ImageSprite.
Can someone help me?

And cbeck you have updated your Companion App to 2.71/2.71u

Is there an update for iOS Companion App for 2.71? I only see 2.64.5 in the app store.

1 Like

Many thanks Ramon,
I updated from 2.7 to 2.71 and the problem seems to have been solved. I have only one doubt: I had tried the same program the night before and I didn't have any problems......
CMQ thanks again.
Anthony