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?
View 1 Replies
Similar Posts:
Jul 20, 2009
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.
source code:
import flash.display.*;
import flash.geom.*;[code]..............
View 0 Replies
Feb 28, 2011
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]...
View 1 Replies
Feb 26, 2011
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.
View 3 Replies
Feb 26, 2011
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.
View 4 Replies
Mar 31, 2009
In Flash, the BitmapData object can be used to store bitmaps in RAM, you can later draw them to a MovieClip using the beginBitmapFill() method.
How do you load an external bitmap file (.jpg) into a BitmapData object?
View 5 Replies
Oct 8, 2009
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
View 2 Replies
Jan 12, 2010
I have a flash file where a button loads a movie clip with he following code:
on (rollover) {
this.attachMovie("proj_1_1_mc", "window", 1);
window._x = 100;
window._y = 100;
unloadMovie("proj_");
}
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?
View 1 Replies
Dec 29, 2009
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.
View 2 Replies
Apr 26, 2009
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?
View 2 Replies
Nov 27, 2005
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?
View 3 Replies
May 8, 2010
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?
View 3 Replies
Mar 6, 2012
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.
import flash.events.Event;
import flash.events.MouseEvent;
import flash.net.URLLoader;
[code].....
View 11 Replies
Jan 7, 2011
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?
View 3 Replies
Jun 10, 2010
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.
View 3 Replies
Nov 16, 2009
I have used fileRef to allow user to load an external image to a swf.But... How do I access the image to add smoothing to it?[code]
View 3 Replies
Mar 2, 2005
I'm trying to load an jpg file that is outside my flash SWF file and I've tried this code:
loadMovieNum("1.jpg", 1);
But it doesn't work.
Is there any simple code to load an external jpeg image into Flash?
View 5 Replies
Feb 16, 2011
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?
View 2 Replies
Nov 29, 2009
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.
View 5 Replies
Jun 26, 2010
Is there any way to load an external image and add it to more than one movie clip?
View 3 Replies
Dec 30, 2010
i'd like to load an external image in a movieclip via
createEmptyMovieClip(..)
mcName.loadMovie( imageName )
trying to set the mc-size via
mcName._width = 100
mcName._height = 100
nothing changes. furthermore - any possibilities to zoom or stretch the image to get the size provided from the mc?
View 1 Replies
Dec 29, 2009
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.
View 9 Replies
Jan 26, 2009
I have my site working using this style of loading in images. I want to add a preloader so it works better is this possible?
View 1 Replies
Feb 16, 2010
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]....
View 5 Replies
Feb 14, 2011
Im trying to load an external swf even a object is clicked in the main swf, im using this code but i get an error, if u can:
bg.farm.addEventListener(MouseEvent.MOUSE_DOWN, farm_Press);
var fl_Loader:Loader;
function farm_Press(evt:MouseEvent):void
[code]....
View 6 Replies
Mar 9, 2012
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]...
View 6 Replies
Nov 29, 2009
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?
View 2 Replies
Apr 29, 2011
I am new to AS3 and I need some help with the Senocular Transform Tool (AS3 version)
I'm having trouble with loading in an external image such that I can transform with the Senocular Transform Tool class.
I have managed to load in the picture but the transform class doesn't seem want to grab it. [code]...
View 1 Replies
Feb 2, 2010
I have external swf and a external image to load on my movie. I want to load the movie to front of my image, but i still not get it. Here my code:
var carregar:Loader = new Loader();
addChild (carregar);
var caminho:URLRequest = new URLRequest("1.jpg");
[Code].....
View 9 Replies
Nov 23, 2010
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!
View 4 Replies