Possible to run a flash function trough javascript?
Hello,
I found the syntax TGotoFrame that you can use in javascript
to go to a certain frame number
in your movie using javascript.
But this TGotoFrame is similar to GotoAndStop .. and not
gotoAndPlay.. so if you place a function
on that frame it would not work.
Is there another way to initalize a function in Flash trough
javascript?
Regards,
Micheal.
Never seen TGotoFrame, but there is GotoFrame() and Play(),
which has worked
well for me. Here's a function I've used to change videos in
a Flash movie
from image buttons in the HTML:
<SCRIPT LANGUAGE="JavaScript">
function changeVideo(xname){
if(window.brtv){
window.document["brtv"].SetVariable("theXML", xname);
window.document["brtv"].GotoFrame(0);
window.document["brtv"].Play();
if(document.brtv){
document.brtv.SetVariable("theXML", xname);
document.brtv.GotoFrame(0);
document.brtv.Play();
//-->
</SCRIPT>
Where brtv is the name of the div containing the movie.
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/
Similar Messages
-
I have got an IPhone 5. It has been locking itself and not possible to run it again. I have restored it by Itunnes. But still not functioning. I have bought it from London whitecity applestore and have been using it in Turkey. Any recomandation ?
Sorry, but the warranty for the phone is only valid in the country where you bought the device, and you can't send it in, Apple does not ship internationally.
Has the phone been officially unlocked? Only the carrier can unlock an iPhone.
iPhone: About unlocking -
Hi all
Is it possible to run a command prompt(or DOS Command) through flash.If it possible please guide me to do that throug AS 3.0.
and
Is it Possible to run a activex (.OCX) file from flash. If it is so please guide me the way to do it
Thanks and Advance
Sankar.M.SOr create a desktop shortcut (in Windows) or an application launcher ( in Linux GUI).
-
HT1349 I need a mac that can run adobe flash. Is that possible?
I need a MAC that can run adobe flash. Is that possible?
All you need to go is go to Adobe.com, download and install it. You will need your admin password but yes they all support it.
-
Possible to Stream a Flash Presentation?
Hi all! I work for a university and we have some faculty that
are creating some huge flash presentations. I know that flash is
remarkably fast when it comes to downloading, but with these large
presentations it's still taking some time. Is it possible to
stream a flash presentation? Compress the audio? Any other
ideas?Never seen TGotoFrame, but there is GotoFrame() and Play(),
which has worked
well for me. Here's a function I've used to change videos in
a Flash movie
from image buttons in the HTML:
<SCRIPT LANGUAGE="JavaScript">
function changeVideo(xname){
if(window.brtv){
window.document["brtv"].SetVariable("theXML", xname);
window.document["brtv"].GotoFrame(0);
window.document["brtv"].Play();
if(document.brtv){
document.brtv.SetVariable("theXML", xname);
document.brtv.GotoFrame(0);
document.brtv.Play();
//-->
</SCRIPT>
Where brtv is the name of the div containing the movie.
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/ -
Accessing built in functions through javascript
Hi everyone,
Is there a way to call one of the built-in functions using javascript? For example, I added a click_box, and the on-success events I can choose to continue, go to a different slide, open a file/url etc. I can also choose to execute a javascript.
My question is, can I choose to execute a javascript, and then within that javascript, call the "open a file/url" and pass it a variable (url)?
The reason I want to do this is when a user clicks on a link to open a URL, I want the movie to pause until they return and click on the next button to proceed.
Unless of course there is a much easier way to accomplish this.
Thanks,
MannyHello again
With JavaScript option you generally create your own functions. And really, IMNSHO that's what the purpose of the JavaScript option is really for. Perhaps you want to open a link in a specifically sized and placed window with specific attributes such as no Toolbar, no Status bar or Menu bar. In this case you would create a function to do this, then call the function from JavaScript.
Then again, JavaScript is a whole other wiggly nest of wiener dogs! My simpleton opinion is to do as much as you possibly can in Captivate without resorting to Flash or JavaScript or any other "layer". Because when things go wrong (and trust me, they ALWAYS do) there is less to confuse issues.
Cheers... Rick
Helpful and Handy Links
Begin learning Captivate 5 moments from now! $29.95
Captivate Wish Form/Bug Reporting Form
Adobe Certified Captivate Training
SorcererStone Blog
Captivate eBooks -
If WDA will be able to call a Flash island, and Flash can call javascript
In this thread here:
How would/should you invoke a javascriptable applet from WDA or WDJ?
Thomas said that an upcoming release of WDA will let WDA call Flash "islands".
Since this link:
http://www.adobe.com/devnet/flash/articles/external_interface.html
says that Flash can invoke javascript, won't it be possible for WDA to call an applet indirectly by calling Flash and letting Flash call the applet ?
djhAnton -
I asked Thomas Stout to describe exactly what he's doing with Flex and JMol, and I'm posting his response just to be sure that there is no way (other than the portal) of duplicating what he is doing using WDA.
Here's his response:
Backend (linux):
- we have a "database" of crystal structures in flat-file directories (for example,
weekly rsync's from the PDB)
- we parse those with perl scripts into an XML table with tagged data that we
feel is relevant
Flex:
- the Flex app is constructed to load that XML file and display the data in a
table. We exported that code from Flex into an HTML table, which provided
the basic page with a Flash movie of the Flex app embedded (See the attached
screenshot from a development version of our web page: it's the horizontal
rectangle at the top of the page).
webpage:
- we then built of the Jmol functionality into the lower half of this web page. The
table entries at the top are sortable on any column and filterable via the text
box. Once a line in the table is selected, the "Load" button passes the
accompanying structure to the Jmol applet and all of the Jmol "tools" become
active in the lower half of the page. There is no communication in the reverse
direction (can't think of why you would want to!).
- BTW, the web page does not use "frames" -- I'm personally opposed to them --
but it is all constructed within a table. The Flash movie is in a table cell that
spans two columns, the Jmol app is down a row and in the left hand (wider) cell,
while the selectable links on the right are all in the right-hand cell. The page is
an amusing gmisch of HTML, javascript and JmolScript all fighting it out
together..... :) -
Can anyone tell me why this doesn't work and how to make it
work?
I have an flv (flash 8) that's being loaded externally into a
swf called player. I have cue points that are created at run time.
The first javascript function executes but all of the other
ones seem to fail. I'm positive flash is recognizing the cue points
because i can here the browser click when it tries to execute the
other javascript functions. But nothing happens.
This is the code I'm using and yes javascript functions are
present in the html.
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
if (eventObject.info.name = "graphic_on") {
getURL("javascript:MM_swapImage('serv1','','images/servicemenu/servicemenu3on.gif',1)");
else if (eventObject.info.name = "db_on") {
getURL("javascript:MM_swapImgRestore();
MM_swapImage('serv2','','images/servicemenu/servicemenu5on.gif',1)");
else if (eventObject.info.name = "print_on") {
getURL("javascript:MM_swapImgRestore();
MM_swapImage('serv3','','images/servicemenu/servicemenu7on.gif',1)");
else if (eventObject.info.name = "mail_on") {
getURL("javascript:MM_swapImgRestore();
MM_swapImage('serv4','','images/servicemenu/servicemenu9on.gif',1)");
myflv.addEventListener("cuePoint", listenerObject);
Thanks,
JeremyAlso note that I am using swfobject to write myflash movie to
the page -
Hi,
I am the creator of the
Virtual Cutter.
This is a website that can be used to create clips and playlists
for a large number of streaming video formats, and currently
supports the Windows Media Player, Real Player, Quicktime Player
and Kasenna Broadband Player. I am now looking to support the Flash
Player as well, or, more accurately, Flash-specific file formats
such as swf and flv.
As I am not a Flash programmer and do not know much about
Flash files, I hope to find answers to the questions I have about
this issue in this forum.
To use the architecture of the Virtual Cutter, I need to
access the Flash Player using JavaScript.
1. Is there a JavaScript function to get the current position
of the videofile? Something like flashplayer.getcurrentposition
2. Is it possible to add buttons to start, stop, pause,
rewind the file?
Off course, to play a clip, it must be possible to play a
file from any position in the file. The Virtual Cutter therefore
generates (depending on the player) an .asx, ram or.smil file, that
contains parameters for start point and end point/duration.
3. Is there a similar file format that I can use to play only
a selection of the Flash file?
4. Is is possible to create a playlist, so a sequence of
clips can be played?
5. What Flash-specific file formats could be processed?
The Virtual Cutter is an Open Source project. If anyone is
interested in working together on this, please contact me.
Best wishes,
André RosendaalNo Flash for iPads, iPhones, or iPods
Here's why there's is no Flash available for iDevices or other mobile devices. Adobe was unable to provide a product that was suitable to the needs of battery powered mobile devices used for Internet browsing. Existing Flash technology used too much memory, ate battery life, and was buggy. Simply put Flash did not work well on mobile devices.
Apple's Steve Jobs led the escape from Flash dependency when Apple introduced the iPhone, and later introduced the iPad. There was a hue and cry over the omission. Time proved Jobs was right on target.
So this is why there is no Flash for your iPhone or iPad or iPod nor for most SmartPhones. Flash has been abandoned by many sites in favor of supported technologies such as HTML5 or by providing their own custom app.
Here is Steve Jobs official comment on his momentous decision to omit Flash from iDevices: Steve Jobs on Flash.
Here is Adobe's later announcement to cease development of Flash for mobile devices: Adobe on Mobile Flash. Adobe is not providing Flash for Apple iOS devices, and they no longer provide Flash for any other cellular phones. Flash is officially gone.
Now, you are not necessarily out on a limb. There are some apps that can display some Flash, but don't count on there ability to display anything using Flash.
A sample of Apps that can display some Flash content:
1. Puffin
2. SkyFire
3. Photon Flash
4. Browse2Go
5. Swifter
Also, note that many sites that use Flash provide their own app for accessing their material. So check with your favorite sites and find out if "there's an app for that." -
Getting Error while calling Flex function from JavaScript
Hi,
I have an aspx page, which shows charts as per dropdown selection,
I am using flex charts for flex.In aspx page, i am calling an mxml function using javascript.below is the code for javascript in aspx.
Javascript code in aspx page:
<script type="text/javascript">
function callApp(formid) {
try {
var objectChart = document.getElementById("statisticsChart");
alert(objectChart.id);
objectChart.myFlexFunction(formid,get('<%=HiddenDashboardWS.ClientID %>').value);
catch (e) {
alert(e.message);
function getDropDownListvalue() {
var IndexValue = $get('<%=FormDropDownList.ClientID %>').selectedIndex;
var SelectedVal = $get('<%=FormDropDownList.ClientID %>').options[IndexValue].value;
// alert(SelectedVal);
callApp(SelectedVal);
</script>
Html code where dropdown control is placed
<asp:DropDownList CssClass="combo" ID="FormDropDownList" runat="server" AutoPostBack="false"></asp:DropDownList>
<object id="statisticsChart" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
height="220" width="680">
<param name="src" value="../swf/DashboardStatisticChart.swf" />
<param name="flashVars" value="" />
<embed name="statisticsChart" src="../swf/DashboardStatisticChart.swf" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" height="220" width="680" flashvars=""></embed>
</object>
Mxml code:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="white" creationComplete="initApp();" >
<mx:script>
public function initApp():void {
ExternalInterface.addCallback("myFlexFunction",myFunc);
public function myFunc(s:String,wsurl:String):void {
Formid.text = s;
webService.wsdl = wsurl;
Alert.show("webservice");
//Getdata calls webservice and gets xml data
GetData();
//showchart() will draw chart
ShowChart();
</mx:script>
</mx:Application>
Above code works perfect in ie, but in firefox, it gives An error saying “chartObject.MyFlexFunction is not a function”.
I am getting the object in javascript in all the browsers, but not the functions!
Does anyone has worked with this?
Any help will be highly appreciated.
Regards,
Nirav PatelFound the solution from here... http://74.125.153.132/search?q=cache:4BC9BY04B5EJ:livedocs.adobe.com/flash/8/main/00002201 .html+externalinterface.addcallback+not+working&cd=1&hl=en&ct=clnk&gl=in
Hope it will help others...
Regards, -
IP - Is it possible to call exit planning function from ABAP Report..
Hi All,
Greetings.
Is it possible to call exit planning function from ABAP Report (t-code SE38) ? Or I mean is not limited only to be called from ABAP Report, perhaps from BSP / Web-Dynpro / Function Module.
If somebody here has been doing it before, I'm keen to ask to kindly share it. Particularly how to call and transfer data to that exit function.
Or if somebody has done in BPS, appreciate if it can be shared too .
Thanks a lot and have a good day,
Best regards,
Daniel N.Hi.
You can achive this as suggested by Mattias in your previous post.
Lets say you have next data structure:
CostCenter | Amount | PercentForDistibution |
Create input ready query in this format. Restrict cost center by variable type range.
Create WAD with analysis item.
When you run web page you enter range of cost centers (lets say you will enter 101004 to 101010).
I assume you have data only for 101004 in your cube (lets say 1000).
You will see only one record in your webpage.
CostCenter | Amount | PercentForDistibution |
101004 | 1000 | NOTHING
When you create WAD in analysis item properties set "NUMBER_OF_NEW_LINES" to lets say 1 (so in WAD you will see always one blank line for entering new data).
Just add 6 new records:
CostCenter | Amount | PercentForDistibution |
101005 | NOTHING| 10
101006 | NOTHING| 30
101007 | NOTHING| 20
101008 | NOTHING| 25
101009 | NOTHING| 5
101010 | NOTHING| 10
Then run planning FOX function like this:
FOREACH Z_COST_CENTER.
IF {Amount, Z_COST_CENTER} <> 0
Z_AMNT_TO_DISTRIBUTE = {Amount, Z_COST_CENTER}.
ENDIF.
ENDFOR.
FOREACH Z_COST_CENTER.
IF {PercentForDistibution Z_COST_CENTER} <> 0.
{Amount, Z_COST_CENTER} = Z_AMNT_TO_DISTRIBUTE * {PercentForDistibution Z_COST_CENTER}.
ENDIF.
ENDFOR.
It is not perfect FOX, but as an idead, it should work.
Regards. -
Acrobat X freezes when I run the search function
Every time I run the search function Acrobat X, Acrobat freezes and then locks up. This is happening on two different computers, both of them are running Acrobat 10.1.1. I've also repaired both installations through the control panel in Windows 7.anyone having similar problems or suggestions on how to fix?
It is possible to have the Redaction tool search for a text string across multiple PDFs without using the "Action" wizard or batch processing. You will have to learn the exact steps to properly set the properties for each string of text. You can also review the items marked for redaction and either accept, remove or adjust as needed each one.
There are 3rd party tools that can also redact PDFs and they existed long before this feature was added to Acrobat. Appligent Document Solutions Redax..
Appligent even has a server based product for large amount of files or using watched folders. -
Is it possible to run a java application within a web browser?
Hello everyone here! I have a question about running a java application within a web browser and I would appreciate it very much if anyone here can give me some answers.
I have a standalone java application written with AWT. Basically this free application lets users to select spectral lines from a big file based on some criteria and plot those selected lines. Yes, it is a very simple application. Now I want to run this application within a web browser so that users don't need to download the application from the ftp site and thus don't need to install in their machine. Is it possible to run this application within browser? If yes, can we get the same plotting function as we run the application separately and where should I start out?
Thanks in advance!
kuilianPlease see the signed applet discussion group for details of how to avoid the applet security restrictions. You can sign the applet, or use the policy file containing {AllPermission} for testing purposes (though not suitable for widespread deployment).
Regards
Matthew -
Cannot call AS3 Function from JavaScript
Hi,
I am trying to call an ActionScript 3 function with JavaScript. The problem I cannot seem to get any of the browsers to trigger this AS3 function. The debuggers say that the function is undefined when I call it on the flash object.
What is supposed to happen is - the javascript function calls the AS3 function, and passes it an integer value. That integer is then used to pull one of 20 swfs, and load that into the flash movie.
Please let me know if you guys can think of anything that I can do to make this work! I've been stuck for hours, and can't seem to make it happen.
Here is my actionScript:
import flash.net.URLRequest;
import flash.display.Loader;
import flash.external.ExternalInterface;
var movies:Array = ["idle-ok.swf", "idle-good.swf"];
// It first loads this "hello swf".
var helloLoader:Loader = new Loader();
var helloURL:URLRequest = new URLRequest("idleAvatar.swf");
helloLoader.load(helloURL);
addChild(helloLoader);
var setAvatar:Function = loadAvatar;
ExternalInterface.addCallback("callSetAvatar", setAvatar);
// Then, this function should be called by JavaScript to load one of the other swfs.
function loadAvatar(indx:Number){
var url:URLRequest = new URLRequest(movies[0]);
var ldr:Loader = new Loader();
ldr.load(url);
addChild(ldr);
Here is my JavaScript:
<script type="text/javascript">
function callExternalInterface(val) {
document.getElementById("loader").callSetValue(val);
</script>
Here is my embed code:
<div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="250" height="350" id="loader" name="loader">
<param name="movie" value="loader.swf" />
<param name="allowscriptaccess" value="always" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="loader.swf" width="250" height="350">
<param name="allowscriptaccess" value="always" />
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
<a href="#" onClick="callExternalInterface(1)">CLICK</a>You don't appear to be calling any function in your actionscript. The names between and within do not agree.
document.getElementById("loader").callSetValue(val);
should be calling a function identified with the string "callSetValue" in your actionscript, but you only have a function identified with "callSetAvatar" and the function associated with that on your AS3 side is specified to be setAvatar...
ExternalInterface.addCallback("callSetAvatar", setAvatar);
but you do not have a function named setAvatar, you have one named loadAvatar
Here's a link to a tutorial that might help you to see how the functions are specified between javascript and actionscript using the ExternalInterface class. It gets confusing so I suggest you copy the code to a word processing file so you can clearly highlight where they have the same language between them.
http://viget.com/inspire/bi-directional-actionscript-javascript-communication -
How do I get a program to run inside flash
How do I get a program on my harddrive to run inside flash on my computer? I would like to build a Flash front end for my boat pc, but I would need to be able able to open up a program inside a flash.exe?
would a external .ini File work? if so what code would I use internally to execute the .ini
any help would be greatly appreciated Sincerely newwaveboatsThanks for the tip about Zink, but it is not what I'm after.
On (Release)
FS Command ("exec", "install.exe")
End On
google search just revealed this button code but it was for back in the day "Flash 8" as1 or 2. as3 your not allowed code to be plaaced on buttons.
So I know it is possible, I just need the know how.
EDIT: I looked further into to this, and it is perfect for my needs. my first look was quick and I saw a close to 300 price tag and that it was a compiler, 2nd longer look showed it was free for personal use and has lots of great system features.
Thanks again combustion007 for your help was greatly appreciated, Sorry I did not realize how perfect it was when you first told me about it.
Maybe you are looking for
-
Microsoft Visual C++ Runtime Library Error in T430S during HP printer install
I just bought a T430S Windows 8 and I'm having problems installing the software and drivers for my HP Photosmart D-110-a printer. I've owned the printer for a year and it was no problem installing the software that it came with on my previous Dell Wi
-
Can't rename Layers in Flash CS4 - Revisited
My testing on the Mac side is pointing toward the Behaviors palette as to the culprit in this issue. As soon as I open that palette in my workspace, the ability to double click on a layer name in the Timeline palette stops. I have to right click and
-
Table loading with empty selected row
hi i have below table ,when the page load it has empty row created, i what it to show that message emptyText=No data to Display when the page load,the table was created based on the bean,am in jdeveloper 11.1.1.6.0,i don't what to use #{!adfFacesCont
-
Good graphics for black and white books?
Can anyone suggest a website where I can get good compostion ideas for black and white work, layouts for books? Actually I'm working on a book on house designs so would like to get ideas for visual layouts for the same, captions, blow-ups etc.The boo
-
Hi, I have inserted 64gig SD Card in my new Z2. Since I will be using a lot of email, with heavy attachments, I want to store the emails on SD card and not on the main device storage. This way, I can keep eons of data handy. Any bright ideas how to a