Highlighted

Wrong message in local host

Explorer ,
Oct 25, 2019

Copy link to clipboard

Copied

I have done a slide show and then click on an image and the image I use stops this code

this.nr42a_btn.addEventListener("click", musicToggle.bind(this));  
this.nr42b_btn.addEventListener("click", musicToggle.bind(this));  
var on = 0;  
function musicToggle() {  
    if (on == 0) {  
        this.nr42a_btn.visible = false;  
        this.nr42b_btn.visible = true;  
        this.stop(); 
        on = 1;  
    } else {  
        this.nr42a_btn.visible = true;  
        this.nr42b_btn.visible = false;  
        this.play("nr42");  
        on = 0;  
    }  
}

 

In each image I have done from jpg to the movieClip symbol but when I click on the image I getting these messages in the Chrome console:

"Uncaught An error has occurred. createjs-2015.11.26.min.js:13 This is most likely due to security restrictions on reading canvas pixel data with local or cross-domain images."

 

"createjs-2015.11.26.min.js:17 Access to XMLHttpRequest at 'file:///C:/Users/%C3%84garen/Documents/Homepage/Jag/WebAudioPluginTest.fail' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https."

 

"A cookie associated with a cross-site resource at http://createjs.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032."

 

"createjs-2015.11.26.min.js:17 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/."

 

When I then put the slide show on a web server so works it but not on local host. What could be the reason?

Views

204

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Wrong message in local host

Explorer ,
Oct 25, 2019

Copy link to clipboard

Copied

I have done a slide show and then click on an image and the image I use stops this code

this.nr42a_btn.addEventListener("click", musicToggle.bind(this));  
this.nr42b_btn.addEventListener("click", musicToggle.bind(this));  
var on = 0;  
function musicToggle() {  
    if (on == 0) {  
        this.nr42a_btn.visible = false;  
        this.nr42b_btn.visible = true;  
        this.stop(); 
        on = 1;  
    } else {  
        this.nr42a_btn.visible = true;  
        this.nr42b_btn.visible = false;  
        this.play("nr42");  
        on = 0;  
    }  
}

 

In each image I have done from jpg to the movieClip symbol but when I click on the image I getting these messages in the Chrome console:

"Uncaught An error has occurred. createjs-2015.11.26.min.js:13 This is most likely due to security restrictions on reading canvas pixel data with local or cross-domain images."

 

"createjs-2015.11.26.min.js:17 Access to XMLHttpRequest at 'file:///C:/Users/%C3%84garen/Documents/Homepage/Jag/WebAudioPluginTest.fail' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https."

 

"A cookie associated with a cross-site resource at http://createjs.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032."

 

"createjs-2015.11.26.min.js:17 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/."

 

When I then put the slide show on a web server so works it but not on local host. What could be the reason?

Views

205

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 25, 2019 0
Adobe Community Professional ,
Oct 26, 2019

Copy link to clipboard

Copied

you're loading or reading bitmap data from an image that is in a different security domain.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 26, 2019 0
Explorer ,
Oct 27, 2019

Copy link to clipboard

Copied

Can you description for me in detail what you mean "different security domain". Is bitmap data from an image a jpg or png image or I must draw a form as a circle or rectangle then I converter a MovieClip symbol or graphic but I can don't converter MovieClip from jpg or png image. I haven't convert some image to bitmap but I have convert jpg or png image to MovieClip.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 27, 2019 0
Adobe Community Professional ,
Oct 27, 2019

Copy link to clipboard

Copied

i recommend you test online and avoid the security issue during testing.  the reason for that recommendation is because online security supplied by your os, your firewall, your router etc evolve over time and a solution/work-around this week may not work next week.

 

that said, if you want to learn how to circumvent cross-domain security issues this week, google it and use the most recent recommendations you can find.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 27, 2019 0
Explorer ,
Oct 28, 2019

Copy link to clipboard

Copied

Thanks for the advice

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 28, 2019 0
kglad LATEST
Adobe Community Professional ,
Oct 28, 2019

Copy link to clipboard

Copied

you're welcome

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 28, 2019 0