ActionScript 3.0 :: Different Buttons / Different URLS
Jun 21, 2010
On one of the pages (In the site I'm designing) I have 4 buttons that need to link to 4 separate URLS. When I code one of the buttons, a link on another page is stopped.I guess what I'm asking is, what is the best way to 'layout' my button links in each page? And what is the best way to achieve 4 buttons with 4 different urls.
I am trying to put 3 buttons in a frame. I want each of themto act as a link to Web pages. If I use just the code forlink_btn_one it works great. If I include the code for the other 2it doesn't work. What am I doing wrong?Here's my code:
var link:URLRequest = new URLRequest(" http://www.skybooks.com"); link_btn_one.addEventListener(MouseEvent.CLICK, onClick);
I have assigned a different URL link to each button in my flash file, but receive the error "duplicate function exists" when tested. I tried renaming each function, but get an additional error, so that doesn't work either. Below is my code:
I have started to take AS2 knowledge a bit further now and am working on a rss reader, i have multiple buttons which are loaded into the stage, what i would like to know is a) how do i create those arrays using their 'idenifier' and b) how do i link pressing those with the corresponding url in the urlArray?
what i then want to do is put the url which is loaded after a button has been pressed and put it as a variable which i can then load into
I am getting these error codes- Call to a possibly undefined method addEventListener through a reference with static type Class. Warning: 3594: exec is not a recognized method of the dynamic class RegExp. I am getting these error codes. I inserted the link where my flash file is. [URL].
I am new to the community, I doing a free website for internship purposes, long story i cannot get my buttons to link in flash site, i have tried many different codes and none had worked, i am a newbie and i need some guidance in the right direction. I have three links Link1, Link 3, and Link 4 The current code I am using is import flash.net.
I have a small flash movie with three buttons I would like to link to three different URLs. My code for these is below, however, when I test the movie there is a namespace error (copied below). I assume this is because both buttons are trying to use the same variable but I have no idea how to make this work in AS3.
where i need to make changes so the code understand that "thisButton" should take the user to URL#1 and "thatButton" should take the user to URL#2?
This is for my own site and I have to use AS3 as there is an FLV on it as well which requires AS3 to be viewed.
FIRST BUTTON
//when they click the "light" button go to the www.site/About page this.lightButton.addEventListener( MouseEvent.MOUSE_UP, function(evt:MouseEvent):void {
Very strange thing has happened. I've had this site running fine for over a year, and recently I have discovered that the buttons that go to external URLs do not work.All of the buttons should be going to another .php file, and they have been until discovered yesterday that they do not.If you go to the .swf file directly, you will see that the navigation buttons take you to the correct .php files, but it becomes unclickable when it's in index.php.VERY strange... but then when you go back to index.php, and click the php active hyperlink "Gum Drops" at the bottom of the page, you'll get taken to the php page... and then all of a sudden the navigation, and all flash links to URLs work!
In the there is a dynamically created movie clip a navigation menu but i just can't find out how to give URL to the buttons dynamically created can someone show me how?t
So, I have tons o' buttons that each need to link to unique URLs, and I'd like to minimize coding as much as possible. The code below works, but I will have to do this about 50 times.Can I associate the URLs with the instance names of the buttons and then reuse the same function?In the event you didn't already guess, I'm a newbie to AS3
cap_mc.CapTeam_btn.addEventListener(MouseEvent.CLICK, capPage); function capPage (evtObj:MouseEvent) { trace("clicked") var url:String = "http://www.mydomain.com"; var request:URLRequest = new URLRequest(url);
I have a question... Can I use the same server side function to send to all lients 3 different swfURL depending on which button pressed from one of them? If the answer is positive...how can I do it?
I am a designer working on a flash project that is used to navigate to html pages. The project is a map - when you roll over different states there is an animation making that state pop out and show the state name. When you click each state (Button), it should open an html webpage. Right now the project works great, but I have the url's coded in flash actionscript using "onpress" and "load url." I would like to set it up so the flash file calls the URL for each button from an xml file, so it can be easily edited. The only thing it needs to call is the URL for each button. Can anyone give me simple instructions on how to make that happen?
How would you add a target="_self" function onto the buttons in this actionscript (as3) I need the buttons to open within the same browser window and not a new (_blank) window:
skype_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); function mouseDownHandler(event:MouseEvent):void { navigateToURL(new URLRequest("skype:mySkypeIdentifier")); } email_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseUpHandler); function mouseUpHandler(event:MouseEvent):void { navigateToURL(new URLRequest("mailto:myEmailAddresss@myDomain.com?subject=rts Esolutions enquiry")); }
I have a slide show swf file with an invisible button on the top frame. I would like this button to go to different URLs depending on what frame the movie is on when it is clicked. Is this possible?
The following works for one url: oneBtn.addEventListener(MouseEvent.CLICK, oneButtonFunction); function oneButtonFunction(event: MouseEvent) { var request:URLRequest = new URLRequest("http://webpage/"); navigateToURL(request); }
The reason I am trying to do it this way is I want the script to all be on one frame because I will be using this as a template for other slide shows and want to be able to edit the urls all in one window. I already have a slide show with key frames at the places where the new url would be accessed is click, but it is a pain to edit and add new content.
I'm building a flash app that gets rss links from a list but then I need to retrieve the rss feed from the rss link to work with in flash. I did this locally using a proxy.php wich works on all types of urls.
But on the server it only works with urls ending in .rss but not when it's a redirected url like .xml or other feedreader urls. How do I retrieve the rss from redirected urls on servers? Little sidenote, I made a test using a php form to call this proxy.php file that I made and when I use the urls that don't work in the flash app it does retrieve the rss feeds.
I'm building an mp3 player expressively to make my music URLs a little less steal-able. Forgive my hacking ignorance here, but would it be better to embed my playlist XML (with the URLs) in the SWF rather than having the SWF read the XML file from my server? Seems that the latter approach would be easier to intercept...
I'm pretty sure that no one wants my mp3s badly enough to decompile the code. But with the player currently at my site, my XML playlists -- with the URLs -- started to come up in Google searches. Would rather avoid *that* level of exposure.
im trying to find info about giving sections of my flash websites different urls.[URL]How do i code it so that a url can take me to a section of a flash website?
I've been trying to fix a problem I'm having in flash, but have no idea where to go from here. I am trying to link multiple images to different urls.[code]I need to make each bigImage file link to a different url.
I've created a flash intro for a website and I have it setup so that in the first frame of the intro it opens a popup window, and then in the last frame it opens the actual site in the same window as the intro. Right now when it hits the last frame it opens up the popup window again also! Ack! The code I've used for opening the popup window is:var url:URLRequest = new URLRequest("player.html"); navigateToURL(url, "_blank");
the code used in the last frame to move to the site is:var urlReq:URLRequest=new URLRequest('index2.html');navigateToURL(urlReq,'_self');
I'm guessing that it has something to do with re-using the same variable name. I tried changing the code in different ways on the second window opening but still had the same result, or broke it opening up any pages at all. I've also tried moving the two code snippets to different layers. I'm thinking there might be a few ways around this too such as if there is a way to trigger the popup window, and then have the intro wait x seconds and then opens the main site or something, but I have no clue how to go about doing any of this. have the site in question in a temp location currently and it can be viewed here: [Url]
so i was trying to lop an Internet radio player, that will connect to different shoutcast servers, and play the radio, of course in development time everything was ok, now the time came for publishing just to be surprised with this messageof course i know what to do, but the end user will most likely won't know, and also i think this is a set back for developing such stuff, i also once tried to develop a twitter widget same thing happened when trying to communicate with twitter output, to work around that i could load the xml file from twitter into a local file using php, but i see a lot of flash files that uses flickr, twitter, and other sites, so how do these widgets work without triggering the security message,
am using Carousel 3, and have my images working properly, and even the application in general. What i'd like to do is embed urls in the text, however i'm finding the (") issue preventing this from happening in an element in the XML file. Initially I thought there was a way around using the quotes so that I could provide links in the text. what i'm trying to accomplish is this:
<icon image="icon1.png" tooltip="This is the Tooltip" content="This is the content and a link ((http://www.gotoandlearnflash.com)) that i'd like to make clickable for a user." />
Im using Swishmax and I can't seem to make a url open in my flash site(so it doesnt open as a pop up but in my actual flash site) So basically that it opens in a designated space that I made for it on my site. I know that a tuturial for this exists on this site but i just can't seem to find it.
I've noticed that a number of Flash sites have urls such as [URL] which gives the ability to return to a specific area (in this case "services") of the site rather than staying on the homepage each time you go back to the page. As you navigate through the site the url changes to reflect where you are in the swf.
Ok this one has confused me since I touched flash and AS3.0. 90% of the time, when I am trying to access a URL, or connect to anything on the internet through AS3, it doesn't work and tells me that it can't find the URL, or w/e I am trying to access. When I upload it to a server, any server, it works fine, but testing it from within the IDE, it doesn't, maybe 10% of the time it might actually work. I don't get this? How come it can't access these external connections while trying to run it locally?
I'm currently creating a video player to play files from a different server.
We have chosen to use a token authentication system to check where the files are from. This is a one number authentication code.
We can link to the files by going to a dynamic url such as...
[URL]
The server has to recieve this token when you try to connect the movie or it won't allow it.
I've tried adding it as a dynamic url but ns.play() doesn't seem to recognise it at all that way, unless I'm really missing something with the parameters.