ActionScript 2.0 :: Activating Hittest By Pressing A Key?

Nov 12, 2009

how to activate a hittest with a key. For example, I have my character and I want that when my character is on the door and he presses a certain key he goes to a different frame.

View 5 Replies


Similar Posts:


ActionScript 2.0 :: Activating The HitTest - Passing The Objects Name As A Parameter Through A Global Function

Jun 16, 2004

I'm having troubles activating the HitTest, passing the objects name as a parameter through a global function. Let's say there is the following function on the main timeline:

[Code]...

View 3 Replies

ActionScript 2.0 :: Activating And De-activating Loaded Movies?

Jan 7, 2009

Am working on a flash AS 2.0 project where am loading movies from the same folder. my code goes like

on (release) {
loadMovie("HAD.swf",2);
}

problem is the swf loads infront of the main movie but the main movie's links are still active.

View 4 Replies

ActionScript 1/2 :: Activating/de-activating Buttons?

Mar 9, 2009

I want to create some AS to disable and enable a button.Let's call this ButtonX. I want this button to appear disabled at first, and then allow the user the option of enabling this button(ButtonX) by clicking another button. Let's call this ButtonY. I cannot get this to work. I am attaching the code I am trying. I have this AS added to ButtonY and ButtonX is the instance name for the button I want to de-activate-activate.

View 7 Replies

ActionScript 2.0 :: Create An "hitTest" Script Inside A Movieclip That Is Actually Part Of That HitTest Code?

Jan 15, 2009

i just would like to know how to create an "hitTest" script inside a movieclip that is actually part of that hitTest code?I mean... I have mc A, and mc B. and the current hitTest code im using (that is on the timeline) makes mc A, destroy mc B when collide with it... but there are many mc B on the stage (with the same instance name) so, when mc A collide with one mc B, it destroys ALL mc's B... but i want it to destroy only the mc B that he collides, not all the others... maybe an hitTest script inside a movieclip B would work (somethig like "if MC A hitTest ME = i die" (not all the others)).

View 1 Replies

ActionScript 3.0 :: Do Something After Hittest " Remove Hittest After First Collsion"?

Feb 8, 2010

i am controlling a tractor mc with right and left keyboard keys and let the user move the tractor till it reach a certain point where it touch a mc i want to go to a certain frame and stop the keyboard event listener and also the hit test listenerso finally the tractor is moved by user till it touches the mc then we will jump to a certain framethis certain frame will not have both of the tractor and the mcPHP Code:

import fl.transitions.Tween;
import fl.transitions.easing.*;
import flash.display.MovieClip;

[code].....

View 1 Replies

CS3 : Keep Button From Activating Until After Mc Plays?

Jul 17, 2009

I have a simple movie clip of fading in text displaying on page with a sound. also have a button that allows user to go to the next frame. It is an exercise for students that basically goes like this: object presented in each frame, spelling (text) for that object fades in on mc with sound attached to mc, then button activates to let them move on to next. Since they are trigger happy, I don't want the button that allows to move on to activate on the frame until AFTER the movieclip and it's sound have played out (which is like 2 seconds so not a long wait) - otherwise, they would just keep clicking next and not listen to the material presented (it's very young children).

How do I set this up? I knew it's likely very simple, but I'm a newbie. Of course, I could always just do it on the timeline, but I have a ton of material, so am trying to use actionscript to be more efficient. for even younger kids, am considering setting this up so they can move to next frame through any keypress. I know how to set up a certain key, but not ANY key.

View 2 Replies

ActionScript 2.0 :: Activating A Swf Without Click?

May 20, 2010

I' am building a web site where i have a navigation which also works by pressing the (4) keyboard buttons, up, right, down, left. When the web site loads the keyboard navigation works only after i click somewhere on the screen.

The same things happens in Safari, Firefox and I.E.Any thoughts about how can i make this work without the need to click somewhere on screen before it works?

View 6 Replies

ActionScript 2.0 :: Activating An Animation?

Mar 13, 2004

this is what I need, I made a 3d model of a PC, What I want is to clic on the monitor and turn on the computer, I have the animation of the computer monitor turning on, but I don�t know how to activate it....

View 10 Replies

Professional :: Re -activating Script After Stop

Jan 10, 2010

How do I stop a script from running, or remove it from a swf at a specific frame, (on its own layer "actions") and then start it again, or script it again on another frame further down the timeline?If I try and put the same script on another layer, past the stop(); or anywhere for that matter, flash gives me a duplicate function definition error.Lets say my swf is embedded in an html and its url is abc.com. When you navigate to that url the swf plays, all scripts work, buttons work to link to frame anchors back and forth within the swf and all is fine. As long as you remain at abc.com and link with a gotoAndPlay(frame), or gotoAndStop(frame) function from the script internally in the swf.However lets say one of those buttons goes to dce.com (urlRequest... dce.com...) essentially navigating away from the swf, .and at dce.com there is a link to go back to abc.com/index.html#frame, when you choose to navigate back to that frame in the swf, it does, but the script no longer works.

The script is on all anchor frames, and works intially in the swf when you play the movie for the first time, the movie stops (stop();) at a specific frame, and continues to navigate around to specific frame anchors and back and forth, the script continues to work as long as you are within the movie so to speak. However if you decide to go to dce.com, essentially leaving the movie and then at dce.com there is a link back to a specific frame, when I link back to the swf, from dce.com, the script no longer functions?I cannot imagine this is not something that quite a few people use, a combination of flash pages and html pages and interlinking them back and forth, I just cannot find ANY info searching exhaustively on why the script will not work after returning to a swf frame after navigating away to anywhere else and then back to the swf frame needed.

View 4 Replies

ActionScript 2.0 :: Frame Labels And Activating Them?

Oct 23, 2009

I have a game I am working on currently, and say I have an animation that plays (this is in a seperate mc) when you click. So it's basically a function. Anyway, one the animation plays through inside the mc, the last frame I put:

ActionScript Code:
stop();
gotoAndStop(1)

After this, I added five or so frames on a seperate layer with another animation on it, put the same code on the last frame, and gave the first keyframe of this second animation the label name "reload".If I then go back to the main stage, how would I code it so that if, for example, I press the down key, it would play that particular frame label?

View 1 Replies

ActionScript 3.0 :: Activating A Page Without Opening It?

Dec 29, 2009

I was given a .FLA containing a banner and was asked to create an input text field and a button that, when clicked, opens a new window with the address, say "www.mywebsite.com/page.php?value=..." where "..." is what the user types in the input text field. The page the user is sent to then performs some action. Now they're asking me to make the page automatically perform that action, as in, they want the .FLA to send the value typed in by the user to that page at [URL] without the user actually going to that page at all. Is this flash-related or even possible?

In short what I'm asking is: Is it at all possible, in principle, to hand a value over to a .php page using flash and then make that page perform an action without being opened? If so could you point me in the direction of how to do it?

View 4 Replies

ActionScript 2.0 :: Activating A Href Link From Swf?

Jul 4, 2010

I've created a button in html using a href. (HTML Button)

I also I have a button within a swf which I want to activate my a href button when clicked on. (Flash Button)

I know that i will prob have to use the geturl function but do not know how to implement it.

Here is the a href code in my html

HTML Code:
<a href="SITC.flv" rel="shadowbox[movie];height=330;width=587" title="SITC FLV"><img src="button.jpg"></a>

and here is a link for an example

[URL]

View 4 Replies

ActionScript 3.0 :: Activating Webcam With Flash?

Sep 18, 2010

I am trying to activate a my webcam and run a live stream from it. Im running into problems though. I can get the webcam to turn on(the green light comes on). However, nothing is displayed. I have copied the code i am using to try and achieve this, hopefully its just a simple mistake.I am using Flash Builder 4 to put all this together.

Code:
package camera
{
import flash.display.Sprite;
import flash.media.Camera;

[code]....

View 2 Replies

ActionScript 2.0 :: Activating The Application At Later Date?

May 25, 2005

i am builing an application which will use a feature called "deffered sms".It means that user will enter the sms and the phone no. and a date and time and will submit this info to the application.when the time and date will come this application will send the sms that was written on that day for deffered sms.when the user had entered the sms and time , he will certainly close the application and the application will no longer be active. my application will store the time and date in a variable .How would my application will come to know that the specified time has come and then it should send the sms.

View 1 Replies

ActionScript 2.0 :: Activating Lightbox 2.0 From Flash

Mar 14, 2007

Im using the Lightbox 2.0 [URL] And a flash movie in the same page. Now ive got this thumbnail slider in the flashmovie with thumbnails loaded from an xml file. As soon as i hit a thumbnail i want the Lightbox to show the full image of the thumbnail.

I've got everything set up and if i test if the Lightbox works with an html link it works perfectly:

HTML Code:
<a href = "path/to/image.jpg" rel="lightbox" title="my Title">Lightbox test</a>

Now my question is how do I call the same action in AS?

I understood the rel attribute refers to both the Lightbox JavaScript and the StyleSheet. But i really dont know how to set the rel attribute in flash.

View 14 Replies

ActionScript 2.0 :: Activating Lightbox 2 From Flash

Jun 20, 2007

if it is possible to activate lightbox 2 from flash.

As extracted from the Lightbox tutorial, lightbox needs an <a href> tag with a rel="lightbox" attribute to be activated.

e.g.

Code:
<a href="images/image-1.jpg" rel="lightbox" title="my caption">image #1</a>

However I dun think it is possible to use getURL(); for this in flash right?

is there a work around for this? what i am aiming to do is have the user click on an image/mc in my flash

e.g.

Code:
my_mc.onRelease = function() { // Activate lightbox from here };

and have it call the light box up.

View 1 Replies

ActionScript 3.0 :: Activating An Animation Via Keystokes?

Apr 8, 2009

i'm wondering if it's possible to add a listener for multiple keys pressed at the same time. for example if it wanted the user to hold CTRL+A+B+C to trigger an animation.

View 4 Replies

ActionScript 2.0 :: Activating A Movieclip Onmouseover?

Dec 1, 2004

What I want to do is:I would like to have a button (I know how to do this), and when the user mousesover the button, I want a movieclip to be activated.So:When user mouses over my home button, my home_ani clip will be accessed. I would want to goto the frame 2 and play of that movie clip.

View 3 Replies

ActionScript 3.0 :: Activating Buttons With A Controller Button?

Feb 24, 2009

I have a row of movie clips which act as buttons with an inactive state, active state, selected state etc. What I am seeking is kind of like a controller button which when clicked will activate or de-activate this row when clicked. I thought the best way might be to set frame labels and add a goto sript for the controller button to make each button go to the activate frame when the controller button is clicked.

View 4 Replies

ActionScript 1/2 :: Get Movable Button To Stop Activating?

May 18, 2009

I'm trying to get my movable button to stop activating. It's looping (up/over/down/hit).
 
loupe_mc.onPress=function() {
this.startDrag();
};
loupe_mc.onRelease=function() {
this.stopDrag();
};

View 3 Replies

ActionScript 3.0 :: Activating Walk Cycle When The Arrow Is Down?

Aug 9, 2011

I have made my character and inside of its symbol I created its stand still - stop(); - frame before its left and right walking cycles which are both 5 frames long.  Now my question is what action script do I use to move both left and right while activating my walk cycle when the arrow is down. Would someone please write out the script for me?

View 2 Replies

Drag And Drop Activating A Movie Clip?

Mar 9, 2009

I have a button which, when a user drags it onto a movieclip is supposed to cause that movie clip to advance to frame 2. What I've used so far is this:

Code:

on (press) {
startDrag(this);[code]..........

The button drags fine, but when released over the movieclip nothing happens. I've tried using "_parent.slide1_mc.gotoAndStop(2);" instead to no avail.

View 1 Replies

Actionscript 3.0 :: Flash - Activating EventListener For An Object

Oct 24, 2011

In my Flash program, I am trying to run a function within an object. The object uses a class called "SkullDemon.as." The function I am trying to run is called "moveSkullDemon();" this function is coded within the "SkullDemon.as" class. My main document class is "TME2d_Main.as." Within that file I create an instance of the Skull Demon class like this:

[Code]...

View 2 Replies

ActionScript 3.0 :: Activating Different Audio Files Over Different Frames?

Oct 6, 2009

Recently I bought CS4 as I decided that I wanted to design and create a new website for hosting my music productions, I have used dreamweaver in the past so I am quite familiar with XML etc but I wanted to make something with a little more to it. After talking to quite a few people and reading into it all I found that this would be my best option. After thinking that it was all going to be quite nicely straight forward Im banging my head against a wall in trying to learn and understand Actionscript.

I have currently designed all of the pages, I have used a few tutorials on actionscript 3.0 and have the whole website is functioning, my pages, frames, labels and buttons are all functioning how they should on the timeline and there is around 14 pages..

The problem i've had for around 4 days now is getting all of my audio previewssnippets to work, i have around 20 of these and I need them to be spaced out on about 6 pages (frames) ; Each frame is a different release etc

In each frame, I have 8 buttons 4X play buttons next to each track and 4xStop next to that... play_btn, play_btn2, stop_btn2 and so on..

I've set it so that all I want to do is be able copy the code into the other frames and also the buttons (which are on a different layer) and then all I have to do is enter the filenames in the code below (Track1.mp3, Track2.mp3 etc)

So... it all works fine on my first frame of my release page.. The audio plays and stops for each track, no problems at all.

Now,, the problem happens when i copy the actionscript from my first release page(frame) to the next.. its about 25 duplicate functions, duplicate variables etc

Is there some kind of way I can put all of this into some kind of Class or Tag.. And this code only operates inside this frame and not in the next to cause the duplicate errors? I realise that I could Label every single variable, function and button differently covering all of the frames so that it dosn't cause the duplications to occur but, I am hoping there is some other way around this..

import flash.media.SoundMixer;
//PLAY TRACK 1
var soundReq:URLRequest = new URLRequest("track1.mp3");
var sound:Sound = new Sound();

[Code]....

View 2 Replies

ActionScript 2.0 :: Loading And Activating Music Into Another File

Nov 30, 2010

I'm trying to load music into a another file using the loadMovie method. This is my script:

ActionScript Code:
stop();
this.createEmptyMovieClip("musicContainer",20);
audioStatus = false;
trace(audioStatus);
[Code].....

As you can see, first I created an empty clip. Next step was to create a variable named "audioStatus" to know if the button has been pressed or not. It seems I'm doing something wrong because the movie is not loading the music and it-s not detecting my var.

View 3 Replies

ActionScript 2.0 :: Button Activating Movie Clips?

Mar 11, 2004

Ok so, I have a button called btnEnter and its instance name is enter. Then, I have a movie clip called mcRotatingDot and its instance name is center. These two work so that when the mouse is over the button, the dot blinks. When the mouse is no longer over the button there is a fade in from alpha 0 to 60 of the dot. It all works fine, here is the code that I am using on the movie clip:

onClipEvent (load) {
//this sets the initial properties of our clip
this._xscale = 75;
this._yscale = 75;[code]...........

1)How can I make the movie clip blink with pure action script? And not having to do a stupid tween on the movie clip's timeline.

2)Can a button activate more than one movie clip? Because I am also trying to make the same button (aka. btnEnter, instance name enter) to change the rotation speed of another movie clip to spin faster. Here is the code for the other movie clip called mcRotatingCircle instance name outter:

onClipEvent (load) {
//this sets the initial properties of our clip
this._xscale = 1000;[code]............

Yet the movie clip will not spin faster on roll over. The only thing that I thought could go wrong is that there is another instance of the same movie clip mcRotatingCircle, named middle on the stage. I tried absolute addressing the outter instance, but it just won't work.

View 2 Replies

ActionScript 2.0 :: Activating A Movie When Text Is Entered?

Apr 28, 2008

I have an .swf file that is going to serve as a login for a new website being built. The .swf will contain a movie symbol and two text fields underneath it. The idea is for the movie symbol to play at different points on its timeline based on what is being typed in the text fields below. For instance, when someone is typing in their user name, the movie file will start at a certain point on the timeline and when they type in their password, it will jump to another point in the timeline. I figure thats the easy part and I would settle for just that.

The complicated part is this: Ultimately, I want the movie symbol to jump to those points on its timeline based on how many characters have been typed into the text fields. For example, if someones user name is "christoper", I need the file to play the movie once someone has typed in "chri" and then jump to the next section of its timeline after they've typed in "stopher", and so on down through the password.

View 7 Replies

ActionScript 2.0 :: Activating Sound Files Incorrectly

May 8, 2002

I did this e-card, and it seemed fine. Then I played it on another persons computer (both PC), and the sound failed to work. I'm using Flash 5. Other e-cards with sound produced by other people worked fine. So here's my code. On the first frame (root) I have:

[Code]...

View 4 Replies

ActionScript 2.0 :: Activating Keypad At Beginning Of Website

Dec 14, 2009

I'm building a website that has the option of using the keypad to navigate the menu. If I test in flash I can use the keypad right at the beginning (if I press the right arrow it expands the first menu). However once I upload the sight, I have to click on the screen before I can activate the event listener. I use a seperate swf to preload it but even that when I test in flash works off the bat when the right arrow key is pressed.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved