[flexcoders] mx:TileList : Why drag doesn't works if allowMultipleSelection is activate
I work with TileList to display image like a gallery. At start, I activate only drag option. mx:TileList xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx columnWidth=120 rowHeight=150 paddingLeft=2 paddingRight=2 paddingTop=2 paddingBottom=2 itemRenderer=fr.ui.display._43Imagerie.TileUnit2 doubleClickEnabled=true dragEnabled=true dropEnabled=true dragMoveEnabled=true verticalScrollPolicy=on Now I try to add multiple selection possibility. If this option is true (allowMultipleSelection), drag stop to work, do you know why? Thanks for helping.
[flexcoders] air customize about window
I work with Flashbuilder 4.6 and Air application on Mas Os and I'd like to customize About MyApp window. I know that all information about this window is in Adobe AIR Application Descriptor File, but I don't know how to customize. Do you know how to do that? Thanks for helping.
Re: [flexcoders] Loading the IDE (Flash Builder) error
Hahahaha. New cafeteria menus promote tighter bun control in schools. 2012/5/11 Davidson, Jerry jerry.david...@illinois.gov ** Whoops. I once asked a guy about “gun control”, but I used a “B” instead and was told to go to the gym. ** **
Re: [flexcoders] Re: BitmapData from asset embedded in external stylesheet swf
What code works when it is in the “code swf”? On 5/11/12 8:43 PM, flexwdw flex...@yahoo.com wrote: I should add -- this all works with an image embedded in the code swf...it's just when I try to do the same thing from the external swf it doesn't work. I can use the asset as a cursor just fine, so I know there is nothing wrong the asset too. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , flexwdw flexwdw@... wrote: I can't seem to figure out how to get the BitmapData for a resource embedded in an external stylesheet swf. I'd really like to have a piece of artwork in the swf that I can pull in via code and render into a UIComponent as a bitmap. Does anyone know how to do this? If I use the StyleManager to get a style declaration and then pull the embedded asset of it and cast it to a Class, I don't seem to be able to use that class to create a BitmapAsset like I'd expect. Any ideas would be greatly appreciated. (I'm still a sad camper stuck on 3.6 btw). Thanks. -- Alex Harui Flex SDK Team Adobe Systems, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: BitmapData from asset embedded in external stylesheet swf
Hey Alex, Two things work: 1) Using the resource embedded in the external stylesheet SWF using a Canvas and the embedded image as a background-image style. In the case I need, it is very preferable to me to render the image in a Graphics content using fillBitmap, thus I'd rather have a bitmap data. 2) Using a resource embedded directly in the SWF that has the Application, like so: [Embed(test.png)] public var testPng:Class; var bitmap:Bitmap = new testPng(); graphics.beginBitmapFill( bitmap.bitmapData ); graphics.drawRect(0,0,50,50); graphics.endFill(); If I try to do this same thing with: var myClass:Class = StyleManager.getStyleDeclaration(.test).getStyle(testPng); var bitmap:Bitmap = new myClass(); I get a runtime error that myClass cannot be instantiated. I thought those two operations were the same, clearly I'm wrong. Is there a way to do this? thanks! --- In flexcoders@yahoogroups.com, Alex Harui aharui@... wrote: What code works when it is in the code swf? On 5/11/12 8:43 PM, flexwdw flexwdw@... wrote: I should add -- this all works with an image embedded in the code swf...it's just when I try to do the same thing from the external swf it doesn't work. I can use the asset as a cursor just fine, so I know there is nothing wrong the asset too. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , flexwdw flexwdw@ wrote: I can't seem to figure out how to get the BitmapData for a resource embedded in an external stylesheet swf. I'd really like to have a piece of artwork in the swf that I can pull in via code and render into a UIComponent as a bitmap. Does anyone know how to do this? If I use the StyleManager to get a style declaration and then pull the embedded asset of it and cast it to a Class, I don't seem to be able to use that class to create a BitmapAsset like I'd expect. Any ideas would be greatly appreciated. (I'm still a sad camper stuck on 3.6 btw). Thanks. -- Alex Harui Flex SDK Team Adobe Systems, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] Re: BitmapData from asset embedded in external stylesheet swf
Run ObjectUtil.toString() on the results of getStyle(“testPng”). That might shed some light on what it is. It might already be the instance of a Bitmap instead of the class itself. Also, what CSS did you use to embed? On 5/14/12 9:16 AM, flexwdw flex...@yahoo.com wrote: Hey Alex, Two things work: 1) Using the resource embedded in the external stylesheet SWF using a Canvas and the embedded image as a background-image style. In the case I need, it is very preferable to me to render the image in a Graphics content using fillBitmap, thus I'd rather have a bitmap data. 2) Using a resource embedded directly in the SWF that has the Application, like so: [Embed(test.png)] public var testPng:Class; var bitmap:Bitmap = new testPng(); graphics.beginBitmapFill( bitmap.bitmapData ); graphics.drawRect(0,0,50,50); graphics.endFill(); If I try to do this same thing with: var myClass:Class = StyleManager.getStyleDeclaration(.test).getStyle(testPng); var bitmap:Bitmap = new myClass(); I get a runtime error that myClass cannot be instantiated. I thought those two operations were the same, clearly I'm wrong. Is there a way to do this? thanks! --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@... wrote: What code works when it is in the code swf? On 5/11/12 8:43 PM, flexwdw flexwdw@... wrote: I should add -- this all works with an image embedded in the code swf...it's just when I try to do the same thing from the external swf it doesn't work. I can use the asset as a cursor just fine, so I know there is nothing wrong the asset too. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , flexwdw flexwdw@ wrote: I can't seem to figure out how to get the BitmapData for a resource embedded in an external stylesheet swf. I'd really like to have a piece of artwork in the swf that I can pull in via code and render into a UIComponent as a bitmap. Does anyone know how to do this? If I use the StyleManager to get a style declaration and then pull the embedded asset of it and cast it to a Class, I don't seem to be able to use that class to create a BitmapAsset like I'd expect. Any ideas would be greatly appreciated. (I'm still a sad camper stuck on 3.6 btw). Thanks. -- Alex Harui Flex SDK Team Adobe Systems, Inc. http://blogs.adobe.com/aharui -- Alex Harui Flex SDK Team Adobe Systems, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: BitmapData from asset embedded in external stylesheet swf
Thanks for the help, Alex! So, code: trace( ObjectUtil.toString( StyleManager.getStyleDeclaration(.wdwTest).getStyle(icon)) ); var test:Class = StyleManager.getStyleDeclaration(.wdwTest).getStyle(icon); var bitmap:Bitmap = new test(); CSS (cursor_move is a resource I am using elsewhere in the app already): .wdwTest { icon: Embed(source=commonV5.1/skins.swf, symbol=cursor_move); } output: (myskins2__embed_css_commonV5_1_skins_swf_cursor_move_2116628543) Exception: TypeError: Error #1034: Type Coercion failed: cannot convert myskins2__embed_css_commonV5_1_skins_swf_cursor_move_2116628543@366be041 to flash.display.Bitmap. thanks! --- In flexcoders@yahoogroups.com, Alex Harui aharui@... wrote: Run ObjectUtil.toString() on the results of getStyle(testPng). That might shed some light on what it is. It might already be the instance of a Bitmap instead of the class itself. Also, what CSS did you use to embed?
Re: [flexcoders] Re: BitmapData from asset embedded in external stylesheet swf
Hey, your changing your story. First it was embedded PNGs and now it is SWF assets. SWF assets do not have to be Bitmaps. They could be Sprites, MovieClips, etc. I’m surprised that ObjectUtil.toString only showed one line of output. Or did the forum software cut it off? Maybe try describeType instead, or use the –keep-generated-actionscript MXMLC option and see what it used for that asset in the SWF. I’m trying to see what the base classes are for the embed. -Alex On 5/14/12 12:41 PM, flexwdw flex...@yahoo.com wrote: Thanks for the help, Alex! So, code: trace( ObjectUtil.toString( StyleManager.getStyleDeclaration(.wdwTest).getStyle(icon)) ); var test:Class = StyleManager.getStyleDeclaration(.wdwTest).getStyle(icon); var bitmap:Bitmap = new test(); CSS (cursor_move is a resource I am using elsewhere in the app already): .wdwTest { icon: Embed(source=commonV5.1/skins.swf, symbol=cursor_move); } output: (myskins2__embed_css_commonV5_1_skins_swf_cursor_move_2116628543) Exception: TypeError: Error #1034: Type Coercion failed: cannot convert myskins2__embed_css_commonV5_1_skins_swf_cursor_move_2116628543@366be041 to flash.display.Bitmap. thanks! --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@... wrote: Run ObjectUtil.toString() on the results of getStyle(testPng). That might shed some light on what it is. It might already be the instance of a Bitmap instead of the class itself. Also, what CSS did you use to embed? -- Alex Harui Flex SDK Team Adobe Systems, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: BitmapData from asset embedded in external stylesheet swf
Hey Alex, Looks like I'm ignorant here. First, yeah, that was the only thing the trace spit out. Secondly, I have never implemented the external stylesheet with embeds other than stuff in our SWF -- so, it sounded right in my head when I said it. (and the SWF is all artsy and stuff. My home has white walls for reason...). It looks like I am getting a sprite from the generated code, right? (paths changed, but you get the idea): package { import mx.core.SpriteAsset; import flash.display.DisplayObject; [ExcludeClass] [Embed(_resolvedSource=/opt2/stuff/Platform/stylesheets/commonV5.1/skins.swf, source=/opt2/stuff/Platform/stylesheets/commonV5.1/skins.swf, symbol=cursor_move, original=commonV5.1/skins.swf, _line=3665, _file=/opt2/development/stuff/Platform/stylesheets/myskins2.css)] public class myskins2__embed_css_commonV5_1_skins_swf_cursor_move_2116628543 extends mx.core.SpriteAsset { public function myskins2__embed_css_commonV5_1_skins_swf_cursor_move_2116628543() { super(); } public var hour_hand:flash.display.DisplayObject; public var minute_hand:flash.display.DisplayObject; } } I'm looking to render whatever this embed is to a UIComponent -- I wanted a BitmapData because I was just going to use fillBitmap and render it directly without having to have an additional child in the way -- like I would with a canvas and a background-image. Is there a way to do this? --- In flexcoders@yahoogroups.com, Alex Harui aharui@... wrote: Hey, your changing your story. First it was embedded PNGs and now it is SWF assets. SWF assets do not have to be Bitmaps. They could be Sprites, MovieClips, etc. I'm surprised that ObjectUtil.toString only showed one line of output. Or did the forum software cut it off? Maybe try describeType instead, or use the keep-generated-actionscript MXMLC option and see what it used for that asset in the SWF. I'm trying to see what the base classes are for the embed. -Alex
[flexcoders] Re: BitmapData from asset embedded in external stylesheet swf
Alex, thanks again for you help, it got me there :) I have found the solution. The problem was that this was indeed a vector graphic I was trying to import, so I needed to bring it in as a SpriteAsset. I can addChild the SpriteAsset to component I'm working from...I can then set that component's mouseChildren to false and get the same thing I needed to render the bitmap directly for. Kudos to you, sir.