Image is not opeing in Window 11. Giving an exception in 'COleClientItem::Draw' function. - 'Invalid Clipboard Format' - exception

I have one drawing file, which includes or which is embaded with an image in it. The drawing file opens fine in Windows 10 also image is visible properly, but when I try to open same file in Windows 11, I am getting following exception in 'COleClientItem::Draw' function. - 'Invalid Clipboard Format'.
After getting this exception, my drawing file opens but image is not show in drawing file.
Can you please let me know what is issue in this?

Related

Why do I get ArrayIndexOutOfBoundsException when I build an imageView with JavaFX?

I have various places in my JavaFx app where I insert images(png/gif). It usually works with one exception. What I do:
I put the images in a specific directory under resources.
I load them like this:
ImageView openView = new ImageView("/pics/logo.png");
An alternative that also works is:
InputStream resourceAsStream = classParameter.getResourceAsStream("/pics/logo.png");
Image image = new Image(resourceAsStream);
ImageView openView = new ImageView(image);
The problem:
There is one gif that has a white background. When I insert it in the app it works, but if I insert the same gif after it is transformed (to add transparency for background) I get :
ObjectProperty [bean: javafx.scene.image.Image#2ac5919d, name: exception, value: java.lang.ArrayIndexOutOfBoundsException: 4096]
If I open it for view, the transformed gif is displayed as expected.
Any ideas on why is this exception thrown?
Stack trace:
java.lang.ArrayIndexOutOfBoundsException: 4096
at com.sun.javafx.iio.gif.GIFImageLoader2$LZWDecoder.readString(GIFImageLoader2.java:388)
at com.sun.javafx.iio.gif.GIFImageLoader2.decodeImage(GIFImageLoader2.java:148)
at com.sun.javafx.iio.gif.GIFImageLoader2.load(GIFImageLoader2.java:209)
at com.sun.javafx.iio.ImageStorage.loadAll(ImageStorage.java:368)
at com.sun.javafx.iio.ImageStorage.loadAll(ImageStorage.java:328)
at com.sun.javafx.tk.quantum.PrismImageLoader2.loadAll(PrismImageLoader2.java:119)
at com.sun.javafx.tk.quantum.PrismImageLoader2.<init>(PrismImageLoader2.java:70)
at com.sun.javafx.tk.quantum.QuantumToolkit.loadImage(QuantumToolkit.java:648)
at javafx.scene.image.Image.loadImage(Image.java:1036)
at javafx.scene.image.Image.initialize(Image.java:785)
at javafx.scene.image.Image.<init>(Image.java:599)
at javafx.scene.image.ImageView.<init>(ImageView.java:167)
at helpers.Helpers.setImageView(Helpers.java:173)
I managed to make it work by using another gif editing tool. So the problem was the conversion. Even if the initial gif seemed fine, under the hood it made JavaFx crash. (Won't share here the name of the tools that work and that didn't work, since it may be against stackoverflow policy).

Actionscript ExternalInterface syntax error

I have created a simple container app whose purpose is to:
play an embedded flv by clicking a button onscreen
activate an external interface call (this records the fact that the person has watched the video)
That's it.
I have it working partially. I have a button on scene 1 with the "click and go to next scene" code snippet attached to it. I click it and it happily moves on to scene 2 where the flv video plays beautifully. The problem happens when I try to insert the code that the external developer told me to use to make the connection between my flash file and IT's back end work.
Here is the recommended code:
ExternalInterface.call("recordScore()”);
Unfortunately, as soon as I enter this code, there is a syntax error and the movie no longer plays. I added the code on a frame at the end of the movie.
I am no sure that the syntax the developer sent was correct, nor do I know where to insert this code into the proper place.
It looks like there is a closed double quotes (”) in what you pasted:
ExternalInterface.call("recordScore()”);
Assure quotation marks, and you do not need the () on the JavaScript function you're calling:
ExternalInterface.call("recordScore");
When running from Flash Projector (as in Ctrl+Enter), you can test whether External Interface is available; otherwise, an exception is thrown at runtime:
if (ExternalInterface.available) {
ExternalInterface.call("recordScore");
}
Fortunately, I found some code in the former employee's files that seems to have worked:
ExternalInterface.call
(
"recordScore()"
);
Hopefully this will connect with the database and resolve the issue so I can go back to making videos.
Thank you so much for your help!
Regards!

Frame Load Interrupted: Safari won't download a linked zip file from my Flash site

First of all I am a total noob so I apologize if this is a dumb question. I am building a Flash site that is designed to be used offline, on a private network. I have successfully linked PDF files, which Safari opens in the browser. This is fine because the file can still be saved from there. However, now I am trying to link .zip files and .mp4/.mov files and am encountering some issues.
Firefox and Safari both try to play the movie files in the browser, but I would prefer for the Open/Save dialog box to appear. As far as .zip files, Firefox prompts the dialog box, which is what I want; in Safari, a new window appears yet nothing happens. The activity window says "Frame Load Interrupted." I have researched this issue and tried tinkering with Safari settings but nothing has worked, nor am I sure it's solely a Safari issue, or if there is something I can do with the Actionscript to prompt the download dialog box. I have seen some different code options for file downloads but wasn't sure how to implement them correctly, or if that was even necessary in my case. Right now I am most familiar with URLRequest and have successfully used the two following configurations:
1)
var zipURL:URLRequest = new URLRequest("../Folder/Folder/Folder/Folder/Archive.zip");
function launchdownload(event:MouseEvent):void
{
navigateToURL(zipURL, "_blank");
}
btn_name.addEventListener(MouseEvent.CLICK,launchdownload);
2)
var request:URLRequest;
var localRef:FileReference;
btn_name.addEventListener(MouseEvent.CLICK,downloadFile);
function downloadFile (evtObj:Event):void
{
var Location:URLRequest = new URLRequest
("../Folder/Folder/Folder/Folder/Archive.zip");
navigateToURL (Location, "_new");
}
If anyone can help me to get around the Frame Load Interrupted issue and/or show me how to properly code my download button such that I can force the Open/Save dialog in all browsers, I would greatly appreciate it! Thank you so much!
You could also let ActionScript do the downloading.
If you add the following code you get a dialog box that lets you select a location to download your file and downloads it.
btn_name.addEventListener(MouseEvent.CLICK,downloadFile);
function downloadFile (evtObj:Event):void
{
var Location:URLRequest = new URLRequest();
Location.url = "http://www.example.com/image.jpg";
var fr:FileReference = new FileReference();
fr.download(request);
}

Breakpoint not set

Super helpful forums over here!
I've recently started back up in as3 and have created a small tile based game. It's far from done but i recently ran into a snag and i've no idea how to fix it!
I have a function where when i click on a tile it checks if is intractable property is true and if it is i do whatever. When i test the fla using ctrl-enter, i get no errors and i can click tiles and everything works fine. However, whenever i test it using Ctrl-Shift-Enter, i get this:
Breakpoint not set; No executable code at line 124 of Scene 1, Layer 'Layer 1', Frame 1
And if i click a tile that is intractable the player stops responding and crashes.
--> Line 124 is a comment ..... ?
I'm very confused, Since i can't locate the error it will be hard to post helpful parts of my code.
Thanks in advance!
Seems like you've put a breakpoint on the comment line, and when running it debug mode, it crashes because it can't break on a comment.
You may have accidentally clicked the margin on line 124 in whatever IDE you're using. See if you can disable the breakpoint at that line.

as3 save swf stage to desktop - only works in IDE

I followed a tip here on saving the stage as a png (is there a way for flash AS3 to take a snapshot of a frame then save it as jpeg but using PNGEncoder instead). It works when run in Flash - I get a dialog box asking for where to save the file. But in a browser it just stalls out without showing the dialog box - and not running the code after that command. Are there security issues with using such code in a browser? Or is there something else going on here.
There are security issues with saving images - it has to be in response to a user action (ie mouse or keyboard event)