ActionScript 3.0 :: Flash Masking Dynamically Loaded Images Within A Movieclip

Dec 10, 2011

I am loading images into a sliding menu which will act as a thumbnail viewer, the structure of which is: "thumbsContainer" (movieclip) nested inside "galleryPane" (movieclip). The images are loaded into movieclips named "all_thumbs", which are added to the thumbsContainer stage.

I would like to mask the content of the thumbsContainer, so that only the images physically within the thumbsContainer border will be viewable.

I have tried adding my coded mask to the thumbsContainer stage, and tying it to the thumbsContainer; and have separately tried the same with the all_thumbs movieclip - but no matter how I organise my code, I can't get this to work. If the mask is tied to the thumbsContainer mc - that element disappears; if the mask is tied to the all_thumbs mc, only the background to the thumbsContainer is visible. Either way, I cannot get thumbnails to display through the mask. No thumbnails at all will display on stage.

Code:

all_thumbs.addChildAt( thumbLoader, 0 );
c = c + 1;
if ( c < totalPics ) {
all_thumbs.alpha = 0;

[Code]....

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Masking Dynamically Loaded Images With Movieclip?

Dec 10, 2011

I wonder whether anyone could give me an idea of where I am going wrong with this.I am loading images into a sliding menu which will act as a thumbnail viewer, the structure of which is: "thumbsContainer" (movieclip) nested inside "galleryPane" (movieclip). The images are loaded into movieclips named "all_thumbs", which are added to the thumbsContainer stage.

I would like to mask the content of the thumbsContainer, so that only the images physically within the thumbsContainer border will be viewable. I have tried adding my coded mask to the thumbsContainer stage, and tying it to the thumbsContainer; and have separately tried the same with the all_thumbs movieclip - but no matter how I organise my code, I can't get this to work. If the mask is tied to the thumbsContainer mc - that element disappears; if the mask is tied to the all_thumbs mc, only the background to the thumbsContainer is visible. Either way, I cannot get thumbnails to display through the mask. No thumbnails at all will display on stage.

I've had a good look through the books I have and online, but with no joy so far.

I'd be really grateful if someone could give me a steer with this.

[Code]...

View 6 Replies

ActionScript 3.0 :: Masking Lost When Images Loaded

Apr 16, 2010

I have a Sprite name - thumbnailContainer which consist of following Sprites :
maskSprite @ level2
thumbnailPane @ level1
thumbnailBg @ leve0

The thing is that, I have masked the thumbnailPane with maskSprite. The issues is, whenever the external images are loaded into the thumnailPane, the mask is lost - revealing the entire horizontal stripe of the thumbnails. As well as the thumbnailBg in thumbnailContainer gets blurred even though, I have not applied any kind of filters on any sprite ! I am using TweenLite for transitions.

View 2 Replies

ActionScript 3.0 :: Dynamically Un-masking A Movieclip?

May 4, 2010

I have a movieclip which is being masked using another movieclip. In one condition I want to unmask the mc. But it seems, mask = null isn't working.can I remove mask dynamically.

a.mask = b;
a.width ++;
if(a.width > 10)

[code].......

View 2 Replies

ActionScript 2.0 :: Resizing Dynamically Loaded Images In Flash

Dec 28, 2005

I've got a client who's asking about resizing dynamically loaded images in flash. basically i'm building him a button that displays dyn. text and loads a .png based on a variable (easy). I'm going to tell him that actionscript/flash really has no means of resizing a loaded image and that you need some type of server-side script to do all of that.

View 2 Replies

Actionscript :: Dynamically Loaded Images Not Displaying Properly In Flash

Mar 10, 2011

I'm creating a banner advertisement in Flash. It pulls all information from an XML file. Images for each product are also loaded externally. Everything is working fine except for 1 thing.

I have an image separator i'm using as a background for each product container to lend a bit of separation to each product. But when I try to add it using code it's only added to the last item. Doesn't matter if it's 10 items or 2 items...it's only being added to the last one and i'm not sure why. Anyways, i've zipped up the associated files and put it on my webserver. I'm using the Tweener class and have included that in the archive as well.

Here's a link to the archive : Project Files

View 1 Replies

Flash :: Access Dynamically Loaded Movieclip (stage > Scrollpane > Myloader > Movieclip)?

Oct 16, 2011

what I'm trying to do is accessingsnapText = scrollPane.source.textSnapshot;from an external swf. I've tried:

trace("-->: "+scrollPane.source.textSnapshot.getText(0, 1000));
trace("-->: "+myLoader.content.textSnapshot.getText(0, 1000));
trace("-->: "+mc.textSnapshot.getText(0, 1000));

[code].....

View 3 Replies

Flash :: Assigning Icons To A ComboBox's List Using Dynamically-loaded External Images

Feb 5, 2010

I'm trying to implement this for an instance of ComboBox specifically, which uses a List to display the dropdown menu full of items. Lists can have icons associated with them, as described in the documentation:

var comboBox = addChild(new ComboBox());
comboBox.dataProvider = new DataProvider([{label:'item1',iconClass:IconClass1},{label:'item2',iconClass:IconClass2}]);
comboBox.dropdown.iconField = 'iconClass';

... assuming IconClass1 and IconClass2 are valid classnames of symbols in our library, this code works perfectly.

Here's my question - the contents of this ComboBox will be XML-driven, populated dynamically, and I'd really rather include that icon reference as a filename instead of a classname, so that when the whole thing is implemented, the icon can be changed in the XML without opening Flash and adding a new symbol to the library. Clients aren't generally good at that sort of thing.

Ideally, I'd like to be able to find a way to reference the container for the instance of that icon class - the ComboBox.dropdown is obviously keeping a reference to each list item somewhere, and if I can find it, I can load the icon images dynamically, then addChild them to the icon instance.

View 1 Replies

Dynamically Loaded Images Are Pixelated?

Aug 8, 2011

I've used AS2.0 to build my site. I have several .jpgs that I'm loading dynamically on my flash site from my server. For some reason only some of the .jpgs are loading pixelated. I've tried to look up solutions to this, but I'm not exactly sure where a quality=best or smoothing=true script should be placed. And I'm equally as puzzled as to why only some of my .jpgs are loading pixelated? This is very frustrating, this is the code I'm using to load my images:

loadMovie("Wave.jpg", _root.image_box_9);

View 1 Replies

Scroll Dynamically Loaded Images?

Sep 21, 2007

How would I scroll dynamicall loaded images. I would like to use XML but that not required.

View 0 Replies

ActionScript 3.0 :: Center Images Loaded Dynamically?

Sep 24, 2009

I have several images that are loaded dynamic.Now I want them to center in the container.How is that done? I can get the width and height but I can't adjust the x values on the loaderinfo object. Heres part of the code:

... part of function ...
for (var i:uint=0; i<numPictures; i++) {
var pictLdr:Loader = new Loader();[code].......

View 8 Replies

ActionScript 3.0 :: Preload Dynamically Loaded Images?

Nov 25, 2010

preload a dynamically loading image.

My header animates then dissapears.

Then after about 2 seconds the dynamically loaded image appears, is there a way to preload the image before the end of the animation?

My code that doesnt work is:

stop();
addEventListener(Event.ENTER_FRAME,loading) ;
function loading(e:Event){

[Code]....

View 6 Replies

ActionScript 2.0 :: Allow Smoothing For Dynamically Loaded Images?

Aug 18, 2009

as you surely know, setting a picture in your library to "allow smoothing" makes it high quality while resizing, rotating, etc with it on the scene.

Now I'd like to know how to set this to a picture you externally load while playing, cause obviously you can't set its parameter "allow smoothing" to true in the library, it'll never be in your library...

I found one thing that draws a bitmap, copies the pict, etc, but it's very slow at usage. I need something faster but the quality of the image must be perfect.

View 5 Replies

ActionScript 2.0 :: Preload Dynamically Loaded Images?

Apr 6, 2010

I'm trying to add a preloader to my code (see below) to preload my images:

// for loop
for (p=0; p<401; p++) {
// create array to load images from folder

[Code]....

View 5 Replies

ActionScript 2.0 :: Rollovers On Dynamically Loaded Images

Dec 22, 2006

For the life of me, I cannot get any rollovers to work with the images that have been loaded from XML. I can target them and set the _alpha and whatnot, but rollover/out/press functions don't seem to work :[ I've tried many different ways... does anyone see what's wrong?

[Code]...

View 3 Replies

ActionScript 2.0 :: Add Spacing Between Dynamically Loaded Images

Sep 3, 2007

Is there a way to modify the code below to make the spacey = a variable + 15 so that the dynamically loaded images can vary in height and be spaced 15px apart?

Code:
cliparray = [];
columns = 1;
spacex = 0;
spacey = 420;
function loadXML(loaded) {
[Code] .....

View 14 Replies

ActionScript 2.0 :: Tween Through Dynamically Loaded Images?

May 14, 2009

I have a working AS2 banner that loads in an array of images into a movieclip using flashvars and then cycles through these (there's no limit on the array length).

Unforunately, the images couldn't alpha tween into eachother as the AS2 script needs to be seperated onto sperate keyframes in order to count through the array.

I've created another movieclip which loads in the 'next' image in the array, so that when the current image fades down, the next fades up.

So to break down:

bannerContainer_mc - loads current image
nextContainer_mc - loads next image

Unfortunately when the timeline loops to the start again, bannerContainer_mc loads in the image which was previously loaded into nextContainer_mc. This creates a 'jolt' in the animation as the same image is re-loaded.

Is there any way of perhaps caching nextContainer_mc at the end of the banner sequence, to save loading it again in bannerContainer_mc?

View 1 Replies

ActionScript 3.0 :: Use An Mc To Mask Dynamically Loaded Images?

May 26, 2009

I have created a custom 3d wall gallery and I would like to mask it to give it right and left fades. I have posted the code that places the images on the stage but for the life of me I cannot mask it. Themc in the library mask_mc already has the correct gradient so now how do I add it to the top of the dynamic gallery?

Code:
private function viewCarousel():void {
viewport = new Viewport3D(stage.stageWidth, stage.stageHeight, false, true);
addChild(viewport);[code]......

View 1 Replies

ActionScript 2.0 :: SetMask Over Dynamically Loaded Images

Oct 27, 2002

if it's possible to apply mask over images loaded with loadMovie(), be it physical or through setMask.

View 6 Replies

ActionScript 3.0 :: Image Smoothing On Dynamically Loaded Images?

Jul 28, 2009

I bought and installed a component and now the place I got it from is not giving support and their site has been pulled. The issues is that I can't figure out how to convert the loaded images into bitmaps in order to apply smoothing. Can someone look at the code in the attached .fla and give me a heads up as to where to add i

View 8 Replies

ActionScript 2.0 :: Make A Slider Where Images Are Loaded Dynamically?

Feb 22, 2011

I'm making a Image slider. When the mouse is rolled over, It'll slide to one direction. Just like a normal image slider.The problem is, the images that I want to be inside this slider are in a folder and I want them to dynamically load into flash and into the slider.

For example, Lets say there are 5 images in the folder. I want flash to get all the 5 images and load them into the slider and do the normal scroll thing. When the 5th image is reached, I want the slider to display the first image. (in a continuous loop). If a new image is put into the folder, flash should now have 6 images in the slider.I've manged to get the Number of files in the folder to flash.How can I make a slider where images are loaded dynamically?

View 2 Replies

ActionScript 3.0 :: Resizing Stage According To Dynamically Loaded Images

Jun 16, 2009

I am uploading different size of images dynamically but at the same time I want the stage to be resized accordingly to image's height and width.

View 11 Replies

ActionScript 2.0 :: Dynamically Smoothing Loaded Images (Child MC)

Nov 19, 2011

I'm trying to make smoothing for images which loaded with loadclip(). I found function for smoothing and it works but only for movieclips located in _level0, for example _level0.mc, but I want to smooth children MC, for example _level0.parent_mc.children_mc and then image just disappears. Smoothing function:

here = this; // trace(here) == _level0
bg_smooth = function (bg):Void {
var bg_depth:Number = bg.getDepth();
var bg_name:String = bg._name;
var bg_parent = bg._parent;
[Code] .....

Also tried to write _level0.parent_mc['children_mc'] instead of parent_mc.children_mc and to make here == _level0.parent_mc - still no luck. If I remove bg_smooth (element) on load complete then all works fine but of course smoothing disabled.

View 1 Replies

ActionScript 2.0 :: Scale And Smooth Dynamically Loaded Images

Jun 22, 2009

I've got a nifty bit of script that loads some images from an XML file into flash. It loads the pictures into specified movieclips:

ActionScript Code:
xmlImages.reset();
xmlImages = new XML();
xmlImages.ignoreWhite = true;
xmlImages.onLoad = loadImages;
xmlImages.load("[URL]");
function loadImages(loaded) {
[Code] .....

Each instance of the movieclips are called picture_mc1, picture_mc2 etc. On the frame where these picture_mc's sit, I've got this code:
ActionScript Code:
function randomImage() {
if (loaded == filesize) {
image = (imageFileName[0]);
picture_mc1.loadMovie(imageFileName[0], 1);
picture_mc1._xscale=23;
picture_mc1._yscale=23;
[Code] .....

Everything works fine, but my image scaling is making my picture_mc's look really pixilated. I've seen references to bitmap image smoothing, but i'm not sure the best way to approach this. It seems that each time I try and smooth my images, the code is smoothing the image placeholder, rather than the jpg that's being loaded into it.

View 0 Replies

ActionScript 3.0 :: Sphere Made Up Of Dynamically Loaded Images

Nov 6, 2009

I am currently building a sphere of images that I'm trying to load from a remote location using XML. I managed to find the source for the sphere and was able to figure out how load the XML into an array of image details.

My problem is that the sphere is made up of images that were loaded into the library and I'm trying to load them in dynamically, i got all the information from XML but i don't understand how to make these dynamic images the same as the ones in the library so i can instantiate the image object.

thumbsArray[0]=[new Bitmap(new Small1(thumbWidth,thumbHeight))];

Small1 = the name of one of the image in the library that makes up the sphere. if i go to the properties of this Small1 image i noticed that its class is called Small1 too. I don't understand this as iv never seen this in actionscript 2.0.

The code below is my attempt at making a image loader object to a bitmap object, that doesnt seem to work my bitmap object becomes null, and throws an error.

SYNTAX / CODE:

function getLoader(url) {
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.CO MPLETE, completeHandler);

[Code]......

View 0 Replies

ActionScript 2.0 :: Apply Filters To Dynamically Loaded Images?

Feb 11, 2007

I am trying to add simple drop shadows to a few dynamically loaded images and it's not working. If I create a plain box or rectangle, the drop shadow filter works fine, but not with loaded .jpg's.[code]...

View 2 Replies

ActionScript 2.0 :: FadeIn Fadeout Dynamically Loaded Images?

Jun 4, 2003

I am dynamically loading images into a blank movie file. I would like if the images fade in as they load. Remark, I am not using a slide show effect. All i would like to do is load image and make it fade in. When the user clicks to go to the next frame the image should fade out. How to do this?

View 9 Replies

ActionScript 2.0 :: Scaling And Resizing Dynamically Loaded Images?

Apr 9, 2009

Im building a site for a photographer, all images are xml driven.. When a thumb is clicked the full size image is loaded into an empty movie clip.

I am after a similar effect as seen here..[URL] If you resize the window the image resizes to scale...

I have managed to align the rest of the movieCLips to the stage when it is resized in its right positions just can't get the image to resize!.

View 3 Replies

ActionScript 3.0 :: Flex BitmapFill Using Dynamically Loaded Images?

Oct 20, 2009

I have a rect that i need to fill with a tiling image. The problem is that there seems to be no way of doing this without using embedded images, which isn't a possibility for me.how to work around this? The reason i can't embed the images is that they are selected by the user from a list, generated by a plsql procedure. it's flex 4 beta 2 by the way,

View 9 Replies

ActionScript 2.0 :: Resize Stage To Dynamically Match External Movieclip Loaded Into Empty Movieclip?

Nov 15, 2004

know how I can resize the stage to match the size of an external graphic/movieclip which is loaded into an empty movieclip,

View 3 Replies







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