Download external css file in adobe edge animate

To download an external js file, you can use yepnope like schown here .

But when I define a .css file like this in the finished stage-composition window:

yepnope({nope:['mystyle.css']}); 

The correct download code is integrated into the generated source, but css does not work.

Can anyone help me out?

+4
source share
3 answers

Did the solution to invoke an external source file using jQuery not do what you need?

 $("<link rel='stylesheet' type='text/css' href='mystyle.css'>").appendTo("#Stage"); 
+3
source

Is there a special reason why you use the nope property in your argument? I am the creator of the Edge Commons extension library for Edge Animate, and we constantly use CSS files in Animate. Here is the official documentation on how to load the lib and CSS dependent file: http://www.edgedocks.com/edgecommons#anchor_edgecommons_22

Our default yepnope call looks something like this:

 // compositionReady yepnope({ load: "path/style.css", complete: function() { // Do something when loading is complete } }); 

Hope this helps.

By the way: you do not need the previous "sym" in "sym. $ ()". The latter is a special modified jQuery selection function from Animate to get children (elements) from a specific character. This is only necessary to resolve the real id in the DOM (which looks like "Stage_mySymbol_Rectangle" instead of "Rectangle"). But you can use the regular $ () function to use the global version of jQuery ...

+1
source

You need to use the above string with a character. Prefix:

 sym.$("<link rel='stylesheet' type='text/css' href='mystyle.css'>").appendTo("#Stage"); 
0
source

Source: https://habr.com/ru/post/1440568/


All Articles