I want to load an external image (dest) and display it on the stage, and i want to load another image (src) which will not be visible. When i hold the left mouse button on the image that appears on the stage, then a function that start copies the src image to the dest will be invoked. Actually i want to reproduce the scratch effect on an image that hides another underneath. here is my code [ the copypixels function is triggered on mouse_move event for debug purposes ]
Although the two images are loaded into memory and the first one is shown on the stage, when the mouse_move events triggers the corresponding handlers the copy does not work.
I've got a code, which caches loaded resources (both images and swfs) and saves its bytes to flash SharedObject:
var cache:SharedObject = SharedObject.getLocal('dataCache'); cache.data[url] = (loader.contentLoaderInfo as LoaderInfo).bytes;
When there's a query to load new resource, the code checks if the resource is in cache and then loads its bytes:
var loader:FlexLoader = new FlexLoader(); // handlers skipped var lc:LoaderContext = new LoaderContext(); lc.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
I have two swf, one loads the other using a Loader class, in the loaded swf I have a NetConnection object which I need to access from the host swf, but I can't, if I debug the app, I see the obejct is there, but I can't access it, if I try to set a variable likeloadedSWF = connectorLoader.content (connectorLoader is the Loader object)loadedSWF is always nullIf I debig the app, I see the NetConnection in the loaded SWF, but I can't have access to it, I have try to use Security.allowDomain("*") in both swf to be sure, but nothing, I thought that only doing the allowDomain method I will have access to the loaded SWF objects
Can I handle an event inside a loaded swf file(using swf loader) using MATE when my main application fires the event ? i want to make a remote service call based on the data i get from the main applications event , and then populate my loaded swf .
If I have a BitmapData that's already been drawn onto a Sprite. Is there a way to redraw the BitmapData onto a Sprites Graphics object without having to invoke beginBitmapFill and passing in the same BitmapData?
I have a swf file sample.swf which has its actionscript class in Main.as. This Main.as has various objects declared as public in it. For instance lets consider an object myData of class MyData (in MyData.as).
I am loading this swf file in my AIR app using swfLoader. I want to know how do I access myData.func() using swfLoader.loaderInfo.content.
I have a flash code where i am loading an AS 2 SWF inside AS 3. The thing is if i put the AS 2 SWF on same domain its working fine but if i put AS 2 SWF on different domain it loads the SWF properly but the "stop()" written inside the AS 2 frame doesnt work... and it keeps on playing all the frames continuously...
I am trying to access a button inside an external swf file that I loaded. Problem is every time I try to access this button I get an error saying that it's null!
Here is my code:
public class DocumentClass extends Sprite { public var loader:Loader; public var swfFile:URLRequest;
[Code].....
Now this should work, code-wise I think its correct. The problem is that loader cant find the required button. There is indeed a button in the loaded movieClip with an instance name of "button", I double checked that.
[URL] basically i was just a layer too high and this is why i couldn't access anything..
I'm brand-new to Flash (taking a course in it), and I'm wondering if the effect I'd like to achieve is possible or not:
I have a graphic of a silk background. I'd like to add bones inside it and set poses so that the silk seems to ripple slightly. Is this possible with a bitmap image? Or only with shapes? (I've had no success so far -- as soon as I attempt to set a pose, the image disappears.) I wish I could draw silk, but I can't make it look realistic.
I have searched several threads, and no answer has been found to apply a bitmap smoothing to an image already inserted inside a movie clip on stage (not dynamically loaded). Any suggestions on what to do to apply smoothing to an image inside a clip? Trying to come up with an answer as I am getting a funny fuzz around a logo that I'd like to see disappear. It appears clean and crisp within the png file, but not in the compiled swf.
This seems like it should be simple, but... I've been trying to figure out how to do the following, and I can't seem to make it work. It all works except for the hit test part. I have a working drag and drop application. I need something different to happen when the user drops an object while the mouse x,y is, or is not over a certain (very irregularly shaped) bitmap inside a movieClip. how to do this? I have found some complicated ways to hit test between 2 bitmaps, but not 1 bitmap and mouse x,y.
I need a Bitmap to make a color map inside certain symbols. What I do is import the png file and export it to as3. After that I drag and drop it inside the Symbols that need it in the correct position. What I need to know is how to get a Bitmap child inside a symbol that belongs to a class if I can't set the instance name of that Bitmap. for ex: a Symbol of the class MyClass has an img exported as Class MyBitmapClass and Base Class flash.display.BitmapData. I want, through as3, to get this MyBitmapClass object.
I have developed a script that loads a few images and rotates them based on a timer. Well now I want to use those same loaded images for some thumbnails across the bottom.
Here is some of the code from my initial attempt:
//CREATE ARRAYS TO HOLD BITMAP DATA var loadedImages:Array = new Array(); var loadedThumbs:Array = new Array();
Trying to set the smoothing of a dynamically loaded, through XML, JPEG set to true using AS2. I've seen an example of that would do this with this code:
In my code I'm loading a series of products from an XML file. Each bit of information for each product gets loaded into a seprate array. I have a 'zoomy box' image, which loads an image, but at 200%, which I want to smooth...
The code: nZoompic1[i] = (childs.childNodes[EEE].childNodes[i].childNodes[18].firstChild.nodeValue); What the syntax would be for getting it to work?
Im trying to draw a bitmap of an dynamically loaded image via xml, and ofcourse i'd like to apply smoothing to my images, as my page resizes with the browser and creates a mess.
The images are loaded with a timer event, which fires every 200ms, and each time this occurs, I'd like to quickly draw the bitmapdata of the image so i can apply the smoothing.
My problem that im having is that the images aren't completely loaded when I run the draw method and so im left with a white box instead.
Currently im using:
Code: function itemHandler(event:Event):void { loadThumbs(event); thumbLoader.unload();
why I cannot convert a loaded jpeg to a bitmap.I've found similar posts on this forum but the solutions provided are not working for me. I have a very simple example of what I'm trying to do below:
Code: private function loadImage():void { var imageLoader:Loader = new Loader();[code]...
For whatever reason I get the error:
Code: TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Bitmap@3a0926d1 to Function.at com.ncnmar.interphaz::People01/loadedImage()
I am trying to take images I am placing in a flex canvas component to a bitmap. I was able to get to the point where I'm not getting an error but then no image shows up and the image I save out as a jpg is blank. I imagine I'm not setting the bitmap data correctly but can't figure out what I am doing wrong.
Here is the code where I am converting it to a bitmap:
I'm having trouble getting my scrollbar to work with dynamically loaded movies inside the movie the scrollbar is attached to.An example of my working scrollbar code with static data and my broken scrollbar with dynamic data can be found here: [URL]
I have a for loop that pulls data from my database, populates a topMovie(contentMain) with 20 subMovies inside it. My scrollbar is attached to topMovie. Once the data is loaded and the topMovie is populated, the scrollFace(not ScrollTrack) dissapears and the dynamic movie is not scrollable.As a test, I populated the topMovie with graphic boxes and no dynamic movies and it scrolls just fine.
Scrollbar code:
Code: scrolling = function () { var scrollHeight:Number = scrollTrack._height; var contentHeight:Number = contentMain._height; var scrollFaceHeight:Number = scrollFace._height;
I am trying to resize an image and display it on stage but i get the.......... error 1119: Access of possibly undefined property bitmapData through a reference with static type flash.display:BitmapData........this is driving me a bit mad because i got most of the code out of essential actionscript 3.0.....I've tried to debug it myself but my debugging skills aren't very good yet
I have a Moiveclip in my library exported with the class of Circle. Inside that movieclip I have 3 nested clips, with instance names of arms, feet, eyes. These moviclips are to act as place holders for loaded images and are animated on the timeline.In the Main class I load in an image called image.gif and create a new instance of Circle passing the images to the constructor.I use addChild on the Main class to add the Circle to the stage. Inside of the Circle class I can use addChild and pass the BitmapData image. But I get a null reference when I try to use eyes.addChild but I can add it to the Circles display list with addChild fine.My question is can you add to a nested movieclips display list and if not what would be the best way to set this up?
I've tried a bunch of options but can't seem to smooth a dynamically loaded bitmap from another domain. I've come to believe this is impossible without a cross domain file. Is it possible or not possible?
I keep getting:
SecurityError: Error #2123: Security sandbox violation: LoaderInfo.content: http://....swf cannot access http://...png. No policy files granted access. at flash.display::LoaderInfo/get content() at Main/showLogo()
So outside of putting a crossdomain.xml file out there, any options?
If I drag a bitmap onto the stage, and add a slider to scale it, I can scale it immensely large, over 80,000 pixels wide. Yet when I load the bitmap using the Loader class, it disappears when scaled beyond a width over 8000pixels. What's going on that makes one seemingly infinitely scalable, and the other limited?
I'm loading a bitmap with FileReference.load() and than dump the byteArray into a Loader object and than add that loader object to stage.The problem is that regardless if I load the loader into a Sprite or add it to the stage, neither the loader or the sprite don't have width or height. It's always 0. So I can't scale the image as I don't know it's dimensions
I have a class that loads an image and offers you the ability to have it in a bitmap or bitmap data object available after the image has loaded. But when I try this:
I have gallery which I want to modify. Now, I load big image on the stage by clicking thumbnail menu. I can see a small preview of that thumbnail on mouse over. Thumbnail preview is done by cloning thumbnail image and nest that image into thumbnail preview window.
[Code]...
However, it did not work yet. I do something wrong. I am wondering if someone can help me to figure it out. I spent a lot of time to modify it as It looked like a simple thing but without any success. I will provide more information if needed. The project consists of many classes I can explain more if the information I provided is not enough.