Flash and Javascript

Orginally posted in Flash Gen Forum, someone reccomended I
try it here.
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);
I'm using swf object to write my flash to the page.
Thanks,
Jeremy

Perhaps the dreamweaver and flash versions are slightly
different.
Have you considered using SWFObject instead? I personally
prefer it and its even (apparently) used by Adobe on some of their
own sites.
http://blog.deconcept.com/swfobject/
I also remember reading about a dreamweaver extension a
couple of weeks back that someone had made for SWFObject, but I
haven't tried it:
http://www.metah.ch/blog/2007/07/25/dreamweaver-extension-%E2%80%93-swfobject-insertions/

Similar Messages

  • Cform type="flash" and javascript?!?!

    In a cfform type="flash", can I used
    javascript within? For example, if I used
    <cfinput name="button"
    type="button" value="I validate this
    information is correct and wish to submit for
    distribution"
    onSubmit="javascriptscriptcall()" >;

    I tried this without successs.
    <script type="javascript">
    function redirectPage()
    window.location =
    "https://www.myesp.org/form.cfm?p=control_par.cfm?p=term_edit";
    </script>
    <cfinput name="cancel"
    type="button" value="Edit This
    Request" onClick="redirectPage()"
    />

  • Can't play Foxnews videos. Trying to use latest Firefox, Flash and Javascript is enabled. Ad plays but video hangs. Anyone else having this issue?

    Have tried both Mozilla 12 and 16, have reloaded Flash several times, have enabled Javascript. Ad seems to play but video does not, only seems to occur with Foxnews.

    You can check the Flash status [http://helpx.adobe.com/flash-player/kb/find-version-flash-player.html here]. If you have any external Windows ad blocking applications, or if you're using a proxy you can try to adjust the settings.
    Additionally, the Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!

  • Interaction between flash and javascript

    I want to make a player separate from my swf file in my web page
    and according to this link
    http://www.adobe.com/support/flash/publishexport/scriptingwithflash/scriptingwithflash_03. html
    I make two button which play and stop the swf but I need three more buttons which control sound (mute , increase volume , decrease volume)
    any  suggestions ...?
    thanks in advance

    Your going to have to unpack your array no matter what, so no.
    You can make your class factory with your huge case, or, if you have the source for your lib you could modify the constructor, but its the same amount of work:
    Was:
    public function MyClass(s:String, n:Number, d:Date){...}
    To:
    public function MyClass(s:*, n:Number=0, d:Date=nul){
      <case code here>
    If you have a decent platform, or even javascript, you could maybe think about writing a parser that will generate the class factory case based on the constructor signatures.

  • Cfform (flash) and javascript integration

    I've been searching and shooting in the dark for 2 days and
    can't get this to work...
    I need to have my flash form button execute a javascript,
    return the value to the form and then I need the form to submit and
    take advantage of cfform's validation.
    So far, I get the javascript to change the value of the form
    field without submitting the form, but when I add the submit line,
    the form submits before the javascript returns the changes.
    Here is my sample:
    <script language="JavaScript" type="text/javascript">
    function changeSomething(x,z1,z2)
    var z3 = "window.document."+z1+ ".SetVariable";
    if (x != "ABCDEFG")
    eval(z3+"(z2+'.text', 'INVALID Name')");
    </script>
    <cfsaveContent variable="prevalidateIt">
    getURL("javascript:changeSomethig('"+name.text+"','Step1','name')");
    submitForm();
    </cfsavecontent>
    <cfform method="post" name="Step1" preloader="no"
    format="flash" width="960">
    <cfformgroup type="panel" label="Step 1" visible="yes"
    enabled="yes">
    <cfformgroup type="hbox" visible="yes" enabled="yes">
    <cfformgroup type="hbox" width="200" visible="yes"
    enabled="yes">
    <cfinput type="text" name="name" size="12" maxlength="11"
    width="12" label="name" validateat="onSubmit" validate="maxlength"
    required="yes" />
    </cfformgroup>
    </cfformgroup>
    <cfformgroup type="hbox" visible="yes" enabled="yes">
    <cfformgroup type="hbox" visible="yes" enabled="yes">
    <cfinput type="button" name="Submit" value="Submit"
    onclick="#prevalidateIt#" />
    </cfformgroup>
    <cfformgroup type="hbox" visible="yes" enabled="yes">
    <cfinput name="Reset" type="reset" id="Reset"
    value="Reset" />
    </cfformgroup>
    </cfformgroup>
    </cfformgroup>
    </cfform>
    My javascript is of course way more complicated than this one
    and goes through several steps of validation of the form field. It
    will ultimately be used on multiple fields in the form.
    Has anybody else tried to do something similar.
    Thanks!

    I ran your code. It appears to work as expected. The only
    major change is that I corrected the typo
    javascript:changeSomethi
    ng.
    <script type="text/javascript">
    function changeSomething(x,z1,z2)
    var z3 = "window.document."+z1+ ".SetVariable";
    if (x != "ABCDEFG")
    eval(z3+"(z2+'.text', 'INVALID Name')");
    </script>
    <cfsaveContent variable="prevalidateIt">
    getURL("javascript:changeSomething('"+name.text+"','Step1','name')");
    submitForm();
    </cfsavecontent>
    <cfform method="post" action="#cgi.script_name#"
    name="Step1" preloader="no" format="flash" width="960">
    <cfformgroup type="panel" label="Step 1" visible="yes"
    enabled="yes">
    <cfformgroup type="hbox" visible="yes" enabled="yes">
    <cfformgroup type="hbox" width="200" visible="yes"
    enabled="yes">
    <cfinput type="text" name="name" size="12" maxlength="11"
    width="12" label="name" validateat="onSubmit" validate="maxlength"
    required="yes" />
    </cfformgroup>
    </cfformgroup>
    <cfformgroup type="hbox" visible="yes" enabled="yes">
    <cfformgroup type="hbox" visible="yes" enabled="yes">
    <cfinput type="button" name="Submit" value="Submit"
    onclick="#prevalidateIt#" />
    </cfformgroup>
    <cfformgroup type="hbox" visible="yes" enabled="yes">
    <cfinput name="Reset" type="reset" id="Reset"
    value="Reset" />
    </cfformgroup>
    </cfformgroup>
    </cfformgroup>
    </cfform>

  • Cfform type="flash"  and javascript

    &lt;!--- THIS IS THE CODE - some code removed, however
    you get the idea) ---&gt;
    &lt;script type=&quot;javascript&quot;&gt;
    function redirectPage()
    window.location =
    &quot;form.cfm?p=control_par.cfm?p=term_edit&quot;;
    &lt;/script&gt;
    &lt;cfform format=&quot;flash&quot;
    name=&quot;visitrequest&quot;
    method=&quot;post&quot; height=&quot;970&quot;
    action=&quot;control.cfm?p=terw&quot;
    width=&quot;600&quot; preservedata=&quot;yes&quot;
    skin=&quot;haloblue&quot; &gt;
    &lt;cfinput name=&quot;cancel&quot;
    type=&quot;button&quot; value=&quot;Edit This
    Request&quot; onClick=&quot;redirectPage()&quot;
    /&gt;
    &lt;/cform&gt;

    agh... for some reason the the character are being turned
    into html equivalant on the board. WTF?

  • Flash and Javascript communication

    Dear All
    I am creating a CD version course where passing data from
    Flash to html. Because of Flash player 8 security reason, a popup
    is flashing. To avoid that I have tried to write a .CFG file in
    system32, but that is not possible on user's machine.
    Is there any other solution to aviod that Flash 8 security
    popup?
    Thanks and Regards
    Shailesh

    If you use player 9 you can set the value. Here's more
    information:
    http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode_02.html

  • Facebook sites and profile pages not loading properly. Updated Adobe Flash and Javascript installed. Firefox allowed through firewall. Disabled facebook plugin as throught this would fix it but it didnt. Have windows 7 32 bit laptop

    Have tried all of the above but facebook home page working fine but other peoples pages and my profile page is all skewed. Most of it is on the left hand side of the page and script all over the place.

    I am facing the same problem...

  • Is there Adobe Flash player and JavaScript for iPad

    I want to watch a tv episode. Told needed adobe flash and JavaScript.  Are these available for iPad?

    No 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."

  • Flash and browser integration

    hi,
    i am trying to find out if there is a way to control the
    window which holds the flash movie through flash, for instance,
    make it scroll up or down, or somehow control the flash movie to
    react the windows position... i have seen it somewhere in an advert
    where oranges are being squashed when the flash banner is scrolled
    up the window... i wish i had the link to give you an example..
    anyway, any help will be apreciated.
    thanks.

    you can use javascript to control the browser window and you
    can use the externalinterface class to communicate between flash
    and javascript.

  • Flash and internet explorer warnings

    Hello!
    I am new to flash so I am really sorry if my question is too stupid for this forum.
    I want to include some flash banners or movies on my website but everytime that I load my website with internet explorer i get the yellow bar on the top of the page saying that the active x needs permission to load the page but this does not happen with Firefox.
    Does anyone know how to overcome this problem or where can I get a tutorial to learn how to do this?
    I have seen that some sites have flash movies, javascript and banners included but dont get any warnings.
    I would appreciate any help!
    Thanks

    Hello and thanks for your reply mldb88!
    It is a problem with internet explorer and I know what I should do when that happens but I am concerned about other people that will visit my website. As you might know there are a lot of people using internet explorer and some of them might get scared with this kind of warnings and I would really like to avoid that.
    But like I said on my previous post, I have seen that most websites that have flash and javascript included in the page, I dont get these warnings on internet explorer when i load them and I would like to know if there is some code or something else that I should include on the webpage to avoid this warning which seems to happen only with internet explorer.
    Thanks!

  • Using CSS and Javascript to display a div with flash in it, mozilla reloads the flash file!

    I am using CSS and Javascript to display a div with an
    embedded flash object in it. Mozilla Firefox reloads the flash file
    when the div is displayed! (I dont want this to happen, as it's
    unexpected functionality, my expectation would be that the flash
    file would not change it's state at all, and would remain in
    whatever state it was left in.)
    I was wondering if anyone has come across this issue and is
    there something I can do to prevent this from occurring?
    To be more specific, I have a single HTML page with 8 flash
    files embedded in it (yeah I know, it's a bit much). I am then
    using CSS and Javascript to display (via a numbered link (with an
    id)) an equivalent numbered div tag containing the flash file.
    Mozilla Firefox reloads the flash object that is in the div.
    Internet Explorer will not do this and will instead, load the flash
    object only upon initial view of the flash object. All subsequent
    links (in IE) will NOT reload the flash object on the page. I'm
    guessing this is some kind of difference in the flash player as an
    Active X object and the plugin, or is it just IE being clever? Or
    am I way off?
    Anyway, here is the code...

    I am using CSS and Javascript to display a div with an
    embedded flash object in it. Mozilla Firefox reloads the flash file
    when the div is displayed! (I dont want this to happen, as it's
    unexpected functionality, my expectation would be that the flash
    file would not change it's state at all, and would remain in
    whatever state it was left in.)
    I was wondering if anyone has come across this issue and is
    there something I can do to prevent this from occurring?
    To be more specific, I have a single HTML page with 8 flash
    files embedded in it (yeah I know, it's a bit much). I am then
    using CSS and Javascript to display (via a numbered link (with an
    id)) an equivalent numbered div tag containing the flash file.
    Mozilla Firefox reloads the flash object that is in the div.
    Internet Explorer will not do this and will instead, load the flash
    object only upon initial view of the flash object. All subsequent
    links (in IE) will NOT reload the flash object on the page. I'm
    guessing this is some kind of difference in the flash player as an
    Active X object and the plugin, or is it just IE being clever? Or
    am I way off?
    Anyway, here is the code...

  • Safari browser does not detect Adobe Flash and/or JavaScript.

    Hello,
    I have Safari and Firefox loaded on my Mac. My Firefox browser detects Adobe Flash Player and Javascript is enabled, but my Safari browser doesn't seem to detect it although it is definitely loaded and installed on the computer. I can watch/see videos on youtube and see flash-enabled content on websites using firefox browser, but my safari browser cannot. Is there anything else I can do to fix this? I went and checked that I have javascript enabled in my preferences for the Safari Browser.
    I have reinstalled the latest version of flash player on my computer several times. But, when I go to a website like youtube, all it tells me is that either my Javascript is disabled or I have an old version of Flash player. I've repeatedly installed the newest version. I need help with this. Thanks.

    No it doesn't work now. I uninstalled Flash, reinstalled, unclicked the javascript buttons in safari preferences, restarted, everything, and still I can't play vids in sites like youtube.com.

  • Unable to launch yahoo chess (Yahoo! Chess requires Flash Player 7 or later and JavaScript enabled in your browser.)

    When trying to launch/play chess from the yahoo games website, I get the following message: "Yahoo! Chess requires Flash Player 7 or later and JavaScript enabled in your browser''. I have verified that I do have Flash Player 10 installed and that JavaScript is enabled. I'm able to launch/play chess from Yahoo Games when I use IE as my browser.

    You either do not have Flash installed for Firefox or it is disabled.
    In Add-ons > Plugins, look for "Shockwave Flash ''(version)''".
    *If it is there and you see an "Enable" button, click the "Enable" button; that means it was disabled.
    *If it is not there, you do not have it installed; see the following.
    There are 2 versions of Adobe Flash; an '''ActiveX version''' for IE only and a '''Plugin version''' for most other browsers including Firefox. On a Windows system, you should always update both individually.
    #'''Using Firefox''', go to the following direct download link and SAVE the download to your desktop so you can find it later: http://fpdownload.adobe.com/get/flashplayer/current/install_flash_player.exe
    #When the download is finished, close Firefox (File > Exit '''''OR''''' Firefox button > Exit)
    #Click or double-click on the file you just saved to your desktop
    #*In the installation window that appears, click the box to the left of "I have read and...." to place a check mark in the box
    #*The "Install" button in the lower right corner will now be highlighted, click it.
    #*The installation is quick.
    #Start Firefox and test your installation here: https://www.adobe.com/software/flash/about/
    #Direct link ActiveX version for IE '''''only''''': http://fpdownload.adobe.com/get/flashplayer/current/install_flash_player_ax.exe
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • Javascript, Flash and Bookmarks

    We are using Captivate 8 to create our courses.  On slide 3 through 12 I have one web object per slide which brings up a web page containing a streaming video player that points at a video hosting company that we rent space on.  Our website is hosting the HTML containing the steaming video player used for each slide.
    On each of these slides (3 through 12) I have some JavaScript (upon page load) which is trying to set the suspend data and making sure that the current slide is being bookmarked.  I have tried calling the suspend data call and even the set Bookmark call and both have the same results:  Nothing happens.
    I am testing it out on a PC running Flash and am using Fiddler to watch the transactions.  Once the videos have started (starting on slide 3), I do not detect any activity to update the bookmark information going back to our LMS.
    Once the student is past all of the slides containing the video web objects, then the bookmarking seems to start working correctly again.
    It appears that Captivate is converting the slides to a Flash Movie with iframes used to display the video itself.  But it appears that while the flash movie is playing the slides with the videos, no communication goes on between the course and the LMS.
    The videos on each slide is only about 5 to 10 minute long.
    We are having more and more students who get somewhere past the 3rd video slide and then their session times out for some reason (usually inactivity) but when they attempt to restart the course, they taken back to the first video slide again.
    We are not ready to go exclusively HTML5, so I need our bookmarking to work with the Flash-version of our course.
    Any help or advice would be greatly appreciated.
    Thanks

    I have used 2 different approaches and neither one seems to work.
    The first was:
    /* Calling a self-invoked function to not pollute the global scope and immediately destroy the scope chain */
    (function(){
      var KeepItActive = {
      checkComms: function() {
      this.showConsoleLogs = 'no';
      try {
      this.currSetExitResult = SCORM2004_CallSetValue("cmi.exit", SCORM2004_SUSPEND);
      if (this.showConsoleLogs == 'yes') {
      console.log("Result is type of " + typeof this.currSetExitResult);
      console.log("Set Exit to Susspend worked =  " + this.currSetExitResult);
      if (this.currSetExitResult || this.currSetExitResult == 'true' ) {
      this.currSlideName = SCORM2004_GetBookmark();
      if (this.showConsoleLogs == 'yes') {
      console.log("Current Slide Name =  " + this.currSlideName);
      } else {
      if (this.showConsoleLogs == 'yes') {
      console.log("Set Exit to Susspend Failed");
      }  catch (err) { //otherwise assume failed.
      if (this.showConsoleLogs == 'yes') {
      console.log("The Catch of the try-catch feature was activated");
      KeepItActive.checkComms();
    The second was:
    /* Calling a self-invoked function to not pollute the global scope and immediately destroy the scope chain */
    (function(){
      var KeepItActive = {
      resetBookmarks: function() {
      try {
      var strBookmark = null;
      var callReturn = null;
      strBookmark = this.SCORM2004_GetBookmark();
      callReturn = this.SCORM2004_SetBookmark(strBookmark);
      }  catch (err) { //otherwise assume failed.
      if (this.showConsoleLogs == 'yes') {
      console.log("The Catch of the try-catch feature was activated");
      SCORM2004_GetBookmark: function () {
         SCORM2004_ClearErrorInfo();
         return SCORM2004_CallGetValue("cmi.location");
      SCORM2004_SetBookmark: function(strBookmark) {
         SCORM2004_ClearErrorInfo();
         return SCORM2004_CallSetValue("cmi.location", strBookmark);
      KeepItActive.resetBookmarks();

Maybe you are looking for

  • My canon rebel T3i isnt being recognized by my computer all of a sudden

    I cant figure out why my camera isnt being recognized by my computer.  And my EOS Utilitysoftware only has the Monitor folder and Picture Style Editor highlighted--- all ther others are greyed out as in not available.  I have used this for 2 years al

  • Shipped orders always undeliverable but can't be sent to will-call

    Hi, Im not sure where else to get help with this, as I have called numerous times now but no permanent solution has been made.  I try to avoid shipping items as much as possible since I have moved to a house in a gated community. The pedestrian gate

  • Re: Partner functions in SAP MM

    I am in the BBP stage.. Can anyone help me Data conversion, Configuration Parameter Thanks

  • Getting error 600 while exporting

    hi friends.... I am trying to export a dump in oracle 10g but getting undermentioned error... UDE-00008: operation generated ORACLE error 600 ORA-00600:internal error code, arguments:[17069],[0x0A0A5D5E8],[],[],[],[],[],[] Thnx....

  • Error while configuring DAC Client

    Hi, I'm trying to create connection in DAC client, I'm using Oracle DB and I used connection type Oracle(OCI8) and tnsname. When I test my connection getting the following error: Oracle (OCI8) driver not available I have installed Oracle client on th