dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Opening new swf when clicking link?

  1. #1
    Junior Member
    Join Date
    May 2003
    Location
    Australia
    Posts
    2

    Opening new swf when clicking link?

    I need help.

    I have createdd a start site for my website, using links and linkvar commands.

    What I am trying to achieve is - when clicking on a link a new swf file will start which will contain the contents of the link.

    I made my start page as a movie. All my sub-pages (which will be activated by pressing each link) are made in a different swf file.
    How do I make both work?

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    on(release){
    getURL("http://www.yourserver.com/next.html", "_self");
    }

  3. #3
    Guerilla Records
    Join Date
    Dec 2002
    Posts
    32
    If i've got this right, you have a main .swf file and you want to load a new .swf when a link is clicked? so do you have seperate .swf files for each link?

    Oldnewbie's reply will open a new html page containing whatever you want... if you want to do anything different, could you please calrify what you're trying to achieve.

  4. #4
    Junior Member
    Join Date
    May 2003
    Location
    Australia
    Posts
    2
    Yes I have seperate .swf files for each link. I do not want to open another html file. Want to stay in the same file. This way all .swf files will be loaded initially.

    The actual main site and the contenst site are different layouts. This is why I created them in seperate .swf files.

    I am currently using linkvar commands and instances of buttons. Do i need to change that or which command do i Use?

  5. #5
    Guerilla Records
    Join Date
    Dec 2002
    Posts
    32
    If i understand you correctly, i think you need to use the "loadmovie" command. this is the best way to load a movie within a movie.

    **** Loading an external .swf ****
    1. You need to create a blank movie on your main page, draw a box or something, convert to movieclip and call it "blankmovie". Then go into "blankmovie" and delete the box, so the movie clip is still there but the box is not!

    2. Give "blankmovie" an instance name such as "mainmc"

    3. Place "blankmovie" in the top left corner of your main movie.

    4. Make seperate .swf files for each section and make sure they are all the correct size.

    5. Give each button the following code:
    On (Release){
    _root.mainmc.loadmovie("yourmovie.swf")
    }

    ************************************

    I think this is what you're looking for but i'm not 100% sure as to what you are trying to achieve.
    Jonathan Murphy
    Guerilla Records

    http://www.guerilla-records.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