Skip to main content
Inspiring
Mar 14, 2024 12:36 PM UTC
Question

how to place a download link into adobe animate animation

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 is closed to new replies. Start a new post to keep the conversation going.

    5 replies

    kglad
    Community Expert
    Community Expert
    Mar 14, 2024 2:20 PM UTC

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

    Translate
    Inspiring
    Mar 14, 2024 2:54 PM UTC

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

    how do i make a button for downloadin the sheet

    thanks?

    Translate
    kglad
    Community Expert
    Community Expert
    Mar 14, 2024 3:04 PM UTC
    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);
    });
    };
    Translate