Actionscript :: Animated "blob" In As3?
Jan 11, 2012
I am currently playing around with a blob code and have a small problem.The problem is that sometimes the blob gets inverted so the white color gets inside the blob itself and makes a white hole in it which I don't really want.
class Blob extends Sprite
{
private var speed :Number = .01;[code]...........
View 1 Replies
Similar Posts:
Nov 30, 2010
I'm trying to save a byteArray to a blob.
The save method looks to be working:
Code: Select allpublic function SaveImage (Image $im)
{
$ba = new Zend_Amf_Value_ByteArray ( $im->bArray );
$data = mysql_real_escape_string ( $ba->getData () );
[Code].....
In Flash I'm getting my Image class back but the byteArray seems to be 0
View 2 Replies
Jul 29, 2011
I've got 3 columns in an SQLite db I built with Firefox's handy SQLite Manager. So, I created 3 columns, an index/reference that's just an incrementing INTEGER for easy reference, a descriptive title of the image (so it can be searchable later) in a TEXT, and a BLOB type that holds the pngs.
I'm trying to add this in an assets folder into my project (as a pre-populated database) and display the blob images, one at a time, in a window one after the other, scrollable by user. This is where I'm running into problems. Eventually I want to be able to encrypt it and add a search tool, but first things first, and that's displaying an image.
I have spent several hours scouring the web about this topic, but there isn't much help out there: Adobe has tips about using SQLite with AS3 (their reference documents and the support section of their website have some overview articles) but nothing refers to reading blob data in depth.
On this site, I've found some references to Adobe Air looking for extra byte information when reading blobs since they have a different syntax to write to the databases created within the program. See: What is the first bytes in a Blob column SQlite Adobe AIR? Blob Sizeinfo?
View 1 Replies
Aug 2, 2011
My Mysql database stores images (in PNG, JPG)of our personnel and it's field type is set to longblob.
Is there any possibility to load blob data type using HttpService and render it in Image component in Flex
I'm eager to know about as it comes in handy in the nearest future!!!
View 2 Replies
Jun 8, 2006
I have a logo that I made in Fireworks, and it looks decent, but I was wondering if anyone could mimic it with movement. For example, if someone could use actionscript to make it "wiggle" or wave like a flag in the wind, that would be awesome.
Notice how the blue line itself stays at about the same thickness (it barely starts getting thicker), but the shading around it thickens as it goes more and more to the right.
Here's the image (ignore the text):
View 1 Replies
Jan 5, 2004
I was browsing the net and came upon this site, which has a really cool blob-like borders effect. I really wanted to learn how to accomplish this effect, here's what I know as of now:
1. I must have an array of points, connect them using curveTo and fill it. For this I have to use this methods:
createMovieClip, lineStyle, beginFill, moveTo, curveTo, endFill
2. Then I must have a proximity detector for each point, more or less like:
dx = point._x - _xmouse;
dy = point._y - _ymouse;
distance = Math.sqrt(dx*dx + dy*dy);
And if the mouse is too close to the point make it move away with a certain velocity (but only if the mouse is moving, if it is still, just make the blob wobble for a while, using an elasticity effect).
point._vx += point._ax;
point._x += point._vx;
Where the acceleration must be a fraction of the distance we calculated before:
k = .2; // example
point._ax = distance * k;
But we must also have damping so we can have the elastic movement, so:
damp = .9; // example
point._vx += point._ax;
point._vx *= damp;
point._x += point._vx;
3. Finally when the mouse is clicked on a blob we must communicate with the others and make them all wobble, by using LocalConnection. How do I make the array with all the points and access them?; how do I impose the proximity detector into each point and make the curveTo's change?
View 3 Replies
May 9, 2011
I have a flex application which is hosted on Azure.
I have some data stored in a blob in a private container.
How can I use URLLoader to display the data? If I use a public container , then I am able to read from the blob in my application. However, if the type of the container is private URLLoader fails.
View 2 Replies
Sep 1, 2006
I have been tyring to export an animated banner, in animated.gif format. it's a simple animated text with no gradients. it should go on top of a graphic which has some gradients and is multi-coloured and with effects (the colours are similar to the one/i used in the page) as you can see here the text looks a bit funny.url...
View 3 Replies
Sep 8, 2011
I need to be able to save and load images into an SQLite database using Flex 4.5 for a mobile application. The use case is this:
Inside the view there is a spark Image object with a URL as a source
When user clicks button, the Image is saved to an SQLite db inside a BLOB field.
In a separate Image, the source is set to the ByteArray stored in the db.
The biggest question so far is this: where do I get the ByteArray for a loaded Image? I've tried debugging and inspecting Image, BitmapImage, and BitMapData but there's no sign of the byte array.... perhaps it's inside the ContentLoader? But that's null unless I enable caching.
I've done some research and there are no complete examples for how to handle this. I've written a simple View that anyone can copy and paste into a new project. It will compile without errors and can be used for testing. I will update this code as I get the answers I need so that anyone can have a fully working example of this workflow.The only caveat: I used a synchronous connection to the DB to avoid complicating the code with event handlers, I wanted to keep it as simple as possible.I will only mark this question as answered once it is fully functioning both ways.
UPDATE SEPT. 09 2011: The code below is now fully functioning in both directions (save and load). Here are some of the things I've learned: It turns out that the ByteArray of a spark Image can be found inside the LoaderInfo of the image itself. Like this:
image.loaderInfo.bytes
However, trying to set this ByteArray as the source of another image ( image2.source = image1.loaderInfo.bytes) results in this security error: Error #3226: Cannot import a SWF file when LoaderContext.allowCodeImport is false.Which is too bad because it would save so much time and processing power.the workaround is to encode the ByteArray using either a JPEGEncoder or a PNGEncoder. I used the JPEGEncoder which produces much smaller files. Here's how:
var encoder:JPEGEncoder = new JPEGEncoder(75);
var imageByteArray:ByteArray = encoder.encode(imageToSave.bitmapData);
Now the problem is saving these bytes to the DB. Saving them as they are now will not work once we read them out, I'm not sure why. So the solution is to encode them into a base64 string like this:
var baseEncoder:Base64Encoder = new Base64Encoder();
baseEncoder.encodeBytes(imageByteArray);
var encodedBytes:String = baseEncoder.toString();
So now just save that string into the BLOB field and later read it out. However, you have to decode it from a base64 string to a ByteArray like this:
var encodedBytes:String = result.data[0].imagedata;
var baseDecoder:Base64Decoder = new Base64Decoder();
baseDecoder.decode(encodedBytes);
var byteArray:ByteArray = baseDecoder.toByteArray();
Now assign the bytearray as the source of your image and you're done. Simple right?if you find any optimizations or alternative ways to do this.I will respond and keep this code updated if need be.
View 2 Replies
Jan 20, 2012
Am I completely hallucinating or what ? That's several years I'm working with Flash, and today, i want to do the simplest animation ever, and it just doesn't work....I want to mask an animated clip with an animated mask (a shape animation), but every time the mask arrives at a keyframe, the clip restarts to the frame 1 !!I added a piece of code to see at which keyframe it is blocked, and at every mask keyframe, the code says 'TypeError: Error #1009: null property..
View 2 Replies
Mar 27, 2012
I am having trouble loading .swf files to my flash app off my cloudstorage account on azure. images and videos load fine but .swf files return this error:
SecurityDomain 'http://localhost/' tried to access incompatible context 'http://[---].blob.core.windows.net/content/swf/Lib_En.swf'
[Code]...
View 1 Replies
Oct 27, 2010
I am trying to get a bitmap to spit out just straight black and white for blob detection purposes.. but my image processing function (below) is spitting out black and transparent instead of black and white... can someone tell me what my pee brain is doing wrong
[Code]...
View 0 Replies
Aug 30, 2010
var imageData:ByteArray = new ByteArray();
var headshotStatement:SQLStatement = new SQLStatement();
headshotStatement.sqlConnection = dbConnection;
[code].....
View 2 Replies
Jan 15, 2011
Im using an animated movieclip to create a pulldown menu..the thing is that I want to anymate the buttons inside the pulldown as well..so I therefore used a similar movieclip inside the pulldown menu to make this animation
View 1 Replies
Dec 12, 2011
I'm using:
[Code]...
But I keep getting an "Error #2030: End of file was encountered." This is (probably) because the class I'm serializing is too big for the "String" object type in AS3. Is there a limitless object for storing an array of characters (or better yet binary), or am I going to have to make my own class? (like one with an array of strings)
View 1 Replies
Sep 5, 2009
Whenever I export a .fla to an animated GIF, the resulting image looks rather pixelated. I've seen other GIF animations online that look less pixely than mine. Are there some settings that I don't know about?
View 2 Replies
Oct 9, 2010
I recently got Flash CS5 and began working with it on some things. One thing I was making was a simple animation that I was going to publish as an animated GIF. However, upon completing my animation, I've been unable to publish it as one. I can get it to publish as a GIF, yes, but it only shows the first frame.
My Publish Settings for GIFs in Flash CS5 are as such:
Playback: Animated, Loop Continuously
Options: Optimize Colors checked
Transparent: Opaque
Dither: None
Palette Type: Web 216
Are there any other settings I may be missing to ensure I can publish as an animated GIF?
View 4 Replies
Jul 6, 2009
I'm creating a simply animation with background images fading in and out. I've done that part.Now i want to add some animated text (simple scroll to middle of movie), i have it fading in ok, but i want to make it look a little bit more realistic.By this i mean, i'd like it to move towards the centre of the movie, but slow down before it stops at the centre.At the moment it simply moves accross the screen at one speed and then stops abruptly. Doesn't look good.
View 2 Replies
Nov 14, 2010
For my project development i want to do animation on jpg image.
View 5 Replies
Aug 13, 2003
how to create an animated signature? You know, as though it's been drawn / written on screen.
View 5 Replies
Nov 14, 2000
How do I import my animated gif into the FLA??
View 5 Replies
Sep 22, 2008
Main requirements for that gallery are:- must be updated via xml file- must be auto resize- thumbnails must be floating like in example- also must have preloaderhat's allIt is my first serious project with flash and it will be good to get any tips how to start doing all of that.Especially I am interested how it is possible to make such floating thumbnails which are also preloading.
View 2 Replies
Jun 1, 2009
[URL] the above site has small animated buttons that run through a sequence continuously until the user positions their mouse over the button then it launches into a 2nd sequence (all in the same movieclip). inside each movieclip there is the entire sequence and the first half is the bit that runs continuously - the second half is the mouse 'overstate'. the top layer has an invisible button and the action script:
[Code]...
View 3 Replies
Feb 14, 2010
Yesterday I worked on an educational activity for adult English as a second language students similar to this one and the two pages worked perfectly.However, when I tried to make another page today that incorporates animated gifs, I ran into problems.I lost the ability to embed sound on the down state for all objects on the page.I am using Vista updated, and KoolMoves 7.4.1.I used these steps:
1. Import an image (jpeg) on to the stage.
2. Clicked on it and selected make it a button from the tool bar
.
3. In the OVER State, I drew a layer over the image and made it transparent.
4. I moved to the UP State, copied the OVER State, and added the word.
5. I moved to the DOWN State, copied the OVER State, and returned to the Main Movie.
6. I then right clicked on the image to show properties and changed the sound to YES, went to the down state, and linked to the sound.
7. I then saved, previewed in Play in Browser Window, and the two previous images with sounds (which worked perfectly before I worked on the gif) and the animated gif do not play sound.
View 1 Replies
Feb 25, 2010
I am using Flash CS3 to create a button for a site I am building in Dreamweaver CS4. The button I am trying to create looks like a volume knob on a guitar amp. I need it to point to zero and then "turn up to 10" over a period of 3 seconds when the user hovers over it. It also needs to play a sound. I have created seperate images in photoshop for the knob pointing at each increment 1-10. I added these to a new Flash doc on separate layers. Saved it and it plays as expected when in preview. However I cannot figure out how to get it set in a button. I have created simple buttons but not one that "plays a longer animation" like this.
View 2 Replies
Dec 16, 2010
I have made a christmas card in flash - but I need to export it as an animated gif of it - which I can do easily enough - my proble is the quality - it defaults to screen 72dpi but if I want better resolution it increases not only the DPI but the actual file dimensions - mega large.How can I get around 150-200 DPI and retain the original canvas size?
View 1 Replies
Jan 25, 2011
I have an animation about 30 frames long, the dimensions are 500x700 pixels.I want to use swf instead of gif because of better quality. So should I use png's or jpeg's to animate the swf?Which format does flash like better?
View 7 Replies
Jun 5, 2009
i am trying to create an animated button, using a Movie Clip.
1. I create a Rectangle with a fill.
2. I convert it to a Symbol (Movie)3. Double Click on the graphic to create it's on Timeline.4. Why do i then need to convert to a symbol again?It will not animate unless i convert that timeline button again.
View 3 Replies
Sep 1, 2009
Can you export an animated GIF in Flash? i know you can export a "regular" GIF but what about animated ones..?
View 6 Replies
Sep 12, 2009
I made an animated gif in adobe flash, but when I export it as a gif, the quality is ruined. I know there is a way to make high quality gifs in flash, as shown here:URL...But when I follow those steps and publish it, the gif turns out to be a blank frame.
View 3 Replies