Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-03-2006, 01:53 PM   #1
Incrue
the ever-living
 
Incrue's Avatar
 
Join Date: Jan 2006
Location: inside this plane
Posts: 113
Send a message via MSN to Incrue
Default BitmapData.loadBitmap

I am not good with flex, so this
http://www.flashguru.co.uk/bitmapdat...pt-3/#more-627
is really confusing
Does anyone know how to do this with f9 alpha?
Anyway, its sad how they make things that used to be so simple and fast so difficult...
Incrue is offline   Reply With Quote
Old 08-03-2006, 02:09 PM   #2
Tink
Addict
 
Tink's Avatar
 
Join Date: Nov 2001
Location: London
Posts: 2,128
Default

Take a look at http://www.lfpug.com/introduction-to-flash-9-27072006/

Its not difficult just different.
Tink is offline   Reply With Quote
Old 08-03-2006, 03:17 PM   #3
Incrue
the ever-living
 
Incrue's Avatar
 
Join Date: Jan 2006
Location: inside this plane
Posts: 113
Send a message via MSN to Incrue
Default

Thanks Tink, but i couldn't find what i was looking for...
That is how to take a jpg from library and send it to a bitmapData Object
Incrue is offline   Reply With Quote
Old 08-03-2006, 03:23 PM   #4
Xeef
Off-Line
 
Xeef's Avatar
 
Join Date: Aug 2004
Location: Ibiza/Spain language :Hungarian/German/ abit English
Posts: 6,539
Default

Hmmmm

this is from the F8 help

but not see why it shoud not work whit F9

ActionScript Code:
import flash.display.BitmapData; var linkageId:String = "libraryBitmap"; var myBitmapData:BitmapData = BitmapData.loadBitmap(linkageId); trace(myBitmapData instanceof BitmapData); // true var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth()); mc.attachBitmap(myBitmapData, this.getNextHighestDepth());
__________________

test your self -->http://www.actionscript.org/forums/s...86&postcount=8
Xeef is offline   Reply With Quote
Old 08-03-2006, 03:33 PM   #5
Incrue
the ever-living
 
Incrue's Avatar
 
Join Date: Jan 2006
Location: inside this plane
Posts: 113
Send a message via MSN to Incrue
Default

Cos loadBitmap was removed...
Incrue is offline   Reply With Quote
Old 08-03-2006, 03:58 PM   #6
Tink
Addict
 
Tink's Avatar
 
Join Date: Nov 2001
Location: London
Posts: 2,128
Default

Quote:
That is how to take a jpg from library and send it to a bitmapData Object
loadBitmap took a bitmap from the library and created a BitmapData object. so thats not what you want?
Tink is offline   Reply With Quote
Old 08-03-2006, 04:50 PM   #7
Incrue
the ever-living
 
Incrue's Avatar
 
Join Date: Jan 2006
Location: inside this plane
Posts: 113
Send a message via MSN to Incrue
Default

Yes,thats what i want, but the BitmapDAta method loadBitmap was removed in AS3
I want to do this in f9...
Incrue is offline   Reply With Quote
Old 08-03-2006, 06:43 PM   #8
Tink
Addict
 
Tink's Avatar
 
Join Date: Nov 2001
Location: London
Posts: 2,128
Default

so in Flash 9 you have to link the bitmap in your library to a class.

you then create an instance of that class and you get a BitmapData object.

you can no longer display this in a MovieClip you have to create a Bitmap object to display you BitmapData.

you then add your Bitmap to a displayList.
Tink is offline   Reply With Quote
Old 08-03-2006, 07:53 PM   #9
Incrue
the ever-living
 
Incrue's Avatar
 
Join Date: Jan 2006
Location: inside this plane
Posts: 113
Send a message via MSN to Incrue
Default

Quote:
Originally Posted by Tink
so in Flash 9 you have to link the bitmap in your library to a class.
Thanks Tink!
That class must extend BitmapData?
Incrue is offline   Reply With Quote
Old 08-03-2006, 08:13 PM   #10
Tink
Addict
 
Tink's Avatar
 
Join Date: Nov 2001
Location: London
Posts: 2,128
Default

you don't actually have to have a class. if the class name you put in the field doesn't exist flash will auto-generate the class for you (again this is all in that presentation and there are sample files to download).

When it auto-generates a class it does acually create anything on your hard drive but enabled you to use that class name along with the 'new' keyword' to create an instance of your bitmap from the library. The auto-generated class with extend BitmapData.
Tink is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:32 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.