Different sized pop-up windows - can't be that hard!

I’ve followed the customisable pop-window tut which works fine, ie no tool bar, specific window size and all that.

BUT

wot I now need is this…

click on"button 1" and I get one type of pop window, say no toolbar… click on “button 2” and another pop up window at a different size, no toolbar etc…

any ideas?

jobbie78 - welcome to the forums :slight_smile:

You’re right it’s not that hard (believe me if I can do it, etc).

Different button = different script

eg

Button 1 =

[AS]on (release) {
//customize the window that gets opened
// 0 equals NO.
// 1 equals YES.
address = “http://www.yoururl.co.uk/directory/target.html”;
target_winName = “title_name”;
width = 300;
height = 425;
toolbar = 0;
location = 0;
directories = 0;
status = 0;
menubar = 0;
scrollbars = 0;
resizable = 0;
//sends data back to the function
openWinCentre(address, target_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);
}[/AS]

Then Button 2 = [AS]on (release) {
//customize the window that gets opened
// 0 equals NO.
// 1 equals YES.
address = “http://www.yoururl.co.uk/directory/target.html”;
target_winName = “title_name”;
width = 500;
height = 550;
toolbar = 1;
location = 0;
directories = 0;
status = 1;
menubar = 0;
scrollbars = 1;
resizable = 0;
//sends data back to the function
openWinCentre(address, target_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);
}[/AS]

and so on…

Just change the values in the script to 1 for Yes, I want them or 0 for No, keep them off.

Thats it :wink: Hope this helps.

Cello

[Edited to say that this is NOT my script - it’s from the Kirupa tut]

hey… thanks for replying so quickly… however I tried it and nothing happened…

I take it no javascript is needed etc… basically I copied the script, pasted it into the actionscript section… (I’m using Kool Moves, bit like Swish), made the thing a button and nothing happened!!!

If u can help me solve this u truly will be a star!

the problem is that I’m not using MX, I’m using an app called KoolMoves… like Swish… how I do have MX… so maybe the plan could be you knock up a simple fla so I can see what u did???

I know it’s a hag but it should do the trick?

are u a muscian?

[Edit] Sorry - it would help if I gave you all the information :wink:

Please have a look at the attached fla - it has all the answers :slight_smile:

Remember with this script, the .swf MUST be on a server to trigger the content of the popup. Previewing through Flash will only open a window with no content (and it won’t be the right size).

This is a link to the .swf that is produced by the attached .fla: http://www.betsytaylor.co.uk/kirupa/button_with_popup.html

Hope this all helps…

Cello

PS Yes - I compose for my partner who is a cellist - who is one of europe’s finest, in fact :slight_smile:

thanks for that… I’ll give it a whirl now…

this might seem cheeky but I’m a published songwriter/producer etc … checkout www.smckenzie.com

I’ve written a piano piece mainly for film but I would like some help to develop etc it, it’s currently in the www.broadjam.com charts at no.3 in classical and no.2 in the uk…

I don´t have any knowledge of the tu, but this works:
[AS]on (release) {
//customize the window that gets opened
// 0 equals NO.
// 1 equals YES.
address = ‘http://www.yoururl.co.uk/directory/target.html’;
target_winName = “title_name”;
width = 500;
height = 550;
toolbar = 1;
location = 0;
directories = 0;
status = 1;
menubar = 0;
scrollbars = 1;
resizable = 0;
//sends data back to the function
// if this doesn’t work, try to remove the spaces around :
getURL(“javascript : window.open(address, target_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable)”);
}
[/AS]

and if it still doesn’t:

on (release) {
        //customize the window that gets opened
        // 0 equals NO.
        // 1 equals YES.
        address = 'http://www.yoururl.co.uk/directory/target.html';
        target_winName = "title_name";
        width = 500;
        height = 550;
        toolbar = 1;
        location = 0;
        directories = 0;
        status = 1;
        menubar = 0;
        scrollbars = 1;
        resizable = 0;
        //sends data back to the function
        // if this doesn't work, try to remove the spaces around :
        getURL("javascript : window.open("+ address+","+ target_winName+","+ width+","+ height+","+ toolbar+","+ location+","+directories+","+ status+","+ menubar+","+ scrollbars+"," resizable+")");
}

thanks people… all sorted now… you’ll never guess how long I’ve been trying to do this!!!

hurrah
til next time