Re: [Flashcoders] timer question
It doesn't trace plus 10 because you're calling it when you declare all your variables, rather than 10 seconds later when seconds == newSeconds. You'll need an onEnterFrame or other loop running to check, and one of the checks will have to be invoked during the single second when it's 10 seconds after var seconds is declared. Marc Hoffman At 12:28 PM 3/23/2007, you wrote: Hi, I'm trying to launch an event using a timer so far the code for trace something is this: var now = new Date(); var seconds:Number = now.getSeconds(); trace(seconds); var newSeconds: Number = seconds+10; if ( seconds == newSeconds){ trace(plus 10); } var seconds:Number = seconds; the problem is that this ones doesn't trace plus 10, instead just traces the var seconds. Do you know what is wrong here? Regards. Gustavo Duenas ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] timer question
Hi, your example is: seconds = a; newSeconds = a+10; if (seconds == newSeconds) in other words if (seconds = seconds+10) that will never work. Look into setInterval and there is a undocumented setTimeout function somewhere I think. Better yet write your own Timer and TimerEvent class to wrap this kind of stuff. greetz JC On 3/23/07, Gustavo Duenas [EMAIL PROTECTED] wrote: Hi, I'm trying to launch an event using a timer so far the code for trace something is this: var now = new Date(); var seconds:Number = now.getSeconds(); trace(seconds); var newSeconds: Number = seconds+10; if ( seconds == newSeconds){ trace(plus 10); } var seconds:Number = seconds; the problem is that this ones doesn't trace plus 10, instead just traces the var seconds. Do you know what is wrong here? Regards. Gustavo Duenas ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] setting a timer in flash 8
hi, i think this might help with the flash timer stop(); pausedAt = getTimer(); this.createEmptyMovieClip(frameLoop, 1); frameLoop.onEnterFrame = function() { if ((getTimer()-pausedAt)/500=6) { play(); this.removeMovieClip(); } // end if }; I have used this many times. Shahid - Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] MDM Zinc v2.5 Trial _ Writing files to hard drive
Google: http://www.google.com/search?q=zinc+write+files+to+hard+drive 2nd item down on the results page: The Local File System and Flash http://www.communitymx.com/content/article.cfm?cid=107B6 --Carl On 3/23/07, Ned Perry [EMAIL PROTECTED] wrote: Hi I need to make a Projector that writes files to the hard-drive. All the content elements are going to be Flash and I was hoping to use Zinc as a wrapper that could handle the file system elements. But I can't find any command to create a file. Does anyone know if there is one? There seems to be loads of stuff to copy and move files etc but not to make one. If there isn't can anyone recommend an alternative to Zinc other than Director. Cheers Ned This e-mail (and any attachments) is confidential and may contain personal views which are not the views of Cimex Media Ltd and any affiliated companies, unless specifically stated. It is intended for the use of the individual or group to whom it is addressed. If you have received it in error, please delete it from your system, do not use, copy or disclose the information in any way nor act in reliance on it and please notify [EMAIL PROTECTED] A company registered in England Wales. Company Number 03765711 Registered Office : The Olde Bakehouse, 156 Watling Street East, Towcester, Northants NN12 6DB This email was scanned by Postini, the leading provider in Managed Email Security. http://www.postini.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Carl Welch http://www.carlwelch.com [EMAIL PROTECTED] 805.403.4819 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] timer question
Hello :) do you use the setInterval method ? var cpt:Number = 0 ; var action:Function = function ( msg ) { trace( msg ) ; if ( cpt ++ == 20 ) { clearInterval(id) ; trace(stop the timer) ; } } var id = setInterval( action, 1, plus 10 seconds) ; EKA+ :) 2007/3/23, Gustavo Duenas [EMAIL PROTECTED]: Hi, I'm trying to launch an event using a timer so far the code for trace something is this: var now = new Date(); var seconds:Number = now.getSeconds(); trace(seconds); var newSeconds: Number = seconds+10; if ( seconds == newSeconds){ trace(plus 10); } var seconds:Number = seconds; the problem is that this ones doesn't trace plus 10, instead just traces the var seconds. Do you know what is wrong here? Regards. Gustavo Duenas ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Actionscript 3.0 help w/ simple HelloWorld
Something to try change import MyPackage.*; to import myPackage.HelloWorld import myPackage.MyClass See if the errors change. Ron Merrill, Jason wrote: I dunno, that's how I have it set up and it works fine for me - Perhaps your Flash 9 Preview Alpha is messed up. I assume your publish settings are all correct, - I don't know why it would do that. Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rob Romanek Sent: Friday, March 23, 2007 10:10 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Actionscript 3.0 help w/ simple HelloWorld Hi Jason, My packageTest.fla is import MyPackage.*; var hw:HelloWorld = new HelloWorld(); var mc:MyClass = new MyClass(); and in the same directory I have MyPackage.as //MyPackage.as package MyPackage { public class HelloWorld { public function HelloWorld() { trace(hello world constructor); } } public class MyClass { public function MyClass() { trace(MyClass constructor); } } } In the windows Flash 9 Alpha IDE I try to run this and I get **Error** Scene 1, Layer 'Layer 1', Frame 1 : Line 2, Column 8 : [Compiler] Error #1046: Type was not found or was not a compile-time constant: HelloWorld. var hw:HelloWorld = new HelloWorld(); **Error** Scene 1, Layer 'Layer 1', Frame 1 : Line 3, Column 8 : [Compiler] Error #1046: Type was not found or was not a compile-time constant: MyClass. var mc:MyClass = new MyClass(); ReferenceError: Error #1065: Variable Timeline0_f549bc2eccff3a4d88caed7024db465e is not defined. This seems to me as if it should work. I don't know if it is the Flash IDE causing me grief, if there is some preference file I don't have set correctly or what. Other than this issue I'm having a lot of fun with AS3 especially the new text features. thanks, Rob On Thu, 22 Mar 2007 20:39:14 -0400, Merrill, Jason [EMAIL PROTECTED] wrote: I have a question back at you along this example. any insights why yours can run as MyPackage.as? Do you start out your package as: package MyPackage { //class definitions } and then import like this: import MyPackage.* ? That should work. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] setting a timer in flash 8
var intervalID:Number = setInterval(timer, 1000, this); var timeLimit:Number = 20; var timeCounter:number = 0; function timer( mc:MovieClip ) { if( mc.timeCounter == mc.timeLimit ) { mc.timeLimit = 0; clearInterval(mc.IntervalID); trace(time LIMIT); } else { mc.timeCounter++; trace(time: +mc.timeCounter); } } --Pedro Taranto Gustavo Duenas escreveu: Hi, I'm trying to set a timer to trigger a event after 20 seconds or less, but so far i have this code, but with no results someone help me? . I don't know how could I got into but some help might be needed this is the code: is inside the first frame of a movie clip and the 4 frame has: gotoAndPlay(1); var now = getTimer(); var seconds:Number = now/1000; var later:Number = seconds+20; this.onEnterFrame= function (){ if(seconds == later){ trace(llegamos); } } trace(seconds); Regards Gustavo Duenas ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] setting a timer in flash 8
Hi, you asked this question before, and I replied to it, why not continue that thread instead of reposting it? You are on the right track though, there are different approaches: 1. waiting a number of frames: var curFrame:Number = 0; var frameRate:Number = 12; var waitFrames:Number = 20*frameRate; //wait 20 seconds this.onEnterFrame= function (){ curFrame++; if(waitFrames== curFrame){ trace(llegamos); } } Or use setInterval: var intervalID:Number = setInterval(myFunc, 20*1000);//set interval to 20 secs function myFunc(){ clearInterval(intervalID); trace(llegamos); } The other thing is that you have to understand why your code is wrong: var now = getTimer(); //get milliseconds passed since swf start FOR EXAMPLE 123541 var seconds:Number = now/1000; //seconds passed since swf start 123,541 var later:Number = seconds+20; //143,541 this.onEnterFrame= function (){ //seconds does not change, later does not change so each frame we compare 123,541 with 143,541 //even you would update seconds, the chance that seconds becomes 143,541 is near 0. if(seconds == later){ trace(llegamos); } } trace(seconds); hth, JC On 3/24/07, Gustavo Duenas [EMAIL PROTECTED] wrote: Hi, I'm trying to set a timer to trigger a event after 20 seconds or less, but so far i have this code, but with no results someone help me? . I don't know how could I got into but some help might be needed this is the code: is inside the first frame of a movie clip and the 4 frame has: gotoAndPlay(1); var now = getTimer(); var seconds:Number = now/1000; var later:Number = seconds+20; this.onEnterFrame= function (){ if(seconds == later){ trace(llegamos); } } trace(seconds); Regards Gustavo Duenas ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] setting a timer in flash 8
I made a Timer class that I use for another set of Classes I wrote. Here is the class itself, it's pretty precise and reliable so far. Hope it Helps ! usage : import ca.daroost.utils.Timer; soundTimer = new Timer(); soundTimer.addEventListener(onTimerDone, this); soundTimer.addEventListener(onTimerStart, this); soundTimer.startTimer(0, 2000); // 2 second timer function onTimerDone(evtObj:Object) { trace(Timer is done after +evtObj.delta+ms - wanted time is : +evtObj.timerDelta+ms); } function onTimerStart(evtObj:Object) { trace(Timer has started); } Class Start --- import mx.events.EventDispatcher; import mx.utils.Delegate; class ca.daroost.utils.Timer { // Constants: public static var CLASS_REF = ca.daroost.utils.Timer; // Public Properties: public var dispatchEvent:Function; public var addEventListener:Function; public var removeEventListener:Function; // Private Properties: private var tEnd:Number; private var tStart:Number; // usually this is 0, but in case of a sound loop there could be a start offset private var _starttime:Number; // actual timer start value set with getTimer() private var tDelta:Number; // Delta time between tEnd and tStart private var tInterval:Number; // Initialization: public function Timer(startTime:Number,endTime:Number) { EventDispatcher.initialize(this); tStart = (startTime != undefined) ? startTime : 0; tEnd = (endTime != undefined) ? endTime : 0; tDelta = 0; tInterval = 0; } // Public Methods: public function startTimer(startTime:Number,endTime:Number) { tEnd = endTime; tStart = startTime; tDelta = tEnd - tStart; _starttime = getTimer(); tInterval = setInterval(this, updateTimer, 1); this.dispatchEvent({target:this, type:onTimerStart, startTime:tStart, endTime:tEnd}); } public function set endTime(value:Number):Void { tEnd = value; } public function get endTime():Number { return tEnd; } public function set startTime(value:Number):Void { tStart = value; } public function get startTime():Number { return tStart; } // Semi-Private Methods: // Private Methods: private function updateTimer():Void { var _delta:Number; _delta = getTimer() - _starttime; if (_delta = tDelta -50) { // here we will get a more precise value with the last 50 ms while (_delta tDelta) { _delta = getTimer() - _starttime; } this.dispatchEvent({target:this, type:onTimerDone, delta:_delta, timerDelta:tDelta}); clearInterval(tInterval); } } } Class End--- Gustavo Duenas wrote: Hi, I'm trying to set a timer to trigger a event after 20 seconds or less, but so far i have this code, but with no results someone help me? . I don't know how could I got into but some help might be needed this is the code: is inside the first frame of a movie clip and the 4 frame has: gotoAndPlay(1); var now = getTimer(); var seconds:Number = now/1000; var later:Number = seconds+20; this.onEnterFrame= function (){ if(seconds == later){ trace(llegamos); } } trace(seconds); Regards Gustavo Duenas ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] setting a timer in flash 8
try using undocumented setTimeOut or setInterval instead say you have a function foo with setInterval: var secondsToWait:Number= 20*1000 //20 seconds var interval_ID:Number=setInterval(this,foo,2) function foo() { clearInterval(interval_ID); trace(llegamos con setInterval); } with setTimeOut setTimeout(this,foo,1000) function foo() { trace(llegamos con setTimeOut); } On 3/24/07, Gustavo Duenas [EMAIL PROTECTED] wrote: Hi, I'm trying to set a timer to trigger a event after 20 seconds or less, but so far i have this code, but with no results someone help me? . I don't know how could I got into but some help might be needed this is the code: is inside the first frame of a movie clip and the 4 frame has: gotoAndPlay(1); var now = getTimer(); var seconds:Number = now/1000; var later:Number = seconds+20; this.onEnterFrame= function (){ if(seconds == later){ trace(llegamos); } } trace(seconds); Regards Gustavo Duenas ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Yehia Shouman ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Component skin path
use flashVars to pass the path of the skin to the flash object and load it inside the swf dynamically by using .skin property if it was flvplayback component. object src . param name=flashVars value=pathToSkin=../../whereTheSkinIs/myskin.swf and in another HTML maybe object src . param name=flashVars value=pathToSkin=whereTheSkinIs/myskin.swf and inside the SWF myComponent.skin=_level0.pathToSkin; On 3/23/07, JP [EMAIL PROTECTED] wrote: Hi All, I have an educational project that includes several lessons with several folders. I'm trying to organize things such that there need only be one player for everything. But I'm running into an issue whereby my player doesn't seem to find it's skin unless I put a copy of the skin file directly next to the HTML file where the player is embedded. Is there a way around this? The server layout looks something like this:: SERVER | LESSON 1 | | HTML for lesson images folder | | LESSON 2... X | | HTML for lesson images folder | | VIDEOS - all in here | | XML - all in here | | PLAYERS | | normal player (swf) | expanded player (swf) | skin for component (.swf) Any help would be greatly appreciated. J ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Yehia Shouman ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Test
well i posted this 4 days ago On 3/23/07, Steven Sacks | BLITZ [EMAIL PROTECTED] wrote: Hello. Flashcoders has been really laggy the past few days. It usually takes an hour or two before I see my posts. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Danny Kodicek Sent: Friday, March 23, 2007 6:02 AM To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] Test Is this delivered??? 'ello D ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Omar Fouad - Digital Emotions... Love is always patient and kind. It is never jealous. Love is never boastful nor conceited It is never rude or selfish. It does not take offense and is not resentful. Love takes no pleasure in other people's sins...but delights in the truth. It is always ready to excuse, to trust, to hope... and to endure... whatever comes. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] flash game developer - multi-player games
You can talk to me. I've got a multiplayer Flash program running at http://www.biality.com/tubes/tubes.swf It's a work in progress. There's more info about how to write programs for it it here: http://www.newgrounds.com/bbs/topic.php?id=652309 - Kipp -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of bruce Sent: Friday, March 23, 2007 12:47 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] flash game developer - multi-player games hi... i'm trying to find out how/who i can talk to to get information regarding flash games. specifically, if i'm looking to talk to anyone/small company who's developed small multiplayer flash games, who can i talk to... thanks -bruce ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/ flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] setting a timer in flash 8
hi gustavo, your first problem is that you have a gotoAndPlay loop. that means that every time you go back to frame 1 you are re-creating your now variable, so it is never going to have a chance to get bigger. secondly, the timer does need to be updated checked inside your onEnterFrame (i used a setInterval), so that it can be compared with your later variable. try this: stop(); var startTime:Number = getTimer()/1000; var later:Number = 20; var timeCheck:Number = setInterval(checkTime, 100); function checkTime(){ var currentTime:Number = getTimer()/1000; var elapsedTime:Number = currentTime - startTime; if(elapsedTime = later){ trace(llegamos); clearInterval(timeCheck); } } Message: 22 Date: Fri, 23 Mar 2007 19:57:54 -0400 From: Gustavo Duenas [EMAIL PROTECTED] Subject: [Flashcoders] setting a timer in flash 8 To: Flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hi, I'm trying to set a timer to trigger a event after 20 seconds or less, but so far i have this code, but with no results someone help me? . I don't know how could I got into but some help might be needed this is the code: is inside the first frame of a movie clip and the 4 frame has: gotoAndPlay(1); var now = getTimer(); var seconds:Number = now/1000; var later:Number = seconds+20; this.onEnterFrame= function (){ if(seconds == later){ trace(llegamos); } } trace(seconds); Regards ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] As3 Reccomended Book
Hi List, I just wanted to ask about the best AS3 Book to begin my path to AS3I allready code in As2 but know nothing about AS3 yet... What would recommend??? -- Omar Fouad - Digital Emotions... Love is always patient and kind. It is never jealous. Love is never boastful nor conceited It is never rude or selfish. It does not take offense and is not resentful. Love takes no pleasure in other people's sins...but delights in the truth. It is always ready to excuse, to trust, to hope... and to endure... whatever comes. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] setting a timer in flash 8
Time is never exact because frame rate is independent from time. Just check if it's greater or equal to the time you desired. var now = getTimer(); var waitSeconds = 3; var later:Number = now + ( waitSeconds * 1000 ); this.onEnterFrame= function () { var now = getTimer(); if( now = later) { trace( now ); delete this.onEnterFrame; } else { var countdown = ( later - now ); trace( wait for it : + countdown ); } } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Duenas Sent: Friday, March 23, 2007 4:58 PM To: Flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] setting a timer in flash 8 Hi, I'm trying to set a timer to trigger a event after 20 seconds or less, but so far i have this code, but with no results someone help me? . I don't know how could I got into but some help might be needed this is the code: is inside the first frame of a movie clip and the 4 frame has: gotoAndPlay(1); var now = getTimer(); var seconds:Number = now/1000; var later:Number = seconds+20; this.onEnterFrame= function (){ if(seconds == later){ trace(llegamos); } } trace(seconds); Regards Gustavo Duenas ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] setting a timer in flash 8
Gustavo, stop(); var later:Number = (getTimer()/1000) + 20; this.onEnterFrame = function (){ var now:Number = getTimer()/1000; if(now = later){ trace(llegamos); delete this.onEnterFrame; } } trace(later); HTH -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Duenas Sent: Friday, March 23, 2007 6:58 PM To: Flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] setting a timer in flash 8 Hi, I'm trying to set a timer to trigger a event after 20 seconds or less, but so far i have this code, but with no results someone help me? . I don't know how could I got into but some help might be needed this is the code: is inside the first frame of a movie clip and the 4 frame has: gotoAndPlay(1); var now = getTimer(); var seconds:Number = now/1000; var later:Number = seconds+20; this.onEnterFrame= function (){ if(seconds == later){ trace(llegamos); } } trace(seconds); Regards Gustavo Duenas ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Flex question : setting listeners and component parameters from the class
in mxml: ... lcModel = new DirectoryBrowser(this) ... in class: ... public class DirectoryBrowser{ private var btn:Button; private var txt:Text; public function DirectoryBrowser(owner):void{ btn = owner.btn; txt = owner.txt; setStuff() Alert.show(class loaded,class debug) } ... that said, ugly way to achieve what your after. if you want AS seperate from mxml, just use a seperate .as file and use the src attribute on the Script element. On 3/23/07, lostchild [EMAIL PROTECTED] wrote: Hi... What i want to manage is, seperating the code from the mxml completely. And here is my attempt but it is not working. I guess my problem is about adding the event listeners or setting the component id s in the class file. How should i change the code so that it works ? and any good practice advises are welcome. Thank you ... / Code /// / MXML FILE // ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; applicationComplete=init() mx:Script ![CDATA[ import mx.controls.Alert import lostchild.DirectoryBrowser private var lcModel:DirectoryBrowser private function init():void{ lcModel = new DirectoryBrowser() Alert.show(application complete, Flex Debug) } ]] /mx:Script mx:HDividedBox width=100% height=100% mx:Button id=btn width=100 height=100%/ mx:Text id=txt height=100% width=100%/ /mx:HDividedBox /mx:Application / DirectoryBrowser.as placed in the folder lostchild// package lostchild{ import flash.events.MouseEvent import mx.controls.Button import mx.controls.Text import mx.controls.Alert public class DirectoryBrowser{ private var btn:Button = new Button() private var txt:Text = new Text() public function DirectoryBrowser():void{ setStuff() Alert.show(class loaded,class debug) } public function callAlert(evt:MouseEvent):void{ Alert.show(button clicked,debugging event handler) txt.text = working fine } public function setStuff():void{ btn.label = just click! txt.text = i can't get to see this ! btn.addEventListener(MouseEvent.CLICK,callAlert) } } } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] OT - Installing PHP, MySQL?
How hard / not-hard is it to install PHP and MySQL on a remote server? Anything to be weary of? Is it something I should just skip attempting and hire an IT guy to do it? Security shouldn't be taking lightly, if you leave something open where your client's machine vulnerable and in fact gets broken into you (or your company) will be liable. If you have an IT department let them do it thats what they get paid for, you wouldn't like the IT department designing your next site ;) Dave - Head Developer www.blurredistinction.com Adobe Community Expert http://www.adobe.com/communities/experts/ ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] setting a timer in flash 8
Gustavo, Duenas noches :) Search for setInterval in the help manual ;). ...helmut On 3/23/07, Gustavo Duenas [EMAIL PROTECTED] wrote: Hi, I'm trying to set a timer to trigger a event after 20 seconds or less, but so far i have this code, but with no results someone help me? . I don't know how could I got into but some help might be needed this is the code: is inside the first frame of a movie clip and the 4 frame has: gotoAndPlay(1); var now = getTimer(); var seconds:Number = now/1000; var later:Number = seconds+20; this.onEnterFrame= function (){ if(seconds == later){ trace(llegamos); } } trace(seconds); Regards Gustavo Duenas ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Static LocalConnection name not working?
Hi, Does somebody know why LocalConnection.connect() throws an error 'One of the parameters is invalid' when using a static variable for the connection name? static var lcName:String = _myConnection; . lc.connect(lcName); A bug or even a security restriction?? -- http://hiddenresource.corewatch.net/ ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] FLV and classes
Hi friends, I have the following strange problem: I have a index.fla and a Application.as. the index.fla contains a movieclip exported for actionscript name test. it contains a VideoObject with instance name testVideo In the external Application class I attach the movieClip to the stage. I can trace the videoObject but the flv won't load. The funny thing is that when I do this all directly on the timeline it works fine... The code in the class: var test_p:MovieClip = _root.attachMovie(test, test_mc, 10); var my_nc = new NetConnection(); my_nc.connect(null); var my_ns = new NetStream(my_nc); test_p.testVideo.attachVideo(my_ns); my_ns.play(movies/mini_1.flv); Anyone a suggestion? Kind Regards, Tom ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] [Ann-Syd-AU] CS3 Launch for Sydney-based developers
The Sydney Flash Platform Developers Group www.flashdev.org.au is holding a special meeting for the launch of Adobe Creative Suite 3 and a chance to win one of the first copies of the new CS3 suite when it starts shipping! When: Wed 28th March at 5:30pm for 6pm start. Where: Adobe's offices, 67 Albert Ave, Chatswood Please register on http://sydneyflashdevelopers.eventbrite.com to attend this event and to be in the draw for a copy of CS3. Note: the building closes at 6pm, so please be early. Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group m: 0415 469 095 www.flashdev.org.au ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] localTrusted in DCR in Browser
Hey all, I've got a Flash file that wants to read a local XML file (from the same directory), in a browser. I've set the file to be trusted, and it works fine with the SWF object. But, this file has to be embedded in a Director file for some other functionality, and from the DCR, I can't read the XML file successfully. I was hoping that the Director Flash Xtra would allow the same access that the Flash plug-in would-- but that doesn't seem to be the case. Has anyone gotten a similar situation to work? Or, any ideas on how to allow this? Thanks, --Dave ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] MDM Zinc v2.5 Trial _ Writing files to hard drive
Hi, In Zinc you can use any of the following: FileSystem.saveFile() - Saves text data to the file specified. FileSystem.saveFileHEX() - Saves HEX data to the file specified. FileSystem.saveFileUnicode() - Saves text data to the file specified. Look at the examples on the Exchange - http://www.multidmedia.com/support/developers/exchange/?action=searchproduc t=Alllevel=Allsearch= 1. (#0007) Simple Text Editor 2. (#0008) Encryption Example Regards Carl -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ned Perry Sent: Friday, March 23, 2007 6:13 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] MDM Zinc v2.5 Trial _ Writing files to hard drive Hi I need to make a Projector that writes files to the hard-drive. All the content elements are going to be Flash and I was hoping to use Zinc as a wrapper that could handle the file system elements. But I can't find any command to create a file. Does anyone know if there is one? There seems to be loads of stuff to copy and move files etc but not to make one. If there isn't can anyone recommend an alternative to Zinc other than Director. Cheers Ned This e-mail (and any attachments) is confidential and may contain personal views which are not the views of Cimex Media Ltd and any affiliated companies, unless specifically stated. It is intended for the use of the individual or group to whom it is addressed. If you have received it in error, please delete it from your system, do not use, copy or disclose the information in any way nor act in reliance on it and please notify [EMAIL PROTECTED] A company registered in England Wales. Company Number 03765711 Registered Office : The Olde Bakehouse, 156 Watling Street East, Towcester, Northants NN12 6DB This email was scanned by Postini, the leading provider in Managed Email Security. http://www.postini.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Resize tool like Illustrator or photoshop white arrow
Hello, I'am actionscript programmer and also a studiant an i'would like to know how to code a system to resize each corner of a movie clip or of an image (like the white arrow in illustrator or photoshop). Maybe a AS3 classe exist ? A really dont know but i'am very interested by it. Thanks and have a good week end ! -- PASCAL Cédric ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] timer question
In your example, seconds doesn't really mean anything. 60 seconds plus 10 seconds should never equal 70 seconds - you want it to equal 10 seconds. Maybe try... var seconds = 10; var now = new Date(); var future = new Date(); future.setSeconds ( now.getSeconds() + seconds ); // will auto adjust the time trace( 'now: ' + now ) trace( 'future: ' + future ) trace( 'time is up: ' + (now.getTime() future.getTime()) ) I found it better to use Date.getTime() and work with the milliseconds, like; // // TIME VERSION // var timeoutInterval:Number; var seconds:Number = 3; var now:Number = getTimer(); function startTimer ( time:Number ) { timeoutInterval = _global.setTimeout ( this, 'onTimesUp', time * 1000 ); } function clearTimer ( ) { _global.clearTimeout ( timeoutInterval ); } function onTimesUp ( ){ trace( ' \n onTimesUp \n' ) var then = now/1000; var now = getTimer()/1000; trace( 'TIME VERSION :: then: ' + then + ' now: ' + now + ' = ' + (now-then) ); var nowD:Date = new Date( ); var timechange = futureD.getTime( ) - nowD.getTime( ); trace( 'DATE VERSION :: timeup: ' + (timechange0) + ', ' + (timechange/1000) + ' seconds ago' ); } startTimer ( seconds ); // // DATE VERSION // var nowD:Date = new Date( ); var futureD:Date = new Date ( (seconds*1000) + nowD.getTime( ) ); var timechange = futureD.getTime( ) - nowD.getTime( ); trace( 'nowD: ' + nowD ); trace( 'futureD: ' + futureD ); trace( 'timechange: ' + (timechange/1000) + ' seconds' ); trace( 'time up: ' + (timechange0) ) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Duenas Sent: Friday, March 23, 2007 12:29 PM To: Flashcoders mailing list Subject: [Flashcoders] timer question Hi, I'm trying to launch an event using a timer so far the code for trace something is this: var now = new Date(); var seconds:Number = now.getSeconds(); trace(seconds); var newSeconds: Number = seconds+10; if ( seconds == newSeconds){ trace(plus 10); } var seconds:Number = seconds; the problem is that this ones doesn't trace plus 10, instead just traces the var seconds. Do you know what is wrong here? Regards. Gustavo Duenas ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] MDM Zinc v2.5 Trial _ Writing files to hard drive
You can only create text based files (.txt, .xml, etc..). mdm.FileSystem.saveFile(myText.txt, some text to put in file); If you want to create a specific file type (e.g. fla) you could include an empty fla with the project and make a copy of it when needed ;-) regards, Muzak - Original Message - From: Ned Perry [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, March 23, 2007 5:12 PM Subject: [Flashcoders] MDM Zinc v2.5 Trial _ Writing files to hard drive Hi I need to make a Projector that writes files to the hard-drive. All the content elements are going to be Flash and I was hoping to use Zinc as a wrapper that could handle the file system elements. But I can't find any command to create a file. Does anyone know if there is one? There seems to be loads of stuff to copy and move files etc but not to make one. If there isn't can anyone recommend an alternative to Zinc other than Director. Cheers Ned ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] timer question
you should use setInterval, see it in documentation --Pedro Taranto Gustavo Duenas escreveu: Hi, I'm trying to launch an event using a timer so far the code for trace something is this: var now = new Date(); var seconds:Number = now.getSeconds(); trace(seconds); var newSeconds: Number = seconds+10; if ( seconds == newSeconds){ trace(plus 10); } var seconds:Number = seconds; the problem is that this ones doesn't trace plus 10, instead just traces the var seconds. Do you know what is wrong here? Regards. Gustavo Duenas ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Re: attachMovie vs createClassObject
createClassObject is defined in UIObject core object. I don't think it can be called as a method of any movieclip. It also requires that you define static var symbolName : String = linkageID; static var symbolOwner : Object = com.myclass; and at the end of the day It calls createObject which basically uses attachMovie passing on the symbolName. Use it if your host mc is a UIObject (inheriting from mx.core.UIComponent or mx.core.UIObject). I use var myInstance:ClassType=ClassType(mc.attachMovie(ClassType.symbolName ,instanceName,depth)) Sometimes, if there is any pending code in the draw method of the created class instance, I wait for a frame using doLater. I hope this helps Yehia Shouman On 3/23/07, Andy Herrman [EMAIL PROTECTED] wrote: Just to amend my previous comment, in the case where I said `createClassObject()` failed but `attachMovie()` didn't, that ended up to be not quite true. `createClassObject()` didn't do anything, but `attachMovie()` created the visual portions of the clip, but it looks like none of the component's code was actually loaded, so while it appeared to be working it really wasn't. But in the cases where one works the other seems to work as well, so I'm still wondering what the difference is. -Andy On 3/20/07, Andy Herrman [EMAIL PROTECTED] wrote: I'm wondering if there are any significant differences between using `attachMovie()` and `createClassObject()` for creating components (I'm targeting for Flash 7). I just ran into a weird issue creating a ComboBox where I was using `createClassObject()` to instantiate it, but saw that elsewhere in the code it was using `attachMovie()` to create one, and both were working. Specifically, both this: mc.attachMovie(ComboBox, myComboBox, mc.getNextHighestDepth()); and this: mc.createClassObject(ComboBox, myComboBox, mc.getNextHighestDepth()); seems to give the same results in most cases. Is there any benefit to using `createClassObject()` over `attachMovie()` for components? The one situation I ran into where it gives different results is when using multiple SWFs from different places. I have a main movie which loads another movie that contains all the UI resources (makes branding easier). The UI resources movie contains the ComboBox in its library. If both the movies are on the local filesystem then it works fine, but if the resources SWF is on a remote web server the `createClassObject()` call fails. However, if I change it to use `attachMovie()` it works fine. So I'm leaning towards using `attachMovie()`, just to make my life easier for testing (don't have to upload the main movie every time I want to test it), but I'm wondering if that will cause issues later. -Andy ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] coverting video to flv on the server
Hi there, Somebody told me the other day there are tools that can convert the most common video formats to flvs. Unfortunately I can't remeber the names of these products. My company wants to create a youTube like web application where the user can upload a video which then gets converted to an flv. Any recommendations and/or thoughts? Cheers Robin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Shahid Kanwal Sent: Saturday, 24 March 2007 11:39 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] setting a timer in flash 8 hi, i think this might help with the flash timer stop(); pausedAt = getTimer(); this.createEmptyMovieClip(frameLoop, 1); frameLoop.onEnterFrame = function() { if ((getTimer()-pausedAt)/500=6) { play(); this.removeMovieClip(); } // end if }; I have used this many times. Shahid - Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] OT - Installing PHP, MySQL?
servers, firewall, domain, dns,... Don't burn your hands if it is all new to you. Just let the IT guy do it (you can even make profit on that) , or try it first at home. But I don't really know your client an budget Seth Caldwell wrote: Its easy enough - is it Apache or IIS? Installation for php still has the occasional hiccup over needing to move some files into the windows directory, or not realizing older versions of dll's from previous php installations are there and screwing up your new versions install. And sometimes IIS is a bit more painful than the apache installation. I say go for it, if it takes more than an hour then get the IT guy ;0 Seth -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Mennenoh Sent: Thursday, March 22, 2007 9:03 AM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] OT - Installing PHP, MySQL? Anyone have any experience in this area? We're developing a Flash site for a new client, who keeps all their own web servers in-house. They are MS house using .net and such. They are setting up a new server just for their new site, and since they are not familiar with PHP or MySQL (which is what we develop with) they are asking us to install them. They will give us remote access to the server... How hard / not-hard is it to install PHP and MySQL on a remote server? Anything to be weary of? Is it something I should just skip attempting and hire an IT guy to do it? Dave - Head Developer www.blurredistinction.com Adobe Community Expert http://www.adobe.com/communities/experts/ ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] MDM Zinc v2.5 Trial _ Writing files to hard drive
You could consider wrapping it into a Apollo projector :) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] setting a timer in flash 8
Btw when setting a start time other than 0 to the timer, it's the difference between both that will be calculated. Example : you app starts at 0ms, but for some reason you need some data loaded that your timer needs before it starts. You need to take into account the time elapsed. var wantedEnd:Number = 2000; var curTime:Number = getTimer(); soundTimer.startTimer(curTime, wantedEnd); the Timer won't go for 2 seconds, but an event will be triggerred after 2 seconds of the Application launch. HTH Alain Rousseau wrote: I made a Timer class that I use for another set of Classes I wrote. Here is the class itself, it's pretty precise and reliable so far. Hope it Helps ! usage : import ca.daroost.utils.Timer; soundTimer = new Timer(); soundTimer.addEventListener(onTimerDone, this); soundTimer.addEventListener(onTimerStart, this); soundTimer.startTimer(0, 2000); // 2 second timer function onTimerDone(evtObj:Object) { trace(Timer is done after +evtObj.delta+ms - wanted time is : +evtObj.timerDelta+ms); } function onTimerStart(evtObj:Object) { trace(Timer has started); } Class Start --- import mx.events.EventDispatcher; import mx.utils.Delegate; class ca.daroost.utils.Timer { // Constants: public static var CLASS_REF = ca.daroost.utils.Timer; // Public Properties: public var dispatchEvent:Function; public var addEventListener:Function; public var removeEventListener:Function; // Private Properties: private var tEnd:Number; private var tStart:Number; // usually this is 0, but in case of a sound loop there could be a start offset private var _starttime:Number; // actual timer start value set with getTimer() private var tDelta:Number; // Delta time between tEnd and tStart private var tInterval:Number; // Initialization: public function Timer(startTime:Number,endTime:Number) { EventDispatcher.initialize(this); tStart = (startTime != undefined) ? startTime : 0; tEnd = (endTime != undefined) ? endTime : 0; tDelta = 0; tInterval = 0; } // Public Methods: public function startTimer(startTime:Number,endTime:Number) { tEnd = endTime; tStart = startTime; tDelta = tEnd - tStart; _starttime = getTimer(); tInterval = setInterval(this, updateTimer, 1); this.dispatchEvent({target:this, type:onTimerStart, startTime:tStart, endTime:tEnd}); } public function set endTime(value:Number):Void { tEnd = value; } public function get endTime():Number { return tEnd; } public function set startTime(value:Number):Void { tStart = value; } public function get startTime():Number { return tStart; } // Semi-Private Methods: // Private Methods: private function updateTimer():Void { var _delta:Number; _delta = getTimer() - _starttime; if (_delta = tDelta -50) { // here we will get a more precise value with the last 50 ms while (_delta tDelta) { _delta = getTimer() - _starttime; } this.dispatchEvent({target:this, type:onTimerDone, delta:_delta, timerDelta:tDelta}); clearInterval(tInterval); } } } Class End--- Gustavo Duenas wrote: Hi, I'm trying to set a timer to trigger a event after 20 seconds or less, but so far i have this code, but with no results someone help me? . I don't know how could I got into but some help might be needed this is the code: is inside the first frame of a movie clip and the 4 frame has: gotoAndPlay(1); var now = getTimer(); var seconds:Number = now/1000; var later:Number = seconds+20; this.onEnterFrame= function (){ if(seconds == later){ trace(llegamos); } } trace(seconds); Regards Gustavo Duenas ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Resize tool like Illustrator or photoshop white arrow
You mean like a Free Distort tool ? I've seen some tests done with, can't remember the link ... might be a 3D experiment of some sort. I'll try to see if I bookmarked it. Cédric PASCAL wrote: Hello, I'am actionscript programmer and also a studiant an i'would like to know how to code a system to resize each corner of a movie clip or of an image (like the white arrow in illustrator or photoshop). Maybe a AS3 classe exist ? A really dont know but i'am very interested by it. Thanks and have a good week end ! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Image Caching Problem
Hi, By default cache I think you refer to the local storage setting in the Flash Player configuration... AFAIK, that's the amount of info you can store with SharedObjects, and has nothing to do with the cache used for storing loaded assets... the later depends exclusively on the browser's cache settings. A preloader is ALWAYS necessary when doing a loadMovie, 'cause even when they are in cache, there's a slight delay of a few frames till they actually appear on stage... so any operation dependant on the image would fail. So, your options are the ones you describe... preload everything when doing a loadMovie (My advice is to use a proxy function, or a loader class, so you never use loadMovie directly, making sure everything is loaded before beeing used), or else switch to Flash 8 and use BitmapData. BitmapData allows you to load images and store them in variables (the same way you would do with text from a loadVars operation), and use them as many times as you want (attachBitmap). The bitmapdata information stays in the computer's memory (ram when available, then virtual memory), so there is absolutely no problem if you only use 380Kb of images. Cheers... David Beermann escribió: Why don't you use BitmapData for storing the loaded images once and placing them in different movie clips as many times as you want? Attila Thanks, Attila. I forgot to mention that the project I'm currently working on is Flash7/AS2. So using the BitmapData Class is no option here. Am 10.03.2035 um 21:51 schrieb Alain Rousseau: There is a limit in each browser for the amount of cache available, if your files go over that amount, not all the files will stay in the cache ! You should try Attila's solution to this You right about the cache, Alain. The default cache setting allows each website to store 100 KB. My images add up to about 380 KB (76 files range from between 2 to 7 KB each). So caching could really be the problem. So my options are, to create a preloader for all areas where I need my thumbnails or the convince my client to switch to Flash 8. Would the switch really help or would I end up in another caching problem? I couldn't find any information in the AS2.0 Language Reference where the BitmapData Class stores its data. Or even better, is there any other solution to this problem? Thanks for your help. David ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Tile a vector Graphic symbol across stagehorizontally?
Hi Daniel! Thanks for the quick response, I really appreciate your help. Holth, Daniel C. wrote: Hope that helps! Oh! That solution is much more elegant than the one I came up with! Thanks Daniel! I really appreciate it. :) Have a great day/night! Many thanks for the code sample, I owe you one. Cheers, Micky -- Wishlists: http://snipurl.com/vrs9 Switch: http://browsehappy.com/ BCC?: http://snipurl.com/w6f8 My: http://del.icio.us/mhulse ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Tile a vector Graphic symbol across stage horizontally?
Hello, Micky Hulse wrote: The fill seems to use the stage as top/left as the starting registration point for my fill... I would like to have the fill start via the top/left corner of my lines above (0, 239). I ended up using a parent movie clip to do this... problem solved! :D Lol, such an easy solution too... sometimes I just do not see the forest through the trees... or something to that effect. Thanks all! Cheers, M -- Wishlists: http://snipurl.com/vrs9 Switch: http://browsehappy.com/ BCC?: http://snipurl.com/w6f8 My: http://del.icio.us/mhulse ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] RE: setting a timer in flash 8
var nInt:Number = setInterval(this, myFunction, 2); function myFunction():Void { clearInterval(nInt); etc . etc . }___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com