dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Help plz on javascript.

  1. #1
    Aasta La Vista Baby ashlaz's Avatar
    Join Date
    Mar 2002
    Location
    India
    Posts
    115

    Help plz on javascript.

    Hi all,
    I have a javascript problem. I have a swf which has a button and a textfield. On clicking the button I am calling a javascript function and passing some value to the textfield.
    In the javascript function I am using GetVariable to get the value of the textfield from flash and am trying to display it in an alert box.
    Its working pretty fine in IE....but not at all working in Netscape6.0
    I am attaching the fla.
    This is the code written in html.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>

    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script language = "JavaScript">
    function check (){
    alert("in check");

    var chapterName = tr.GetVariable("chapter");
    alert(chapterName);
    //alert("here");



    }
    </script>
    </head>

    <body>
    <object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="550" height="400" id="tr">
    <param name="movie" value="tr.swf">
    <param name="quality" value="high">
    <embed src="tr.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="550" height="400" name="tr" swLiveConnect="true"></embed></object>
    </body>
    </html>


    Any help on this please.
    Am using Flash2004.

    Thanks plz help.
    Attached Files Attached Files
    only stupid people look for logic in the chambers of the human heart

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,044
    Hi,

    it should work in netscape 7

    In case the textfield content is less than about 500 characters, you could use a javascript call to transfer the data to javascript
    getURL("javascript:alert('some message')");

    Musicman

  3. #3
    Aasta La Vista Baby ashlaz's Avatar
    Join Date
    Mar 2002
    Location
    India
    Posts
    115
    I don't have netscape7.....but i viewed it in netscape6 and 4.7.
    No solution yet.
    Also, how will I pass the flash varaible to javascript using

    getURL("javascript:alert('some message')");

    where 'some message' is to be replaced by _root.chapter

    Thanks.
    only stupid people look for logic in the chambers of the human heart

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center