Skip to main content
Inspiring
March 14, 2024
Question

how to place a download link into adobe animate animation

  • March 14, 2024
  • 1 reply
  • 505 views

hello there

i making an music animation

with sheet music animated with a line passing as 

the sound goes......

at the end of presentation i want to place a button

with download link .... to get the original sheet in order

to study at home and print........

for example the link of sheet uploaded to mediafire.com 

what am i suposed to do ?

thanks to all 

leo

    This topic has been closed for replies.

    1 reply

    kglad
    Community Expert
    Community Expert
    March 14, 2024

    where's the file?  if it's on the same server as your html file, it's easy to code.

    Inspiring
    March 14, 2024

    the file is in a site of uploading documents...

    how do i make a button for downloadin the sheet

    thanks?

    kglad
    Community Expert
    Community Expert
    March 14, 2024
    this.b.addEventListener("click",downloadF.bind(this));
     
    function downloadF(){
    downloadFF(site of uploading documents, yoursheetmusic);
    }
     
     
    function downloadFF(url, fileName) {
    fetch(url, {
    method: 'get',
    mode: 'no-cors',
    referrerPolicy: 'no-referrer'
    })
    .then(res => res.blob())
    .then(res => {
    const aElement = document.createElement('a');
    aElement.setAttribute('download', fileName);
    const href = URL.createObjectURL(res);
    aElement.href = href;
    aElement.setAttribute('target', '_blank');
    aElement.click();
    URL.revokeObjectURL(href);
    });
    };