Re: [flexcoders] Setting width/height not affecting visual display?
Two things 1) Try setting the height and width of the container. 2) I tried to read the adobe docs and it says The SpriteVisualElement class is a light-weight Sprite-based implemention of IVisualElement. and there are no height and width property available for this class. where are there are only write only protected properties available and that are viewHeight and viewWidth (Which scales instance of IVisualElement proportionately.) You might want to check more in details http://docs.huihoo.com/flex/4/spark/core/SpriteVisualElement.html On Tue, Jul 13, 2010 at 6:44 PM, Oleg Sivokon olegsivo...@gmail.com wrote: These properties may be overridden. My gut feeling says there should be something like commitProperties / validate or some similar method to apply all changes to the changed display object.
[flexcoders] Re: cropping image under mask
any suggestions On Mon, Feb 23, 2009 at 3:53 PM, Mayur Bais mayur.b...@gmail.com wrote: I am trying to crop image in different different shape, for this , I am trying to use the technique of masking here is what i am trying to do : function drawBMP(): void { var bd:BitmapData = new BitmapData(maskedImage.width, maskedImage.height, true, 0); bd.draw(maskedImage); target.source = new Bitmap(bd); } mx:Image alpha=.3 source=small.jpg mx:filters flash.filters:BlurFilter blurX=20 blurY=20/ /mx:filters /mx:Image mx:Image id=maskedImage mask={topMask} source=small.jpg /mx:Image !--the image mask-- mx:HBox id=topMask height=100 width=100 borderStyle=solid backgroundColor=#ff/ mx:Button click=drawBMP() x=1260 y=184/ It works when we set x, y of the images to 0,0... it gets screwed up when u increase the x and y of the image.. its because of masking.. can any body please suggest me the solution
[flexcoders] cropping image under mask
I am trying to crop image in different different shape, for this , I am trying to use the technique of masking here is what i am trying to do : function drawBMP(): void { var bd:BitmapData = new BitmapData(maskedImage.width, maskedImage.height, true, 0); bd.draw(maskedImage); target.source = new Bitmap(bd); } mx:Image alpha=.3 source=small.jpg mx:filters flash.filters:BlurFilter blurX=20 blurY=20/ /mx:filters /mx:Image mx:Image id=maskedImage mask={topMask} source=small.jpg /mx:Image !--the image mask-- mx:HBox id=topMask height=100 width=100 borderStyle=solid backgroundColor=#ff/ mx:Button click=drawBMP() x=1260 y=184/ It works when we set x, y of the images to 0,0... it gets screwed up when u increase the x and y of the image.. its because of masking.. can any body please suggest me the solution
[flexcoders] Flv not playing ..please help
Hi all, here is my code for flv player.. Flv gets loaded but it does not play at all.. can any Plz tell me what i am doing wrong ?xml version=1.0 encoding=utf-8? mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% xmlns:controls=com.fxcomponents.controls.* creationComplete=init() verticalScrollPolicy=off horizontalScrollPolicy=off xmlns:view=ms.imfusion.util.view.* borderColor=#9C9C9C mx:Script ![CDATA[ import mx.core.Application; import mx.controls.videoClasses.VideoError; import mx.events.MetadataEvent; import mx.events.VideoEvent; import flash.events.ProgressEvent; import mx.events.SliderEvent; private var thumbHookedToPlayhead:Boolean = true; private var flo:Boolean = true; private var volumeBeforeMute:Number = 0; private var fullScreen:Boolean; private var metaData:Object = {duration:0}; private var percentage:Number; * public function setFlv(flvulr:String):void { videoDisplay.source = flvulr; //videoDisplay.source = 'video.flv' } * public function init():void { videoDisplay.addEventListener(MetadataEvent.METADATA_RECEIVED, onMetadataReceived); videoDisplay.addEventListener(ProgressEvent.PROGRESS, onProgress); videoDisplay.addEventListener(VideoEvent.PLAYHEAD_UPDATE, onPlayheadUpdate); videoDisplay.addEventListener(VideoEvent.STATE_CHANGE, onStateChange); videoDisplay.addEventListener(VideoEvent.COMPLETE, onComplete); videoDisplay.addEventListener(VideoEvent.READY, onReady) progresSlider.addEventListener(SliderEvent.CHANGE, playhead_onChange); progresSlider.addEventListener(SliderEvent.THUMB_PRESS, onThumbPress); progresSlider.addEventListener(SliderEvent.THUMB_RELEASE, onThumbRelease); volumeSlider.addEventListener(SliderEvent.CHANGE, volume_onChange); play_pause.addEventListener(MouseEvent.CLICK, pp_onClick); volume_btn.addEventListener(MouseEvent.CLICK, volume_onClick); fullScreenBtn.addEventListener(MouseEvent.CLICK, fullScreen_onClick); } private function error():void { } private function onMetadataReceived(event:MetadataEvent):void { trace('onMetadataReceived :: ' ); metaData = event.info; percentage = metaData.width / metaData.height; progresSlider.maximum = Math.round(videoDisplay.totalTime); trace(totalTime: + videoDisplay.totalTime); videoDisplay.play(); } private function onProgress(event:ProgressEvent):void { trace('onProgress :: ' ); var loadProgress:Number = Math.floor(event.bytesLoaded/event.bytesTotal*100); //progresSlider.progress = loadProgress; } private function onPlayheadUpdate(event:VideoEvent):void { trace('onPlayheadUpdate ') if(thumbHookedToPlayhead) { trace('onPlayheadUpdate :: thumbHookedToPlayhead :: ' + thumbHookedToPlayhead) progresSlider.value = Math.round(event.playheadTime); } else { trace('onPlayheadUpdate :: thumbHookedToPlayhead :: ' + thumbHookedToPlayhead + flo :: + flo) play_pause.selected = true; videoDisplay.pause(); } } private function onStateChange(event:VideoEvent):void { //trace(state: +event.state+ : +event.stateResponsive); if(event.state == VideoEvent.CONNECTION_ERROR) { //timerTextField.text = Conn Error; } } private function onComplete(event:VideoEvent):void { trace('onComplete :: ') play_pause.selected = true; videoDisplay.pause(); } private function onReady(event:VideoEvent):void { progresSlider.maximum = Math.round(videoDisplay.totalTime); videoDisplay.play(); trace('onReady :: '); } private function playhead_onChange(event:SliderEvent):void { try{ trace('playhead_onChange :: '); thumbHookedToPlayhead = true; videoDisplay.playheadTime = event.currentTarget.value; videoDisplay.play(); }catch(e:Error) { } } /** SliderEvent */ private function onThumbPress(event:SliderEvent):void { thumbHookedToPlayhead = false; } private function onThumbRelease(event:SliderEvent):void { thumbHookedToPlayhead = true; } private function
[flexcoders] error while extending dictionary error ..
Hi all, I have class extending a dictionary class: public class mydict extends Dictionary { publicstatic instance:mydict // done to maintain singleton class function mydict (){ super(); } public static funtion getInstance():mydict { return instance; } function addTodict(id:int,val:String):void{ mydict [id] = val // its giving me error here...can not create proeprty 26..(if id was 26..) on mydict } } Any work around?? Regards Mayur
Re: [flexcoders] Maintaining styles and locales(proeprties files)
can u not keep the styles and text file..in once folder.. and add that folder as a external source path ..to all ur locale project.. and there by only one copy gets used across all projects... On 5/13/08, mydarkspoon [EMAIL PROTECTED] wrote: Hi, I'm currently working on a project where both styles and language content are externalized and loaded at runtime. The same application is supplied to all clients from the same code base, and the changes are only made on the locales/styles. As the styles and the locales are compiled for every client differently, they're located on separated projects: -Main application project (Same code base for all clients) -Styles flex project (per client) -Locale project (per client) Since the main app is rapidly being developed, new styles and texts are added. Whenever new text is added to the app, it needs to be added to each and every locale project, even if all clients share the same text. same goes with styles. This is a quite maintenance issue and I'm looking for ways to make this proccess easier. I'll be really glad to get get some advices regarding maintenance of such architecture. Thanks in advance, Almog Kurtser.
Re: [flexcoders] error while extending dictionary error ..
Any specific reason why we should not extend dictionary..? I got it working by writing one getter method in the class which returned dictionary... just curious On Tue, May 13, 2008 at 11:11 PM, Alex Harui [EMAIL PROTECTED] wrote: Don't extend dictionary, just return a Dictionary. -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Mayur Bais *Sent:* Tuesday, May 13, 2008 2:11 AM *To:* [EMAIL PROTECTED]; flexcoders@yahoogroups.com *Subject:* [flexcoders] error while extending dictionary error .. Hi all, I have class extending a dictionary class: public class mydict extends Dictionary { publicstatic instance:mydict // done to maintain singleton class function mydict (){ super(); } public static funtion getInstance():mydict { return instance; } function addTodict(id:int,val:String):void{ mydict [id] = val // its giving me error here...can not create proeprty 26..(if id was 26..) on mydict } } Any work around?? Regards Mayur
Re: [flexcoders] error while extending dictionary error ..
:) :) sure ...there is nothing that I could not do without extending dictionary... with singleTon , I wanted to have the only once reference across the application .. I tried once extending it..and ran into a problem..and then solved it by not sub classing it (directly returning).. But the curiosity was there in my mind ..hence put up the question here... Here is the class which i had tried extending dictionary: (though it did not worked...) package ms.imfusion.model { import flash.utils.Dictionary; import ms.imfusion.Constants; public class MemberList extend dictionary { private static var instance:MemberList; // instance of self. /** * property memberList of type Dictionary */ public var memberList:Dictionary; /** * constructor */ public function MemberList(){ super(); } /** * Returns the reference to self */ public static function getInstance():MemberList { if(instance == null){ instance = new MemberList(); } return instance; } /** * Append to memeberlist * @param tempMember * @returns void */ public function appendtomemelist(tempMember:MemberObject):void { var userId:int = tempMember.userId; memberList[userId] = tempMember; } /** * Creating memberlist * @param obj from server * creates MemberObject object and adds to memberlist dictionary * @returns void */ public function addToMemberlist(obj:Object):void { for(var i:int=0;iobj.length;i++) { var tempMember:MemberObject = new MemberObject() tempMember.fill(obj[i]); appendtomemelist(tempMember); } } /** *Set instance of memberList null on logout */ public static function setInstanceNull():void{ instance = null; // clear mermber information in the current session } } } On Wed, May 14, 2008 at 10:19 AM, Josh McDonald [EMAIL PROTECTED] wrote: If it's not giving away any business secrets, why on earth would you want to subclass Dictionary? Flex already has some sort of built in support for singletons, I believe. -J On Wed, May 14, 2008 at 2:43 PM, Mayur Bais [EMAIL PROTECTED] wrote: Any specific reason why we should not extend dictionary..? I got it working by writing one getter method in the class which returned dictionary... just curious On Tue, May 13, 2008 at 11:11 PM, Alex Harui [EMAIL PROTECTED] wrote: Don't extend dictionary, just return a Dictionary. -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Mayur Bais *Sent:* Tuesday, May 13, 2008 2:11 AM *To:* [EMAIL PROTECTED]; flexcoders@yahoogroups.com *Subject:* [flexcoders] error while extending dictionary error .. Hi all, I have class extending a dictionary class: public class mydict extends Dictionary { publicstatic instance:mydict // done to maintain singleton class function mydict (){ super(); } public static funtion getInstance():mydict { return instance; } function addTodict(id:int,val:String):void{ mydict [id] = val // its giving me error here...can not create proeprty 26..(if id was 26..) on mydict } } Any work around?? Regards Mayur -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
Re: [flexcoders] error while extending dictionary error ..
ah..ok... got it :) thanks On Wed, May 14, 2008 at 11:03 AM, Josh McDonald [EMAIL PROTECTED] wrote: I'm not speaking from authority, but I'm 99% sure that Dictionary either partly is, or relies on some native code that lives in the flash plug-in rather than in the Flex SDK library in order to provide the weakKeys functionality, and that's why you can't subclass it. -J On Wed, May 14, 2008 at 3:04 PM, Mayur Bais [EMAIL PROTECTED] wrote: :) :) sure ...there is nothing that I could not do without extending dictionary... with singleTon , I wanted to have the only once reference across the application .. I tried once extending it..and ran into a problem..and then solved it by not sub classing it (directly returning).. But the curiosity was there in my mind ..hence put up the question here... Here is the class which i had tried extending dictionary: (though it did not worked...) package ms.imfusion.model { import flash.utils.Dictionary; import ms.imfusion.Constants; public class MemberList extend dictionary { private static var instance:MemberList; // instance of self. /** * property memberList of type Dictionary */ public var memberList:Dictionary; /** * constructor */ public function MemberList(){ super(); } /** * Returns the reference to self */ public static function getInstance():MemberList { if(instance == null){ instance = new MemberList(); } return instance; } /** * Append to memeberlist * @param tempMember * @returns void */ public function appendtomemelist(tempMember:MemberObject):void { var userId:int = tempMember.userId; memberList[userId] = tempMember; } /** * Creating memberlist * @param obj from server * creates MemberObject object and adds to memberlist dictionary * @returns void */ public function addToMemberlist(obj:Object):void { for(var i:int=0;iobj.length;i++) { var tempMember:MemberObject = new MemberObject() tempMember.fill(obj[i]); appendtomemelist(tempMember); } } /** *Set instance of memberList null on logout */ public static function setInstanceNull():void{ instance = null; // clear mermber information in the current session } } } On Wed, May 14, 2008 at 10:19 AM, Josh McDonald [EMAIL PROTECTED] wrote: If it's not giving away any business secrets, why on earth would you want to subclass Dictionary? Flex already has some sort of built in support for singletons, I believe. -J On Wed, May 14, 2008 at 2:43 PM, Mayur Bais [EMAIL PROTECTED] wrote: Any specific reason why we should not extend dictionary..? I got it working by writing one getter method in the class which returned dictionary... just curious On Tue, May 13, 2008 at 11:11 PM, Alex Harui [EMAIL PROTECTED] wrote: Don't extend dictionary, just return a Dictionary. -- *From:* flexcoders@yahoogroups.com [mailto: [EMAIL PROTECTED] *On Behalf Of *Mayur Bais *Sent:* Tuesday, May 13, 2008 2:11 AM *To:* [EMAIL PROTECTED]; flexcoders@yahoogroups.com *Subject:* [flexcoders] error while extending dictionary error .. Hi all, I have class extending a dictionary class: public class mydict extends Dictionary { publicstatic instance:mydict // done to maintain singleton class function mydict (){ super(); } public static funtion getInstance():mydict { return instance; } function addTodict(id:int,val:String):void{ mydict [id] = val // its giving me error here...can not create proeprty 26..(if id was 26..) on mydict } } Any work around?? Regards Mayur -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
Re: [flexcoders] state enter /exit
So, It means not to use state...I could it working by hiding and making visible Thanks On 9/21/07, Alex Harui [EMAIL PROTECTED] wrote: If the canvas gets destroyed and recreated, then it will call init() as it gets recreated. You would need to prevent re-creation by hiding and showing the canvas instead. -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *learner *Sent:* Thursday, September 20, 2007 8:59 PM *To:* flexcoders@yahoogroups.com *Cc:* Flex India Community *Subject:* Re: [flexcoders] state enter /exit It is getting destroyed and re-created.but the intialization variables that are kept on init() ..are getting initialized again and again... how to avoid that.. On 9/20/07, *Alex Harui* [EMAIL PROTECTED] wrote: You sure the Canvas isn't getting destroyed and re-created? -- *From:* flexcoders@yahoogroups.com [mailto: [EMAIL PROTECTED] *On Behalf Of *learner *Sent:* Thursday, September 20, 2007 1:25 AM *To:* flexcoders@yahoogroups.com; Flex India Community *Subject:* [flexcoders] state enter /exit Hi All, I observed that the creationComplete event of the compoent is fired everytime the state of the component is changed. Ex: mx:Canvas creationComplete= init() xmlns:mx= http://www.adobe.com/2006/mxml; mx:Script public function init(){ // some action } /mx:Script mx:states mx:State name=NormalState mx:AddChild mx:Panel /mx:AddChild mx:State name=rollOverState basedOn=NormalState mx:AddChild position=lastChild mx:Button / /mx:State /mx:states mx:Canvas if i change the state of this compoenet ... the creation complete gets fired everytime is there any work arround to avoid this ?? Regards PS
Re: [flexcoders] Re: compiling java classes for flex data services
Thanks for replying, but for compiling java class why would i need swc? though I have one in my class library path. Regards PS ε On 5/28/07, simonjpalmer [EMAIL PROTECTED] wrote: I think you are probably missing fds.swc from your library path. If you are using the Eclipse IDE, search for it on your computer and then add it to the Flex Build Path / Library Path in your Flex project. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, learner [EMAIL PROTECTED] wrote: I have trying the sample examples for the flex data service and following the CRM samples . I could write good value object class in both AS and JAVA , and also the class to communicate with database(my-sql in my case). but while looking at the EmployeeAssembler.java in the sample and tried to modify to suit my needs I am getting following error samples\crm\EmployeeAssembler.java:21package flex.data does not exist import flex.data.ChangeObject; samples\crm\EmployeeAssembler.java:22package flex.data does not exist import flex.data.DataSyncException; samples\crm\EmployeeAssembler.java:23package flex.data does not exist import flex.data.DataServiceTransaction; samples\crm\EmployeeAssembler.java:23 package flex.data does not exist import flex.data.assemblers.AbstractAssembler; Can any body put light on this? Regards http://www.google.com/reader/shared/01613629439254822020 PS å
Re: [flexcoders] var in Loop
yeah thanks it was helpfull :) On 10/11/06, EECOLOR [EMAIL PROTECTED] wrote: Hello, Its not that the concept of the for..in loop has changed (i think), but the way classes are defined internally has changed. Properties and methods ofclasses that are defined inside the class definition will not change at runtime. This is (i think) why they are stored in a different place, it might even help prove performance (again, i think). So for the runtime player they are actually something else then the dynamic properties of an object (or an array). I hope this helps in any way. Greetz Erik __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Software development tool Software development Software development services Home design software Software development company Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___