ActionScript 2.0 :: Masking An Exact Shape
Apr 7, 2004
id like to mask an exact shape so i can do some cool animations that are only seen over that shape.
example:
lets say i have a big letter 'P' that i made in photoshop and import it into flash. i made the background transparent and saved it as a .png file. so then i place a 'P' on stage that i want to be visible and i place another one directly on top of it to act as the mask. when i use set mask in this situation it doesnt use the shape of a 'P' is uses a box of some weird dimension.
View 2 Replies
Similar Posts:
Apr 7, 2004
id like to mask an exact shape so i can do some cool animations that are only seen over that shape.example:lets say i have a big letter 'P' that i made in photoshop and import it into flash. i made the background transparent and saved it as a .png file. so then i place a 'P' on stage that i want to be visible and i place another one directly on top of it to act as the mask. when i use set mask in this situation it doesnt use the shape of a 'P' is uses a box of some weird dimension.
View 2 Replies
Jun 2, 2009
I'm making some banner ads. They work great on my staging site seen here:But they do not work great on my client's staging site. You can see that the masks are shown and there is flickering throughout:on how to solve this?I'm an expert-level user when it comes to creating artwork and doing timeline animation in Flash CS3.
View 2 Replies
Aug 23, 2005
This is the third thread I've written for my current project (1st was answered perfectly, 2nd failed [but I still figured it out anyways]) but I'm not sure if there is a solution to this problem. I can't really explain my problem, so once again I've included a helpful animation to show you what I mean. Bear in mind that the pale-blue box represents the movie clip's borders, and those borders are usually changed to include the animation (instead of the borders moving with the animation, the borders get bigger).
For the animation problem, I've already got a solution: create an invisible movie clip that has the exact size and shape of the animated movie clip and make it follow the movie clip as it animates, and make the hitTest check the invisible movie clip instead of the animated one. As for the rotation problem, well, I don't know how to fix it. Is there a way to change that?
View 1 Replies
Nov 30, 2009
ActionScript Code:
package {
import flash.display.MovieClip;
public class Base extends MovieClip {
public var baseHP:int = 50;
var newRect:Shape = new Shape();
1046: Type was not found or was not a compile-time constant: Shape. 1180: Call to a possibly undefined method Shape. What does it mean by "undefined method"? I am somewhat of a newby, so sorry if there are any stupid errors
View 1 Replies
Jun 22, 2010
Whenever I add shape hints to a shape tween the shape disappears in the between frames. I am using CS5 on Vista. I using files from [URL]to practice.
View 2 Replies
Oct 11, 2011
need to draw the shape of a existing movieclip which is irregular shape.
View 2 Replies
Oct 11, 2011
need to draw the shape of a existing movieclip which is irregular shape.
View 1 Replies
Jul 9, 2009
Id like to know if there is a way to do a shape hitTest.Not as the normal hitTest would do, but shape colliding another shape, not the rectangleof a movieclip.It can be in a movieclip.
View 23 Replies
Oct 19, 2010
using the shape tool you can draw basic shapesthen using the subselection tool you can re-shape them by relocating certain points
What i want to do is create a tween whereby one of the points is movedthe problem is you have to convert to a symbol first and after you have done that you cant change the shapes shape.so how do i go about using a motion tween to change the shape of a shape?
View 1 Replies
Jun 8, 2009
on my stage are 5 buttons, each with the name of a product. i want to be able to hover over each product and see a Description of the product with a "learn more" link at the bottom of the description. the problem is that i want the Descriptions for each product to appear in the exact same place.
if the hit area of each button covers only the button itself, you can't click the "learn more" link because it disappears when you move off the buttonif the hit area of each button covers the Description area, the hit areas overlap each other. this causes the Description to always show the same thing (i think it is the Description of the last button i added) if you are hovering over anything besides an actual button.
View 6 Replies
Aug 9, 2011
I've got a problem when I need to display (19.99 * 100 - 1999) on the screen. When I trace it, it will show -2.27373675443232e-13. The problem is that 19.99*100 != 1999. I can use Number(( 19.99*100 ).toString()) to get 1999 exactly using Action Script 2, but this method failed using Action Script 3.
View 3 Replies
Sep 12, 2011
I have decided to give XML a go, so I thought I would start with something small : ) and give creating a dynamic menu a try.
I load my menu headings using textField and I can not get my code to find out the actual length of each menu heading. It all produces 100. I wanted to get each individual lengths so I can divide it by 2 and positon that to the center of my menu buttons.
I am also try to turn my menu buttons into buttons, so I can add my eventlisteners, but it doesnt seem to work. The menu text seems to get in the way, even though I made them non selectable.
This is my XML code
Code:
<?xml version="1.0" encoding="utf-8"?>
<menu_list>
<menu title="1">Home</menu>
<menu title="2">About Us</menu>
[Code].....
View 12 Replies
May 2, 2011
Any way to get the exact position for every character inside a textflow?, also I'm having trouble with the TLF documentation, is there anny documentation that shows more on how to work with it in actionscript rather than mxml, I am looking to write my own component and perhaps not use richtexteditor if I don't need to. How to get each characters position in the textflow:
private function getCharPosition():void {
for (var i:int=0; i<=textController.flowComposer.numLines; i++) {
var textFlowLine:TextFlowLine = textController.flowComposer.findLineAtPosition(i);
var textLine:TextLine = textFlowLine.getTextLine();
trace('number of atoms in this line: ' + textline.atomCount);
[Code] .....
This returns an error that's why I have try and cache, I have tried to change textLine.atomCount to -1 but that wont work either. Now I don't know what character exactly that I have the position for.
View 1 Replies
Jul 13, 2009
Here's my AS:
ActionScript Code:
var messages:Array =
[
"SWEATSHIRT",
[code]....
I have a text box called whatToClick which contains the words (copy and pasted) SWEATSHIRT. As such, that should trigger checkMask(), which checks if the clicked item is the same as the one in the text box. While running various trace commands, the string traces out exactly the same, capitals and all. But this always runs the else instead, which means the if isn't true. [URL]
View 4 Replies
Oct 19, 2009
I hav ea problem with recording (or even showing) the video of 2 separate webcams which are the same type, brand etc. Somehow one shows its stream and the other one doesn't.
ActionScript Code:
var widthPos=Math.ceil(Math.sqrt(Camera.names.length));
var heightPos=Math.ceil(Camera.names.length/widthPos);
var tWidth=640/widthPos;
var tHeight=480/widthPos;
[Code]...
View 0 Replies
Jul 12, 2009
Code:
var messages:Array =
[
"SWEATSHIRT"[code].......
I have a text box called whatToClick which contains the words (copy and pasted) SWEATSHIRT. As such, that should trigger checkMask(), which checks if the clicked item is the same as the one in the text box. While running various trace commands, the string traces out exactly the same, capitals and all. But this always runs the else instead, which means the if isn't true.
View 9 Replies
Apr 15, 2010
I would like to have a possibility, where a user could draw simple lines, but with exact length (5000mm, 3150mm, 3950mm etc).where a user could just click and see the lines. Together these lines would make a floor plan for a house. These lines don't have to have thickness, because it will be just a sketch where walls are located. After user has drawn the sketch i would need the program to generate a text file with coordinates of the lines.
View 3 Replies
Apr 23, 2010
I have made a tween using the new tween feature in CS4. I would like the tween to end on an exact copy of the original key frame so that it will loop seamlessly but I just cant figure out how to do this. I am unable to just recreate the keyframe because the object has rotated and moved to much to. I can do this with a classic tween but cant achieve the same effect.
View 1 Replies
Aug 3, 2010
What is the exact difference between mc1.hitTest(mc2) and mc1.hitTest(mc2._x,mc2._y,true)
View 2 Replies
Apr 5, 2011
I've researched a bit and I discovered a way to generate sounds dynamically on flash:
import flash.media.Sound;
var mySound:Sound = new Sound();
mySound.addEventListener(SampleDataEvent.SAMPLE_DATA, sineGenerateSound);
[Code]...
I would just like to know how I can make it generate the exact frequency I need, for example 100Hz.
View 3 Replies
Jun 21, 2009
I have two arrays on my Globals.as document:
ActionScript Code:
public static var special:Array = [];
public static var ground:Array = [];
public static var playertouchme:Array = [];
I go to push an object onto one of the arrays:
ActionScript Code:
Globals.special.push( this );
That works fine. However, when I replace it with:
[Code]....
I get this error:
[Code]....
View 4 Replies
Oct 7, 2005
I bought a template website and I understand pretty much all of the AS by now that they use. But I would like to decrease the file size so I wanted to load things externally. Here's a layout:Main Timeline:page1movieclips of all kinds plus a thumbnail scrollbar to load some other movieclips inside page1.page2page3page4code on the buttons inside the thumbnail scrollbar:
on (rollOver) {
gotoAndPlay(2);
}
[code].....
View 1 Replies
May 15, 2006
imagen I have a movieclip (space_mc) w1000Xh1000 px?
inside the space_mc I have 2 movieclips:
- vlak1_mc (w100xh100px, _x:100,_y:100);
- vlak2_mc (w100xh100px, _x:400,_y:400);
ok!?
now i put the space_mc on the stage and scale it to 20% the stage (document properties) are w800xh600
Now i want that the USER clicks on vlak1,2_mc and the space_mc scales to 100% But the clicked vlak(1,2)_mc must have the exact coordinates as in the space_mc?
so if clicked on the vlak1_mc!
the space_mc zooms in to 100% and the _x,_y of the vlak1_mc are x100,y100 on the stage(800x600)?
[URL]
View 1 Replies
Jun 25, 2009
how can i load an image to an exact size in the movie clip ?
lets say i have an img which is 1000X1000 and i want to leave it at the same proportion but display it at 800X800
View 2 Replies
Feb 16, 2002
I want to record speaking and used in the flash. But I don't have digital recorder or something like that. I then use digital camera with the ability to record about 10 secs movie with sound. It's an avi file. so anybody can tell me how to exact the sound from this avi file so that I can use it in the flash.
View 7 Replies
Jan 13, 2010
I have a script that calls for an external swf file. It can import the file no problem but it is always the same size. The problem is that I made the swf file with smaller dimensions and it is still to larger in my window.[code]...
View 1 Replies
Jul 26, 2010
It seems seek() on mp4 file seeks to the closest keyframe (seekpoint). Is it possible to seek to exact position in between of keyframes?
View 2 Replies
Jun 9, 2011
How do I get an exact width and height of a MovieClip if it was scaled on stage resize?
for example if I have:
stage.scaleMode=StageScaleMode.EXACT_FIT;
stage.addEventListener(MouseEvent.MOUSE_DOWN, checkSize);
function checkSize(e:MouseEvent):void{
trace(mc.width);
}
It will always output the same width and height no matter how big or small the stage is. Is there anyway to get exact current size?
View 2 Replies
Jul 17, 2009
This seems like a simple problem but I can't seem to figure it out. If I use this standard code from the reference:
ActionScript Code:
var nc:NetConnection = new NetConnection();
nc.connect("rtmp://myserver/");
var stream_ns:NetStream = new NetStream(nc);
my_video.attachVideo(stream_ns);
stream_ns.play("myflv");
the video streams fine, but if I put the exact same code within a function like this:
[Code]....
View 9 Replies