Displaying A Graphic When A Key Is Pressed?
Apr 18, 2010
I am trying to play a sound and display a graphic when a key is pressed , so far i have been able to play my sound when i press the 'a' key but i also want to display a graphic that gets displayed while the key is down , i have created the graphic as a movie clip, not sure if thats right, iam not sure of the code i need to display the graphic.
View 1 Replies
Similar Posts:
Nov 16, 2004
I have a function on root:
_root.fadeBox_mc.onEnterFrame = function (){
if (fade){
this.nextFrame();[code]....
This causes a mc to fade in and out on rollover/rollout. But what I wanna make is a box that fades in when pressed on the button and fade out when pressed for the second time. But if I say
on (press){
_root.fade = true;
}
the mc fades in, but I cant do another on (press) to fade out. Is this too confusing?
View 2 Replies
Dec 6, 2010
I am struggling a bit with keys on the keyboards controlling a movieclip to happen.Ive got a person moving when pressing right and left, and a movieclip with three frames: First frame is a movieclip with the person standing still, looking bored. The second frame is the person moving right, and the third frame is the person moving left.This is the code that Ive inserted into the persons actions on scene1:
if (Key.isDown(Key.RIGHT)) {_x += speed;this.gotoAndStop(2);_xscale = +scale;}
if (Key.isDown(Key.LEFT)) {_x -= speed;this.gotoAndStop(3);_xscale = -scale;}
this code works alright accept that when the keys are not pressed it doesnt stand still, the legs are still moving, so I tried to include this code aswell:
if (!Key.isDown(KEY.RIGHT)) [code]....this makes the person standing still when not pressed but not moving the legs when turning right and left.
View 3 Replies
Apr 1, 2009
I'm trying to create a mini-gallery. The background is an image which auto-centres, cropping the relevent areas to ensure it fits perfectly central at the right aspect ratio.However, when I add a bar across the top, it gets 'cropped' with the image (ie. If I make the window thinner, it will get cut-off. Is there any way to keep an image exactly 10px from the top of the visible area - no matter how the background is cropped?
Code:
orig_stage_width = 960;
orig_stage_height = 600;
orig_back_width = 1600;
orig_back_height = 1200;
[code]....
View 1 Replies
Jul 20, 2010
So lets say I make a chess board in flash that is a top down view. Then if I want it in isometric view I simply go to the transform window and enter the skew properties of 60 and 30.
Now here is my question, is there a way to change from this ISO view back to the normal top down view?
View 3 Replies
May 10, 2009
I am building an RPG type game in flash and have hit upon my first problem.I have created a character out of various different body parts (upper arm, lower arm, hand, head, etc..) I would like to make it possible to change the look of each of these body parts (different types of armor / clothing) whilst maintaining the whole body animations.I'm becoming confused about how many things are inside each other! Rather than recreate a whole new set of animations for every conceivable combination of armor and clothing it should be possible to simply change one of the graphics within the movieclip that is the character.
So the structure I have thought of is like this:Whole body > Changeable graphic > Base Body Part (bare arm for instance)What is a sensible way to go about doing this? I'd like to have a solution that is easily scalable and won't require notably more work if there are 10 different types of changeable graphic or 1000.I think that I need use the event that triggers the armor / clothing to change for that body part, to run a script that either somehow changes which graphic it is displaying, possibly inside the Base Body Part movieclip.
View 2 Replies
Jun 19, 2009
I have a giant image that I vectorized in flash in order to stretch it to the stage size, but obviously this lags a ton (vector size is about 700x500). Is there a way to convert this vector (in a MC) to a graphic after resizing in order to reduce the lag?
View 2 Replies
Nov 23, 2010
I am creating graphics that are to be integrated into a new website booking system. I want to emulate the graphic on this site. http:[url]...Is this flash or macromedia or XHTML or what??Could i create something like this fairly easily or do i have to know in-depth action script?
View 3 Replies
Jun 6, 2009
I've created a small animation containing a few images which i have converted to graphic symbols so I can alpha-tween them. I tweened the first image then copy/pasted the frames to do the next using the swap symbol function. When swapping the symbol I selected the desired symbol and pressed okay but nothing happened - I then dragged the desired symbol out of the library and onto the stage then deleted the previous symbol. As soon as I did that the new symbol I had just dragged out switched back to the previous symbol.
View 1 Replies
Sep 20, 2011
I'm using Flash 8 and I have a Flash movie created some while ago that I need to change from time to time. Over the years the centre of some of the graphics/movie clips has moved as the clips grow and reduce in size. I now find I cannot edit the wording on one of the projects (project 10). [url]...
View 2 Replies
Apr 2, 2009
I know how to animate with Flash, and I know the basics of Actionscript 2.0 enough to make simple games.I have a project to do which I wanted to do with Javascript/CSS, but instead I'd like to hone my Flash skills to do it.If someone could point me in the right direction that would be awesome! I'm making an image move in a path about a web page without regard to other content on the page.I was thinking that I could make a Flash vid with a transparent background and lay it over the page.If so, how do I make a transparent background? If that's not the solution, can I even do this with Flash?
View 2 Replies
Aug 4, 2009
(without using a button)I have a square MC with a dummy graphic. I want that MC to display (based on conditions, so with AS3) a different graphic. Something like myMC.picture=otherMc.picture
View 2 Replies
Dec 14, 2009
[code]...
This does not!. I'm not even referencing tile109 but by having the same graphic it errors real weird!. I am using the same graphic just for test purposes so would change it later - does seem very strange though.
The error occurs in my copypixel (null source), but as said tile109 isn't even used. Some mangling/reference prob?
View 5 Replies
Jun 27, 2010
so i tried to make an emoticon in chat, it worked actually. but only if you type "/smile", it will turn into "" << colon and closed parenthesis. not if you type "bla bla bla ".
so here's the code i use:
Code:
function onSendBtClick(evt:MouseEvent):void
{
if (ti_message.text == "/smile")
[Code]....
all I wanna do is change the "", "", and ":/" into animated emoticon (for example: "smile.swf", "sad.swf", "frown.swf") anyone know the code to replace the text-emoticon code i used..?
View 2 Replies
Jul 11, 2011
I am trying to import a SWF inside my flash file. I keep trying to import the SWF to the library, but the library denotes it with an icon as a graphic, not a movie. As such, it won't play or anything.
View 1 Replies
Jun 29, 2006
I downloaded this script: [url] I works fine, but i want some graphic on top of the images, without adding the graphic to all the images, so i made a new layer in flash, made the graphix i wanted... But when i run the script, the images is fading over the graphic i made....
View 2 Replies
May 12, 2009
make a graphic like this:
when i press the button the graphic go up, if press again go down, always like this.
View 2 Replies
Jun 30, 2009
I imported a panorama .jpg file (i.e., several overlapping landscape photos stitched together) onto the Flash MX 2004 stage, changed it to a symbol (graphic), and used Tween to simulate the panorama panning back and forth. The effect looks great when I click on the .swf file in Windows Explorer, but when I created a box on a PowerPoint 2000 slide and linked the .swf file to it, instead of the graphic, there is a red rectangle. The rectangle moves the way the graphic would, but you cannot see the photograph. By the way, I followed the steps at [URL] to link the .swf file to the PowerPoint slide.
View 1 Replies
Jul 28, 2009
Half a year ago I started working on this game. One of the aspects of it involves clicking a point on the screen and a path made of 32x32 squares will be drawn from its current point to the clicked point. Well at the time I jsut needed to do a quick prototype so I did something like this.[code]That worked perfectly then and simply filled the path with that color. However now I want to break away from a solid color and fill the path with 32x32 .png tiles. If it helps to better visualize picture it similar to an RPG world maker or an RTS level editor.It's been a few months since I've looked at actionscript.
View 1 Replies
Aug 3, 2009
I have a FLV playing (via FLVPlayback component), and I'd like to have a graphic/movieclip display on top of the video at one of the cue points.
The video is a person speaking, and I'd like to have his name and title fade in when he says it.
View 1 Replies
Dec 23, 2009
I want to know all differents betweent Movie Clip and Graphic & Also I want to know when I use graphic or Movie Clip
View 14 Replies
Dec 10, 2010
I am trying to get coordinates of my graphic that is on the screen and failing. I am using AS2.
View 2 Replies
Jul 2, 2009
My brother is currently living overseas with his girlfriend and is flying home for a visit in August/September this year so I have decided to mark the occasion by creating a 3-scene Flash movie. Just there now I had the plane on the stage, I had the names moving towards the plane but when I played the scene back the text and the plane weren't on-screen at the same time, as the text and graphic were in different layers. My question is how do I make it look like the text is moving to get on the plane and vice versa as in the next scene I obviously want to have the plane flying towards the airport, (more text) i.e how do I merge the layers or is merging the layers not what I need to do?
View 6 Replies
Sep 3, 2009
How do I replace a graphic symbol ? It is actually made up of 3 layers including a textbox and bullet. When I double click on the symbol, I get the Text Properties menu.
When I single click on the symbol on the stage, the properties menu shows a Swap button. When I choose the correct symbol and click OK, it looks like it worked but it still shows the original symbol name (Instance of it) on this Properties menu.
Another issue is that when I change one of the symbols (by double clicking on the symbol and then double clicking on the text layer), it does change the text on that layer. However, then it changes the text on the other symbol as well even though they are different symbols.
Note that I can edit the original symbol and the new one. Both symbols are different. In other words, they each show the different text (which is what I want). It's like the original symbol is attached/embedded and cannot be changed.
Background on this issue: Rather than create a brand-new layer, I copied all the frames in a layer to a new layer because it has a motion tween on it. I only need to change the symbol that is in the motion tween. This is the only action/event happening on both layers.
View 1 Replies
Oct 5, 2009
I have a image of a cartoon (it is vector graphic created in Flash not bitmap!) and I want to change it
into grayscale, how do I do that?
View 2 Replies
Oct 29, 2009
I just try to work on a document and need to draw something with my graphic tablet, but everytime I switch from mouse to graphic tablet, Flash crashes immediately.Is there any way to make it work WITH the tablet?! I remeber it worked once, but now it's pretty f**ed up.
View 1 Replies
Mar 10, 2010
Is there anything a graphic symbol can do, that a movie clip can't? So many tutorials I look at, use Movie Clips for so many things, including one frame objects, and buttons etc...So, is there any benefit to ever using a graphic symbol over a movie clip?
View 3 Replies
Mar 21, 2010
In adobe flash CS3 i am using AS2 and have just made some buttons. I wnat to knwo if i can load a graphic rather than a movie when i play my moveis it pops up with an error //load Graphic Behavior this.loadMovie("H:\Year 12\Web Design\Term 1\5956\Images");//End Behavior it says that this line of code is the problem i cant see anything wrong with it
View 2 Replies
Jul 7, 2010
How do you change the Pivot point for a graphic on MX 2004? It defaults to the middle and I need it on the end of the graphic.
View 3 Replies
Jul 23, 2010
I'm designing a drawing board with flash (as3). I want to add the posibility to take a sample of color from the canvas.
View 1 Replies