To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Flash Help > Flash General Help

Reply
 
Thread Tools Search this Thread Display Modes
Old 07-01-2003, 04:17 PM   #1
Deckard
Member
 
Join Date: Nov 2000
Posts: 36
control browser window size with getURL

Just wondering if anyone knows what I would add to my actionscript for a getURL command to make the browser window that opens up a certain size, in my case, really small.

thanks,
D
Deckard is offline   Reply With Quote
Old 07-01-2003, 04:38 PM   #2
Deckard
Member
 
Join Date: Nov 2000
Posts: 36
Just want to add something bizzare to this that's happening.

I have a button set to carry this action out, BUT, the button NEVER works the 1st time it is pressed or released, or whatever(I've tried it both ways). It only works the 2nd time and everytime thereafter. Really wierd.

What would make this happen?

Here's the code I used

on (release) {
instancename.onPress = function() {
getURL("mymp3file.mp3");
};
}

I also wish I could figure out how to load the mp3 as a swf so a separate browser window never even has to open for someone to audition the mp3s.

Help
Deckard is offline   Reply With Quote
Old 07-01-2003, 04:38 PM   #3
Lineu
Junior Member
 
Join Date: Jun 2003
Posts: 19
try that

on (release) {
getURL("javascript:window.open('file to be oppened',new Date().getTime(),'width=600,height=450,top=0,left= 0'); void(0);");
}
Lineu is offline   Reply With Quote
Old 07-01-2003, 04:45 PM   #4
Deckard
Member
 
Join Date: Nov 2000
Posts: 36
crashed my browswer window using that code, but thanks for the effort.
Deckard is offline   Reply With Quote
Old 07-01-2003, 07:10 PM   #5
catbert303
Moderator
 
catbert303's Avatar
 
Join Date: Aug 2001
Location: uk
Posts: 11,221
first opening a new window,

try,

code:

on (release) {
getURL("javascript:window.open('page_to_open.html' ,'myWindowName','width=400,height=300');void(0);") ;
}



for security reasons most browsers should prevent you making the window too small though.

the second post because you've wrapped the onPress event handler in an on (release) button event the onPress isn't defined until after the press event has passed (the button has been released)

just add a frame action in the same frame,

code:

instanceName.onPress = function() {
getURL("mymp3file.mp3");

};



maybe look into using the Sound object for playing your mp3 file,

music = new Sound(this);
music.loadSound("mymp3file.mp3", true); // stream the sound

also check _soundbuftime to set how long the sound should be buffered before playing
__________________
Antonetti in '09
catbert303 is offline   Reply With Quote
Old 07-01-2003, 07:54 PM   #6
Deckard
Member
 
Join Date: Nov 2000
Posts: 36
Ok, I see what I've done wrong.

Don't know how to use the sound object though.

I don't want the sound to stream in the background. I want it to be controlled by a button.

D
Deckard is offline   Reply With Quote
Old 07-02-2003, 05:33 AM   #7
catbert303
Moderator
 
catbert303's Avatar
 
Join Date: Aug 2001
Location: uk
Posts: 11,221
code:

// load the sound
music = new Sound(this);
music.loadSound("mymp3file.mp3", false);

myButton.onPress = function() {
music.start();
};

__________________
Antonetti in '09
catbert303 is offline   Reply With Quote
Old 11-04-2009, 08:16 PM   #8
nancyjpants
Junior Member
 
Join Date: Nov 2009
Location: Santa Monica, CA
Posts: 1
I was trying the pop up window code in flash and it works well,

on (release) {
getURL("javascript:window.open('file to be oppened',new Date().getTime(),'width=600,height=450,top=0,left= 0'); void(0);");
}

but my original page loses the flash images once the button is clicked and the new window opens. Any thoughts?
nancyjpants is offline   Reply With Quote
Old 11-07-2009, 06:03 PM   #9
Eye for Video
Member
 
Join Date: May 2008
Posts: 77
If I understand the problem, when the popup window opens, the parent window closes?? If so, then add:
Code:
'_blank'
right after:
Code:
getURL("javascript:window.open('file to be oppened','_blank',...
A new window will open, leaving the parent also open.
Best wishes,
EfV
Eye for Video is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Flash Help > Flash General Help

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:49 AM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.