Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Best Import Bitmap Method?



Hi,I am doing a software simulation using a bunch of screengrabs. Save them as layers in PS, Then usually have a full background plate, and isolate the different changes (such as button hilites or other grapic changes on layers above the background, sometimes ending up with 30+ layers. After much testing betweeb PS, Firework, and Flash, I found the best method was to import the file to Imageready and export / layers as files, in the 24 png format. Then import the pngs to Flash 8. They come in with the correct alignment to the background plate, and with transparency and the layer name (I had given them in PS). (Does this seem the best method to other people?).My question now is; In flash, the layers with the transparency are now easy to lay out to the background since they all have the same bounding box size, etc. But are these layers with Transparency increasing the over all file size, (and affect the resulting .swf), if so, is there anything I can do to make them smaller. Also always been confused to know if I should break apart all full screen bitmaps after importing, or only if I'm going to be editing or munipulating them some how?



Adobe > Flash General Discussion
Posted on: 11/30/2006 09:10:19 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

AS3 - What Is The Best Method To Know What Classes To Import
Does anyone know if there's a list or a chart that lists all of the built-in classes, and packages?

Basically, I want to be able to minimize the KB size of my movie - and instead of importing the entire text class for example (import flash.text.*) I want to import only the specific files that I need for that class. is there a simple way to list them, so I can pick and choose?

Bitmap Import Quality
I am importing sharp JPG photo images into my flash 5 movie. However, on playback they show a definite loss of quality. What's going on?

BITMAP Import Limitations?
Im remaking an old video game and that entails grabbing lots of bitmaps from an emulator.

I imported a bunch of png/gif files and ive come to quite an impass. It seems whenever I try to add more png/gif files to a movie clip, the entire game just completley falls apart. When I remove the image(s), the game functions as normal.

Im fairly well versed with AS and i dont think it has anything to do with my code.

Is there any known documentation in regards to limitations of the number of images you can import to flash?

any ideas/comments would be great. thanks. im starting to get frustrated =

check out a beta of the game, wasd or arrowkeys move shoot w/mouse, here: http://www.sleepingninja.com/html/smashtv/index.html

Jpeg Vs Bitmap Import
I import graphics files I make into flash. I used to save these image files as JPEG before importing.
I then thought hey, why not use bitmaps... becuase the quality is better and the exported movie size shouldnt be bigger becuase flash renders its own image out from the imported file right?
So I did a test: 2 files, same picture, same attributes, 1 bitmap+ 1 jpeg.
I imported the JPEG, placed image from the library onto the movie scene, export the movie. do exactly the same with the bitmap.
I expected to see both movies the same size as i thought flash renders its own image out from the imported graphics, or maybe even the bitmap import movie bigger becuase the quality of the image was better so the image rendered out might be higher quality and bigger. But i didnt expect to find the jpeg as bigger in size?
i did the same test with another picture and the movie with jpeg imported is always bigger. but being jpeg is worse quality then the bitmap one.
Am i missing something here? im pretty confused.
someone please enlighten me.
thankyou

Any Method To Resize An Import Image?
I want to dynamically load image into Flash, but the original image is vary in size. What I want to do is to load the image to an empty movie clip, resize the image to 640 x 360 and display it. Could anyone give me some hints on how to do it? thanks

Export/import Swf Class Method
dear all,
I need your help.

I just made a movieClip and associated to it a class with a method:'popolate'.
The movieClip works correctly inside the fla where I develop that movieclip.

Now, I'd like to import that movieClip in others projects, but when I import the movieclip runtime with loadMovie I can't execute the method.
It is like when exporting to swf, flash does not include the class file with the movieClip.

Can anyone help me?
Thanks, Dario.

Import To Library... Bitmap & Graphic
If I import an image to the library, why does it create both a bitmap & a graphic .

Do I need both? For example, if I import an image. Automatically I have the image (say a .png) as well as a bitmap graphic called Symbol 1. Now if I create a movie clip out of that image I have 3 items in the library instead of 1. Think if you import 100 images... you have a mess of 300 items in your library already.

So is there a way to control this? At the very least I just want to understand why it does so.'

Thanks--

Bitmap Image Problem On Import
this seems to happen to me quite often, and it is really frustrating: I will create a bit map image in photoshop exactly as I want it, and then import into flash (as a button for example). When you look at it on the stage, it looks perfect. However, after publishing or testing the movie, the image is often compromised, looking different. A pixel or 2 may be lost of the edge of the image for example. Is there a reason for this? how can i ensure that my images will look as they do on the stage? is it a quirk of Flash, and should i just delete it and try re-importing the bitmap, or am i wasting my time? I really do not like creating vector images in Flash, they never look as I want them and flash does not have extensive graphic creation capabilities as photoshop does. thanks.

Jpeg, Any Bitmap, Import Quality Loss?
i know this has been asked about a million times and i have read the replys but now i cant find any of the threads - i have tried every diffrent file format possible but everytime i import an image into flash it gets lighter, noticeibly. i have embedded color profiles, saved at max quality, what is the trick to maintaining the quality/color of my images?

How To Import Graphic File As Bitmap, Not Vector?
I'm wonder how do I import the file into flash where it can be treated as a bitmap (pixel by pixel) and not as vector (mathetical stuffs).

Thanks,
FletchSOD

Resize Bitmap, Then Draw(Bitmap) To A Separate BitmapData, Doesn't Work Right...?
Hey everyone,

So, I'm loading a jpg into a BitmapData variable, which is liked to a Bitmap variable, then I resize the Bitmap variable.

Every 10 secs it unloads the current bitmap and loads a new one.

But I want to draw the resized bitmaps to a separate BitmapData Variable, except when I try and do that it draws it in the original size... ? Why doesn't it draw the new resized version?

Any ideas?

CopyPixels While Moving Bitmap When Overlay Layer Has Bitmap Effects Bug?
hi,

Wanted to create a walking character, using a large image of all this character postures as resource.

Did this:
1. Created a new Bitmap with its BitmapData
2. Created an EnterFrame event listener to this Bitmap where:
a. I move the Bitmap to the right
b. I change the character posture by copying pixels from the large image to the characters BitmapData

Works fine...

But then I've added another layer (sprite) on top of this bitmap.
Added a glow filter to this layer (sprite) and got the following bug:
The character (Bitmap) is leaving trails as it moves... as if Flash doesn't clean after it...

Please see attached files - it's all there, short and clear.

Basically, the pseudo code looks like this:
--------------------------------------------------------------------------------------------------------------
var __sourceBmpData:SourceBmpData = new SourceBmpData(72, 128);// SourceBmpData is a linkage name to an image on the library
var __imgBmpData:BitmapData = new BitmapData(24, 32, true, 0x00000000);

var __imgBmp:Bitmap = new Bitmap(__imgBmpData);
this.addChild(__imgBmp);

// add event listener
__imgBmp.addEventListener(Event.ENTER_FRAME, Walk);

// bug layer
var bug_mc:Sprite = new Sprite();
this.addChild(bug_mc);

var glow:GlowFilter = new GlowFilter();
glow.color = 0xFF0000;
bug_mc.filters = [glow];

// enter frame
private function Walk(event:Event):void {
__imgBmp.x = 32 + __posX * 12;
__imgBmpData.copyPixels(__sourceBmpData, new Rectangle((__posX % 3) * 24, 32, 24, 32), new Point(0, 0));

__posX++;
}

--------------------------------------------------------------------------------------------------------------

Is it a bug or am I doing somthing wrong?

Thanks,
EZ

CopyPixels While Moving Bitmap When Overlay Layer Has Bitmap Effects Bug?
hi,

Wanted to create a walking character, using a large image of all this character postures as resource.

Did this:
1. Created a new Bitmap with its BitmapData
2. Created an EnterFrame event listener to this Bitmap where:
a. I move the Bitmap to the right
b. I change the character posture by copying pixels from the large image to the characters BitmapData

Works fine...

But then I've added another layer (sprite) on top of this bitmap.
Added a glow filter to this layer (sprite) and got the following bug:
The character (Bitmap) is leaving trails as it moves... as if Flash doesn't clean after it...

Please see attached files - it's all there, short and clear.

Basically, the pseudo code looks like this:
--------------------------------------------------------------------------------------------------------------
var __sourceBmpData:SourceBmpData = new SourceBmpData(72, 128); // SourceBmpData is a linkage name to an image on the library
var __imgBmpData:BitmapData = new BitmapData(24, 32, true, 0x00000000);

var __imgBmp:Bitmap = new Bitmap(__imgBmpData);
this.addChild(__imgBmp);

// add event listener
__imgBmp.addEventListener(Event.ENTER_FRAME, Walk);

// bug layer
var bug_mc:Sprite = new Sprite();
this.addChild(bug_mc);

var glow:GlowFilter = new GlowFilter();
glow.color = 0xFF0000;
bug_mc.filters = [glow];

// enter frame
private function Walk(event:Event):void {
__imgBmp.x = 32 + __posX * 12;
__imgBmpData.copyPixels(__sourceBmpData, new Rectangle((__posX % 3) * 24, 32, 24, 32), new Point(0, 0));

__posX++;
}

--------------------------------------------------------------------------------------------------------------

Is it a bug or am I doing somthing wrong?

Thanks,
EZ

Function In A Method Return True To Method's Caller?
I think I probably don't know the correct terminology to ask this question, but here goes:

In this example, can anyone tell me how to have the setComplete event function within the main method return true to the caller of the method, instead of just to the listener?


PHP Code:



    function loadAsset(target:MovieClip, asset:String, assetLoaderInfo:LoaderInfo): Boolean    {    var assetLoader:Loader = new Loader();    var assetURLRequest:URLRequest = new URLRequest(asset);    assetLoader.contentLoaderInfo.addEventListener(Event.OPEN, setLoaderInfo);    assetLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, setComplete);    function setLoaderInfo(event:Event)        {        assetLoaderInfo = event.currentTarget;        }    function setComplete(event:Event)        {        target.addChild(assetLoader);        return true;        }    assetLoader.load(assetURLRequest);    }

Function In A Method Return True To Method's Caller?
I think I probably don't know the correct terminology to ask this question, but here goes:

In this example, can anyone tell me how to have the setComplete event function within the main method return true to the caller of the method, instead of just to the listener within the method?

Many thanks!


PHP Code:



function loadAsset(target:MovieClip, asset:String, assetLoaderInfo:LoaderInfo): Boolean
    {
    var assetLoader:Loader = new Loader();
    var assetURLRequest:URLRequest = new URLRequest(asset);
    assetLoader.contentLoaderInfo.addEventListener(Event.OPEN, setLoaderInfo);
    assetLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, setComplete);
    function setLoaderInfo(event:Event)
        {
        assetLoaderInfo = event.currentTarget;
        }
    function setComplete(event:Event)
        {
        target.addChild(assetLoader);
        return true;
        }
    assetLoader.load(assetURLRequest);

    }

Can't See A Bitmap Under A Mask When Moving The Bitmap With Elastic Motion
The um... title... kinda said it all. I have a mask. I have a bitmap under the mask. I want to move the bitmap around with elastic motion so I put it in an MC and cut and pasted some functions.

I can see it moving fine when i delete the mask. And I can see it masked fine when I delete the functions. But when both are there I just get emtpy space.

Is there something I don't know but shoud about elastic motion and masks or is there something ****y going down and I probably need to post the FLA?

Thanks all,
-damnit.

Stretch Bitmap-filled Object W/o Stretching Bitmap?
I've got a bitmap-filled rectangle I'm using as a background. I'd like to resize the rectangle dynamically without stretching the bitmap, ie the bitmap needs to tile.

I can do it with BitmapData using the tile option, but it's really slow. Is there an easier way to do this that I'm missing?

How Can I Edit Bitmap And Save The Edited Bitmap In Flash
hi all

It would be appreciated if any one let me know how to edit bitmap which is imported in flash using xml and save the edited bitmap back to xml in flash.

Is it posible to save the bitmap data in flash?


thanks in advance

Draw A Bitmap Line Or A Bitmap Polygon
I need to create a flash/flex/ActionScript3 program that allows user to draw lines and polygons with legends. The legends are provided as bitmap. I'm thinking that I have to use bitmapfill to do the work. Is this the best approach?

As the line may change the direction, I will need the bitmapfill to change direction following the direction of the line. What is the best way to do this? Any example out there?

For polygons, can we use bitmapfill to fill irregular shapes?

Thanks,
-Maggie

Bitmap Font Text Drawn To Bitmap
Is there a way to write a bitmap font right into the bitmap being desplayed?

Mabey better worded:
myBitmap.draw(image, t) draws a picture is there a way to draw text?

I'm stuck even if its just a work around in some way I would like to know... (the current work around i have in my head is writing it in a movieclip turning that into bitmap data and drawing it... esentially creating a prototype answering my question... but a built in way would be easier probably).

Draw A Bitmap Line Or A Bitmap Polygon
I need to create a flash/flex/ActionScript3 program that allows user to draw lines and polygons with legends. The legends are provided as bitmap. I'm thinking that I have to use bitmapfill to do the work. Is this the best approach?

As the line may change the direction, I will need the bitmapfill to change direction following the direction of the line. What is the best way to do this? Any example out there?

For polygons, can we use bitmapfill to fill irregular shapes?

Thanks,
-Maggie

Bulk Import Statments Vs. Specific Import Statements...any Performance Difference?
Lets say I have 20 classes located at nl/amsterdam/simulation/model/. Now I'm writing another class that is going to use some of those 20 classes. Is there any performance difference in the compiled swf if I import them all using a wildcard:

Code:
package nl.amsterdam.simulation.view
{
import nl.amsterdam.simulation.*
...
versus importing each specific one that I need?:


Code:
package nl.amsterdam.simulation.view
{
import nl.amsterdam.simulation.model.Tulip;
import nl.amsterdam.simulation.model.Canal;
import nl.amsterdam.simulation.model.Prostitute;
import nl.amsterdam.simulation.model.StonedTourist;
import nl.amsterdam.simulation.model.BuisnessMan;
import nl.amsterdam.simulation.model.Windmill;
import nl.amsterdam.simulation.model.CoffeeShop;
import nl.amsterdam.simulation.model.SkinnyBuilding;
...
Or is there only a difference in the time it takes to compile, not the time it takes to execute?

How To Edit Bitmap Which Is Imported In Flash Using Xml And Save The Edited Bitmap Back To Xml In Flash.
hi all

It would be appreciated if any one let me know how to edit bitmap which is imported in flash using xml and save the edited bitmap back to xml in flash.

Is it posible to save the bitmap data in flash?


thanks in advance

How To Edit Bitmap Which Is Imported In Flash Using Xml And Save The Edited Bitmap Back To Xml In Flash.
hi all

It would be appreciated if any one let me know how to edit bitmap which is imported in flash using xml and save the edited bitmap back to xml in flash.

Is it posible to save the bitmap data in flash?


thanks in advance

When Is Necessary To Use Import Statements To Import Classes?
Hi,

I'm sure that it must be necessary to use import statements in some situations, I'm finding that my code often works fine without them. For example, some instructions will say it is necessary to use import.flash.events.MouseEvent; before MouseEvent.CLICK will work, or that I must import the loader class before loading an SWF, but I'm finding that I can skip timporting and it works fine. Could anyone please explain why this it, and give me some idea of how to knew when to import and when I don't have to?

Thank you in advance!

Can't Import Import Fl.controls.ComboBox
Hi all!

I am starting learning AS 3.0 (used to use AS 2, that was sweet times ) and actually can't understand simple thing - why I can't include that package from action script?

I actually start new Action Script 3 file, and put single line in first frame


Code:
import fl.controls.ComboBox
and got errors

Code:
1172: Definition fl.controls:ComboBox could not be found.
1172: Definition fl.controls:ComboBox could not be found.
Actually thats part from the code listed at the manual and I don't have any idea, why it doesn't work.

Also when I open components window and drag combobox to scene error is not showed any more.

Any ideas how can I solve this problem without adding combobox to the library?

[Flash 8] Import, Import, Import
Last edited by Nutrox : 2005-09-18 at 06:24.
























 
Ahh!! I'm already getting a bit tired of having to continuously import classes into Flash for things like BitmapData, Rectangle, and Point etc. Is there a way I can set things up so that these classes don't need to be manually imported all of the time?

I've tried a few things including : (a) Creating extension classes, but Flash moans about class paths when I try to import something like flash.display.BitmapData into my own class. (b) Setting a class path so that it points at the class directory .. $(LocalData)/Classes/FP8/flash/display/ .. but that doesn't work either (I know why, but it was worth a shot). (c) Importing the entire class package .. import FP8.* .. but that causes errors with a tonne of other classes. import FP8.geom.* etc works though, but that doesn't really help.

Am I just missing something obvious here, or is there no way around this?


Si ++

Faster Option Than Bitmap Smoothing? Or Speed Up Bitmap Smoothing?
Hey,

Is there any way to speed up bitmap smoothing? or to achieve the same effect with something less processor intensive? Or maybe a way to reduce the amount that it smooths or something. Btw, when I say speed up I mean less processor intensive.

In the project I'm currently working on the image must be rotated and scaled smoothly to 1.5 times it's starting size. If there is any different way to achieve a smooth-ish image please let me know. Even if it's really complicated, if it's at all faster I want it hear it.

How I'm currently doing it is I load in the images (jpg) from an XML file, create a bitmap take the bitmap data from the loaded jpg and enable smoothing. Then I add that bitmap to a movieclip and then I do my stuff from there. It's a complex photo viewer. It all works, but I need to make it work using less resources.

Any ideas are MUCH appreciated! Thanks

[AS2 OOP] Calling A Method In A Method
Hi everyone
i'm not quite sure how to phrase my problem, so i'll examplify:

Code:
class A{
function A(){
trace("construct");
}
private function moo(){
trace("moo!");
}
private function cow(){
trace("start mooing");
moo();
}
}
this does what I expect it to: construct, start mooing, moo!

Code:
class A{
function A(){
trace("construct");
}
private function moo(){
trace("moo!");
}
private function cow(){
trace("start mooing");
_root.onEnterFrame = function(){
trace("moo!")
}
}
}
this also does what I expect it to: construct, start mooing, moo!, moo!, moo!, ...

Code:
class A{
function A(){
trace("construct");
}
private function moo(){
trace("moo!");
}
private function cow(){
trace("start mooing");
_root.onEnterFrame = function(){
moo();
}
}
}
yet this doesn't, I'd expect it to: construct, start mooing, moo!, moo!, moo!, ...
yet the moo! moo! moo! doesn't appear, as if moo() never gets called it all.
so what I'm I doing wrong?

Better To Use A Bitmap, Or MovieClip Containing The Bitmap?
Just wondering -- I have a background image that doesn't really change. Should I just add it to the stage as a bitmap, or create a movieClip that holds the bitmap and add that instead?

Thanks!

Bitmap To Bitmap Rendering (AS 2.0)
There doesn't seem to be a way to render a region of one bitmapData to another bitmapData. Is this a large flaw or is there something I'm missing? I'm currently creating a complex game, and this has been puzzling me. I know about the draw command, but say I want to take a convex polygon region of one bitmapData object and paste that region of pixels to another. How would I do that. I am familiar with the idea that I can draw to a movieclip using the moveTo and lineTo, then just draw to a desired bitmapData, but that extra third party transfer of pixels is very useless and a tad CPU intensive for my liking.

I've even gone as far as trying to implement my own system using get and set pixel, but that is rather pointless as the code runs far to slow, unlike the optimized functions flash uses.

I was just wondering if one of the developers could fix this problem (if it really does exist). I thought flash CS3 would fix this simple concept, but they didn't. I don't use movieClips when I program my games, so using them for something this trivial leads me to believe that the developers didn't foresee the use of bitmap region to bitmap much.

Has anyone else noticed this before? Any fast fixes or workarounds?





























Edited: 05/14/2007 at 06:20:42 PM by Sirisian

Bitmap To Bitmap Rendering
I know the .draw command can be used between two bitmaps to render a rotated or regular bitmap, however I can't think of a way to render a convex polygon region from one bitmap to another. Rendering to the root you'd use the beginBitmapFill and the moveTo and lineTo, but those only work on a MC or the root. Copying just a region from one bitmap to another doesn't seem to have a way. Anyone know how?

Trace Bitmap Vs Bitmap
Hey guys quick Flash concept question. Does have regular bitmaps in your site in Flash bog down the site? I mean will the site run smoother if everything is ocnverted to vector using trace bitmap? In my case, it's not big pictures or anything, it's small little buttons or whatnot, but I would like to know if it is worth losing a bit of the bitmap quality to trace it.

Thanks!
-brad-

Import Via "import To Stage"
I opened a new AS2 document in Flash CS3

I designed a clip which I saved as an fla and exported to an swf file.

Now I imported the swf onto the stage but all that has happened is that the seperate swf componens are on the stage and not the complete clip?

For... In ... Method
Hi all,
I have some problem with the

for( iterator in Object ) method

because it iterates on my Object returning properties in reverse order
In other words if I define a Object Person with

Fabio = new Person()

function Person(){
firstName = "Fabio"
birthday = "28-10-1970"
eyesColor = "Blue"
}

and then I use

for (i in Fabio){
trace(Fabio[i])
}

this method returns my Object properties in reverse order

eyesColor
birthday
name

instead of

name
birthday
eyesColor

Is there anyone who can tell me if it is possible to get my Object properties in the same order i defined them?

Any help will be very appreciated

GET Method
I have a PHP script that need two variables...
what is the correct syntax in flash ?



on (release) {
Status = "Beginning registration Process... Please Hold";
loadVariablesNum ("Register.php?RegName="+RegName ????&???? RegPassword="+RegPassword, 0);

}

thnx

A Method Of Self Help
This may sound odd, but for those who are budding flash developers, I think I found a way (aside from buying books and what not) to learn Flash MX commands rather well.

Open Flash MX, Press SHIFT+F1 (Reference), open the INDEX on the left, and one by one click on each and READ!

I've been doing this and what makes it all sink in is that I am writing what I read into a notepad file. The process of both reading and writing (seeing and doing) makes remember not only that object easier, but you know expand your thinking process when a problem presents itself.

Like you can get a eureka moment if a problem exists, and since you remember better what you read, you have an increased chance of formulating an answer with code.

Not only that, but you should try the code out. Set aside some time to test the code you're a little iffy on, and if that doesn't work, do a google search on ACTIONSCRIPT and the keyword you're having problems with.

I'm a forgetful person, and I've been doing these steps and learning SO MUCH. Hopefully it'll work well for others too.

& In Get Method
Hello!

I need to pass some text to display it in my .swf movie i'm using loadVariables to do this: http://myserver.com/content.php?id=1 but in this text there are some Baltic characters like õ, now php outputs it like this: text=ettev& #245;te and when my movie sees the & it treats it like another variable for example: text=tettevote&id=1 here are two variables text and id.

Is there a way around this?

Method In Other Method
Why if I call a method "makeFunction()" it works and if I call the same method fro the method "Down()" it doesen't work?

dynamic class SingleMovieClipEvents extends MovieClip {
private var movieClipPath_mc;
private var functionName;
private var args_array:Array;
private var theFunc;
public function SingleMovieClipEvents(mC:MovieClip, funNa, args:Array) {
functionName = funNa != undefined ? funNa : null;
args_array = args != undefined ? args : null;
movieClipPath_mc = mC != undefined ? mC : this;
setMovieClip();
makeFunction();
}
private function setMovieClip() {
movieClipPath_mc.onRelease = Down;
}
private function Down() {
this.gotoAndStop("down");
makeFunction();
}
private function makeFunction() {
if (functionName) {
theFunc = eval(functionName);
theFunc.apply(this, args_array);
}
}
}

WHAT's The Best Method? . . . .
Best Method for Text ?:

Ok, need a bit of help from some flash experts with a fair few applications under their belt, particularly ones that involved formatted text.

I’ve making an interface (application) that has about 6 different sections, video, multimedia, art, noise, bio’s and poetry text. So far i’ve basically got a “thumbnail” that you click, it then goes to the corrosponding frame in that scene and the movie/file needed loads into a movie/instance in that frame called “blank” (pretty creative naming huh? ;-)).

The interface its self is fairly bais, it stay with the style of graffiti and all things load on a brick wall, using graf fonts and a few tags etc. Most things work fine except for a few hiccups.

My problem is this:

I now have about 250-300 poems to get in to the interface, all with rich formatting (bold, italics, spacing, diff size fonts, etc) and all sent as DOCS. My thoughts were to do the following:
Convert all into RTF files using Appleworks (yes, I’m on a mac) or a similar converter (Vinc seems ok), import each one into Freehand since it seems to preserve most RTF and then bring the resulting SWF file into FLASH, paste it into a basic movie that has a simple scroll bar and then export that movie and name it appropraitely, move onto the next one . . .

I know it’s possible to load fomatted text into Dynamic text boxes from text files but I’ve so far not been able to get a handle on this (am using Flash MX) and I’m not sure it would be able to handle the “aligning” spaces, etc involved. The reason I’m using a scroll bar is that some poems are very long and won’t fit on the “WALL”, otherwise I’d just paste them in a graffiti font and leave it there.

Anyway, could ppl let me know of any pitfalls they see in this method, problems, etc or if anyone knows a better way (or has or has seen any examples of one) then please let me know. Have to get started on this soon and don’t want to be half way through it when some expert points out a brilliant stylish method that I hadn’t thought of that then makes me tear my hair out.

Thanks very much for any help or advice on this, it is GREATLY APPRECIATED.

Cheers

scart

Which Is The Best Method
Hi,

I would like to know, does anyone have any suggestions as to the best way to create a flash video gallery that can be used in a website.

I would welcome any samples or tutorials that may be available.

I would appreciate it very much.

Cheers

Best Method For:
Got a project I need help with and I need to know if the fallowing is possible and if so what would be the best method for accomplishing it.

Need:
Virtually I need to know how to build a small flash GUI that allows users to name their so called "projects" then click a button ("Build") that will copys/pastes a directory and name this copy what ever the user called it on this flash GUI.

Of course this Flash GUI will have to reside in the same folder as the directory its going to be duplicating. I just need to know if I should be looking at XML help or PHP or if action script might be able to do the whole copy and paste while naming actions.

Thanks.

Best Method For This?
hi all, im just creating a quick thing for my dad which has lots of objects on the stage and when the user hovers over an object he wants the object to turn red (50% tint) (the object can also be clicked to go to a different frame)
would it be best to have them all just as buttons, or as movieclips and addEventListeners to them all to the one function?
or is there a different way?
thanks
Dan

Key Hit Method?
Ive got this Key class, to replace what was lost with AS2 (Using AS3):


Code:
// Key.as
package {

import flash.display.Stage;
import flash.events.Event;
import flash.events.KeyboardEvent;

/*
* The Key class recreates functionality of
* Key.isDown of ActionScript 1 and 2. Before using
* Key.isDown, you first need to initialize the
* Key class with a reference to the stage using
* its Key.initialize() method. For key
* codes use the flash.ui.Keyboard class.
*
* Usage:
* Key.initialize(stage);
* if (Key.isDown(Keyboard.LEFT)) {
* // Left key is being pressed
* }
*/
public class Key
{

private static var initialized:Boolean = false; // marks whether or not the class has been initialized
private static var keysDown:Object = new Object(); // stores key codes of all keys pressed
private static var keysReleased:Object = new Object();
private static var wasPressed:Boolean = false;



/*
* Initializes the key class creating assigning event
* handlers to capture necessary key events from the stage
*/
public static function initialize(stage:Stage)
{
if (!initialized)
{
// assign listeners for key presses and deactivation of the player
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
stage.addEventListener(KeyboardEvent.KEY_UP, keyReleased);
stage.addEventListener(Event.DEACTIVATE, clearKeys);

// mark initialization as true so redundant
// calls do not reassign the event handlers
initialized = true;
}
}

/*
* Returns true or false if the key represented by the
* keyCode passed is being pressed
*/
public static function isDown(keyCode:uint):Boolean
{
if (!initialized)
{
// throw an error if isDown is used
// prior to Key class initialization
throw new Error("Key class has yet been initialized.");
}
return Boolean(keyCode in keysDown);
}

public static function isPressed(keyCode:uint):Boolean
{
if (!initialized)
{
// throw an error if isDown is used
// prior to Key class initialization
throw new Error("Key class has yet been initialized.");
}
if (wasPressed == false)
{
return Boolean(keyCode in keysDown);
wasPressed = true;
}else{
return false;
}
}

public static function isReleased(keyCode:uint):Boolean
{
if (!initialized)
{
// throw an error if isDown is used
// prior to Key class initialization
throw new Error("Key class has yet been initialized.");
}

return Boolean (keyCode in keysReleased);

}


public static function clearKeysPressed():void
{
keysDown = new Object();
}

/**
* Event handler for capturing keys being pressed
*/
private static function keyPressed(event:KeyboardEvent):void
{
// create a property in keysDown with the name of the keyCode
keysDown[event.keyCode] = true;

}

/**
* Event handler for capturing keys being released
*/
private static function keyReleased(event:KeyboardEvent):void
{

if (event.keyCode in keysDown)
{
// delete the property in keysDown if it exists
keysReleased[event.keyCode] = true;
delete keysDown[event.keyCode];

}

}

/**
* Event handler for Flash Player deactivation
*/
private static function clearKeys(event:Event):void
{
// clear all keys in keysDown since the player cannot
// detect keys being pressed or released when not focused
keysDown = new Object();
keysReleased = new Object();
wasPressed = false;

}
}
}
Anyone any ideas how i can add a Key Hit method, so it'll only register when the key is initially pressed, then it'll go back to false?

Best Method
For building my website, is it better to use getURL commands to load my other pages, or loadMovie commands and have it all be one happy .swf file?

AS3 Best Method
As of now, im using URLLoader to send a variable to a php file and use that to connect to mySQL, the php file then echos back an XML with the results. Once that is back in flash I parse it out and use the data. Once I receive the data my application begins to run extremely slow. I've removed the listener once the load has completed, i've tried loader.close(). So this is my question, is it possible to use the URLStream in this case? Will that have any effect? Or is there a better way to go about this. I'm only grabbing, as of now, about 10 values from the database, but there will be a lot more I need to get. So if it is lagging down to a crawl already, then something must be wrong.

There Is No Method With The Name ?
I have an .as file with the code:

Math.getMiddle = function(a,b){

...

}

I have a .fla file that includes the .as file and then trys to run the methods in the .as file. I get the error:

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 357: There is no method with the name 'getMiddle'.

Anyone help?

What's The Best Method? . . . .
Best Method for Text ?:

Ok, need a bit of help from some flash experts with a fair few applications under their belt, particularly ones that involved formatted text.

I’ve making an interface (application) that has about 6 different sections, video, multimedia, art, noise, bio’s and poetry text. So far i’ve basically got a “thumbnail” that you click, it then goes to the corrosponding frame in that scene and the movie/file needed loads into a movie/instance in that frame called “blank” (pretty creative naming huh? ;-)).

The interface its self is fairly bais, it stay with the style of graffiti and all things load on a brick wall, using graf fonts and a few tags etc. Most things work fine except for a few hiccups.

My problem is this:

I now have about 250-300 poems to get in to the interface, all with rich formatting (bold, italics, spacing, diff size fonts, etc) and all sent as DOCS. My thoughts were to do the following:
Convert all into RTF files using Appleworks (yes, I’m on a mac) or a similar converter (Vinc seems ok), import each one into Freehand since it seems to preserve most RTF and then bring the resulting SWF file into FLASH, paste it into a basic movie that has a simple scroll bar and then export that movie and name it appropraitely, move onto the next one . . .

I know it’s possible to load fomatted text into Dynamic text boxes from text files but I’ve so far not been able to get a handle on this (am using Flash MX) and I’m not sure it would be able to handle the “aligning” spaces, etc involved. The reason I’m using a scroll bar is that some poems are long and won’t fit on the “WALL”, otherwise I’d just paste them in a graffiti font and leave it there.

Anyway, could ppl let me know of any pitfalls they see in this method, problems, etc or if anyone knows a better way (or has or has seen any examples of one) then please let me know. Have to get started on this soon and don’t want to be half way through it when some expert points out a brilliant stylish method that I hadn’t thought of that then makes me tear my hair out.

Thanks very much for any help or advice on this.

Cheers

scart

What Method Is This?
Hello all. I came across a cool newsfeed on
http://iblog.chubzz.com/ ANyone know how they did it..? its to the rigt asa you open up the site.

-R

Copyright © 2005-08 www.BigResource.com, All rights reserved