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
Printable View
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
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 :(
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);");
}
crashed my browswer window using that code, but thanks for the effort.
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
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
code:
// load the sound
music = new Sound(this);
music.loadSound("mymp3file.mp3", false);
myButton.onPress = function() {
music.start();
};
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?
If I understand the problem, when the popup window opens, the parent window closes?? If so, then add:
right after:Code:'_blank'
A new window will open, leaving the parent also open.Code:getURL("javascript:window.open('file to be oppened','_blank',...
Best wishes,
EfV