ActionScript 2.0 :: Load An External Image As A BitmapData Object?
Apr 8, 2007
I've been looking at one of senocular's rather brilliant source files, specifically the 'rising grid transition', which performs a transition effect by using the bitmapData class. Currently,it loads a variable called 'tempbmp' by using the bitmapData.loadBitmap function:
var tempbmp = flash.display.BitmapData.loadBitmap('hill');
where hill is a jpg in the library with a linkage ID of 'hill'. what i'd like to know is if this process could use an image that is not in the Flash library. Is there a way to load an external image as a bitmapData object?
I'm trying to load external image into Flash like BitmapData. Problem is, whan I load image into movieClip and than I want to convert it by using draw(), in bitmapData variable is an old statement of mc (before loadClip instruction). But from the logic of source code is imposibe.
This is what I used to load an external image into a movie clip and drag and drop. The feedback part is pretty much the same from the old code.[code]...
I would like to know how to set up the URLRequest to load an external image to a movie clip that is being used in a Drag and Drop event.I have successfully implemented the drag & drop code to my design but I would like to improve it by successfully loading external images to those objects that are being dragged around.I have both Var Load and starDrag codes. I am trying to figure out how to combine them.
how to set up the URLRequest to load an external image to a movie clip that is being used in a Drag and Drop event.
I have successfully implemented the drag & drop code to my design but I would like to improve it by successfully loading external images to those objects that are being dragged around.
This shouldn't be too difficult, but what I have is a button, which in the 'over' state I want to load an external image, and then have the image disappear when the users mouse hovers off the button
How do i modify this so that the proj_1_1_mc movieclip loads an external image instead of putting it in the flash file and thus bloating the .swf file?
The title might be a little misleading. Look at my code and I will explain
public static function loadTile(tileDir:String = "empty"):void { if(tileDir != "empty") { tPoint = new Point(0,0); tRect = new Rectangle(0,0,30,30);
[Code]...
I am trying to do tiling with sprites. I want my tiles to be interactive, so that is why I am using the sprite object instead of using regular bitMaps to represent my tiles. You might be wondering why I wouldnt just use graphics.beginBitmapFill(tImage); and graphics.drawRect(0, 0,tWidth ,tHeight ); to pick out the tiles I want to use. Well reason being is because it turns out that drawRect() first and second parameters actually alter the location of where the actual sprite sits at.
So if I set the x and y properties of the sprite to x = 20, and y = 20. then I set my drawRect(20,20). it actually adds an extra 20 pixels to my x and y coords of my sprite. And I know the reason why, I just need to know a better way.
hi guys, i got this image i scaled down by .5. The user is then allowed to add objects to the image such as flowers that are sprites in the library. So basically, a jpeg that is 800 x 800 is down to 400 x 400 on the stage and the user is able to add objects to overlay the image.
i want to save the image with the flowers and objects back to its 800 x 800, how do i redraw this image using bitmapdata properly?
I am trying to load an object from flash file A into flash file B. Both files are in the same directory. The reason i'm not just loading A into B, using loadMovie, is that A is generated by another process and has some annoying code in it which messes up my movie by loading stuff in the other _levels. The only thing I need from file A is an object inside it that has some parameters. I am working with file B and have the source code. Is there a way to just load the object I want from movie A into movie B. ? Can I use loadVariables to load and object?
When I use Loader to load the same external image twice (same URL), what happens the second time? Is it taken from cache or does it actually load again?
I only want to display a single image (no gallery)I would like to get the url for the image via an xml.Here is a copy of my current action script which has already pulled in the xml data which includes the node with the url for the photo.
I would like to load an external image to a flashwebsite.I do this using a Loader.[code]When I test the swf offline, it works. But when I put everything online and I browse to the HTML file, it doesn't load the images anymore.What do I have to do to load external images online?
I'm having issue with loading this image [URL] onto my stage. I can load the image perfectly when I load locally however I cannot open from any external domains. I'm using cs4 windows vista if that helps.
I'm trying to trace the path of an object by using setPixel on the object's position every frame in a BitmapData/Bitmap pairing. These pixels aren't showing up normally and I suspect I have a fundamental misunderstanding of the BitmapData class. Here's what I'm doing:
public var contrailBase:BitmapData; public var contrail:Bitmap; private var contrailColor:uint;[code].....
Using this code, the red pixels don't show up. If I initialize contrailBase to 0xFF000000 instead then I get a black screen on which the red pixels DO draw, but I need the bitmap to be transparent except for the contrail. What am I doing wrong?
I have an image gallery that I made with this tutorial (AS3 Photo Viewer Tutorial), and I'm trying to get an external preloader to load it. The only tweaks I've made to the tutorial file have been to change the stage size, and change the name and contents of the xml file.The preloader, which uses something I downloaded from preloaderz, worked with another, simpler swf, but when I try it with this one, I get
Quote:TypeError: Error #1009: Cannot access a property or method of a null object reference. at PhotoViewer()
I don't know why this won't work. Another thing I don't quite get is how the .as file is attached, because the PhotoViewer.fla file appears to be blank, with nothing I can see in the timeline/ stage, or in the actionscript. Before trying the external preloader, I tried adding one to PhotoViewer.fla, using script from the ActionScript 3 Classroom in a book, which worked in their lesson file, but not with this file. I also tried moving the script to the .as file, but that didn't work either.I'm using Flash CS4. If all else fails, I might have to try a simpler image gallery, that would hopefully work with a preloader, but I like how this one looks.
I have been browsing here for a while & recently signed up, searched the forums but can't find exactly what i'm looking for because i'm an actionscript newbie..
Here's my problem I would like to load an external HTML image like so "<img src="http://image/dog.jpg" id="1" width="728" height="90" />"; but I am not sure how I can achieve this - the ID="1" is something someone gave me however I do not know if "1" has to be assigned in order for the image to load. I am very, very new to actionscript & I apologize if asking this insults anyone but if anyone can help me I would be very grateful - This has been bugging me for almost a week now & even when I try to pay for help no one can help me out.
i am trying to load an image from external domain and i got this message,
Code: Attemping to launch and connect to Player using URL C:xampphtdocsuploading agimageshowtags.swf [SWF] C:xampphtdocsuploading agimageshowtags.swf - 64905 bytes after decompression[code]....
I have a problem loading a swf object into an existing object. Everything works fine within the parent swf object, but I don't know how to make the whole object dynamically so I can call the parent object with a URL flash variable (or something like that). [code]...
I need a simple way to load an external image referenced in an XML file, into a layer (named "avatar") in my flash project..By default I want it to load this image as soon as the flash widget is opened.And how would I position the image, say in the center, or wherever?
I am trying to create an interactive 3D canvas, e.g. it loads up the person image and loads it into several - pre warped- movieclips... trouble is when I run this:
ActionScript Code: function imageLoaded2(e:Event):void { canvas_wrap_mc.canvasF_mc.addChild(imageLoader2);
[Code]....
It only executes the last one instead of them all, when I remove the last one (canvas_white_mc)... it goes to the next last one canvas_black_mc...
I'm obviously doing something wrong, and everything about addChild and loading external images for me is a bit loose weave!