|
|
|
#1 |
|
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 |
|
|
|
|
|
#2 |
|
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
|
|
|
|
|
|
#3 |
|
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);"); } |
|
|
|
|
|
#4 |
|
Member
Join Date: Nov 2000
Posts: 36
|
crashed my browswer window using that code, but thanks for the effort.
|
|
|
|
|
|
#5 |
|
Moderator
Join Date: Aug 2001
Location: uk
Posts: 11,221
|
first opening a new window,
try,
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,
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 |
|
|
|
|
|
#6 |
|
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 |
|
|
|
|
|
#7 |
|
Moderator
Join Date: Aug 2001
Location: uk
Posts: 11,221
|
__________________
Antonetti in '09 |
|
|
|
|
|
#8 |
|
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? |
|
|
|
|
|
#9 |
|
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' Code:
getURL("javascript:window.open('file to be oppened','_blank',...
Best wishes, EfV |
|
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|