ActionScript 3.0 :: Buttons Open In The Current Window But It Doesn't Seem To Work
Aug 26, 2009I'm trying to have my buttons open in the current window but it doesn't seem to work. Here is my code:
[Code]...
I'm trying to have my buttons open in the current window but it doesn't seem to work. Here is my code:
[Code]...
I have a simple website and I am going from one page(flash file) to another page(different flash file) using the following code.
var myLink:URLRequest;
function openPage(event:MouseEvent) {
switch (event.currentTarget) {[code]....
This works fine, but I want to be able to use "_self" so I open the new page in the same window yet it doesn't seem to work.
I'm having a new problem getting a new browser window to open in front of the current window. They are now opening behind and unless the viewer is smart enough to think of it and see the tab they think it didn't open. I use the recommended code. on (release) {getURL ("nameofURL.html", "_blank" );}I'm pretty sure this used to open a browser window that appeared in front of the current one, but now it never seems to although once in a while it may (that was with a file with an htm extension.)
View 3 RepliesI am using the getURL function in response to a button event. I need it to open the URL (absolute) in a new browser window, but I need the new browser window to open on top of the current browser window. Right now it's opening behind the current browser window. Below is my code:
on (release){
getURL("absolute URL here", "_blank");
}
I used the pop-up tutorial here on kirupa, and heres what I got: in the as layer i have :
[Code]....
But when I view it online th pop up doesn't work, it does when I view it in my folders, and in opera the pop-up works, but it still have scrollbar and it is lot of white space in top so it get weird.
[URL]
I used the pop-up tutorial here on kirupa, and heres what I got: in the as layer i have :
[Code]...
But when I view it online th pop up doesn't work, it does when I view it in my folders, and in opera the pop-up works, but it still have scrollbar and it is lot of white space in top so it get weird
I was just wondering how when you assign a link to a button, instead of it opening that link in the same window, how can i get it to open it in a new one.
View 3 RepliesHave an issue with several buttons in cs3. I want the buttons to open the page in the same window, and they will once, but I need this to be a reoccuring effect. here is the code.
[Code].....
I inherited some code from a previous programer. The idea is that a user clicks on the player and that opens the page at a new url. It works if it opens in a new page but it doesn't work trying to open the url in the same page. It just closes the player. Here is the code:
[Code]....
In this code I'm creating a new window when I click the button. In the new window are TextInput and DropDownList components. When the new window opens, clicking the DropDownList does nothing - you have to click it a second time round to get it to open. However, click into the TextInput field first and then try opening the DropDownList works no problem.
Below is the code, or download the FXP file here.
// DropDownTest.mxml (application)
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
[code]....
just as the title says, _blank opens the link in a new window, _self does nothing could the issue be related to testing locally?
[Code].....
I have a component in AIR like so:[code]The 2 alerts both work. however nothing happens when you click the new window link.all 3 links works when in a real browser so I know its ok.Is there just no support for window.open in the AIR HTML component? or is this a bug?Is there a work around?
View 2 Replies1) how do you open a new window if you have thumbnail pics in the flash movie but want the full pic to open up in a new window? Is this Javascript inside flash?
2) How do they do the menu bar here at this site:[URL]
I can't seem to get the javascript open window functon to work with a simple button. I'm using flash 8. I'm creating a simple CD with exe which loads a swf movieclip. With in this movie clip is a button to open a popup window. Every javascript I have tried to use isn't working. The exe, swf and html page all reside in the same directory. There the latest:
on (release) {
getURL ("javascript:NewWindow=window.open('popup.htm','ne wWin','width=400,height=300,left=0,top=0,toolbar=N o,location=No,scrollbars=No,status=No,resizable=No ,fullscreen=No'); NewWindow.focus(); void(0);");
}
I've tried to use it. It works fine in all the browsers in a non frame layout. But when aplying it to a frame layout (i know, not cool but nessecairy) it refuses to work, and it generates an error message. That it can't open the requested HTML page.
View 1 RepliesI've tried the chromeless script from chromeless.org but it doesn't work in windows XP SP1 and SP2. I need a pop up full screen window as I've designed the whole site with the full screen in mind and if I can't get a pop up, I got to redo everything!! I redid it twice and I'm not going to try the third!! OMG!! Anyone has alternative solutions for this? Or anyone has another version of the chromeless script that works with SP1 and SP2?
View 1 RepliesMy map: [URL] The problem: The buttons does'nt work,i think i'm doing something wrong. They're in the map it self,because i don't want them to move while zooming. Actions of the button is: on (release) {getURL("http://mapping.lt", "_blank");} T.y. The fla of the map is here [URL]
View 1 RepliesI'm loading an external swf into a container. The swf has 4 buttons that won't work
on (release)
_root.main.gotoAndPlay("4-1");
}
The as is placed on each button and it works fine when im testing the swf in itself.But they wont work when i test it from the main swf and load the ecternal swf in.
I work with 3d animation. Im have a problem with a personal website Im doing, I have a link in a button inside a flash movie to open a new window and play a youtube movie:
on (release) {
var jscommand:String = "window.open('http://www.youtube.com/v/b0L4XLODhAA&hl=en&fs=1&','win','height=344,width=4 25,toolbar=no,scrollbars=yes');"; getURL("javascript:" + jscommand + " void(0);");
}
This works fine in Firefox but in IE it doesnt work, I then change the /v/ in the youtube link with /p.swf?video_id= and now I have the window open showing the small youtube thumbnail of my video but once a click play, nothing happens, I check it and is not loading anything.
I searched every where but didn't have a solution. my main content has a button in the first frame I call it (wright_btn) when u click on it, u suppose to go to next frame this is a part of the code in the first frame:
ActionScript Code:
wright_btn.addEventListener(MouseEvent.CLICK, wrightAnswer);
function wrightAnswer(event:MouseEvent):void
{
nextFrame();
stop();
[Code]...
The title essentially is the question, how do I open the .swf without the browser's control bar junk? and maximize the window?
View 2 RepliesI'm new and am having a bit of trouble loading one swf into another for a preloader and main program. If u open up flashSite.fla or the swf, everything works, but when I load it into a mc container of preloaderMomSite, the animated buttons no longer work. If someone could take a look, I would love to find out what I'm doing wrong. All files are located on in the same directory.
[Code]....
I have buttons inside/on window01/mc that are still active/clickable when the opacity is 0, I basically have a area on my website that if you click it opens the window corresponding to the button. how do I stop this? I only want the buttons to work when window01 is opacity 100.
[URL]
just click in the blank black area below the nav bar and the window will appear. The normal way to get to this window is click products than the buttons.
Code:
import gs.TweenLite;
btn06.addEventListener(MouseEvent.CLICK,f2);
function f2(e:Event){
navigateToURL(new URLRequest("http://www.jmoneyaudio.com/"), "_self");
[Code].....
I still can't figure the way to make my buttons work
[URL]
here is my fla file... Basically I have a rollover buttons inside a movieclip and my action script in the first frame of the scene is the following
_root.designer_mc.b1_01.onPress=function(){
goto("designer01");
}
b1_01 is the instance of the button inside designer_mc movieclip~ however I ealized that buttons won't work in movieclip and i just don't know what's other solution
how to get this fixed~ i m so stuck and I have wasted my past 2 days trying to figure this out and still no result...
This Script:
Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
var cities:Array = ["muscat", "sohar", "dubai","abu_dhabi"]
[Code]....
...does not work when the buttons "muscat_btn", "sohar_btn", "dubai_btn" and "abu_dhabi_btn" are grouped into a movie clip.
I was given the following code to have my button open a link.
testbtn.addEventListener(MouseEvent.MOUSE_DOWN, gotest);
function gotest(event:MouseEvent):void {
navigateToURL(new URLRequest("http://www.bing.com/"));
}
This function works fine except that it opens all my links in new windows or tabs. I added the "_self" parameter to the function and created the following:
[Code]...
I have a big problem - I decided to make a website using flash as I am good with photoshop and thought it would be fairly easy to construct in flash using tutorials. All went well except now the website is published, weird things happen. The homepage works fine but when you click on "portfolio" some of the buttons don't appear and when you try the buttons, some images don't appear. Occasionally some of the buttons take you to the wrong place also. When I test the movie in flash, everything works fine so I can't work it out. I am a complete novice so advice will have to be spelt out in black and white.
View 2 RepliesI decided to make a website using flash as I am good with photoshop and thought it would be fairly easy to construct in flash using tutorials. All went well except now the website is published, weird things happen. The homepage works fine but when you click on "portfolio" some of the buttons don't appear and when you try the buttons, some images don't appear. Occasionally some of the buttons take you to the wrong place also. When I test the movie in flash, everything works fine so I can't work it out.
View 9 Repliesi'm loading an external swf files in one but the buttons inside the external files wich controls its timeline doesn't work, i'm using AS3 but why it doesn't work.The external file just has some simple actions to move between keyframes in the timeline with buttons goto and some other similar actions
View 4 Repliesi'm using the centered pop up window script from: [URL]. i have multiple buttons in my flash movie which open screenshot html pages in external browser windows. the script works fine except when a popup window stays open. the rest of the buttons don't open/replace past that one popup. i tried changing the window name in the onRelease script to screen1, screen2, etc for each button, but that didn't work.
View 1 Replies