Targeting Edge from external javascript file
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?
Yes, it is. Read this post for some background information and a sample.
http://forums.adobe.com/message/5289458#5289458
-Elaine
Similar Messages
-
Use function from external Javascript file
Hi All,
Is it possible to use function from other javascript file. If possible then please post some example.
ShonkyAs Harbs mentioned, you can use doScript().
Maybe you can do something like this:
First I created simple function in separate file and exported it JSXBIN
function myAlert(myString){
alert(myString);
Then, I copied contents of that JSXBIN and put it into variable
var securedFUNCTION = app.doScript("@JSXBIN@ES@[email protected]AffABC40BhAB0AzHjNjZiBjMjFjSjUDAC0EzAEByB");
or
var securedFUNC = eval("@JSXBIN@ES@[email protected]AffABC40BhAB0AzHjNjZiBjMjFjSjUDAC0EzAEByB");
And simply called function
myAlert('My test String');
Also, you can use include external script with #include to call JSXBIN, but you need to wrap contents of JSXBIN file into doScript or eval().
tomaxxi
http://indisnip.wordpress.com/ -
How to call Edge Animate's play function from external javascript
I have a symbol on the stage called "cart".... inside the symbol is my graphic that has a motion path put on it to the timeline (it is called "car_v1").
On my stage I have a code to hide the symbol cart with an external css class :
sym.$("cart").addClass( "hidden" ); ( this is the css - .hidden { display: none; } )
I have a function that calls an external javascript file.. from that external file I want to get the timeline animation to work:
here is the function called:
checkCar();
and here is the function:
function checkCar() {
if (AdobeEdge.countCar == 5){
AdobeEdge.getComposition("EDGE-172492634").getStage().$("cart").removeClass( "hidden" ); // this works!
AdobeEdge.getComposition("EDGE-172492634").getStage().$("cart").play(); //doesn't work! <------------this is the line I need help with!
// sym.getSymbol("cart").play(); // this works inside of edge and the timeline animation runs!!!
Can anyone help me get the play function to work from my external javascript file? Thanks!
KristenHi,
You can try:
function checkCar() {
if (AdobeEdge.countCar == 5){
var iCall = AdobeEdge.getComposition("EDGE-172492634").getStage();
iCall.$("cart").removeClass( "hidden" );
iCall.getSymbol("cart").play(); -
Creating Target Group from External File
Hello Experts
We need to create target group from external file. (That is to say we will have let's say txt file containing BP that belongs to specific target group and we need to assign these BPs to to specific target group in SAP CRM)
I have searched for it on sdn and found something benefical. I have found BAPI_TARGETGROUP_CREATE, I have checked it but I don't understand how should we use it becuase as far as we understand it just creates target group, we cannot see anything related with Business Partner. How can we relate BPs with the target group we create by this BAPI.
What should we do, is anyone have previous experience about it? or is there a way to do it without using BAPI.
thanks it advance
M.
Edited by: Mehmet Ergul on Jan 22, 2009 11:19 AMHi,
You can do this from within the standard Web UI. It's straight out of the box.
Create a profile set and in there create a target group in the target group assignment block just by entering the description of the target group. Then enter edit mode of this target group and click the button "Import Members". Remeber to mark "Change selected target group" unless you want to create a new target group.
/Anders -
Invoking external javascript file from xdp source
Is it possible to invoke an external javascript file from within the xdp source? I know it is possible to embed the javascript in the form.
If this is possible, would I be correct in assuming that this is also possible from pdf source?
Basically I am looking to show / hide buttons based on the status associated with a form at a given time in the flow. My understanding of PDFs is that the source cannot be edited once it has been created? If this is the case I was hoping that there could be code embedded that would call on the external file which would return the status of the letter. Based on the response buttons / fragments etc could be shown / hidden as required.
Feedback required asap please!
Thanks in advance.You cannot call outside of the rendered form. So you have a couple of means to get information into the form. Merge dat aonto the form (in your case you can use a field as a flag and key off of that),or use Web Service call to check the status.
Hope that helps
Paul -
Access symbols from external javascript code?
Because the coding support in the Edge editor (e.g. code completion) and the debugging tools are limited (and errors in browser console are useless), I've been moving as much of my code as possible into external javascript files. From external js files, it has worked fine to access things on stage by jquery class selectors. But I would also like to access symbols by instance name. Does anyone know how to do this from an external js file?
I noticed that using the new in version 3.0 way of adding js libraries to the project doesn't work so well for my own js because "Preview in Browser" doesn't re-load my edited code each time. So I'm still using yepnope for my own external js.
DougHave you checkout Bootstrapping in Edge Animate http://blogs.adobe.com/edge/2012/05/15/bootstrapping-edge-compositions/
Once the composition is loaded store the composition ID.Later you can access the symbols using the regular Animate API's
Like :
AdobeEdge.getComposition(compId).getStage().getSymbol('symbol_name') -
Jspx and external javascript file (display empty page ?!?!)
I have created a JSPX file...
Now I want to add a javascript control to verify that only numbers are pressed from keyboard..
This is a simple javascript function:
function isNumberKey(evt)
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
When I add a function directly to jspx I get error in phase of compile of the page...
So I tryed to write an external javascript file with function above...
In My jspx page i have put <script src="functions.js"></script> the tag has a reference to external javascript file...
When I run the page I get "blank" page.. (it's like that all html code is a comment)..
If I remove the script tag the page will display correctly...
Is there any example how to include an external javascript file inside jspx?
this is a piece of jspx:
<f:view>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250"/>
<title></title>
<link href="css/oracle.css" rel="stylesheet" media="screen"/>
<script src="functions.js" type="text/javascript"></script>
</head>
..Hi,
you should not add
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250"/>
<title></title>
<link href="css/oracle.css" rel="stylesheet" media="screen"/>
<script src="functions.js" type="text/javascript"></script>
</head>
to f:view. There are JavaScript equivalents to this. Alternatively use
<f:verbatim>
<script src="functions.js" type="text/javascript"></script>
</f:verbatim>
I assume you use JDeveloper 10.1.3 because in JDeveloper 11 there are other options
Frank -
Call External Javascript file in Custom Visual WebPart
Hi..
How to call external javascript file in Custom Visual WebPart in sharepoint 2010
RavindranathHello,
Download that script and save in layout folder or within a site. Then use below script tag in webpart:
<SharePoint:ScriptLink ID="ScriptLink2" Name="location/jquery-1.5.min.js" runat="server" OnDemand="false" Localizable="false" />
http://stackoverflow.com/questions/5068663/how-to-call-an-external-javascript-file-from-a-webpart
http://stackoverflow.com/questions/5243821/external-javascript-file-in-sharepoint-web-part
Hope it could help
Hemendra:Yesterday is just a memory,Tomorrow we may never see
Please remember to mark the replies as answers if they help and unmark them if they provide no help -
Changing .css property through external Javascript file?
Hi,
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. Any idea what this could be?
Thanks,
Rafael CarignatoHave you tried sending textid to the console.log to make sure you're sending the actual name of the symbol and not a pointer to the symbol itself?
-Elaine -
How to include external javascript file in an html
hello
i've an html file placed in apache/webapps/test folder this html file includes an external javascript file placed at same level
i'm includind the file as
<script src="file1.js"></script>but the file does not gets included
but when the sam folder "test" is paste outside apache the html file including the external file runs properly.
Thank Youflounder wrote:
cotton.m wrote:
What's really pathetic is that this is your third cross post on this same stupid off topic topic.
You are really a dumb fuck you know that?If they knew that they were a dumb fuck then they wouldn't be a dumb fuck!That's a logical and reasonable conclusion. Therefore I very much doubt that the OP is capable of it.
Hmmm this is interesting. It now shows the entity escapes rather than their values when you quote. -
How to access Shared Component Images from External Javacript File
Hi,
I have an external javascript file that is referenced within a page that consists of a number of calls to images within the Shared Components, i.e.:
"#WORKSPACE_IMAGES#up_arrow.png"
Unfortunately this no longer seems to work when used in an external js file.
What options do I have to allow the external js to access images within the Shared Components/database?
Thanks.
Tony.Hi,
You do not have much options, that is know limitation.
This post is about same kind problem with CSS files
Re: referencing workspace image in CSS file
Br,Jari -
Loading data from a JavaScript file
I am writing a Java application that will run client-side, and will essentially allow the user to download, update, and then reupload a JavaScript file. The data I'm needing to parse / build to the JS file consists of staticlly-defined string arrays, and one associative array.
The file looks like this.
var array1 = new Array();
array1[0] = "String1";
array1[1] = "String 2";
array1[2] = "String 3";I'm wondering if there is a more simple/eleoquent way of loading arrays from a JavaScript file than simply reading them and writing parse code by hand to extract the data I want... I can write the parsing code without any problem, but, I'm wondering if there's something built-in that I just don't know about...
ThanksYou can use the ScriptEngine provided in Java 6. Takes a little hacking, but here's how you'd do it:
a simple javascript file:
//test.js
var myArray = [];
myArray[0] = 'Something';
myArray[1] = 'To';
myArray[2] = 'look';
myArray[3] = 'at';
//ScriptTest.java
import javax.script.*;
import sun.org.mozilla.javascript.internal.NativeArray;
import java.io.FileReader;
class ScriptTest {
public static void main(String[] argv) throws Exception {
ScriptEngine js = new ScriptEngineManager().getEngineByName("javascript");
FileReader script = new FileReader("test.js");
js.eval(script);
NativeArray array = (NativeArray)js.get("myArray");
for(int i = 0; i < array.getLength(); i++)
System.out.printf("Object: %s\n", array.get(i, array));
}Now, since NativeArray is an internal class, you'll need to add rt.jar to your bootclasspath:
javac -bootclasspath JAVA_HOME/lib/rt.jar ScriptTest.javaSee. Told you it was a hack. :-) -
Adding html into edge animate text box from external js file
I have a text field in edge animate that I want to update with a score. The function that is used to click and update the score is in an enternal file so I'm trying to figure out how to get my edge animate div to be read by jquery in the external file. This is what I have so far in the external js but it isn't reading the edge animate text field properly:
external .js file:
AdobeEdge.coinCounter += 250; // this calls the variable coinCounter which was set in edgeActions.js and updates it from the original 0 value
alert(AdobeEdge.coinCounter); // this shows it works and updated correctly
var comp = AdobeEdge.getComposition("EDGE-172492634");
var stage = comp.getStage();
stage.sym.$("gameText").html(AdobeEdge.coinCounter); // this is where things go wrong. I want this updated value to read back into the textbox called "gameText" that is in the edgeAnimate composition
stage.sym.$("gameText").html("NewText"); // nothing reads to the "gameText" textbox; something must be wrong how I am referencing it outside of edgeActions in the external .js file
Would someone mind helping me reference the textbox "gameText" correctly so I can input my new value? Thank you!!Thank you. The learning curve is taking me awhile. It works now:
var checking = AdobeEdge.getComposition("EDGE-172492634").getStage().$("gameText").text();
alert(checking); //yay!
Thanks Joel! -
Add one character at a time from External Text file
Hi,
I'm using Flash 8, and I have created a standard Dynamic
field that pulls the text from an external text file using the
LoadVars function and it works fine.
To get the correct effect for the design, I would like to be
able to create the illusion that the characters are being typed out
when the page loads as if someone has started typing and also hear
the "Typewriter Clack" each time a character appears.
The only place I have found an example is on the Syphon
Filter Game website which seems to have created the illusion
perfectly:
http://www.syphonfilterdarkmirror-thegame.com/en_IE/
(Check out the bottom right section)
I could create a Movieclip and add a character each frame
but, I would like to be able to edit the text when required via a
text file or even ASP or PHP if neccessary.
Any help would be grateful.
Cheersor here:
http://www.actionscripts.org/tutorials/beginner/Scripted_Typerwriter/index.shtml -
Call a javascript function (in ASPX) page from a javascript file
I have a javascript file (viewer.js) situated in Scripts/viewer.js My
default.aspx has a javascript functions that calls a c# function in the
default.aspx.cs ( it sends a http webrequest)
Now I want to call from the viewer.js the function in default.aspx which calls the c# function.
How can I handle this in my viewer.js?
I need to do this because I work with 3D objects and the select event is on the viewer.js
When I select the 3D object it needs to call the function in default.aspx...
Scripts/viewer.js
function ClickPickItem(item) {
$("#properties").show();
/*Call function App() */
Default.aspx
function App() {
PageMethods.Connect(callback);
Default.aspx.cs
[WebMethod]
public static string Connect()
string rsp = DigestAuthFixer.GrabResponse("http://<username>:<password>@nextbus.mxdata.co.uk/nextbuses/1.0/1");
... CODE TO MAKE HTTPWEBREQUEST}
Sorry if I'm not clear enough
I don't see another option like this
What I need to do?
Thanks!If my understanding is not wrong, you are trying to call a Javascript function in a separate script block from a linked Javascript page. rite?
When it comes to Javascript, all scripts will be posted to the client side browser and we can access any method between pages provided those JS files are linked to the page.
So you can directly call
App()
function from your
ClickPickItem()
function.
Please try and let us know your result.
Maybe you are looking for
-
Rwserver.exe - Unable to locate dll
After 'successfully' installing both 9iAS infrastructure and app server on separate Win2k boxes, trying to start the reports server (either through em or as a service) generates the following pop-up error message on the app server: The dynamic link l
-
Ipad mini calender and reminder problem
i am currently using IPad mini, why my calender and reminder cannot add new items ?
-
"Import Error" at report output.
Hi All, I need help for a problem that I am frequently encountering. After I execute a report, an information dialog is thrown on the screen which says: <b>"Import Error: No result found for key RU 0047621000029"</b> After pressing the tick button on
-
Search Usage Report nt authority\iusr
Hi, There seems to be some nt authority\iusr process account that is being tagged instead of a regular user account to search for terms in our search application. The search usage log has many entries on this account name along with the other accoun
-
Error (9) when trying to sync
Hey guys. Need to restore my iPhone but it keeps getting the Error (9). Apple's support page says this is a hardware issue. However, I have sync'd the phone with this computer before. In fact, it's the first and only computer it's been sync'd with. I