Edge Animate CC :: Changing CSS Property Through External JavaScript File?
Mar 11, 2013
I'm trying to create all kinds of functions on an external .js file, so I can just call them in Edge multiple times with less coding. The thing is, after importing jQuery and my external Javascript file, some code works, but I get stuck at this part: changing the .css property of a symbol, more specifically, the "font-size" property. My current function is:
function setFont(textid,fontsize,originalWinWidth){ //textid: symbol's name; fontsize: current font size of this symbol; originalWinWidth: window size at the start of the animation
console.log("Set Font:");
//set the original font size
var originalFontSize = Math.round(originalWinWidth/fontsize);
console.log("Original Font Size: " + originalFontSize);
console.log("Text ID: " + textid);
//set the font size using jquery
sym.$(textid).css("font-size", originalFontSize); }
I get an error at the last line, all other parts of the code works.
Is it possible to target adobe edge build from an external Javascript file? For instance, I click a button outside of the edge animate project and javascript tells Edge animate to "play()". What would that syntax be?
I have come across about a dozen similar discussions, but most have presented solutions that worked in earlier versions of Edge and no longer work.
I am trying to use Edge to build animations that can then be integrated into larger non-Edge projects. I would like to then be able to control the Edge timeline or Edge symbols from elements OUTSIDE of Edge, such as another link or button in the page.
I cannot seem to figure out how to properly reference the Edge stage or symbols.
I have come across several proposed solutions for referencing Edge stage, such as:
var comp = AdobeEdge.getComposition("EDGE-966604542"); var stage = comp.getStage(); var comp = $.Edge.getComposition("EDGE-966604542"); var stage = comp.getStage(); var comp = Edge.getComposition("EDGE-966604542"); var stage = comp.getStage();
and these either DO NOTHING or throw errors about either AdobeEdge or Edge or comp being undefined.
Do I have to write a CSS rule for every symbol and element in a presentation or can I just specify a general rule for the whole thing?For example, how can I specify that all images should have a red border, or all links should change color on hover?
Shouldn't I be able to create a separate CSS file as in Dreamweaver and just attach it?
the project I am working on is using a default.css and I would like to assign styles from the file to elements in edge - how can I do that?I already tried the "class" setting in the GUI next an element but the elements do not use the styles defined in the default.css.The default.css is linked in the html file properly. In the js file which edge creates I see that the value userClass: 'slideTitle' is assigned and slideTitle is defined in the default.css.
I just made my first edge animate project and made a progress loader animation. Works well.When i placed the code in the site the animation was always on, so i've hidden the item in css
#Stage { display:none; }
When my animation is needed i'm making is visible however the animation has already been started in the background so wont begin the right place. I'm wondering should i stop the stage autoplay in the config and then start the animation in JS? If so how can i go about starting the animation via JS.
I've been playing around with AdobeEdge.bootstrapCallback but cant seem to get it to play.
then you add that symbol to stage and have the following code in document.compositionReady
var mySymbolObject = sym.getSymbol("HoverExample"); var targetElement = mySymbolObject.$("backing"); targetElement.css({"background-color":"#111111"});
where mySymbolObject is the symbol on the stage, backing is a rectangle div and the color is different than the original color in the symbol then you add the following code for hitbox (rectangle div that is alpha 0) under Hitbox.mouseover
sym.stop("over");
the end result is that the css from the project, in this case the red background color, gets reapplied on mouseover despite me changing the color on startup.
How to publish/ include my Edge animation which has an audio element (included via the buzz javascript library) to Wordpress. Thus far Ive been uploading Edge animations as .OAM's using Edge Suite plugin for Wordpress. However, when I upload the file, there is no audio so Im at a loss on this one.
I have managed to make a flake in Edge to flash randomly after following a tutorial on lynda.com
My javascript knowledge is fairly limited but I used the following code on a trigger inside the flake symbol I made:
var randomFrame = Math.floor(Math.random()*5000); var maxWidth = $('#Stage').width(); var randomX = Math.floor(Math.random()*maxWidth); var randomY = Math.floor(Math.random()*300); sym.play(randomFrame); var myName = sym.getSymbolElement(); $(myName).css({'position':'absolute','top':randomY+'px','left':randomX +'px'});
This all works as a randomly appearing flake which doesn't look like snowfall. How to make the symbol float down from the top of the stage and repeated lots of times to look like snowfall?
I am looking into edge instead of flash. My question is how do you load external images and videos from an external server?To clarify, I need to insert a link from where the images can load into the stage, so they don´t take up any of the final weight.
I've got a problem following playing around (Typical, isn't it?). Architecture 2011 allows editing property sets from external objects through the host drawing (i.e. change a room number of a property set attached to a space xref'ed in from another construct). This obviously has to put an editing lock onto the xref to prevent data loss in case somebody else works on the xref in the meantime. This editing lock is removed when I close my host drawing. However, the lock is immediately restored when I re-open the host drawing.
How can I release the xref file lock again after editing the property sets in my host drawing?
I am including an animation I built using Edge Animate into Dreamweaver. I can't use an .oam file because of some other JavaScript I'm using so basically I'm limited to an .html file with all my edge includes java, and other supporting files.
when I preview in browser within dreamweaver. However, when I upload the page to my domain, my animate HTML file won't work. Here is a link to the current site in progress. (The first green box top left is my link to my animation). URL....
I have an existing HTML page (created in Adobe Muse) and I am trying to draw some Adobe Edge objects on top of the page (e.g. a rectangle or an image). When I look in the layers panel, the Edge objects show as top in the list. However, visually when I look at the page, the elements show behind the pre-existing HTML page from Muse.
I have a textfield nested in a symbol and am using an Adobe web font (droid-sans). When I change the text inside the textbox with something like the following:
the fontFace APPEARS to go to some other sans font and seems bold from that point forward. Do I need to reset all the css properties of the fontface every time I change html text in a textbox.
Currently, if you convert a rectangle (which contains elements, for example, a book title) into a Symbol, and copy that Symbol, you get the same elements (same book title).
I want to change that book title in the Copied Symbol, but any changes you make in the Copied Symbol, automatically changes the Original Symbol to the same.
How can I make changes to Elements in Copied Symbols so it won't affect the Elements in the Original Symbol?
I'm working on a game in Animate that tracks several scores at the same time – six, to be exact. There are six personalities in the game, and the player's actions determine the positive or negative score displayed to each personality.
The player is presented with a situation and their action effects their score with one or more of the personalities. I'd like to know how to set a text field to change by a negative or positive value (not just changing to a specific number), based on which button the player chooses. I've created symbols for each of the six score fields, each one has a uniquely named text field inside the symbol.
I've placed the OAM file of my Edge animation and gone through the steps of creating a "folio", but when I preview in Adobe Content Viewer all I get is a static page that fades out when clicked.
The PHP code is not parsed. In order to have it work with Wordpress, I am using "Edge Suite" plugin, which requires you to import the animation as an OAM file, then I am firing it like this inside one of Wordpress' PHP file:
Having some trouble with the oppacity on my projects. As you can see from the screenshot, I've clearly clicked something because any text or images that I try to add to my project and set the oppacity at 0% - to then build over a few seconds to 100%, will not do this.Yet previous elements that I've added will.
Is there something I need to click to stop the new text and images from changing oppacity immediately. I want them to build over time - I can see that the added keyframe looks different also.
What is the Javascript equivalent to this AppleScript?
set xxx to every page item whose note = "John"
After looking at some of the tutorials, I pieced this together. Is there a better way of doing this? With 30,000 path items it took over a minute to execute...
docRef = app.activeDocument; var pathLength = docRef.pathItems.length; docRef.pathItems[0].note;
I have imported an OAM file into the first page of an app I am making in InDesign. The OAM looks correct on load but once the animation begins it gets really big and all I see is a tiny portion of the animation.
I have other text and graphics on that page I was wondering if that could be the cause.
Working with Edge version 1.5.0 and Visual Studio 10. Just about finished with a project and now all of my code has disappeared from Edge, I can't see any of my triggers on the timeline or events on the buttons. I can still open the html in a browser and everything still works but I can't do any more edits inside of Edge because I can't see the code in there.
The edge actions file has all the code, but Edge does not see any of it inside Edge. I tried pasting the full code back into Edge but it would not save it. How can I get edge to see the code again?
I have built an EDGE file to the size of a full page iPad layout (1024 X 768), with a few elements that animate. I have set it up correctly, and, published to "Animate Deployment Package. However, when it plays in DPS, there is a hesitation (or delay), then, a white - stop in the action - then the animation plays fine. I have not coded in delays or stops.
I am not a coder.I have done a number of tests with a variety of "Poster" images, but, I still get the play "Hesitation" (of delay).
On the web I have seen a video on how to make an app from your Edge Animate project [URL]. I have tried to follow this video, but when I publish my project, no .zip file is created.
I have an SVG file with text inside, if I open the file in the browser I can select the text, but when I import the file to Edge Animate and then exported as html I lose the ability to select the text with the web browser.
my .oam files getting bigger...i had a little animation that was 1.9mb and 1 month later i make the same animation and i' m getting a 2,9mb file.Not much, but this .oam file is part of a website...so size das matter..
Is there a way, to get smaller sizes? the files are alrready based on the animation size..the animation is 960x320pixels..and i made the pictures 100% based on that measurements..