Re: [Flashcoders] Moving groups of objects
I think you'll have to provide some code. It's hard to tell why you've orphaned your text. Maybe your targeting the wrong clip. It can be pretty convoluted. Luck - Original Message - From: "J.C. Berry" <[EMAIL PROTECTED]> To: "Flash Coders List" Sent: Tuesday, July 22, 2008 10:27 PM Subject: Re: [Flashcoders] Moving groups of objects Thanks Gabino for the quick answer. However, I do not know what I have done incorrectly. As per my second email, I have an empty mc on the root and I have created a text field in there, also load in mcs in there, and attachMovie some buttons. But when I move the mc in root only the images which are loaded in move when I move it? On Tue, Jul 22, 2008 at 9:12 PM, Gabino Travassos < [EMAIL PROTECTED]> wrote: Hi Jonathan, How about creating a root movieclip and then making your objects as children of that clip, so something (pseudocode) like: create movieclip f1 // root button create movieclip f1.button1 // button clip create text field f1.button1.text1 // text create movieclip f1.button1.rect1 // rectangle and then you can move f1._x+=10 or f1._visible=0 Gabino - Original Message - From: "J.C. Berry" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Tuesday, July 22, 2008 8:51 PM Subject: [Flashcoders] Moving groups of objects Hi all, I hope this is not too basic, but are there any tutorials and/or hints on how to move multiple objects as a group with AS (preferably AS2)? Whenever you could throw me a line I would appreciate it! Thanks so much. -- Jonathan Berry, M.A. IT Consultant 619.306.1712(m) [EMAIL PROTECTED] "I think the real reason the Extropy Institute closed is because Ayn Rand rose from her cryo-sleep" -digibrill ( @ o ) / | | | | \ Chumby.com --- This E-mail is covered by the Electronic Communications Privacy Act, 18 U.S.C. ?? 2510-2521 and is legally privileged. This information is confidential information and is intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. --- ___ 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 -- Jonathan Berry, M.A. IT Consultant 619.306.1712(m) [EMAIL PROTECTED] "I think the real reason the Extropy Institute closed is because Ayn Rand rose from her cryo-sleep" -digibrill ( @ o ) / | | | | \ Chumby.com --- This E-mail is covered by the Electronic Communications Privacy Act, 18 U.S.C. ?? 2510-2521 and is legally privileged. This information is confidential information and is intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. --- ___ 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] Moving groups of objects
Hi Jonathan, How about creating a root movieclip and then making your objects as children of that clip, so something (pseudocode) like: create movieclip f1 // root button create movieclip f1.button1 // button clip create text field f1.button1.text1 // text create movieclip f1.button1.rect1 // rectangle and then you can move f1._x+=10 or f1._visible=0 Gabino - Original Message - From: "J.C. Berry" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Tuesday, July 22, 2008 8:51 PM Subject: [Flashcoders] Moving groups of objects Hi all, I hope this is not too basic, but are there any tutorials and/or hints on how to move multiple objects as a group with AS (preferably AS2)? Whenever you could throw me a line I would appreciate it! Thanks so much. -- Jonathan Berry, M.A. IT Consultant 619.306.1712(m) [EMAIL PROTECTED] "I think the real reason the Extropy Institute closed is because Ayn Rand rose from her cryo-sleep" -digibrill ( @ o ) / | | | | \ Chumby.com --- This E-mail is covered by the Electronic Communications Privacy Act, 18 U.S.C. ?? 2510-2521 and is legally privileged. This information is confidential information and is intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. --- ___ 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] tracing height
I suggest you use onLoadInit instead onLoadComplete, because onLoadInit is dispatched after content was fully loaded and initialized. Gabino, use this code and you'll be able to get the dimensions of your loaded movie as soon image is loaded. Best, Fábio, Yeah, that is much better than what I was doing. :) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] tracing height
According to the help files you need: var mclListener:Object = new Object(); - Original Message - From: "Lehr, Theodore M (N-SGIS)" <[EMAIL PROTECTED]> To: "Flash Coders List" Sent: Tuesday, July 08, 2008 1:09 PM Subject: RE: [Flashcoders] tracing height Ok - so I have tried the following: this.createEmptyMovieClip("img_mc", 999); var my_mcl:MovieClipLoader = new MovieClipLoader(); mclListener.onLoadComplete = function(target_mc:MovieClip, status:Number):Void { trace("onLoadComplete: " + target_mc); }; my_mcl.addListener(mclListener); my_mcl.loadClip("http://www.helpexamples.com/flash/images/image1.jpg";, img_mc); and while the clip loads I am not getting a trace... that's really what I need Ted -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gabino Travassos Sent: Tuesday, July 08, 2008 11:24 AM To: Flash Coders List Subject: Re: [Flashcoders] tracing height - Original Message - From: "Lehr, Theodore M (N-SGIS)" <[EMAIL PROTECTED]> To: "Flash Coders List" Sent: Tuesday, July 08, 2008 8:56 AM Subject: [Flashcoders] tracing height I have: _root.imageMovie.loadMovie(stepImageArray[0]); sizeImage(); function sizeImage () { trace(_root.imageMovie._height); } But I keep getting 0 I am guessing because the trace is fired before the image is loaded... how can I make sure this function does not fire until the image is loaded. I tried: _root.imageMovie.onLoad = function() { } But that does not seem to fire at all My ultimate goal is to control the size of the image that is being loaded to make sure it is not too big Thanks! Hi Theodore, There might be better ways than what I am using, but this works. For each image I create a new movieclip which onEnterFrame resizes the target loadMovie image to a set size, and then removes itself so it doesn't keep working needlessly. This is cut and pasted from a project where images are sourced from XML, so it might have some extraneous ... mrand=Math.round(Math.random()*3000); tname='img'+mrand; _root.createEmptyMovieClip(tname, imagedepth); imagedepth++; _root['img'+mrand].createEmptyMovieClip('md', imagedepth); _root['img'+mrand].md.loadMovie(images.childNodes[i].attributes['imgloc' ]); _root['img'+mrand]._x=images.childNodes[i].attributes['x']; _root['img'+mrand]._y=images.childNodes[i].attributes['y']; trace(images.childNodes[i].attributes['imgloc']); // image sizer mrand=Math.round(Math.random()*3000); sizer=tname+'sizer'+mrand; imagedepth++; _root.createEmptyMovieClip(sizer, imagedepth); imagedepth++; _root[sizer].pushw=images.childNodes[i].attributes['w']; _root[sizer].pushh=images.childNodes[i].attributes['h']; _root[sizer].clipname=tname; //trace(images.childNodes[i].attributes['w']); _root[sizer].onEnterFrame=function(){ trace(this.clipname + ' ' + this.pushw + ' ' + this.pushh); _root[this.clipname]._width=this.pushw; _root[this.clipname]._height=this.pushh; //trace(this.clipname); // img0sizer if(!init){ init=1; } if((this.pushw)&&(this.pushh)&&(init>30)){ // counts to 30 frames and quits, should be enough this.removeMovieClip(); } init++; } ___ 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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] tracing height
- Original Message - From: "Lehr, Theodore M (N-SGIS)" <[EMAIL PROTECTED]> To: "Flash Coders List" Sent: Tuesday, July 08, 2008 8:56 AM Subject: [Flashcoders] tracing height I have: _root.imageMovie.loadMovie(stepImageArray[0]); sizeImage(); function sizeImage () { trace(_root.imageMovie._height); } But I keep getting 0 I am guessing because the trace is fired before the image is loaded... how can I make sure this function does not fire until the image is loaded. I tried: _root.imageMovie.onLoad = function() { } But that does not seem to fire at all My ultimate goal is to control the size of the image that is being loaded to make sure it is not too big Thanks! Hi Theodore, There might be better ways than what I am using, but this works. For each image I create a new movieclip which onEnterFrame resizes the target loadMovie image to a set size, and then removes itself so it doesn't keep working needlessly. This is cut and pasted from a project where images are sourced from XML, so it might have some extraneous ... mrand=Math.round(Math.random()*3000); tname='img'+mrand; _root.createEmptyMovieClip(tname, imagedepth); imagedepth++; _root['img'+mrand].createEmptyMovieClip('md', imagedepth); _root['img'+mrand].md.loadMovie(images.childNodes[i].attributes['imgloc']); _root['img'+mrand]._x=images.childNodes[i].attributes['x']; _root['img'+mrand]._y=images.childNodes[i].attributes['y']; trace(images.childNodes[i].attributes['imgloc']); // image sizer mrand=Math.round(Math.random()*3000); sizer=tname+'sizer'+mrand; imagedepth++; _root.createEmptyMovieClip(sizer, imagedepth); imagedepth++; _root[sizer].pushw=images.childNodes[i].attributes['w']; _root[sizer].pushh=images.childNodes[i].attributes['h']; _root[sizer].clipname=tname; //trace(images.childNodes[i].attributes['w']); _root[sizer].onEnterFrame=function(){ trace(this.clipname + ' ' + this.pushw + ' ' + this.pushh); _root[this.clipname]._width=this.pushw; _root[this.clipname]._height=this.pushh; //trace(this.clipname); // img0sizer if(!init){ init=1; } if((this.pushw)&&(this.pushh)&&(init>30)){ // counts to 30 frames and quits, should be enough this.removeMovieClip(); } init++; } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Changing font?
loop setTextFormat() maybe - Original Message - From: "Pedro Kostelec" <[EMAIL PROTECTED]> To: "Flash Coders List" Sent: Thursday, April 24, 2008 11:49 AM Subject: [Flashcoders] Changing font? Hi How can i animate a change of font like in this page: http://www.emmawatsonofficial.com/#harry? -- Pedro D.K. ___ 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] Reloading Dynamic Text
What does the variable t1s look like? I notice that the text box is also called t1s. - Original Message - From: "Scott Wilhelm (HireAWebGeek.com)" <[EMAIL PROTECTED]> To: Sent: Saturday, April 19, 2008 1:43 PM Subject: [Flashcoders] Reloading Dynamic Text Hello: I'm trying to update a dynamic text field that is being loaded with variables brought in from a php file loaded in within a setinterval function...for some reason though, it will not update the text field, even though I have the it in the function...I'm, using AS2... This is the script I have so far: setInterval(updatescoreboard(), 1000, ""); function updatescoreboard() { loadVariablesNum("live_flash.php?mid="+mid, 0, "GET"); _level0.t1s.text = t1s; } Any ideas/suggestions to get this to work? Thanks, Scott ___ 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] code review
Oh, right. I never use setTextFormat, I always create the text box, format it and put the text in. public static function makeTextField(x:Float,y:Float,w:Float,h:Float,f:String, s:Float,rgb,t:String){ var newDepth=flash.Lib.current.getNextHighestDepth(); var tf2 =flash.Lib.current.createTextField("tf2",newDepth,x,y,w,h); tf2.selectable=false; tf2.wordWrap=true; tf2.embedFonts=true; tf2.setNewTextFormat(new TextFormat(f,s,rgb)); tf2.text=t; } The above is written in haXe, so it mgiht not make sense. Sorry about the misinformation, Theodore. - Original Message - From: "Morten Barklund" <[EMAIL PROTECTED]> To: "Flash Coders List" Sent: Wednesday, April 16, 2008 10:33 AM Subject: RE: [Flashcoders] code review Hi, It is the other way around. setTextFormat is for formatting text currently in the textfield (optionally text in the textfield within a certain range), and setNewTextFormat is for text prepended to the current contents of the textfield (either prepended by script or by the user in case of input fields). Regards, Morten -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter B Sent: Wednesday, April 16, 2008 5:23 PM To: Flash Coders List Subject: Re: [Flashcoders] code review also, have you put text in p_1 already? Because the order that Flash wants is you setTextFormat on the text field, and then you put the text in it. HTH Gabino Really? I thought it was the other way around - put text in, then set the format, *unless* you are using TextField.setNewTextFormat... ___ 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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] code review
Hi Theodore Have you tried it without the loop? i=1; _root.main_content["p_"+i].setTextFormat(portNavOff); _root.main_content["p_"+i].text="hello world!"; also, have you put text in p_1 already? Because the order that Flash wants is you setTextFormat on the text field, and then you put the text in it. HTH Gabino - Original Message - From: "Lehr, Theodore M (N-SGIS)" <[EMAIL PROTECTED]> To: "Flash Coders List" Sent: Tuesday, April 15, 2008 10:13 AM Subject: [Flashcoders] code review What is wrong with this code: for (i=1; i<6; i++) { _root.main_content["p_"+i].setTextFormat(portNavOff); } P_1, p_2, are dynamic text fields. Should this be working or can I not target a text field like this? ___ 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] sending email as/php
hi Theodore Use $_POST if you're sending POST. Use $_GET when you're pulling variables out of the url, like index.php?id=980; I'd also recommend strip_tags(). $comment=strip_tags($_POST['ucomment']); And look up sql injection. Gabino - Original Message - From: "Lehr, Theodore M (N-SGIS)" <[EMAIL PROTECTED]> To: "Flash Coders List" Sent: Monday, April 14, 2008 9:29 AM Subject: [Flashcoders] sending email as/php Sorry for posting such a basic but I did google first... I am trying: As: loadVariablesNum ("mail.php", 0, "POST"); php: I am not getting the variable values... ___ 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] Adding n days to dateField.selectedDate
Hi Alan I found the easiest way to work with dates to keep from having to do this all the time is to start with unix date time, do calculations on it, and then convert it back to whatever format you want. For example, today is 1208129349, which is that many seconds past the Unix epoch start time, which is January 1, 1970. (http://en.wikipedia.org/wiki/Unix_time) If I want 283 days in the future I add 1208129349 + (283 days *24 hours*60 minutes*60second) = 1232580549 and I convert that to whatever date format I want. It saves the hassle of having to count months and end of years and all that. Luck - Original Message - From: "Alan Neilsen" <[EMAIL PROTECTED]> To: Sent: Sunday, April 13, 2008 5:10 PM Subject: [Flashcoders] Adding n days to dateField.selectedDate I am building a cattle birthing calculator. Can anyone help me with the code to add a certain number of days (usually around 283) to the output of a dateField.selectedDate (breeding date) so the result can be put into a string and output to a text field such as, "The estimated birthing date is 7/7/2008." Currently my output can show spurious dates like the 13/33/2008, and I assume there is an easy way of adding days and ending up with a real date. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] online compiler project
Hi Flashcoders, Could you point me in the right direction for this? I've sampled some trial applications, but I'm not sure I'm on the right path. Requirements: - Linux server hosted compiler - takes swf, xml, jpeg, text, whatever and compiles to Win EXE and OSX app - one file result Something like your typical swf 2 exe compiler, except it happens from a server in a Linux environment. Many thanks. Gabino Travassos ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders