Re: [Flashcoders] centering content on stage / resizable stage
Make sure you have in your code (somewhere at the start) the following code: *stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT;* Also make sure that you have the following property in your object / embed tag: salign=TL Greetz Erik On 5/14/08, Patrick J. Jankun [EMAIL PROTECTED] wrote: Hello again! Im quite desparate after trying to find a simply and yet efficient way to get my content always in the middle of that stage, i wrote simple script, that seems to be working when i launch the stand alone player, however when i launch it with the html wrapper and in browser, the positions are different (?!?) and i cant figure out why, this is probably very stupid, but before i just wanted to know how you ppl solve the centering / positioning problems in flash/stage my awesome script: private function positionContainer() : void { _lastBgX = _bg.x; _lastBgY = _bg.y; var halfW : Number = this.width / 2; var halfH : Number = this.height / 2; _bg.x = 0; _bg.y = 0; _bg.width = stage.stageWidth; _bg.height = stage.stageHeight; _holder.x = (stage.stageWidth / 2) - (_holder.width / 2); _holder.y = (stage.stageHeight / 2) - (_holder.height / 2); } _bg is scale, as it's a simple sprite filled with bitmapdata, just for testing, and it does what it's suppose to do, _holder is my content holder wher i put all my instances, movieclips and so on something i dont get is, if i have a class that generates something bigger then that _holder [width/height] the things starts too look strange I think i dont really get how that html wrapper works and what are the best settings for an fullscreen flash in html should i pass settings to the stage class? if yes then which makes sense? How do you ppl solve that issue? Thanks for your Help! P. -- fancy skills to pay the bills www.jankun.org Phone: +43 660 96 969 - 01 web:jankun.org mail: p[at]jankun.org ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Aligning images and text in textfield / textarea
I remember the component named Deng, which is able to render a subset of HTML. It can be found here: http://deng.com.br/ HTML within Flash is one of the toughest things to do as the support for HTML within Flash is very limited. Greetz Erik On 5/6/08, Neil Jenkins [EMAIL PROTECTED] wrote: I'm using textareas and textfields to display HTML with text, images and CSS and running into problems trying to stop text wrapping around the side of images (AS2, Flash8). Even if the image is as wide as the textarea, any text following the image will appear letter by letter vertically down the side of the image until it gets to a clear line under the image whereupon it begins to display correctly again. I've cludged it to stop happening by adding multiple pbr //p after each image depending on the height of each image (lineheight of the text I'm using is 18 pixels, so divide the image height by 18 and add that many paragraph/break tag combinations as above). It's a rather messy cludge and requires a stack of extra PHP on the server side to parse the HTML and add the extra tags after each image - has anyone seen or know about a better way to do this - I'm imagining some one may have been able to extend the textarea or textfield class or possibly created a more reliable component to display HTML text and images (with vertical scrollbar if needed) many thanks Neil ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] as3 namespace question
Thanks for the response Erik. Yes, I am aware that compiling the entire base class of another swf is problematic. I was just trying to simplify things for the example. If the idea works I will to use an interface as a public api to the loaded swf. Anyway, I am very interested in seeing your example files, whether in Flex or Flash. However, I don't seem to receive attachments sent through this list. Can you send me the attachment off list? Thanks Dave -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of EECOLOR Sent: Tuesday, May 13, 2008 5:38 PM To: Flash Coders List Subject: Re: [Flashcoders] as3 namespace question And now the attachment, hehe. Greetz Erik On 5/13/08, EECOLOR [EMAIL PROTECTED] wrote: I posted about this before and didn't receive and answer but it is still causing me issues so I am trying again. There were some concrete answers posted to your question. Anyway, let's see if we can solve it again. Before I will try and help with your problem, I want to point out something about your code. I am not sure if you are using (in your real application) an interface which you will cast your class to: *var _lm:ILoadMe = ILoadMe(_ldr.content);* If you are using the actual class, the problem is that the whole class and it's dependencies are compiled into you main swf, defeating a big part of the purpose of loading the swf into it. In my previous reply to your earlier email I posted a Flex version of the answer. This time I created a Flash example. It is added as attachment. The attached zip file contains 2 directories. Make sure you have your webserver point to to these directories, the virtual hosts in apache: *VirtualHost *:80 ServerName domain1 DocumentRoot E:\Projects\domain1 /VirtualHost VirtualHost *:80 ServerName domain2 DocumentRoot E:\Projects\domain2 /VirtualHost* In the hosts file (if you are on windows) you need these 2 entries: *127.0.0.1 domain1 127.0.0.1 domain2* In order to test the example, call this url: *http://domain1/domain1.html* You should see this appear on your screen: *domain1.swf domain2.swf loaded Domain2Base* I hope this will solve your problem. Greetz Erik ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] AMFPHP classes AS3
Hi. I was wondering if anyone here has som advice on running flash content from a database with the help of AMFPHP 1.9? Maybe someone has a brilliant class for this or good tutorial. I have searched the net, but am not finding much out there. I need to make several queries, for instance for menu, content and news ticker. Thanks Vayu ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AMFPHP classes AS3
http://www.google.com/search?hl=enq=amfphp+tutorialmeta= http://www.sephiroth.it/amfphp.php - Original Message - From: Vayu Robins [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, May 15, 2008 1:01 AM Subject: [Flashcoders] AMFPHP classes AS3 Hi. I was wondering if anyone here has som advice on running flash content from a database with the help of AMFPHP 1.9? Maybe someone has a brilliant class for this or good tutorial. I have searched the net, but am not finding much out there. I need to make several queries, for instance for menu, content and news ticker. Thanks Vayu ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] hi.. need help asap.. newbie here.. hehe
need to capture the input in textfield which is restricted to numbers only... and convert the string to number... this is my code but it wont work.. when i trace it.. it displays.. object [textfield].. or 0.. or NaN.. //stores age var userAge:Number = Number(age); var newAge:String = String(age.text); //age field age.type = TextFieldType.INPUT; age.border = true; age.restrict = 0-9; thanks guys.. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Multiple query strings in a single URL
Howdy all, I currently have a app that pulls a single variable from the URL I.e. = index.html?page=2 I pass that info into my program with FlashVars using: -- script src=Scripts/AC_RunActiveContent.js type=text/javascript/script script type=text/javascript function querySt(ji) { hu = window.location.search.substring(1); gy = hu.split(); for (i=0;igy.length;i++) { ft = gy[i].split(=); if (ft[0] == ji) { return ft[1]; } } } /script snippet from the Flash swf embed FlashVars, 'whichSection=' + querySt('page')); end snippet --- So querySt parses the value of 2 and passes it into my whichsection just fine. Now I have to have two things passed in: I.e. Index.html?page=2login=1 Can FlashVars handle this?? I tried: FlashVars, 'whichSection=' + querySt('page'),'loggedin=' + querySt('login')); But loggedin is NOT getting picked up inside of Flash. Can Flash handle multiple query strings being passed into itself? Did I explain this well enough? Thanks in advance, John === John R. Sweeney Jr.([EMAIL PROTECTED]) Interactive Multimedia Developer/ Digital Media Specialist OnDemand - Interactive, Inc. 847.651.4469 (cell) 847.310.5959 (office/fax) === ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders