A Flash Developer Resource Site

Results 1 to 15 of 15

Thread: want to close html file.

  1. #1
    Junior Member
    Join Date
    Apr 2004
    Location
    mumbai. but now i m in jeddah,saudi arabia
    Posts
    22

    want to close html file.

    see this is the site

    hi frnd,

    I need help. I have designed a intro type underconstruction page. but as per client they need it to b open in Full window....

    1. I did in flash FSCOMMAND ..full screen.
    2. & given a quit on button whn any1 want to exit.
    3. I did it in HTML Format whn any1 press www.asdaf-dev.com it should open a full screeen window. which is opening in new internet explorer window.
    4. Now my main probz is when any1 wants to quit or close this window they cant do it. so i need a help or a script to solve my probz .or is thr anyway to solve this...if any1 can help me out i will b thnakful.

    Sarfaraz
    sarfweb@yahoo.com
    sarf

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    I found this on this board.

    Insert this into the head of your html

    <script language="javascript">
    function fatherclose(){
    father = window.self;
    father.opener = window.self;
    father.close();
    }
    </script>

    then use this for your button action

    on(release){
    geturl("javascript:fatherclose()");
    }

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  3. #3
    Junior Member
    Join Date
    Apr 2004
    Location
    mumbai. but now i m in jeddah,saudi arabia
    Posts
    22

    want to close html file

    hi...no its not wrk...as i need it like this....

    See i hv given this code in my index.html file.

    onload='window.open("new.swf","","fullscreen=yes status=yes")'

    So it is opening a new window with new.swf file , i havent created any html file for this. so plz let me know if any1 can help me.

    www.asdaf-dev.com its the url...


    need help asap thnkz

    sarfaraz.
    sarf

  4. #4
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Then try this on a button in the swf.....

    on (release) {
    getURL("javascript:window.close();void(0);");
    }

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  5. #5
    Junior Member
    Join Date
    Apr 2004
    Location
    mumbai. but now i m in jeddah,saudi arabia
    Posts
    22

    wowwwwwwww

    thankuuuuuuuuu very muchhhhhhhhhhhhhhhh.........

    very happy tht my probz solved thnkz to u and to flashkit this forum really works like a magic...

    thnkz alotttt

    sarfaraz
    sarf

  6. #6
    Junior Member
    Join Date
    Apr 2004
    Location
    mumbai. but now i m in jeddah,saudi arabia
    Posts
    22

    open windw

    hi i have another query.

    see i m working on 1 project. in which thr r 3 buttons and when u clik on tht button it shld open a presentation in new full window & hw to do it do let me knw.
    sarf

  7. #7
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    //POPUP CODE

    on(release){
    getUrl("javascript:window.open('http://www.mysite.com/image1.html','newwindow','width=1024,height=768,to p=0,left=0'); void(0);")
    }

    (there should be no space between java and script)

    And check out the popup script generator at www.flash-db.com/PopUp
    ..for more advanced versions, if you want a fullscreen that sizes itself.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  8. #8
    Junior Member
    Join Date
    Apr 2004
    Location
    mumbai. but now i m in jeddah,saudi arabia
    Posts
    22

    no its not working

    see i dont have any html file here... i hv .swf file to be called..

    plz help me.... see wat i exactly need is like a new fullwindow should open on click of button. plz help me out.

    sarfaraz
    sarf

  9. #9
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    So write the name of the swf instead of the name of the html page in the code.

    Its safer though to embed a swf in html dso it works on all platforms.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  10. #10
    Junior Member
    Join Date
    Apr 2004
    Location
    mumbai. but now i m in jeddah,saudi arabia
    Posts
    22

    its giving error

    hi

    its giving error.

    see for e.g.
    i m working on flash presentation eg. in this flash file i have 3 buttons. ok now i want to give this button a links. link 1 should open sarf.swf , 2 shld open sarf2.swf .now i want wehn any1 clik on link1 it shld open in fullscreen new window.

    this is wat i need.
    sarf

  11. #11
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    If it gives an error, its easier for me to understand what is going wrong if you tell what error message you get.

    Try using this code ON the first button.

    code:
    on (release) {
    getURL ("javascript:NewWindow=window.open('sarf.swf','new Win','width='+screen.availWidth+',height='+screen. availHeight+',left=0,top=0,toolbar=No,location=No, scrollbars=No,status=No,resizable=No,fullscreen=No '); NewWindow.focus(); void(0);");
    }



    There should be no spavce between java and script in the code above ( its this board that adds the space).

    Remeber to change the name of the file to open on the other buttons.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  12. #12
    Junior Member
    Join Date
    Apr 2004
    Location
    mumbai. but now i m in jeddah,saudi arabia
    Posts
    22

    its still giving error

    hi sorry i m distrbing u again

    see its still give me error...its opens a new window but tht window shake & (object) this text and at the tope the script which u gave me is comng at the top of the screen.

    is thr any other way to do this.

    thnku
    sarf

  13. #13
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    It is also importatn that the the javascript is on one line in Flash, maybe that is what is going wrong.

    Everything between

    on(release){ and the last }

    ......should be on one line. ( when it is the whole javascript will be the same color in Flash ).

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  14. #14
    Junior Member
    Join Date
    Apr 2004
    Location
    mumbai. but now i m in jeddah,saudi arabia
    Posts
    22

    insert or call movieclip from file library

    hi

    i need lil help again sorry to distrb.

    see is thr anyway to insert or call movieclip from file library to the target area when my mouse over or out.

    if thn hw
    Attached Files Attached Files
    sarf

  15. #15
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    You would use attachMovie() to get a library movie out on stage. I have never used it so check some tutorials on it.

    http://www.flashbax.com/attachmovie.htm
    http://actionscript-toolbox.com/sampleattachmovie.php

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

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