IDE :: Masking An Image Loader?
Jun 10, 2009
I'm coming from AS3 and I'm trying to mask a SWF file that's being imported in but it's doing something pretty funky. The SWF file is coming in fine, but when I'm masking it, it shows the shape I'm masking with, but it's also masking because nothing is going beyond its' edges.
{
var mask_mc:Shape = new Shape();
mask_mc.graphics.beginFill(0x000000);
[Code]....
View 6 Replies
Similar Posts:
Feb 10, 2011
I'm trying to set a mask to a loader that is nested inside a dynamicly created movieclip. The images are loaded into the correct movieclips but they aren't masked. Here's (part of) my code:
PHP Code:
for (var i:int = 0; i <= total_days; i++) var var_name:String = "cell_"+i; this[var_name] = new Cell();this[var_name].name = "cell_"+i;container_mc.addChild(this[var_name]); for(var j:int=0; j<=observ_array.length; j++) var tmp_date:Date = new Date(observ_array[j]);if(tmp_date.time ==
[code]...
mask_mc is created at authoring time and sits somewhere of the stage.I've tried all kinds of variations to my_loader.mask = mask_mc; including mc.my_loader.mask = mask_mc; I can add other properties to my_loader eg my_loader.scaleX works fine...
View 1 Replies
Aug 12, 2009
im working on an image viewer and im loading an image to a loader and then add the loader to the stage.I want the user to be able to drag and drop the image but since it's a loader i dont know how to do it.
I tried
imageLoader.startDrag = true;
imageLoader.content.startDrag = true;
but im getting an error on both.
View 2 Replies
Oct 14, 2009
I am trying to load a colour image and then it is changed to black and white image. Here I am using a mask. But it is not getting worked. The code that i am using for this purpose is attached following: import
[Code]...
View 7 Replies
Apr 14, 2009
I'm extending a tutorial from Flashtuts by Michael Chen. My goal is to have the grid fill in random, masking the image for a transition, as the famed Mask Effect transition from Flash-filter. This is what i got so far: URL]
[Code]...
View 2 Replies
Jun 6, 2009
I've just created a sliding transition, see code below, which masks an image however when I run the swf it doesn't work and just displays the whole image without a mask.
[Code]...
View 3 Replies
Jun 3, 2010
I would like to reveal an image by drawing over it with the mouse. The drawing part is not a problem but I don't succeede with masking the image with the drawing. Here is my code:
Code:
var myImage:theImage = new theImage(); //linked image from the library
var canvas_mc:MovieClip = new MovieClip();
[code].....
View 3 Replies
May 24, 2009
I'm loading an external image to use as part of the background for each section (other section, new external image). But that image needs to be animated in, in a certain shape (I have created a kind of spatter animation).I always use an Movieclip container to place my external images. So on one layer I have this container clip. I mask this layer with a layer on top of that one, which has the splatter animation (this splatter animation is not a movieclip, just some keyframes with the animation).Everything works, except that the image is not loaded. I checked everything, maybe I put the wrong url or something. But nothing.
So I tried unchecking the mask option. Ok... now my image did load. But as soon as I check the masking of that layer, again I'm left without image.It seems to me that it has problems with loading images that are begin masked. How can I fix this? I tried google'ing, but few solutions were found. And I'm nog programer-guru. I use flash semi-design/semi-program.
View 2 Replies
Mar 9, 2009
I have a 8x 10 array of mcs on stage each which contains a small image. So, there are 8 parent clips (columns) each containing 6 child clips containing the thumbnail images. If the movie clip arrays are created dynamcally (therefore loaded into the top layer) how can I mask them? I'd like to be able to mask 1 vertical (parent) column at a time (so only 1 of the 8 columns (6 images) is visible.
View 14 Replies
May 30, 2010
Flash CS4 AS2 Okay -I have a flash movie, and I want to apply a mask to it. The mask I want to apply, or rather, the "shape" of the mask I want to apply is an external image that was made in photoshop. The shape is an irregular one with a bunch of jagged edges. the shape itself is solid, with a transparent background. I've tried saving it as a PNG with transparent b/g, and I've tried importing the PSD file directly into Flash - however - when I go to use this shape for a mask, the mask that is applied is an entire rectangle bounding the imported image - rather than along the edges.Hopefully you can see what I'm trying to do here, and perhaps offer some insight on how I can get this image into flash (let's stick with the idea that the jagged edged manner of the image is too difficult to recreate inside of flash).
View 13 Replies
Aug 24, 2009
I made an xml loaded dynamic image gallery and I cannot figure out how to crop the image should it be too big. Masking appears to work only with a movieclip created outside of actionscript (which cannot be created dynamically).
View 2 Replies
Sep 15, 2007
i have a problem with Interactive Image Panning & Alpha Channel Masking. without panning codes masking is working but with panning i can't see my masked area. code is below and icant find where i am wrong or what i am missing
[Code]...
View 2 Replies
Oct 26, 2011
How would I make an image I load using AS3's loader class into a button with an event handler on it? Below is what I have started. And below that is my error I get when I click the message.
AS:
//call function that starts loading my image
callButtons();
function callButtons():void {
[code]....
the error I am getting when I click the spanish.png on the stage is: ArgumentError: Error #1063: Argument count mismatch on MyVideoPlayer_CS4_fla::MainTimeline/playSpanish(). Expected 0, got 1.I NEEDED TO ADDED evt:MouseEvent
View 1 Replies
Apr 30, 2010
I have this piece of code to change images. I was trying to figure out how you could put a timer on the code, so if the image has been displayed for say 5 seconds it diverts to the next image automatically? Also if it's not to hard, when it has played to the end to divert to the 1st image.
[Code]...
View 1 Replies
Mar 22, 2011
[code]This script is for a loader image gallery in flash, as part of a class assignment. What happens is that in flash, when I open the swf file, the initial image (images/nair_evanescentautumn.png) will load fine. However, clicking on any thumbnail image (including the exact same images/nair_evanescentautumn.png), will result in an error saying the file cannot be found.I cannot figure out why it is doing this... I've tested it over. Clicking each thumbnail does go to the correct position in the two separate functions. All said full-size image links are in the folder images/, and replacing the initial loader image will load the other images in place of the default one. However, clicking on any thumbnail still results in URL not found, even though everything works correctly.[code]Before anyone asks why I'm putting this kind of content into a flash site, I'm not--this is only for a class assignment. I'm just trying to figure out why my images aren't loading right when I'm only doing the exact same thing in the functions as I am on the other pages.Of note, commissions.swf has the exact same feature, just with swf files loaded instead, and it works perfectly fine. home, traditional, digital, and photography all have the image gallery, and all have the same issue (I only referenced one page because if I can fix one page I should be able to fix all of them).As for the artworks, they are all my fiance's. The website design was built for her, and I used the website design for this project because I didn't want to have to build an entirely new interface design. Since the project also required a gallery, I felt that this interface would work just fine.
View 3 Replies
Feb 23, 2010
I need to create a gallery to load images and display them. This part is fine:
/**
* @variable image_name to store the name of the selected item
*/
private function showimage(evt:Event):void
[Code].....
where imgMain is the id the image component.
But, I need a small twist. A transition image i.e. loading image should be displayed while the the image is being loaded.
View 1 Replies
Mar 6, 2010
I've looked through a couple threads here about reflecting images... but I don't quite understand it. I will include a link to my project thus far: Final Project First of all, ignore the music/mp3 items at the bottom of the stage. Those aren't wired up yet. When you click on a bike image on the right, the reflection image should appear under the image... but it's not quite working out that way, and I've tried a few things. Here's the segment of AS3 code that is giving me trouble:
[Code]....
View 2 Replies
Oct 29, 2010
A basic image loader, looks like this:
var my_loader:Loader = new Loader();
my_loader.load(new URLRequest("imagename.jpg"));
movieclipinstancename.addChild(my_loader);
[code].....
View 4 Replies
Dec 1, 2008
I'm trying to simply have 4 images at a time appear, then scroll over one image when a button is clicked. I'm using the Loader component to call in the external jpgs. This works perfectly in Firefox and when I preview it in Flash, but in IE the images don't load properly. I'm scaling them down using the Loader parameters, but IE usually tries to load the full-sized images. You can see the problem if you visit [URL]
View 1 Replies
Jun 28, 2009
Attached is a link to a file I made named "index".I would have liked to have included the following files but was limited due to "you-send-it" not uploading folders.Files not included: [but functioning and vital to the site as well as the question]- xml list- images [folder]- thumbnails [folder]
View 7 Replies
Jul 9, 2009
I would like for the website preloader to recognize the random image loader that I have on frame 8 of my siteI have a basic preloader on frames 1 and 2(frame 1)
amountLoaded:Number=_root.getBytesLoaded()/root.getBytesTotal;
(frame 2)
if(_root.getBytesLoaded()==_root.getBytesTotal()}
[code]......
View 9 Replies
Apr 22, 2011
I've tried adding this loader as a child of several different sprites but it only ends up in one of the sprites (must be removing from the other sprites display list automatically).How can I duplicate that image in the loader into multiple sprites?e.g. (note don't worry about making sure the icon is loaded, pretend I wanted to Event.COMPLETE before adding to
var icon:Loader = new Loader();
icon.load(new URLRequest('image.png'));
var iconA:Sprite = new Sprite();
[code]....
View 3 Replies
Mar 23, 2010
I am having trouble in dragging a image within a loader. I am able to do zooming and rotating image but not moving image with mouse. Purpose is when I zoom a image info is out of boundaries and so is hidden. To see that info users should be able to drag the image any way they want.
View 1 Replies
Aug 23, 2010
I'm writing a movie that should load image from external location and display it in placeholder. I called placeholder "imageMC" and I gave it dimensions on 250x250 px.Next I load image using Loader class and I'm waiting for complete event.After that I try to resize image so it will fit to placeholder. I also want to keep fine aspect ratio.My code looks that:
ActionScript Code:
function onComplete(e:Event):void {
var wFactor:Number, hFactor:Number, originalWidth:Number, originalHeigth:Number, newWidth:Number, newHeigth:Number;
originalWidth = loader.content.width;
[code]....
The problem is line: "imageMC.addChild(bmp);". When I add a bmp as child of imageMC the trace statement looks like:
Quote:
250:187 //loader.content dimensions
252.05:362.4 //imageMC dimensions ??!! WHY THEY ARE CHANGED???
250:187 //bitmap dimentsion
and imageMC resizes his heigth and display image wrong scaled.But when I add bmp as child of stage: "addChild(bmp);" trace looks like:
Quote:
250:187
250:250
250:187
and image is scaled propertly.What is cause of this error?
View 2 Replies
Jun 22, 2007
why this isn't working with as 1.0? I have to publish it with 1.0 for other reasons. basically i want a simple preloader:
[Code]...
it goes straight to 100% when viewed through the download simulator, but the image isn't actually loaded. I don't really know as 1.0, just 2.0.
View 1 Replies
Apr 8, 2009
I have created a photo gallery, following this tutorial:URL...However I want the user to be able to click a thumbnail, which triggers a function to unload the previous image, and then reload the selected image.[code]
View 1 Replies
Feb 10, 2009
I'm a complete newbie using ActionScript for a class I'm taking online (not my choice to have it online, unfortunately). My instructor isn't much help to me and I am struggling. I am a beginner Flash user so know a little about that program but it's the AS I'm struggling with. I will give you my first bornI am creating a simulation that contains an octopus in a bath tub for the main image.I'm trying to get the octopus to load on my stage using the code my instructor has given me:
var somePictLdr:Loader = new Loader();
var request:URLRequest = new URLRequest("octopus.jpg"); <--this is the name of the jpg I have. I'm on a Mac and the entire folder with all of my stuff is on my desktop named
[code].....
View 3 Replies
Apr 10, 2012
I'm loading a list of urls of pics from an fql query, then loading those urls with the loader class using this function:_loc is a MovieClip that holds the picture,[code]In onMyPictureLoaded I would like to get the bitmapdata out of loader.content and scale the image (smooth it too) that way, and then reattach it to the _obj MovieClip, but I'm having trouble reattaching that new bitmap to the object.It seems the problem is more to do with events and not having the ability to pass information (_loc, for example) from:loader.contentLoaderInfo.addEventListener(Event.CO MPLETE,onMyPictureLoaded); to the onMyPictureLoaded function.
View 11 Replies
May 6, 2009
I use a loader to import an image into flash.
[Code]....
And I do absolutely nothing with the loaded image, I don't add it to the display list or anything. But when I use the unload() method on the loader it doesn't disappear from memory! Even if I set the _loader = null it doesn't free up the memory!
I check the System.totalMemory property and it just keeps stacking up if I repeat the process.
View 9 Replies
Jan 17, 2010
I'm trying to load images using the loader class but it doesn't seem to ever trigger the complete event (in this case anyway). The images are only 16x16px images from the local machine, so it should take no time at all to load. I use the totalImages variable as a counter; as an image is loaded, it subtracts 1 from it. Once it is 0, all images are loaded. I can create an instance and it goes as far as tracing "Begin loading images", but that's it. No errors in the console either.
PHP Code:
package lib{
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Loader;
import flash.geom.Rectangle;
import flash.net.URLRequest;
import flash.events.Event;
public class Frame extends Bitmap{
[Code] .....
View 2 Replies