ActionScript 1/2 :: Movieclip On Click Go To Webpage?
Jun 20, 2011I have a movieclip thats takes 10 seconds to show up on the animation.How can i click on this movie clip and open a webpage ?
View 1 RepliesI have a movieclip thats takes 10 seconds to show up on the animation.How can i click on this movie clip and open a webpage ?
View 1 RepliesI created a flash slideshow with pictures of events and link each picture with its own event (ie. each pictures has its own links to the website). I created the fade in and fade out effect using the class motion tween. With the link, I created a layer with a MovieClip butoon that has alpha= 0 (so the user don't see it) and then I used code snippet to make another layer with the action script "click to go to url."When the slideshow goes to the last picture I made it fade out and the first picture of the slideshow would show up and then the slideshow would replay itself. My goal is to make a continuous slideshow.
When I tested the swf file, the first time it runs, everything is right. The urls and the pictures are in correct order. However when the slideshow replays itself automatically, I notice that the links are incorrect. In the first play, when I click the picture of the event it would open the url of that event. However when the sldieshow replays, clicking the pictures would only open the url of the first event picture. To be more exact, I noticed that after the first loop, the file replays and whenever I click on an image it would automatically direct me to the last link in the timeline instead of directing me to the link pertains to that image.I'm using flash CS5 and action script 3.0.[code]It seems to me that the above code only execute once. I had done these kind of slideshow with AS 2 where I just simply put the gotoUrl code in the button itself. But AS3 makes everything so complicated!Anyway I can make the click to go to URL code execute continuously (and endlessly) in AS3?
I am just new to Flash CS4, recently trying to add a slide show in my webpage, with the function of click on any of the images in the slide show, that will bring me to another webpage. The flash file will be inside a html pages manage by Adobe Contribute.
I have already build a one layer with 10 images slide show, but have no idea to add the function of clicking on any images to bring to another website, can anyone give me a hand on this.
I have a flash movie embedded on a webpage, it's an intro of sorts, when the movie has finished it removes itself from the DOM but I also want this functionality on flash movie click.so far to remove it after it's finished playing I'm using[code]but it never gets called. I also tried adding the click event to the body and it worked everywhere but not over the top of the flash movie.
View 2 RepliesI am building a flash interface and I would like a menu where it is hidden to begin with (just a tab). You click the tab to expand it, and click again to collapse it. I've made a movieclip with animation of the menu opening up and closing, but I can't seem to work out how I'd go about making the movieclip open and close properly.
View 4 RepliesI want to have a movieclip "button" that when clicked will go to another page on a website, a different URL, not another frame in the flash application. I am trying to use this actionscript
var targetPage:URLRequest = new URLRequest("update0709-2.html");
procedures_mc.p_dropdown_mc.p_body_mc.newPage = "update0709.html";
procedures_mc.p_dropdown_mc.p_body_mc.buttonMode = true;
procedures_mc.p_dropdown_mc.p_body_mc.addEventListener(MouseEvent.CLIC K, goToPage);
[Code]...
I am building a website where I have a fade-in MC of a box. What I want it to do is fade_in every time you switch to another page. At this point, once it fades in for the first time, the MC does not fade-in for the other pages, it is just there. I have a stop() in the last frame of the MC and no reference of the MC in the AS in Scene 1.
View 5 RepliesI want to be able to have my ketchup cursor and click on the buns and the buns go to the ketchup frame and vice versa with the mustard, but if the ketchup is already on then it would go to the frame with both mustard and ketchup.I would post my code but I dont really have much to post except the basic eventlistener function. I have googled it a million times and cant seem to find what im looking for.
View 6 RepliesIs there a way to get a movieclips name when you click on that particular movieclip?
View 3 RepliesI have 3 movieclip on stage. On user's click, I wish to attach another movieclip on the same x,y as the selected movieclip.
So right now, i'm guessing by getting the selected movieclip name, then i could get the x,y of it.
how to get a name of selected movieclip when any of them is pressed?
Lets say i have a button on frame 1. And if you press it normal, you ll get to frame 2. But then if you click it on another way, you ll get to frame 3. How do i do that easy?! With another way i mean like shift click or ctrl click or is it an easier way?
View 3 RepliesI have the movie clip "movie" in my library and the button "btn" on the stage.Now everytime I release "btn", I want to add "movie" to the stage and have it play from predetermined coordinates (let's say _x = 20, _y = 20)...So far, I've tried
Actionscript Code:
on (release) {duplicateMovieClip("movie", "movie2", 1);}
but that doesn't do the trick because it doesn't multiply the displayed movies.Everytime you release "btn", "movie" breaks off and restarts,I want it to finish its animation and have ANOTHER one spawn at the origin...
I have th following code below. When the monster is clicked I would like to remove it but the MouseEvent.Click event never fires? I'm using flash cs4.
import fl.motion.Animator;import fl.motion.MotionEvent;var this_xml:XML = <Motion duration="30" xmlns="fl.motion.*" xmlns:geom="flash.geom.*" xmlns:filters="flash.filters.*"> <source> [code].......
from various books, I know that to add eventlisenter for mouse click to a movieclip:
movieClipName.addEventListener (MouseEvent.CLICK, clickFunction);
then I define the function
function clickFunction(event:MouseEvent)
{ bla bla bla }
My questions are (as silly as they might sound!),
a) why do we need a parameter (i.e. event:MouseEvent) for clickFunction??
b) since we have a parameter for clickFunction, when we feed this function into addEventListener, why didn't we write movieClipName.addEventListener (MouseEvent.CLICK, clickFunction() );
I have bought a flash template in an online store. There are different buttons on it and some of them link to existing local html files from the pack - index-1.html, index-2.html etc. There are also some buttons that don't go anywhere right now but they are intended to be linked to some urls too. They react with animation on mouse rollover and I suppose they should go to some url if I set it somewhere on click. But there is no documentation about that in the pack. I searched through the Flash source file and all html pages files for something like "index", "geturl", also looked through them manually to realize how it could be made but with no luck. So, my question - is that possible that way or another to make that MovieClip button link to some my page, for example, "contacts.html".
View 1 RepliesIs there any way to detect if the user click outside a MovieClip?For instance, I need to detect it to close a previously opened menu (like Menu bar style: File, Edition, Tools, Help, etc). How can I detect this kind of event?
View 3 Replieshow to load the movieClip(symbol) on click of a button (and movie should not be on stage) it should be loaded only on Click event
View 9 RepliesI was just wondering why it is that after I have clicked a button to run a movieclip, I have to click it twice to run it again? I would like to be able to run it again with just one click - it is for a true and false set of questions. The movieclip is an animation that runs if correct (and there is another if it is incorrect.
Here is the button script
on (release) {
_root.tf1_mc._visible=false;
_root.tf2_mc._visible=true;
_root.tf2_mc.gotoAndPlay(1);
}
comment: tf1_mc runs when the true button is clicked and tf2_mc runs when the false button is clicked. The script above is for the false button
I have a movieclip with 2 layers (a background layer, and a text box layer), and i have an eventListener for clicking on it. The only problem is the function i call when clicking the MC only works when i click the background, if i click where the text box is in the MC the function doesnt get called?
Is there any way to treat the entire MC as a single entity rather than a layered one, or is there a way to specify which layer is to be clicked, and i can just add an invisible hit rectangle on a new layer in the MC.
I'm developing a small game using as3 , in that i want to pause my whole movieclip when a user click on quit button.
means when user will click on quit button , a dialog box will appear and will give options "yes" or "no".
so when i will click on quit button , i need to pause my movieclip for the time until user will select yes or no.
And also , if he will select option "no",application should be resume.
I have a MC in my project that acts as a popup window only it is really just a movie clip. One that loads hi-res pictures AND... here's the important part.... Has a startDrag() action attached to it so that the user can move the picture aside if they so desire. However to close this window, I'd like to have the user DOUBLE CLICK with the mouse. They should be able to double click anywhere on the movie clip or even anywhere else... it doesnt matter really. The thing is, how do I listen for a double click in ActionScript? There no method for the built in classes that I could find.
View 2 Replieseven better a source file when double clicking in a certain movieclip the execute a function.
View 1 RepliesWhat script do I need to make this:If I click 300px from the left, and 10px from top, that the movieclip move's to 300px from the left and 10px from the top. Sinned-B
View 2 RepliesHow do you click a movieclip and then after clicking you will go to the next frame??
going to next frame i know is gotoAndPlay("frame name or number");
but do i have do name the movieclip with an instance?
i'm developing a small game using as3 , in that i want to pause my whole movieclip when a user click on quit button.
means when user will click on quit button , a dialog box will appear and will give options "yes" or "no".
so when i will click on quit button , i need to pause my movieclip for the time until user will select yes or no.
And also , if he will select option "no",application should be resume
i will try to explain wit hierarchy to understand my problem
On scene1, i have taken 3 movieclips on first frame but at different layers.
And Each of this movieclip contains minimum 5 children movieclips.
so i want pause scene 1 movieclip from 2nd or 3rd child movieclip.
so how can i pause that movieclip?
I have this script on a button:
Code:
on (release) {
kast0.duplicateMovieClip("kast"+(num+1), 0);
this["kast"+(num+1)]._x = kast0._x+((num+1)*15);
this["kast"+(num+1)]._y = kast0._y;
num++;
}
And this in frame one:
num = 0;
"kast0" is a MC, that I want to duplicate (with every click), so there would be many of those in a row. But that script "erases" the "kast1" if it creates "kast2" currently I have my fla with only one frame and there is no other actions.
I have made a sort of drop down menu of a movieclip. There are actually two, the first one named list_over_mc is only to detect when the mouse is in the area for when to drop down the menu (onRollOver) and the other one, list_mc, is holding the menu itself. The problem is that when the menu is down nothing happens when I click the button (now named knapp1_btn). I have tried with another but with the same sort of script (but placed outside of the movieclip list_over_mc) and that works so I'm guessing it is because the button is "over" the other movieclip.
View 3 RepliesSay that i have a variable called explosion when this variable is set to yes i'd like it so that whenever you press the screen with the left mouseclick it "creates" a movieclip where you clicked that in the library is named bomb (or duplicate the movieclip from off screen if that is easier)
View 2 RepliesI need to add ac2 to a movie clip. When the movie clip is clicked on I want it to play and when it is clicked again that it will stop. This is the code that I have on the button already -
onClipEvent(enterFrame) {
this._rotation += 5}
I'm almost 100% sure that I have to write an if, else statement for this. Below is the code I have for a button(movieclip) I created. It is suppose to play an animation when you click on it. Then when you click it again it's suppose to play a second animation that will take it back to the original state. What is happening is, it goes straight to the clicked state without playing the animation. However when you click the second time it plays the animation that takes you back to the original state. Am I correct in believing the only way to get the animation to play on both clicks is to use an if, else statement.
function clickPlus(event:MouseEvent):void {btn1.gotoAndPlay("clickOpen"); }btn1.addEventListener(MouseEvent.CLICK, clickPlus);
function clickX(event:MouseEvent):void {btn1.gotoAndPlay("clickClose"); }btn1.addEventListener(MouseEvent.CLICK, clickX);
btn1.removeEventListener(MouseEvent.CLICK, clickPlus);