ActionScript 2.0 :: Loading Bitmaps With Custom ARGB Data?

Mar 31, 2010

BTW, this should be in actionscript 3.

What's the fastest way to dump your data (not in a file) into a bitmap for display?

I had it working with setPixels and colored rects but that's way too slow.

Is there a way to load in the raw bytes or hijack the loader class to put in custom loader data?

View 0 Replies


Similar Posts:


ActionScript 3.0 :: Creating Bitmaps From ARGB Strings?

Mar 31, 2010

what's the fastest way to dump your data (not from a file) into a bitmap for display?I have it working with setPixels and colored rects but that's way too slow.Is there a way to load in the raw bytes or hijack the loader class to put in custom loader data?

View 11 Replies

Actionscript 3 :: Creating Bitmaps From ARGB Strings?

Apr 1, 2010

in actionscript 3, what's the fastest way to dump your data (not from a file) into a bitmap for display?

I have it working with setPixels and colored rects but that's way too slow/inefficient.

Is there a way to load in the raw bytes or hijack the loader class to put in custom loader data?

What would be the best/fastest--should I start writing a byte encoder?

View 1 Replies

Data Integration :: Loading XML Using A Custom Class And Accessing It From Other Classes?

Aug 30, 2006

I began with a class for a movie clip rollover function FigureRollOver. It works marvellously. Three things happen:

1) it loads XML from a file "mod1_fig1.xml" and uses another class, XMLMember, to retool the scoping of the XML so that I can get at it

2) an onload call inside of XMLMember calls the myOnLoad function and transfers the XML into an array.

3) so long as the array is finished building, rolling over a movie clip attaches a new movie clip with the rollover text in it.But I don't want all those functions in one because I need it to be more dynamic, starting with being able to load any old xml file instead of just "mod1_fig1.xml", plus it seems lik overbuilding to have all of that in one class, so I've separated out the loading of the XML and building of the array into its own class, FigureXMLLoader. FigureRollOver is then left to just attach the rollover with text in it, extracted from the array built by the new class.

Problem is, though the array builds inside FigureXMLLoader, I can't figure out how to make it available outside the class. I know that I'm constructing things in the wrong order, and that the array needs to be somehow built inside the class function to be available, but I can't figure out how to do that. A cruddy work-around is to put a function call at the end of the building of the array, which calls yet ANOTHER function on the main timeline of my .swf to put the array I've just built into a new variable.This works, but it's messy. It seems like I should be able to have one line of script in the .swf that generates an array on the main timeline (or just a public array) which I can then access from my FigureRollOver class:

var myRollOvers:Array = new FigureXMLLoader("mod1_fig1.xml");

Here is FigureXMLLoader (see comments in the code for more details) which obviously does not return an array as it is, because of all the working around I've had to do. Note the "testing" variable, which can be traced from the main timeline of the .swf, but I will get "not what I want" because of course the array hasn't been built yet, and never will be, inside of the declaration as it is. How do I get it in there so I can return an array?

View 2 Replies

ActionScript 3.0 :: Return Data From Custom Class On Complete Loading?

Feb 11, 2010

How do you return data from a custom class, and only when something in the custom class has completed something. For example, let's say I have this code in the custom class[code]...

This, of course, doesn't work. I need the whatever.getLoadedObject() method to wait until the loading has finished inside the custom class then do whatever with the image loaded.

View 2 Replies

ActionScript 3.0 :: Redraw Multiple Bitmaps From XML Data?

Dec 27, 2009

I've been trying to get the hang of working with bitmaps.  I can redraw them using draw(), and after some trouble managed to redraw an externally loaded file using copyPixel().  What I can't do is redraw several images loading from XML.[code]...

View 3 Replies

ActionScript 2.0 :: Saving And Loading Bitmaps?

Jun 5, 2007

Ok I wrote an application where I have panels that the user can draw on, kind of like paint, but they can create panels. Now I want them to be able to save and load their work. Using Quasimondo's bitmap exporter, I was able to save a bitmap (200x200), and the application prompts the user where they were to save the image file. However, my problem is that the user will probably have 6-12 panels to save, and so I want the program to save all those panels so they can be loaded later.

Now in order to load, I don't want the user to manually select each panel to load. I want the user to select one file and it will load all the images into the panels. I was thinking about maybe loading a zip file and flash would extract the images and load them, but I don't know if that's possible. I think the user would need to select an XML file,which would direct Flash to what files to load and in what order. For this, and I'm assuming when it saves the flash application/php, it would need to write a new xml file.So I guess what I need to know how to do is:- How do I get flash to save several images to the server or the users hard drive- flash to generate an xml file- is there any way to make flash combine all the files into one file so that the user doesn't have to deal with several files?

View 3 Replies

ActionScript 3.0 :: Loading Bitmaps From The Library?

Feb 11, 2009

I've been learning AS3 for a while now, and it's my first Actionscript language, but not my first coding language. I've learned a lot so far, but I started off doing things in the not so efficient, or correct ways. I was putting all of my actionscript on frames. I'm trying to get in the habit of doing it the right way now. But I'm having a basic problem. I can't figure out how to load a bitmap from the library in AS3.

View 6 Replies

ActionScript 3.0 :: Loading Bitmaps On Runtime?

Feb 18, 2009

To do this does it mean that I have to store them in another external location rather than my library and only load them when I need to use them from a URL request?

View 2 Replies

ActionScript 3.0 :: Loading Bitmaps Into BitmapData?

Mar 5, 2009

I want to load .jpg images into flash and store them as BitmapData objects. I've coded the loading of images many many times but I've never tried to store them as BitmapData, I just usually add the Loader to the display list and manipulate the image through its loader.

I feel like this is a very poor approach and so I want to try just saving BitmapData, because on the Model side of things thats really all I need.

Now the only way I have found to extract BitmapData from a loaded JPEG is to load the JPEG and upon completion write:

myBitmapData = Bitmap(loader.content).bitmapData;

First, is there a way to extract the BitmapData without encumbering the code with the Bitmap class? In other words, is there a way to extract that information without involving the Bitmap class - BitmapData while useful for a Bitmap is not dependent on Bitmap so ideally I would never involve Bitmap here.

Also, why is this Bitmap type-casting so widely accepted? loader.content is a DisplayObject and therefore is not necessarily compatible with Bitmap. Further, for all Flash knows we just loaded an SWF and as far as I know you can't typecast that to a Bitmap.

View 1 Replies

ActionScript 3.0 :: Comparing And Matching Bitmaps Against An Array Of Saved Bitmaps

Jul 31, 2009

I'm trying to figure out the best way to compare a single bitmap against perhaps an array of saved bitmaps to see how close of a match it may be to any one of the bitmaps stored in the array. Right now I'm running a for loop that uses the bitmapData.compare() method to try to compare to see how much of a variance there is but... to be honest I'm at a loss as to how to use the resulting data to do so. Does anyone know of any good method to accomplish what I am trying to do? Forget looking at my code it's a waste of time because simply, it's not working.

View 4 Replies

Data Integration :: Loaded External SWF Gets Blurry Fonts/bitmaps

Jun 1, 2006

When i load an external swf file it looses quality and renders blurry. But the swf itself (the external one) looks perfectly fine standalone. Now i ask myself, is this really a flashbug or what the heck is it?

Because i wrote an elearning player wich references hundreds of this files, its not very funny to see the quality dropping. To get some meat for you, i created a small site, wich should make the problem much clearer:

Click here and explore the strange bug

View 4 Replies

Bitmaps - Loading Graphics From Game Into SWF File

Dec 17, 2009

I have 2 questions regarding bitmaps. Say I'm loaing graphics from a game off a server into a .swf file:
1) Which format is the best to use - gif, jpeg,png? (for non transparent images)
2) When a user plays a .swf movie it gets saved to their browser cache and its loaded the next time they access the same file, but when your externally loading images does flash have to re-download all the images or is it all stored in the browser cache?

View 2 Replies

ActionScript 3.0 :: Loading Bitmaps And Storing In Array?

Mar 19, 2010

I'm trying to setup a program that loads a set number of pictures (the exact number is stored in resources/data.txt). Pictures are labled picture# starting at 0 and increasing.

My problem is that I want to store the loaded pictures, which is giving me trouble. When I try to trace the bitArray length, it says it is zero..

My Code:

//Variable Initilizing
//Loaders:
var mLoader:URLLoader;[code]....

View 8 Replies

ActionScript 3.0 :: Loader Event/loading External Bitmaps

Nov 30, 2009

I have my .fla file and .swf file in a folder on my desktop

i want to add to that file a bitmap. everytime my flash project receives a the String "loadBITMAP" i want it to reload that bitmap into a designated area on the stage. (i am using a system of binary sockets to recieve data, but don't worry about that...i know how to process that already.) so basically my code will say

Code:
if(socket.readUTFBytes="loadBitmap"){
need code here on how to load bitmap
}

View 21 Replies

ActionScript 3.0 :: Bitmaps Loading An Image And Tracing The Result After The Loader Completes

Dec 12, 2009

I'm trying to clone / duplicate an object loaded in at runtime via the

--
ldr = new Loader();
var mRequest:URLRequest = new URLRequest(targetFile);
--

technique. The problem I think I'm having, is in understanding what exactly the loader returns and how it can be used. after loading an image and tracing the result after the loader completes like this ...

trace(ldr.content); // - traces [object Bitmap]

I have a fuction I built that returns an arrar of clones / duplicates of a passed bitmap ...

[Code]...

View 2 Replies

Actionscript 3 :: Rgb - Translating HEX To ARGB?

Mar 3, 2010

i'm studying getPixel32() and the Bitmap and Bitmap Data classes.Basically, i'd like to know how to output a simple trace of an ARGB from a hexadecimal value.as an aside, i'm under the impression, which i assume/hope is wrong, that hexadecimal values can't produce as many colors as RGBA values.perhaps "web safe" has thrown me off with understanding the usefulness or desire to use colors produces with hexadecimal values.

View 1 Replies

ActionScript 3.0 :: Create ARGB From RGB And Alpha?

Mar 21, 2011

How is it possible to create an ARGB value from an RGB value (ex: 0x00FF00) and an alpha value (ex: 0.5) ?

View 1 Replies

Javascript :: Long Decimal Number: Extract The ARGB Values Individually

Nov 1, 2011

I have colour values from a Flash application that are ARGB format(A being the alpha/transparency value). I have to convert that long decimal number to a RGB/Hexadecimal number in Javascript. Do you know how I can extract the individual R, G, B & A values from a long(8 digit) number? Here's my function which converts a number to hexadecimal BUT its not good enough because it needs to convert the values individually(R,G,B,A):

[Code]....

View 2 Replies

Data Integration :: Loading Data From Php Page Into StartLoading();

Aug 10, 2008

Loading data from the test.php into the startLoading();

How do I load the data from test.php "echo $photo_out;" into the startLoading();

loadVariables("test.php", this, "POST");
infoField._visible = true;
startLoading(test.jpg);

[Code]....

View 16 Replies

ActionScript 2.0 :: Saving Data And Loading Data From A .txt File?

Sep 24, 2006

I have read through Shared Objects but i couldn't get it work...

I just have to save my data, maybe array into .txt file and later on
retrieve from the same .txt file...

Anyone here have an example or some source code so i can have reference on it?

View 6 Replies

Data Integration :: Loading Data From Xml File?

Jan 26, 2008

I am attempting to get data from an xml file load in flash. I followed a tutorial in a new fla and it seemed to work fine, I then tried to adapt it to my own needs which worked fine. But then when trying to implement this into my news section it doesn't seem to work. I am trying to make a news section, that displays the date and news article. This is in within a movie clip, I even tried putting it in the timeline of the scene but still nothing.

- I have 2 dynamic text boxes, date_txt and news_txt

- The xml file is named news.xml,

- both the fla and the xml are in the same folder


This is the actionscript I am using:

function loadXML(loaded) {
if (loaded) {
_root.thedate =

[Code]....

View 1 Replies

ActionScript 3.0 :: XML To Custom Data Class?

Jun 8, 2009

I am trying to take some XML from a web service that looks something like this:

<User>
<UserData>
<ID>1</ID>[code]....

That works. However I have been unable to manipulate that into an XMLList. (I'm not sure that is the best course of action however.)I have tried this:

var
myXMLList:XMLList = x.UserData;

and var myXMLList:XMLList = x.User; Neither of these work. (Again, not sure if this is even what I need to do.)

View 4 Replies

AS3 :: Pass Custom Event Data

Aug 9, 2010

I am trying to pass custom event data from 1 class to another class...here is my codes..[code]

View 2 Replies

Actionscript 3 :: Getting Data From Custom Classes?

Oct 27, 2010

How can I get some var / data from a custom classes?The XML class

package classes
{
import flash.net.URLLoader;

[code].....

View 3 Replies

Actionscript 3 :: Map Data Types To Custom?

Jan 24, 2012

Consider the following function:

public function foo(bar1:int, bar2:uint, bar3:String, bar4:Boolean):void{}

What I want is to have the different types of data represented by custom named types which are essentially representing the original data types. In other words, I would like to proxy the data types and have a valid function as following[code]...

View 3 Replies

ActionScript 3.0 :: Vector Of A Custom Data Type?

Aug 17, 2009

Below is basic structure of LetterClip class which extends WMovieClipwhich inreturns extends Movieclip Class.
 
public class LetterClip extends WMovieClip
 {
public function LetterClip(char:String):void

[code]...
 
Error occurs at the push statement.It throws the given below error only when the same activity is executedsecond time in a sequece.
 
TypeError: Error #1034: Type Coercion failed: cannot convertorg.waterford.activity.erp.erp1.r1lt08.clipclass::LetterClip@282e9281 to org.waterford.activity.erp.erp1.r1lt08.clipclass.LetterClip.#Operating System: Windows XPBrowser: Microsoft IE

View 1 Replies

Flash :: Custom CellRenderer For A List With XML Data?

Sep 14, 2010

I have a Game-sprite representing a game room with up to 3 players, it works ok. And would like to populate a List component with those Game's, based on an XML data coming from a socket.I've prepared a simple test case demonstrating my problem -ListTest.fla (should have a List component in its Library):

import fl.data.*;
import fl.controls.*;
stop();

[code].....

View 1 Replies

Flex :: Attach Custom Data To Elements?

Aug 23, 2011

Is there any way to attach custom data to elements? Kind of like the $.data() function in jQuery?I know you can subclass and element and add custom parameters, but it would be an overkill to create custom class just to add a single custom parameter.

View 4 Replies

Actionscript 3.0 :: Share XML Data Between Custom Classes?

Apr 26, 2011

I have an application where I'm loading in XML data externally. What i'm trying to figure out is the best way to store this data in my application so that I can pass the relevant XML or data to my custom classes.

Basically I have a navigation and gallery class I have written both of which are instantiated on the document class, I would like to pass them each their corresponding XML. My question is whether I should store or seperate the xml into objects in the document class first, or simply pass each class its own xml node? Is there another/more preferable way to handle XML data between custom classes?

View 2 Replies







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