Error #2004 One Of The Parameters Is Invalid. Drawrect
Extras Plugins By using GreenSock code, you agree to the terms of use. Events About Licensing Blog Learning Club GreenSock Support Support Docs Forums FAQ's Examples Products Products HTML5 / JSGSAPDraggableSplitTextPlugins for GSAPFlashGSAP Jump to content Codepen Notification You didn't provide a codepen sample that illustrates the problem. It really helps us quickly identify problems. This isn't mandatory, but it will get you better/faster results. Would you like to add one? Submit Post Add Codepen LEARN HOW GreenSock Forums Flash / ActionScript Archive GSAP (Flash) View New Content Javascript Disabled Detected You currently have javascript disabled. Several functions may not work. Please re-enable javascript to access full functionality. AutoFitArea - Error #2004 [SOLVED] Started by flysi3000, Feb 23 2010 03:20 AM Please log in to reply 6 replies to this topic flysi3000 flysi3000 24 Likes 56 posts Post #1 by flysi3000 , 23 February 2010 - 03:20 AM Hi, I decided to take AutoFitArea for a spin, but I'm getting the following on compile:ArgumentError: Error #2004: One of the parameters is invalid. at flash.display::Graphics/drawRect() at com.greensock.layout::AutoFitArea() at home/loadRandomBgImage() at home/parseXML() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() Anyone else experiencing this? Thanks in advance,Simon Back to top GreenSock GreenSock 3,459 Likes (Superhero) 12,451 posts Post #2 by GreenSock , 23 February 2010 - 03:30 AM Please post the code you used to set up the AutoFitArea. I suspect you passed an odd parameter in there. Back to top flysi3000 flysi3000 24 Likes 56 posts Post #3 by flysi3000 , 23 February 2010 - 03:47 AM Hey, thanks for the speedy response. My code's below: function loadRandomBgImage():void { // create a random number bgNum = Math.floor(Math.random() * maxBg-1) + 1; // choose a random image from the background image array currBg = bgList[bgNum].@filePath; // load the image bgLoader = new Loader(); bgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, bgLoaderHandler); bgLoader.load(new URLRequest(currBg)); // add the image to the bgHolder sprite bgHolder = new Sprite(); bgHolder.addChild(bgLoader); bgArea = new AutoFitArea(this, 0, 0, WIDTH, HEIGHT); bgArea.attach(bgHolder, ScaleMode.PROPORTIONAL_INSIDE, AlignMode.CENTER, AlignMode.CENTER); bgArea.addEventListener(Event.CHANGE, areaUpdate); setChildIndex(bgHolder, 0); } Thanks again for your help. Back to top GreenSock GreenSock 3,459 Lik
ElementsAdobe Dreamweaver Adobe MuseAdobe Animate CCAdobe Premiere ProAdobe After EffectsAdobe IllustratorAdobe InDesignView all communitiesExplore Menu beginsMeet the expertsLearn our productsConnect with your peersError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. Please turn JavaScript back on and reload this page. Please enter a title. You can not post a blank message. Please type your message and try again. More discussions in Flex SDK http://greensock.com/forums/topic/2096-autofitarea-error-2004-solved/ All CommunitiesAdobe Open SourceFlex SDK 2 Replies Latest reply on Apr 29, 2012 4:49 AM by yazza71 AdvanceDatagrid - Framework error (Graphics/drawRect()) gvnsaxena Mar 5, 2012 8:36 PM keeps on getting this framework error accessing Advance datagrid. Please suggest.ArgumentError: Error #2004: One of the parameters is invalid. at https://forums.adobe.com/thread/971253 flash.display::Graphics/drawRect() at mx.controls.advancedDataGridClasses::AdvancedDataGridHeaderRenderer/updateDisplayList() at mx.core::UIComponent/validateDisplayList() at mx.managers::LayoutManager/validateDisplayList() at mx.managers::LayoutManager/doPhasedInstantiation() at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2() at mx.core::UIComponent/callLaterDispatcher()Thanks in Advance. I have the same question Show 0 Likes(0) 1549Views Tags: none (add) This content has been marked as final. Show 2 replies 1. Re: AdvanceDatagrid - Framework error (Graphics/drawRect()) yazza71 Apr 29, 2012 4:40 AM (in response to gvnsaxena) HI,Hope it isn't too late,I have had the same error only while running FB 4.6The solution I found was to set the fullHeight variable as well as the height when the compnent is created.(this has to do with the way the skins are registered)Before that the panel was getting 'height=NaN' which caused the error Like Show 0 Likes(0) Actions 2. Re: AdvanceDatagrid - Framework error (Graphics/drawRect()) yazza71 Apr 29, 2012 4:49 AM (in response to gvnsaxena) Like Show 0 Likes(0) Actions Go to original post Ac
från GoogleLogga inDolda fältSök efter grupper eller meddelanden
using your existing account on the new forums, check out this thread. Register Help Remember Me? Forum Today's Posts FAQ Calendar Forum Actions Mark Forums Read Quick Links View Forum Leaders What's New? Advanced Search Forum Flash ActionScript 3 scale9Grid Error Results 1 to 3 of 3 Thread: scale9Grid Error Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode April 22nd, 2008,09:01 PM #1 trilec View Profile View Forum Posts 16 posts Registered User scale9Grid Error Does anyone know why this error if no graphics present eg: Code: var square:Shape = new Shape(); square.graphics.lineStyle(20, 0xFFCC00); square.graphics.drawRect(0, 0, 100, 100); var grid:Rectangle = new Rectangle(20, 20, 60, 60); square.scale9Grid = grid ; addChild(square); eg with error Code: var square:Shape = new Shape(); var grid:Rectangle = new Rectangle(20, 20, 60, 60); square.scale9Grid = grid ; addChild(square); error ArgumentError: Error #2004: One of the parameters is invalid. at flash.display:isplayObject/set scale9Grid() at Untitled_fla::MainTimeline/frame1() Thanks T Last edited by trilec; April 23rd, 2008 at 07:37 AM. ww.trilec.com Reply With Quote April 23rd, 2008,09:40 AM #2 Felixz View Profile View Forum Posts Visit Homepage 1,565 posts Researcher if there is no graphics, width and height equal ZERO, scaling objects with width or height = 0 is impossible. (propably division by zero problem) Homepage Reply With Quote July 1st, 2008,04:35 PM #3 ActionScription View Profile View Forum Posts Visit Homepage 3 posts Registered User scale9Grid Specifics trilec, I'm sure you're way past this problem, but in case another person is on this forum: I believe, not positive, that the scale9Grid property must be set to a rectangle that actually fits into the bounds of the displayObject that you're setting it to. In your case, the scale9Grid is set to a rectangle of x:20, y:20, w:60, h:60, but the bounds of the displayObject (square) you're setting it to are x:0, y:0, w:0, h:0. So, your grid exceeds the bounds of the square and will produce an error. Good luck. Originally Posted by trilec Does anyone know why this error if no graphics present eg: Code: var square:Shape = new Shape(); square.graphics.lineStyle(20, 0xFFCC00); square.graphics.drawRect(0, 0, 100, 100); var grid:Rectangle = new Rectangle(20, 20, 60, 60); square.scale9Grid = grid ; addChild(square); eg with error Code: var square:Shape = new Shape(); var grid:Rectangle = new Rectangle(20, 20, 60, 60); square.scale9Grid = grid ; addChild(square);