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


Similar Posts:


ActionScript 3.0 :: Load Bitmaps / Vector Graphics In Application

Jul 28, 2011

I want to have DisplayObject that will randomly contain bitmaps/vectors from some database. I want to implement this using only code. How?

View 1 Replies

Professional :: Loading Vector Graphics File Format In IOS Converted App?

Mar 9, 2011

I'm going to create a iOS app in flash and convert. I'm thinking I may want to load graphic assets at runtime. I'd like these assets to be vector graphics so they can be resized easily with no quality degradation. I usually use SWF files ofr this purpose. Unless I'm wrong, a converted iOS app probably does not load SWF files. So I'm wondering what kind of vector graphics file format can iOS load at runtime?

View 1 Replies

ActionScript 3.0 :: How To Add 3D Bitmaps To 2D Game

Oct 20, 2009

I wish to add some 3D bitmaps to my 2D game. Everything is currently drawn via copypixels into the only movieclip and that is rendered. Am I correct in that I need to create (for example) a sprite, add a bitmap to it, perform all my 3d transformations and then simply .draw the result into my bitmap? If so are there any simple examples of doing so, also what about camera, focal length, perspective etc. etc. Are they taken into account before the .draw?

View 0 Replies

ActionScript 2.0 :: Attach Graphics Instead Of MC Cause A Graphics File Size Is Relatively Small Than That Of A Graphic?

Apr 9, 2005

I was wondering about MC and hey can help to lag a game out. I set up an advanced class system so i don't have to use MC to simulate walls, all i use isthe x,y,width and height. Well anyway since i don't need MC anymore I was wondering if there is a way to attach Graphics instead of MC cause a Graphics file size is relatively small than that of a graphic, I think. If anyone could tell me thats true and show me a way to attach graphics that would be nice. I haven't tried it yet but maybe if I exported the graphic from the library imihgt be able to call its name, but it doesn't have an instance name so im stuck.

View 2 Replies

Actionscript 3 :: Flash Game - High Score With Graphics Not With Text

Jan 1, 2010

is it possible to use graphics (the numbers 0-9 in one png-file) instead of a Textfield to show the high score of a game to the player? With a TextField it is easy to "refresh" the score but what can I do, if I want to use my png-files for the score? Is there a simple way to do this? How are other flash game designer do it?

My current solution (not tested, just in my head) is, to create 10 bitmaps (numbers from 0-9) or 1 bitmap with all the numbers in it and then convert the current score into a string, split this string and for every digit show the matching bitmap. Update: or should i try to use filters on the textfield to create a "more beautiful" score?

View 2 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

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 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

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 2.0 :: Publish Flash File Certain Graphics And Text Are Disappearing From The Swf File?

May 27, 2010

can anyone explain when I goto publish my flash file certain graphics and text are disappearing from the swf file?

For instance just some static text and also a graphic i've copied three times.. two show up but the third doesn't? really annoying help!

View 2 Replies

ActionScript 3.0 :: Game That Populates User-designed Cards Into The Game Using An External Xml File

Apr 24, 2011

I'm making a game that populates user-designed cards into the game using an external xml file. My main class loads the xml file and then calls to the "Card" class, which wants to use the xml file. I've tried using this.parent and it just gives me a null object reference error. This is what I have so far: Main.as

[Code]...

View 2 Replies

ActionScript 3.0 :: Draw A Series Of External Bitmaps Described By An XML File

Sep 7, 2009

I'm trying to draw a series of external bitmaps descriped by an XML file.

[Code]...

Rather than draw out all of the images described in the XML file, it draws out the last file as many times as there are keys in the XML array (in this case, it draws the last image three times). When I just add it as an image, without having to load them as bitmaps objects, it works fine, but then it won't let me adjust the width and the height of the images.

View 9 Replies

Flex :: Import Vector Graphics File *.ai File?

Dec 20, 2009

can i import vector graphics file *.ai file(illustrator generated) into flex3 ??

View 2 Replies

ActionScript 3.0 :: XML CuePoint Loading Graphics

Aug 24, 2009

So I have this bit of code that pulls text from within the "caption" tags in the XML file and displays it in sync with the cue points...it works great.

Code:
caption_mc.setText(String(xmlData.cuepoints.cuepoint[i].caption));

I sorta understand how it works but not enough to convert it to pull a graphic. I assume it would be something like:

Code:
graphic_mc.setGraphic(URL(xmlData.cuepoints.cuepoint[i].caption));

View 0 Replies

ActionScript 3.0 :: Loading Vector Graphics At Runtime?

Oct 20, 2009

I'd like to know if there is any way or any vector graphic file format that i can load dynamically at runtime on a web-based flash application.I have some files in pdf that i want to load in and i can convert them to jpgs at runtime and load the jpgs but then i lose vector graphics so when i zoom in and out they become pixelated.
 
I had a look a look at flashpaper to convert pdf to swf and load them in but i can't see anywhere in the documentation about converting the pdf's at runtime rather than manually dragging and dropping them in.So far i've looked at pdf, svg and .ai but none of these can be loaded at run time just imported into the .So can this be done? Or alternatively is there an application that can do the pdf -> swf conversion from the commandline then i could trigger php to do the conversion at runtime.

View 3 Replies

ActionScript 3.0 :: Working With Graphics From .as File?

Feb 2, 2010

I copied code from one site and saved as Test3D1.as. The code is:

Code:
package
{
import flash.display.*;
public class Test3D1 extends Sprite

[code]....

and tested it again. I got message "test" in output window, but still no graphics.

Code:
import flash.display.*;
var ellipse1:Sprite = new Sprite();
ellipse1.graphics.beginFill(0xff0000);

[code]....

View 3 Replies

ActionScript 3.0 :: 1119: Access Of Possibly Undefined Property Graphics Through A Reference With Static Type Flash.display:Graphics.

Oct 8, 2009

i am trying to receive in my function as a parameter either a shape or a sprite and then access their graphics property, but this gives me an error:

Code:
public static function makeRect( obj:DisplayObject, ...
var g:Graphics;
if(obj is Sprite){

[code]...

//1119: Access of possibly undefined property graphics through a reference with static type flash.display:Graphics.

View 1 Replies

Flash Games - When Game Page Loading , The Flash Game Itself Does Not Appear?

Feb 15, 2010

When game page loading , the flash game itself does not appear ( just white area as the holder of the flash game) untill the game almost finish downloading, then it appears .. This long waiting with just white area makes visitors leave, thinking there was nothing there.

View 1 Replies

ActionScript 3 :: Flex SDK 4.6 - Using FXG File For Simple Graphics

Mar 1, 2012

I have flex sdk 4.6 installed and I want to compile AS3 class that uses FXG file for simple graphics. I have and fxg file called Speaker.fxg and I tried to import it like a package
import Speaker;

But when compiling it returns
Error: null

Also tried this
[Embed(source='Speaker.fxg')]
private var Speaker:Class;
private var sp:Sprite = new Speaker();
[Code] .....

I used the fxgeditor air app from here [URL]. I also tried using A. Illustrator exported fxg file and it compiles but the swf is blank.

View 1 Replies

ActionScript 3.0 :: Convert Graphics File To MovieClip?

Dec 20, 2009

I am trying to display photos as a slideshow with some transitions effect. I am having error when using TransitionManager, the error code is

"1067: Implicit coercion of a value of type flash.display:Loader to an unrelated type flash.display:MovieClip."

To me it seems like TransitionManager can only be used in MovieClip and the XML file is link to .jpg.

Is there a code to convert the Graphics into MovieClip and make the code work. Or is there a better way to do the slide show using XML data.[code]...

View 2 Replies

ActionScript 2.0 :: Project That Has An FLV With Cue Points Controlling When Graphics Appear In The Swf File?

Aug 4, 2010

I've got a project that has an FLV with cue points controlling when graphics appear in the swf file. The graphics are being loaded into empty movie clips via AS on the stage (everything is being loaded and unloaded into the first frame of the main stage). What the client wants is a pause button that will pause/play both the FLV and graphics being loaded in the swf.

View 1 Replies

Make Graphics Outside Of Stage Appear In Final Swf File Online

Jul 7, 2009

I have a client who wants some graphics to appear "coming onto the screen from the sides." They are flames, to be exact. She does not want them to just come in inside the "box" (stage). She wants them to appear coming in from the sides of the browser window. Is there a way to do this? That is, can you make graphics or movie clips that start off outside of the frame appear in the browser when the swf file is saved?

View 2 Replies

Professional :: Reduce File Size Vector Graphics

Jun 16, 2010

When it comes to imported vector graphics are there any methods to decrease the swf's file size as much as possible? So far I have:

- imported an illustrator ai file (strokes 'expanded' in illustrator and unneeded swatches/ brushes etc. deleted and with no raster images embedded)
- exported the file in illustrator as swf and imported that swf into flash
- imported ai file and breaking it down to flash shapes
- optimized those shapes as much as possible
 
I rather use vector as much as possible. For a banner for examle, I've imported vector images of trees. I couldn't get it below 40 kb so I exported all illustrator files to png files which helped. Can detailed vector images be optimized just as much? Or is it better to use bitmap files when it comes to more detailed graphics? Does it matter if it is a vector images made in flash or a imported vector file even if both have the same number of paths?

View 1 Replies

ActionScript 3.0 :: Loading Flash Game In Flex 3

Aug 21, 2009

I am trying to load a flash game in flex but the game does not work the same as it does in the flash player. The game was made using AS2 but I read somewhere that is should play without errors, that is not the case. Played normally the guns shoot the enemies no problem but in flex the bullets just float around the enemies never hitting them. It is hard to describe what is happening so I also included a link with the flex 3 project file that has all of the files.

Here is what I am using for my flex 3 code.
Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="[URL]" layout="vertical"
creationComplete="init()">
<mx:Script>
<![CDATA[
private function init():void{
[Code] .....
So is there a way to just play the swf file without messing up the game?

View 1 Replies







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