ActionScript 2.0 :: Mask Over Script - Load A Picture And Centers It?
Apr 16, 2004
is it possible to have a mask over this script:
_root.createEmptyMovieClip("emptyMC", 1);
_root.emptyMC._x = 25;
_root.emptyMC._y = 25;[code]....
what it does is load a picture and centers it, what would be nice is to have a mask over it....
View 9 Replies
Similar Posts:
Jan 19, 2010
I've got the code for circle on an image (mask). I've got it in my first frame and I need do something else in 2nd frame but after the movie in 1st frame is finished.
Code:
//This container contains all the circles that act as a mask for the picture
var container:Sprite = new Sprite();
//Assign the container to be the image's mask
picture.mask = container;
//Add the container to the stage
addChild (container);
/*
This timer is responsible for creating a circle every 0.05 seconds. A total of 20 circles will be created.
*/
var timer = new Timer(50,20);
timer.addEventListener (TimerEvent.TIMER, createMaskBall);
timer.start ();
//The timer calls this function every 0.05 seconds
function createMaskBall (e:Event):void {
[Code] .....
View 5 Replies
Apr 12, 2004
I have a code that duplicates a movie clip that then falls across a picture. They are sort of like water drops on a window but I want the picture to only be seen through the water drops. My problem is I can't get more than one drop to mask the picture at a time. I have tried code in the duplicated MC and I have tried pasting a bunch of instances to the stage and creating a mask later. Please help me out. The following is the code of the duplicated movie clip where _root.drop is the falling mask and _root.bg is the picture I want to see through the drops.[code]
View 1 Replies
May 8, 2004
Im loading several thumbnails from out of a database into flash, everything is stored as it should. Then i create a Rectangle called "mc_mask". This one is created as it should with the correct values. Then im looping through this for(){}. As you can see im duplicating a movieclip "mc_thumb_holder" then eval them to my array, there im loading in a Movie with .loadMovie(thumb); Now when i set the rectangle as a mask on each of the duplicated movieclips it wont work. So my question is:
[Code]...
View 2 Replies
Aug 12, 2010
im going crazy with the simple matherfather task. i want to make a mask and applay it to a picture but i need to do it in actionsript. so what i do is create all necessery objs. at stage, acces them in class. set movie's clip mask and it's working but not the way i want. i want to have empty hole inside of mask which is a movie clip. that is not possible until i make a empty hole connected to the edge of mask with empty space. only then its showin the empty hole (and the connecting empty space aswell and) [URL]
View 3 Replies
Apr 22, 2002
I want to make a picture gallery and use buttons that move you from picture to picture and backwards, but I don't want to tell button 1 to go to frame 2 and button 2 to got to frame 3 and so on (I hope you know what I mean)Can I use on button on a separate layer with the same action set? I tried something like that, but it didn't work:
on (release) {
thisframe =+1
}
[code]........
but it didn't work. I'm kind of new to any action script other than gotAndPlay, easy functions and all that.
View 2 Replies
Jun 25, 2009
In Flash CS3 is there any way to scale a large number of symbols (each on their own layer) at the same time, about each symbols own center. For example after scaling down, every symbol is smaller but it's x,y position has not changed.
View 1 Replies
Apr 25, 2010
did someone else encounter this problem? I use the methods PopUpManager.createPopUp() and PopUpManager.centerPopUp() to create and center a pop up window but it looks strange, like the window is created at (0,0) and then reappears in the middle of the screen. how do I fix this?
View 1 Replies
Mar 6, 2009
I've been fighting this one for weeks - I've tried changing the Document Properties, Publish Settings, and even placing huge white boxes behind the clips I want to preview ... all to no avail! What gives?
Basically, whenever I'm inside a nested movie clip, and Test Scene (Control-Alt-Enter), the animation is centered in the upper left of the stage, so I can only see the bottom-right quarter of the animation - the rest is off-stage and not visible!
View 1 Replies
Aug 19, 2004
i've been using the equillibrium code that centers an object between 4 other objects, but when you put the 4 objects inside of another symbol i messes up and i have all the roots right. If you look at the .fla you will be able to see how easy the code is ( its in the square) but it wont work.kirupaForum
View 1 Replies
Nov 23, 2007
I am trying to make a resize class that centers my main movie, but i can't seem to get it to work when i put it in a class.
This is my code so far.
Code:
import mx.utils.Delegate;
class resizeClass extends MovieClip {
private var sw:Number = Stage.width;
[Code]....
View 5 Replies
May 1, 2009
The desired affect is simple: I have a single button... with each click I want it to load text into a dynamic text field and load a corresponding picture or movieclip.There are only three unique text/image combinations- after its displayed the third, with the next click I want it to just start over. All the text functions perfectly with each click.
The problem is:I use "createEmptyMovieClip" then use the resulting clip as a loader clip.. With the first click I want a movieclip from the library to load, so I use the "attachMovie" method- it displays the first library fine.With the next click I want to load an external swf- so I call the "loadMovie" method of the loaderclip... The external swf loads just fine replacing the first library clip.The third clip is where I have problems... now I want to load another library item into the loaderclip... so I tried using the attachMovie method again but the external swf remains static... then with the next click, I discover the first library item no longer loads and the external swf remains still playing- it's like once it's been loaded into the loaderclip it cant be moved...
So I tried adding the "unloadMovie" method in the code for the third click.. it successfully removed the swf... but the next line of code immediately after the unload statement, doesn't work. The line calls the attachMovie method for the loaderclip... but the library item doesnt load... Oddly enough, with the next click, the first library item now does load as if everything's fine... It seems like you cant use the unloadMovie and attachMovie on the same executing code? if that makes any sense... the basic idea was that if I couldnt get the attachmovie method to replace the loaded external swf, then I would use the unload method to remove it, then have code immediately after, to then execute the attachMovie method... but it still doesnt load the library clip. and I know it's not a type-o, because when I comment out the loadMovie and unloadMovie statements, it loads both the library items perfectly ? The code is below
var increment:Number = 1;
var verbiage1:String = "Hello World1";
var verbiage2:String = "Hello World2";[code].............
View 2 Replies
May 6, 2009
Can't understand why: loadMovie("pict/my_picture.jpg",movieClip); the path seems to be correct, but Flash canīt load the picture. It works locally, although, but not on the server.
View 1 Replies
Sep 21, 2009
I have a nested blank clip (_root.banner.holder.picture) and want to load a picture into it, using the following code in the _root.No matter what I do, I can't get it to work
Code:
_root.myobject = "picture1";
loadpic = _root.myobject+".jpg";
[code].....
View 1 Replies
Nov 30, 2010
I use Loader to load two picture,such as 1.jpg and 2.jpg,like follows:
_p1=new Pic("1.jpg");_p2=new Pic("2.jpg");
Then I add the two picture into a Sprite,like follows:
Sprite _g=new Sprite();
_g.addChild(_p1);
_g.addChild(_p2);
Then I draw a circle as _g mask,such as _c
_g.mask=_c;
I want to realize following effect.First appear 2.jpg,and during the mask _c radius is from 0 to 300,the picture 1.jpg is appearing synchronously in mask _c.
View 3 Replies
Jul 12, 2010
I'm editing a web page to access it only after login, so now it's a php page with an inital <?php session_start(); ?> and in the body of the page I test the value of a session variable.All works fine but in the header there is flash animation that don't load background picture.In the old version of the page this picture was loaded fine but not now.The address of old version of the page is this and new versione is this this.
View 1 Replies
Jul 15, 2010
I'm creating a picture gallery in actionscript 2. In order for people to easily create/modify galleries, I have actionscript read in file information through XML. However I have one problem I can't get around. I'm having trouble loading the picture into a movieclip, then being able to change the properties of that movieclip (change _x, _y, and _alpha). Here is what I have so far
[Code]....
View 1 Replies
Jul 29, 2010
I'm new to flex, i'm used to flash (CS5 & as3) I'm trying to load a picture in my swf file to add a DisplacementMapFilter then.
[Code]...
View 1 Replies
Jun 23, 2010
i'd seem some of the flash webpage, when enter into gallery or other photo area, the picture was loading into swf then.
View 9 Replies
Sep 8, 2011
i was trying to load a picture in to a loader :
ActionScript Code:
var url:String = e.currentTarget.link;
var request:URLRequest = new URLRequest(url);
[Code]....
and the only error was : SecurityError: Error #2000: No active security context.
i found the problem !: this error occurred if the xml link is wrong or if the picture is not on called link.
The question is: this is a cs5 bag or i miss something ?
View 2 Replies
Aug 19, 2005
I'm trying to monitor the currentframe of a movie so that when it goes to a specific frame, its loads the corresponding a picture out of an array dynamically using XML.
I think I have most of that loading part sorted out, the issue i think comes when i am looping code on the movieclip. I'm trying to set it up in such a way that if the currentframe remains the same, that it does nothing...this is so that it does not repeatedly load the same image over and over if the frame does not change.
I only want an image to load if the current frame has changed. I realise an example is in order so i posted the .fla and the .xml files in a zip file.
View 14 Replies
Dec 6, 2005
I'm trying to fix this for such a long time. I've used the scotty gallery but want to open the clicked thumnail in a new movie. [code]...
View 1 Replies
Oct 30, 2006
Code:
this.createEmptyMovieClip("mc", 10);
mc.loadMovie("http://www.winbakfarm.com/images/winbak_header_halloween.jpg");
trace(mc._width+newline+mc._height);
why doesn't load width and height of the picture?
View 4 Replies
Feb 16, 2010
I'm editing a web page to access it only after login, so now it's a php page with an inital <?php session_start(); ?> and in the body of the page I test the value of a session variable.All works fine but in the header there is flash animation that don't load background picture.In the old version of the page this picture was loaded fine but not now.
View 1 Replies
Feb 28, 2005
I know to load an swf, its like:loadMovie But is there a way similar to the way above but it loads a picture instead?
View 2 Replies
Nov 17, 2009
I get a ActionScript class for loading the content:
public class LoaderContainer extends Sprite {
public function LoaderExample() {
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
addChild(loader);
[Code]...
View 1 Replies
Jun 12, 2009
When I rollover my thumbnails I want it to load the corresponding version of a bigger picture, which is stored in the name property of each thumbnail. This works but the problem is i also want to, when clicked, goto a URL adress. But now the name property already have the path to the big version so I cant put the URL-path there. So how do I make each thumbnail find the "big version" and the url-path?
Code:
//thumbnail picture
thumb_Loader.load(new URLRequest(xmlList[i].attribute("thumb")));
//thumbnail BIG picture
thumb_Loader.name=xmlList[i].attribute("source");
View 3 Replies
Dec 13, 2009
I have this script. On the mc duplications i want to onRelease get on the every box a different loadPic(x)[code]...
View 0 Replies
Jan 29, 2003
i have some images file in a directory (gif), can i load my picture in flash movie? how?
i need this can by dynamis like load text with php (not using inport file in flash)
View 6 Replies
Jun 13, 2004
I have a picture that I want to load directly in to a movieclip.
Movieclip name = picture
Image name = image.jpg
I tried something like this
loadMovie("image.jpg", picture);
but didnt work
View 11 Replies