A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Error!

  1. #1
    Member
    Join Date
    Jul 2000
    Posts
    85
    Hi.. I am doing a pop up window from Flash. I use the following javascript

    <SCRIPT LANGUAGE="JavaScript1.2">
    </SCRIPT>
    <!-- Begin

    function openNewWindow(windowURL, windowParameters)
    {
    window.open(windowURL, "", windowParameters);
    }
    <//End-->
    </SCRIPT>

    In the flash button, i put
    JavascriptpenWindow("play.htm","400","400")

    Can someone tell me how come I always got an error, saying "OBJECT NO EXPECTED".

    PLs help me in this as i urgently need to hand in my project!

    Secondly, How do i have a pop up window of flash. Although it appear to be 400 by 400, when maximise, the flash will fill the whole screen rather than appearing so small. I believed its the FS command...

    Pls.. can anyone help?

    Luv,

    Sherraine

  2. #2
    Senior Member
    Join Date
    Sep 2000
    Posts
    532
    Use the get url script in the button and the javascript outside of flash will take care of the pop-up window things. The reason that the movie fills the screen when you maximize is because your publish settings are set to allow it. Go into publish settings and click on the flash tab. Set it to match movie and it will stay the same size no matter the size of the window.

  3. #3
    Member
    Join Date
    Jul 2000
    Posts
    85

    Yeah I did!

    Originally posted by satkoski
    Use the get url script in the button and the javascript outside of flash will take care of the pop-up window things. The reason that the movie fills the screen when you maximize is because your publish settings are set to allow it. Go into publish settings and click on the flash tab. Set it to match movie and it will stay the same size no matter the size of the window.
    Hi!

    Thanks for ur reply. I did use GET URL, on release and stuffs like that. The problem is that the jus now mentioned scripts just dun function. It always give me the OBJECT NOT EXPECTED Error.

    Pls help me?

    Luv,
    Sherraine

  4. #4
    Junior Member
    Join Date
    Jan 2001
    Posts
    19
    cut and paste this code on in the button "action "
    On (Release)
    Get URL ("javascriptpenNewWindow('play.htm','theplay','height=400,widt h=400,toolbar=no,scrollbars=no,align=center' )")
    End On
    after that publish the movie
    and check the following code is existing in the html page were you have embbed the flash if not
    paste this the code in body between body tag
    <A HREF=javascriptpenNewWindow('play.htm','theplay','height=400,widt h=600,toolbar=no,scrollbars=no')></A>

  5. #5
    Member
    Join Date
    Jul 2000
    Posts
    85

    Help!

    Originally posted by badshah123
    cut and paste this code on in the button "action "
    On (Release)
    Get URL ("javascriptpenNewWindow('play.htm','theplay','height=400,widt h=400,toolbar=no,scrollbars=no,align=center' )")
    End On
    after that publish the movie
    and check the following code is existing in the html page were you have embbed the flash if not
    paste this the code in body between body tag
    <A HREF=javascriptpenNewWindow('play.htm','theplay','height=400,widt h=600,toolbar=no,scrollbars=no')></A>
    Thanks Sir.
    There is still this error in my PC.. object not expected.
    I dun know any part of my scripts is wrong or what.
    IS there any site whereby i can look for a pop up window scripts?

    I am devastated.

    Thank You...

    Sherraine


  6. #6
    Member
    Join Date
    Jul 2000
    Posts
    85

    PLS HELP..

    Hi all,

    I am writing this to appeal all flashers to help me. I just canit make things rite.

    I have a flash menu. This flash menu supposed to open up windows without scrollbars. However, I do not want to control everything in the menu (index.html) file. Cos.. there are many buttons inside the menu. I want to have a control, such that some buttons will open up windows that have NO SCROLL BARS... while some of them, there ARE scroll bars. I figured out that the only way to do is use javascript.

    Therefore, i uses this in my index.html.

    <SCRIPT LANGUAGE="JavaScript1.2">
    </SCRIPT>
    <!-- Begin

    function openNewWindow(windowURL, windowParameters)
    {
    window.open(windowURL, "", windowParameters);
    }
    <//End-->
    </SCRIPT>

    In my buttons.. i will enter this;
    On (Release)
    Get URL ("javascriptpenNewWindow('play.htm','theplay','400 ','400',toolbar=no,scrollbars=no,align=center' )")
    End On

    So far SO SAD. I always got an error. "Object not expected"
    I have trying to source for scripts. but still unable to debug. Will you all help me?

    Pls?

    Devastated,
    Sherraine


  7. #7
    Senior Member
    Join Date
    Nov 2000
    Posts
    234
    Put this code in the HEAD section of your webpage
    Code:
    <script>
    function winopen() 
    {
     window.open('intro.html', 'Intro', 'toolbar=no,directories=no,menubar=no,width=800,height=600,resize=no,scrollbar=no');
    }
    </script>
    then rename the .html pages as needed, then in flash add the to a button "Get URL javascript:winopen()"
    or
    if you want a button on the .html page to open the window then do this
    Code:
    <a href="javascript:winopen()">Intro</a>

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