[Flashcoders] Can you embed .mp4 files in timeline?
Hey, Just trying one more time Using Flash CS3 and publishing to flash player 9, can you import and embed .mp4 files in the flash timeline? I can't. I can link to it via an flvplayback component. Thanks, Matt ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Can you import .mp4 files into the flash ide?
hi. i'm working on a video project that needs lots of invisible hotspots and rollover effects. so i'm forced to embed the video in the timeline to make that possible. i know it's not recommended but it will be played on a CD so i'm hoping that will minimize playback problems. the problem i'm having is that all videos are encoded as .mp4 and when i import them into the flash timeline as embedded video and then publish the movie i can hear the audio but i'm not seeing the video. i don't think the .mp4 files are the problem because i can play them just fine when i reference them with an flvplayback component. has anyone ever imported mp4 files with success? flash player 9/flash cs3 has support for mp4 but is it only when the files are external? i'm using flash cs3 version 9.0, with flash player 9.0.115 any tips are appreciated. thanks! matt ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] missing method
update: the problem was solved and the error was that there were two local vars with the same name, 'poly'. the first one was an instance of my Polyline class and the second was an instance of the Polygon class. the Polyline class has no method 'getArea()', but Polygon does. thanks for lending a hand. very much appreciated. -- matt. On 1/2/07, Yehia Shouman <[EMAIL PROTECTED]> wrote: Does your Polygon class has a constuctor? On 1/3/07, Omar Fouad <[EMAIL PROTECTED]> wrote: > > u should set the class from static to dynamic in order to get acess to > that > method > > On 1/2/07, Matt Ganz <[EMAIL PROTECTED]> wrote: > > > > hi. > > > > i'm having a strange problem. i'm getting compile-time errors when i try > > to > > access a public function in a class. i can successfully access other > > public > > methods in this class from the same place in the codebase (verified thru > > traces), but not this one. > > > > i don't know if it's a weird CVS error or not, but here's what it looks > > like > > when i try to access the method (getArea()): > > > > if (geom instanceof Polygon) { > > var poly:Polygon = Polygon(geom); > > geomarkup.area = poly.getArea(); // error occurs right here. > > } > > > > and here's the error i'm getting: > > > > There is no method with the name 'getArea'. but the method is in there > in > > the class and it looks like this: > > > > public function getArea():Number{ > > if(area != null) > > return area; > > } > > > > has anyone had similar issues and can point me in a general direction. > i'm > > a > > little at a loss. > > > > any tips are greatly appreciated. thanks -- matt. > > ___ > > 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 ___ 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] missing method
unfortunately, that didn't solve the problem. i can access other methods in the class and even add new trace statements (to ensure that the IDE is looking at the right version of the class and not some old CVS'd version). bizarre, really. On 1/2/07, Omar Fouad <[EMAIL PROTECTED]> wrote: u should set the class to dynamic ___ 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] missing method
hi. i'm having a strange problem. i'm getting compile-time errors when i try to access a public function in a class. i can successfully access other public methods in this class from the same place in the codebase (verified thru traces), but not this one. i don't know if it's a weird CVS error or not, but here's what it looks like when i try to access the method (getArea()): if (geom instanceof Polygon) { var poly:Polygon = Polygon(geom); geomarkup.area = poly.getArea(); // error occurs right here. } and here's the error i'm getting: There is no method with the name 'getArea'. but the method is in there in the class and it looks like this: public function getArea():Number{ if(area != null) return area; } has anyone had similar issues and can point me in a general direction. i'm a little at a loss. any tips are greatly appreciated. thanks -- matt. ___ 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] calculating dates based on a starting date.
very nice. thank you very much. - Original Message - From: "Merrill, Jason" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Thursday, April 27, 2006 4:27 PM Subject: RE: [Flashcoders] calculating dates based on a starting date. Here is a SuperDate class I wrote if it's of use to you. You can get a future date and also get the elapsed number of days since a date, get the ordinal date etc. /* Name: SuperDate Class Author: Jason Merrill Date: 1/10/2006 Description: Some methods to help with date class needs - still a work in progress. See descriptions beside each method. Usage Example: var thisMonthAbreviated:String = SuperDate.getMonthName(myMonthNumber, true); */ class com.icfconsulting.utils.SuperDate extends Date{ function SuperDate(){ }; public static function getMonthName(mo:Number, abreviated:Boolean):String{//returns the name of the month in full or abbreviated. var months:Array = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); var monthsAbreviated:Array = new Array("Jan", "Feb", "Mar", "Apr," ,"May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"); var month:String; if(abreviated){ month = monthsAbreviated[mo]; }else{ month = months[mo]; } return month; }; public static function getOrdinalDate(num:Number):String{//adds the ordinal to the date - i.e. 15th, 21st, 2nd, 3rd. etc. var ordinal:String; if(num ==1 || num == 21 || num == 31){ ordinal = "st"; }else if (num == 2 || num == 22 ){ ordinal = "nd"; }else if (num == 3 || num == 23){ ordinal = "rd" }else{ ordinal = "th"; } return num+ordinal; }; public static function formatDate(date:Date):String{//formats the date object into somehting readable. var thisMonth:Number = date.getMonth()+1; var thisDay:Number = date.getDate(); var thisYear:Object = date.getUTCFullYear()-2000; if(thisYear <10){ thisYear = "0"+String(thisYear); }; var thisDate:String = thisMonth+"/"+thisDay+"/"+thisYear; return thisDate; }; public static function getElapsedDays(earlierDay:Date, laterDay:Date):Number{//calculated the number of days elapsed since the input date. var dms:Number = laterDay-earlierDay; // difference in milliseconds dms = Math.floor(dms/1000/60/60/24); // difference in days return dms; }; public static function returnDate(initDate:Date, daysToAdd:Number):Date{//calculates a date in the future based on an initial date. var newDate:Date = new Date(initDate.getTime()); var newDateNum:Number = newDate.setDate(newDate.getDate() + daysToAdd); return new Date(newDateNum); }; } Jason Merrill | E-Learning Solutions | ICF International ___ 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] calculating dates based on a starting date.
hi karina. that looks very useful. yes, please post it on your blog. i'm not sure it's an exact fit for my problem but i'm making some progess here. for example, i have a starting date as a date object and based upon what the user selects, i can calculate an increment. the only remaining unknown is how to calculate it over a 13 month period. here is what i've got so far: infusionDates.push( startingDate ); // set the initial start date in the array. // user selects 1 infusion once a week if( infusions == 1 && weeks == 1 ) { increment = 7; for( i:Number=0; i<4; i++ ) // but '4' here is wrong. what value do i use to represent 13 months?? { infusionDates.push( startingDate += increment ); } } thank you very much for your help. -- matt. - Original Message - From: "Karina Steffens" <[EMAIL PROTECTED]> To: "'Flashcoders mailing list'" Sent: Thursday, April 27, 2006 2:19 PM Subject: RE: [Flashcoders] calculating dates based on a starting date. Hi Matt, If what you're looking for is a way to subtract two dates, then it's your lucky day... I just wrote an Age Counter component that displays how long it's been since a specific date (years, months, hours, minutes, and seconds). It's for a client who wants to show how long his pediatric center has been running (a very long time...): http://www.belilovskypediatrics.com/en/about.htm Anyway, you don't need the whole class, just the relevant function which is: function getAge (year:Number, month:Number, day:Number):Date { //Founded day or birthday var founded:Date = new Date (year, month, day); //Today var today:Date = new Date (); //Time difference in milliseconds var mil:Number = today.getTime () - founded.getTime (); //The age, in a date format var age:Date = new Date (); //Set the age (in relateion to 1970) age.setTime (mil); //Adjust the year age.setYear (age.getYear () - 70); return age; } The function returns a Date format, from which you can easily extrapolate everything you need - var age:Date = AgeCounter.getAge (1970, 6, 12); //That's my birthday, send me a card ;) Note: The month is 0 based, so don't send me that card in June, but in July ;) The day is 1 based, so my birthday is indeed on the 12th And get the various age differences between dates like this: age.getYear(), age.getMonth(), age.getDate(), age.getHour(), age.getSecond() If you need exact hours, just add them to the method. See docs for creating a Date object. Anyone - let me know if you want the AgeCounter component itself, I'll post it on the blog. Cheers, Karina -Original Message- From: matt ganz [mailto:[EMAIL PROTECTED] Sent: 27 April 2006 18:18 To: Flashcoders mailing list Subject: [Flashcoders] calculating dates based on a starting date. hi. i'm building a scheduler app for people who need infusions over a 1 year period. a user selects the following info to begin: 1. a starting date for first infusion - day, month, and year 2. number of infusions - 1-4 3. frequency of infusions - every 1, 2, 3, or 4 weeks. i have to come up with a schedule of infusion dates over the next 13 months. the breakdown of infusion frequency goes like this: CASE 1: user selects infusions per 1 week period. a. 1 infusion every week -> increment every 7 days b. 2 infusions "" -> increment every 4 days c. 3 infusions "" -> increment every 2 days d. 4 infusions "" -> alert ("max 3 infusions/week" ); CASE 2: user selects infusions per 2 week period. a. 1 infusion every 2 weeks -> increment every 14 days b. 2 infusions "" -> increment every 7 days c. 3 infusions "" -> increment every 4 days d. 4 infusions "" -> increment every 4 days CASE 3: user selects infusions per 3 week period. a. 1 infusion every 3 weeks -> increment every 21 days b. 2 infusions "" -> increment every 10 days c. 3 infusions "" -> increment every 7 days d. 4 infusions "" -> increment every 5 days CASE 4: user selects infusions per 4 week period. a. 1 infusion every 4 weeks -> increment every 28 days b. 2 infusions "" -> increment every 14 days c. 3 infusions "" -> increment every 9 days d. 4 infusions "" -> increment every 7 days the way i figured to do it would be to capture the starting day and month and then calculate ( based on number of infusions and frequency ) every other day and month over a 13 month period. i'd throw all of these values into an 'infusionDates' array and then i can loop over them and change the properties of the DateChooser that i need. i just need help figuring out how to populate the infusionDates array. can anyone help me get started, please? thanks for any tips. -- matt.
[Flashcoders] calculating dates based on a starting date.
hi. i'm building a scheduler app for people who need infusions over a 1 year period. a user selects the following info to begin: 1. a starting date for first infusion - day, month, and year 2. number of infusions - 1-4 3. frequency of infusions - every 1, 2, 3, or 4 weeks. i have to come up with a schedule of infusion dates over the next 13 months. the breakdown of infusion frequency goes like this: CASE 1: user selects infusions per 1 week period. a. 1 infusion every week -> increment every 7 days b. 2 infusions "" -> increment every 4 days c. 3 infusions "" -> increment every 2 days d. 4 infusions "" -> alert ("max 3 infusions/week" ); CASE 2: user selects infusions per 2 week period. a. 1 infusion every 2 weeks -> increment every 14 days b. 2 infusions "" -> increment every 7 days c. 3 infusions "" -> increment every 4 days d. 4 infusions "" -> increment every 4 days CASE 3: user selects infusions per 3 week period. a. 1 infusion every 3 weeks -> increment every 21 days b. 2 infusions "" -> increment every 10 days c. 3 infusions "" -> increment every 7 days d. 4 infusions "" -> increment every 5 days CASE 4: user selects infusions per 4 week period. a. 1 infusion every 4 weeks -> increment every 28 days b. 2 infusions "" -> increment every 14 days c. 3 infusions "" -> increment every 9 days d. 4 infusions "" -> increment every 7 days the way i figured to do it would be to capture the starting day and month and then calculate ( based on number of infusions and frequency ) every other day and month over a 13 month period. i'd throw all of these values into an 'infusionDates' array and then i can loop over them and change the properties of the DateChooser that i need. i just need help figuring out how to populate the infusionDates array. can anyone help me get started, please? thanks for any tips. -- matt. ___ 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] best way to correlate dates with DateChooser
hi. - i'm building a scheduler app where a user picks a starting day, month, and year for an infusion. - then they can choose how frequently they want an infusion, i.e. every week, every two weeks, etc.. - then i calculate every day for an infusion for the next year and throw all these dates into an array, i.e. infusionDates. now, from my research this appears to be the way to target individual cells in a DateChooser component: myDateChooser.dateGrid[ "dayBlock"+columnIndex+"label"+rowIndex ]; the data i'm currently capturing in my infusionDates array doesn't really translate very well over to columnIndex and rowIndex. my question is: what is the best way to set up the infusionDates array so i can easily target those dates in the DateChooser? basically i'd just like to loop over that array and be able to target individual cells and change their properties. any tips are very much appreciated. thanks. -- matt. ___ 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] creating a schedule based on starting date
hi. i'm building a scheduler application. a user chooses the first date of their infusion and then how many they want and how frequently. a user can choose between 1-3 infusions every 1, 2, 3, or 4 weeks. these values are stored in comboboxes where the user makes their selection. what i want to do is calculate on what days there will be infusions and then push them into an array. i capture the starting date and injections like this: startingMonth = month_cb.selectedItem.data; startingDay = day_cb.selectedItem.label; startingYear = year_cb.selectedItem.label; infusions = infusions_cb.selectedItem.label; weeks = weeks_cb.selectedItem.label; how would i go about pushing them into an array? this is what i've begun with. var infusionDates:Array = new Array(); infusionDates.push( startingDay + " " + startingMonth + " " + startingYear ); // how would i increment it? any tips on getting started are greatly appreciated. thanks. -- matt. ___ 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] DateChooser selected date.
hey. don't know if the DateChooser component for flash 8 was updated or not but i'm trying to highlight a few days in each month. i can see the 'selectedDate' property does this but it doesn't appear to be able to for more than one date in each month. anyone know of a workaround? thanks. -- matt. ___ 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] Sound.stop(linkage) problem
have you created a sound object for every sound in your file? i believe the minute you want to manipulate sounds independent from one another you have to create a sound object for each sound in your movie. otherwise, it'll affect all sounds...as that 'sounds' what is happening to you. On 3/2/06, Anggie Bratadinata <[EMAIL PROTECTED]> wrote: > Hi Ramon, > I think you should invoke stop() to the mc into which the sound is > loaded / attached. > > -- > Anggie Bratadinata > Web|Graphic|Flash > Jl. Raya Langsep 21 > Malang - East Java > I N D O N E S I A > http://design.ibshastautama.com > > > Ramon Miguel M. Tayag wrote: > > Hi everyone, > > > > I was pulling out my hair a while ago because in my movie, when I > > stopped one sound it stopped all. After commenting code randomly, I > > found out the anySound.stop() stopped all sounds. > > > > Looking at the documentation, it says you can specify what sound to > > stop using a linkage ID. I understand that'd work fine if you use > > sound.attachSound (getting a sound from the library), but what if you > > use sound.loadSound(file)? What is the linkageID now? > > > > Thank you, > > ___ > 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] working with multiple sound objects.
nice catch. that's my bad but i have it fixed now. i just got it working and i simply pass the container movie clip housing my media display component into the sound constructor a la: var sound_md1:Sound = new Sound( _level0.container_mc1 ); and it's working fine. thank you very much for your help. matt. On 2/27/06, Helen Triolo <[EMAIL PROTECTED]> wrote: > Matt Ganz wrote: > > >the reference is named room1Music but the actualy movie clip instance > >name is _level0.room1_mc. i've been using the reference before the > >sound methods, i.e. room1Music.start(), etc... > > > > > > > > That's not what I see in the code you posted. I see room1 being used as > the (non-existent, according to the rest of your code) instance name. eg, > > >>>>>var room1Music:Sound = new Sound( _level0.room1_mc ); > >>>>>room1.setVolume( 80 ); > >>>>>room1.stop(); > >>>>> > >>>>> > > ___ > 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] working with multiple sound objects.
the reference is named room1Music but the actualy movie clip instance name is _level0.room1_mc. i've been using the reference before the sound methods, i.e. room1Music.start(), etc... im trying to manipulate several sounds independently of another. i have 4 sound objects; 1 for each media display component i'm using. i also have 3 other sound objects that i'm using for background mp3s. i just changed the ones for the mp3s to use attachSound() and now it is working fine. thanks eric. but i can't use that method with a media display component. so i'm trying to figure out the best way to control those. thank you for your help. matt. On 2/27/06, Helen Triolo <[EMAIL PROTECTED]> wrote: > You can. But are your sound instances named room1Music or room1? Does > it make a difference if you correct that? > > Helen > > Matt Ganz wrote: > > >no. i thought you could just pass in a reference to the sound > >constructor with the instance name of the movie clip that houses the > >mp3 file. > > > >On 2/27/06, eric dolecki <[EMAIL PROTECTED]> wrote: > > > > > >>I assume you forgot your attachSound code in your email? > >> > >>On 2/27/06, Matt Ganz <[EMAIL PROTECTED]> wrote: > >> > >> > >>>hi. > >>> > >>>i have 3 sound objects that i'm working with in my app. i have them > >>>all load when the site launches but i stop() them all at first because > >>>i don't want them all to start playing. here's the code: > >>> > >>>var room1Music:Sound = new Sound( _level0.room1_mc ); > >>>room1.setVolume( 80 ); > >>>room1.stop(); > >>>var room2Music:Sound = new Sound( _level0.room2_mc ); > >>>room2.setVolume( 80 ); > >>>room2.stop(); > >>>var room3Music:Sound = new Sound( _level0.room3_mc ); > >>>room3.setVolume( 80 ); > >>>room3.stop(); > >>> > >>>each of the sounds is set to 'start' and 'loop' in their respective mcs. > >>> > >>>the problem is that when the site launches, room1 sound is stopped but > >>>room2 and room3 play. why might that be happening? i can successfully > >>>trigger the room1 sound a little further down in my site via: > >>> > >>>room1.start(); // and it starts playing exactly where it should. > >>> > >>>i guess i just don't understand why i can stop 1 of the sounds but not > >>>all. > >>> > >>>any insight is greatly appreciated. > >>> > >>>thanks. -- matt. > >>> > >>> > > ___ > 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] working with multiple sound objects.
no. i thought you could just pass in a reference to the sound constructor with the instance name of the movie clip that houses the mp3 file. On 2/27/06, eric dolecki <[EMAIL PROTECTED]> wrote: > I assume you forgot your attachSound code in your email? > > On 2/27/06, Matt Ganz <[EMAIL PROTECTED]> wrote: > > > > hi. > > > > i have 3 sound objects that i'm working with in my app. i have them > > all load when the site launches but i stop() them all at first because > > i don't want them all to start playing. here's the code: > > > > var room1Music:Sound = new Sound( _level0.room1_mc ); > > room1.setVolume( 80 ); > > room1.stop(); > > var room2Music:Sound = new Sound( _level0.room2_mc ); > > room2.setVolume( 80 ); > > room2.stop(); > > var room3Music:Sound = new Sound( _level0.room3_mc ); > > room3.setVolume( 80 ); > > room3.stop(); > > > > each of the sounds is set to 'start' and 'loop' in their respective mcs. > > > > the problem is that when the site launches, room1 sound is stopped but > > room2 and room3 play. why might that be happening? i can successfully > > trigger the room1 sound a little further down in my site via: > > > > room1.start(); // and it starts playing exactly where it should. > > > > i guess i just don't understand why i can stop 1 of the sounds but not > > all. > > > > any insight is greatly appreciated. > > > > thanks. -- matt. > > > > ___ > > 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
[Flashcoders] working with multiple sound objects.
hi. i have 3 sound objects that i'm working with in my app. i have them all load when the site launches but i stop() them all at first because i don't want them all to start playing. here's the code: var room1Music:Sound = new Sound( _level0.room1_mc ); room1.setVolume( 80 ); room1.stop(); var room2Music:Sound = new Sound( _level0.room2_mc ); room2.setVolume( 80 ); room2.stop(); var room3Music:Sound = new Sound( _level0.room3_mc ); room3.setVolume( 80 ); room3.stop(); each of the sounds is set to 'start' and 'loop' in their respective mcs. the problem is that when the site launches, room1 sound is stopped but room2 and room3 play. why might that be happening? i can successfully trigger the room1 sound a little further down in my site via: room1.start(); // and it starts playing exactly where it should. i guess i just don't understand why i can stop 1 of the sounds but not all. any insight is greatly appreciated. thanks. -- matt. ___ 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] flv video encoding for flash 7
my recommendation would also be to use sorenson squeeze. here's the equation i use (taken from a video tutorial on macromedia.com) to calculate data rate: ( ( movieWidth x movieHeight x fps ) / 1000 ) / 2.5 check these two links for more: http://www.macromedia.com/devnet/flash/articles/video_guide_02.html#encoding http://www.macromedia.com/devnet/flash/articles/flv_encoding_02.html On 15 Feb 2006 16:11:57 -, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I used the flash 8 video encoding tool and set it for flash 7 high quality > (700k) and the video is very pixelated, I've uploaded it here for review : > > http://bluetubecom.web123.discountasp.net/clients/soapbox/videotest.html > > the original quicktime is here : > > http://bluetubecom.web123.discountasp.net/clients/soapbox/img/PortVideo/SBS_open_for_flash-test.mov > > the flv version is really pixelated, not acceptable at all. Someone > suggested using sorenson squeeze instead of the flash video encoder as it may > produce better results but I'm pretty green on flash video. > > The settings I used for that where : > > Sorenson spark codec, frame rate same as source (29.xx), keyframe placement > automatic, quality, custom, 1000 kilobits per sec, no video resize, audio > mp3, 128kbs stereo. > > Thanks > Grant. > > > > - Original Message - > From: Fabio Sonnati [EMAIL PROTECTED] > To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com > Sent: 2/15/06 2:54 AM > Subject: Re: [Flashcoders] flv video encoding for flash 7 > > > I think its sorenson > > let we know what you used to encode your video and related settings. > > > > Fabio Sonnati > > http://flashvideo.progettosinergia.com > > > > > > - Original Message - > > From: > > To: > > Sent: Wednesday, February 15, 2006 7:07 AM > > Subject: [Flashcoders] flv video encoding for flash 7 > > > > > > >I have a quicktime that I need to encode to an flv and have had very poor > > >results (pixelation/noise) using flash 7 sorenson. I found this site : > > > > > > http://www.creativedigitalgroup.com > > > > > > the quaility of video on there looks very good, is it my source material > > > that is too hard to encode and produce a good quality flv ? Or is that > > > site really using the on2 Vp6 codec ? Is there a way to tell in an flv is > > > on2 or sorenson without some special tools ? > > > > > > Grant. > > > ___ > > > 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 > ___ 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] using MCL to keep track of total bytes loaded.
hi. i have a question on using the MovieClipLoader class to load an array of swf files. i just want to add the loadedBytes of each swf to another variable so i can constantly compare the loaded to the total of all swf files. in the end, i need to figure out the percentage of the total swfs combined weight is loaded. i've started off a little here but am not sure how to compare the values or if i'm adding it correctly. can anyone see if i'm approaching this correctly so far? here's my code: // An array that holds the paths to external swf files. var mainSwfArray:Array = new Array( { path: "one.swf", id: "one_mc", depth: 6 }, { path: "two.swf", id: "two_mc", depth: 8 }, { path: "three.swf", id: "three_mc", depth: 18 }, { path: "four.swf", id: "four_mc", depth: 16 }, { path: "five.swf", id: "five_mc", depth: 14 }, { path: "six.swf", id: "six_mc", depth: 12 }, { path: "seven.swf", id: "seven_mc", depth: 10 } ); var totalWeight:Number = 5677376; // the total weight of the swf files in the mainSwfArray (in bytes). var loadedWeight:Number = 0; // we'll add to this variable as the movies get loaded. var mainMCL = new MovieClipLoader(); var mainMclListener = new Object(); mainMCL.addListener( mainMclListener ); // onLoadProgress() mainMclListener.onLoadProgress = function( targetMC, loadedBytes, totalBytes) { loadedWeight += loadedBytes; // then do a test to find out the percentage loadedWeight is of totalWeight. i need to know when it's reached 10%, 20%, 30%, etc... } thanks. -- matt. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] is delegate the answer?
hey john. that did help. i've still got some remaining issues with retrieving the correct scope but eval() worked. thanks. -- matt. - Original Message - From: "John Grden" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Sunday, January 08, 2006 12:01 AM Subject: Re: [Flashcoders] is delegate the answer? Hey Matt, if completeScope is a string, eval it in your call: removeEventListener( "complete", eval(completeScope)); removeEventListener is looking for function or object in the second argument: function removeEventListener(event:String, handler):Void As for using Delegate, I don't think that's the issue here, but then again, I might be missing your question. hth, John On 1/7/06, Matt Ganz <[EMAIL PROTECTED]> wrote: hi. i'm having problems referencing a listener that is attached to my media display component. i believe the answer lies in my using delegate. when my video plays thru, i can successfully remove my listener a la: var completeListener = new Object(); completeListener.complete = function( eventObject:Object ) { _level0.container_mc1.mediaDisplay1.removeEventListener( "complete", this ); // works great. }; _level0.container_mc1.mediaDisplay1.addEventListener( "complete", completeListener ); the problem is that i have a navigation menu that allows you to jump out of the section you're in (interrupting the video) and move to another section. at this point i have to remove all listeners, and i've been trying to do it by passing the scope along a la: function jumpToNewSection( my Params ) _level0.[ "container_mc" + mediaNum ][ currentMediaDisplay ].removeEventListener( "complete", completeScope); } where completeScope is a string: _level0.externalSwf_mc.completeListener; but it's not working. would i be better off going with delegate in this instance? thanks for any helpful tips. matt. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- John Grden - Blitz ___ 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] is delegate the answer?
hi. i'm having problems referencing a listener that is attached to my media display component. i believe the answer lies in my using delegate. when my video plays thru, i can successfully remove my listener a la: var completeListener = new Object(); completeListener.complete = function( eventObject:Object ) { _level0.container_mc1.mediaDisplay1.removeEventListener( "complete", this ); // works great. }; _level0.container_mc1.mediaDisplay1.addEventListener( "complete", completeListener ); the problem is that i have a navigation menu that allows you to jump out of the section you're in (interrupting the video) and move to another section. at this point i have to remove all listeners, and i've been trying to do it by passing the scope along a la: function jumpToNewSection( my Params ) _level0.[ "container_mc" + mediaNum ][ currentMediaDisplay ].removeEventListener( "complete", completeScope); } where completeScope is a string: _level0.externalSwf_mc.completeListener; but it's not working. would i be better off going with delegate in this instance? thanks for any helpful tips. matt. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash Remoting and CF
it's what i did. within flash, i'd create either a generic object or an associative array and i'd pass that entire object in my remoting call. the method in my cfc is set up to accept this arg and the first thing that it does is loop over it and passes those values along to my database. and going back i'd do the same thing. i used structs and passed it back to flash where i'd loop over the result and then going about using those values where needed. i used the netconnection debugger to view the back and forth and it gave me a real nice visual display of the structure of my data. hth. On 12/21/05, Sam Shrefler <[EMAIL PROTECTED]> wrote: > I was wondering what other people's practices were when using Flash Remoting > and Coldfusion together with respect to passing values. > > Usually, I create an Object in flash ( usually containing all the arguments > I want to pass to flash, for example: all the values of a form ) and it > remoting converts those valuse to arguments used in my cfc. > > When going from CF (say i'm initializing a form and getting a bunch of data > from my cfc )... I'll usually create a struct in cf that contains all the > information and pass it back to flash. > > Does this seem to common to what other people do? > > Thanks > > Sam > ___ > 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] JM Events Calendar v1.2.0
hi ryan. i have an events calendar component i built in as2 that is xml-driven. i haven't done any fancy skinning or the like but i definitely can hook you up with the script. email me offlist. matt. On 12/9/05, Ryan Mayer <[EMAIL PROTECTED]> wrote: > Just double checking if anyone knows of a calendar script that'll help me > solve my issue? > > Thanks in advance > > ¬ > r. > > > > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf > > Of Ryan Mayer > > Sent: December 8, 2005 1:12 PM > > To: 'Flashcoders mailing list' > > Subject: RE: [Flashcoders] JM Events Calendar v1.2.0 > > > > > > Damn... Can anyone recommend a good calendar script that uses > > xml I can use then? All I need is to be able to show there's > > an event on a certain day and then have that day "clickable" > > which will bring up more details. > > > > Thanks, > > > > > > ¬ > > r. > > > > > > > > > > > > > -Original Message- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] On Behalf > > > Of JesterXL > > > Sent: December 8, 2005 12:27 PM > > > To: Flashcoders mailing list > > > Subject: Re: [Flashcoders] JM Events Calendar v1.2.0 > > > > > > > > > There have been issues with TextFields blanking out when they > > > are placed at > > > authortime onto the stage, and then that SWF is loaded into > > > another one. > > > > > > One way to fix it is to create the textfields dyanmically, > > > but I'm sure > > > that's a lot of work. > > > > > > I can't remember the other solutions. > > > > > > - Original Message - > > > From: "Ryan Mayer" <[EMAIL PROTECTED]> > > > To: "'Flashcoders mailing list'" > > > Sent: Thursday, December 08, 2005 2:16 PM > > > Subject: RE: [Flashcoders] JM Events Calendar v1.2.0 > > > > > > > > > > mb a lockroot issue? > > > > > > I'm not really sure. I checked throughout the code and there > > > isn't any reference to _root. Just "this" since it's a > > > componet. There's no embeded fonts either, just a default "_sans". > > > > > > > > > ¬ > > > r. > > > > > > ___ > > > 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 > > > > ___ > 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] the bitmap shift bug
SOLVED: yes, i'm publishing to fp7. when i view it in fp7 i see the 1px shift, but when i view it in fp8, it doesn't happen. voila, the problem is solved. but my question now becomes why doesn't this shift happen with all my flvs that have bitmaps composited in them? why only some? thanks for your help. -- matt. On 12/1/05, Eric E. Dolecki <[EMAIL PROTECTED]> wrote: > pixelshift has been fixed in fp8, but you are publishing to fp7 right? > > edolecki > > On Dec 1, 2005, at 6:29 PM, Matt Ganz wrote: > > > point taken. i'll trace out the x and y of my media display to ensure > > it's ending up where i want it. > > > > and the odd thing about it is that i'm using 7 flvs and only 2 are > > suffering from this shift. > > > > i've also been thinking that it could be due to the way i'm > > compressing the flvs. i've tried recompressing with a higher data rate > > but that hasn't been a consistent fix. > > > > thanks for your help. -- matt. > > > > On 12/1/05, David Rorex <[EMAIL PROTECTED]> wrote: > >> On 12/1/05, Matt Ganz <[EMAIL PROTECTED]> wrote: > >>> just wondering if the known bug that shifts bitmaps 1px > >>> (http://www.misuseit.com/bitmapbug/) could affect an flv that has a > >>> bitmap composited in it. > >>> > >>> i'm experiencing 1px shifts (to the right) that do not appear to be > >>> specific to screen resolution, browser, or platform. > >>> > >>> my flv is called externally and played thru a media display > >>> component. > >>> swf is published for fp7. > >>> > >>> thanks. -- matt. > >> > >> if it's consistent, just compensate by shifting the thing one > >> pixel to the left. > >> > >> the bug from the link, shifts down & right, not just to the right. So > >> it may be related, but both the thing it affects, and the effect it > >> has is different, which would seem to point to it being a different > >> bug, possibly in your code. > >> > >> > >> -David R > >> -David R > >> ___ > >> 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 > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] the bitmap shift bug
point taken. i'll trace out the x and y of my media display to ensure it's ending up where i want it. and the odd thing about it is that i'm using 7 flvs and only 2 are suffering from this shift. i've also been thinking that it could be due to the way i'm compressing the flvs. i've tried recompressing with a higher data rate but that hasn't been a consistent fix. thanks for your help. -- matt. On 12/1/05, David Rorex <[EMAIL PROTECTED]> wrote: > On 12/1/05, Matt Ganz <[EMAIL PROTECTED]> wrote: > > just wondering if the known bug that shifts bitmaps 1px > > (http://www.misuseit.com/bitmapbug/) could affect an flv that has a > > bitmap composited in it. > > > > i'm experiencing 1px shifts (to the right) that do not appear to be > > specific to screen resolution, browser, or platform. > > > > my flv is called externally and played thru a media display component. > > swf is published for fp7. > > > > thanks. -- matt. > > if it's consistent, just compensate by shifting the thing one pixel to the > left. > > the bug from the link, shifts down & right, not just to the right. So > it may be related, but both the thing it affects, and the effect it > has is different, which would seem to point to it being a different > bug, possibly in your code. > > > -David R > -David R > ___ > 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] the bitmap shift bug
just wondering if the known bug that shifts bitmaps 1px (http://www.misuseit.com/bitmapbug/) could affect an flv that has a bitmap composited in it. i'm experiencing 1px shifts (to the right) that do not appear to be specific to screen resolution, browser, or platform. my flv is called externally and played thru a media display component. swf is published for fp7. thanks. -- matt. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] problem positioning media display
hi. i have a media display component that i'm constantly moving around the stage and loading new flvs into. i do this via: function setMediaDisplayPos( x:Number, y:Number ):Void { _level0..mediaDisplay.move( x, y ); } on my machine, FLV4 is off by a pixel. but on other machines, FLV4 is just fine and FLV1 and FLV5 are off by a pixel. i thought this might be related to screen resolution and ran some tests only to find that it is not. for example, i changed my resolution to the other machines i tested on (where FLV1 and FLV5 were off) and still i'm having a problem only with FLV4. any ideas on what i might be experiencing here? thanks. -- matt. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Re: external flv stuttering even though completely loaded.
UPDATE: i've been tracing out the bytesLoaded, bytesTotal, and playheadTime for my media display components so i can see what is going on. my scenario is that i have 2 media display components and as 1 plays, the other one loads in an flv behind the scenes. whenever an flv gets loaded behind the scenes, i can see the bytes being loaded and when it's fully loaded, playheadTime=0. but when i load my first flv, the first time, into my 2nd media display, i see the bytes loaded but the playhead time is empty...even when it's fully loaded. the other flvs don't behave like this. could that be my problem? and why might that happen with my very first flv? thanks. -- matt. On 11/29/05, Matt Ganz <[EMAIL PROTECTED]> wrote: > hi. > > i'm loading an external flv into a media display component behind the > scenes. the dimensions are 360x386 and the flv weighs 908kb. the > problem is that the when i tell it to play, it still stutters for the > first frame (on a high-speed connection). > > before the user even gets to this part, the flv is already fully > loaded...but it still stutters. > > it doesn't happen with any of the other flvs in my app which are > loaded the exact same way. but most of those weigh behind 250-600kb > and their dimensions are approx. 180x274. > > this is how i preload my flvs behind the scenes: > > mediaDisplay.setMedia( path, "FLV" ); > mediaDisplay.play( 0 ); > mediaDisplay.pause(); > > my assumption is that my video is at a dimension that is too big, it > weighs too much...and the cheesy effect i have at the beginning is too > much. can anyone think of anything else i might check into? > > thanks. -- matt. > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] external flv stuttering even though completely loaded.
hi. i'm loading an external flv into a media display component behind the scenes. the dimensions are 360x386 and the flv weighs 908kb. the problem is that the when i tell it to play, it still stutters for the first frame (on a high-speed connection). before the user even gets to this part, the flv is already fully loaded...but it still stutters. it doesn't happen with any of the other flvs in my app which are loaded the exact same way. but most of those weigh behind 250-600kb and their dimensions are approx. 180x274. this is how i preload my flvs behind the scenes: mediaDisplay.setMedia( path, "FLV" ); mediaDisplay.play( 0 ); mediaDisplay.pause(); my assumption is that my video is at a dimension that is too big, it weighs too much...and the cheesy effect i have at the beginning is too much. can anyone think of anything else i might check into? thanks. -- matt. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] reading 'loadedBytes' from MovieClipLoader onLoadProgress
brilliant. it works perfectly. thank you for taking the time to help me out. -- matt. On 11/21/05, David Rorex <[EMAIL PROTECTED]> wrote: > I might do something like: (warning, not tested, but in theory it should work) > > var mcl:MovieClipLoader = new MovieClipLoader(); > var listener:Object = new Object(); > listener.counts = {}; // keep track of each individual movieclip's progress > listener.onLoadProgress = function(mc, loaded, total) > { > this.counts[mc] = loaded / total; // store the percent of each > movieclip's progress > var n = 0; > var sum = 0; > for(var i in this.counts) // loop through all the progresses, and > count them & sum them > { > n++; > sum+=this.counts[i]; > } > var pcnt = sum / n; // find the average % complete > trace("Overall percentage: "+Math.round(pcnt * 100)+"%"); > } > mcl.addListener(listener); > mcl.loadClip(url1, target1); > mcl.loadClip(url2, target2); > mcl.loadClip(url3, target3); > > > -David R > > On 11/21/05, Matt Ganz <[EMAIL PROTECTED]> wrote: > > hi dave. thanks for your response. i understand the problem. but i am > > now resetting currentWeight to 0 directly after i test what percentage > > i'm at and i'm still getting skewed values: > > > > here is my code: > > > > mclListener.onLoadProgress = function( targetMC, loadedBytes, totalBytes ) > > { > > > > currentWeight += loadedBytes; > > var currentPercentage = Math.floor( ( currentWeight / > > totalWeight ) * 100 ); > > > > if( currentPercentage % 10 == 0 ) > > { > > trace( "another 10% completed" ); > > } > > > > switch( String( currentPercentage ) ) > > { > > case "10" : > > trace( "10% has loaded..." ); > > break; > > case "20" : > > trace( "20% has loaded..." ); > > break; > > // etc...etc); > > } > > currentWeight = 0; > > }; > > > > when i test each external swf individually, i still get skewed > > results, for example: > > > > swf1 = 312KB = 316,020 bytes // the trace value is 353,483 > > // NOW ADD > > swf2 987K = 1330176 byets // the trace value is 1079498 > > // THEN ADD THIS > > swf3 2.6MB = 4056473 bytes// the trace value is 2819958 > > > > i just can't seem to get this right. is there a better way i can approach > > this? > > > > thanks again for your help. -- matt. > > On 11/18/05, David Rorex <[EMAIL PROTECTED]> wrote: > > > On 11/18/05, Matt Ganz <[EMAIL PROTECTED]> wrote: > > > > hi. > > > > > > > > i'm using the MovieClipLoader class to load a few swfs that are > > > > defined in an array a la: > > > > > > > > > > > > var totalWeight = 41079759; // total weight in bytes (3.9MB) > > > > var currentWeight = 0; > > > > > > > > var mainArray:Array = new Array( { path: "movie1.swf", id: > > > > "movie1_mc", depth: 1 }, > > > > > > > > { path: "movie2.swf", id: "movie2_mc", depth: 2 }, > > > > > > > > { path: "movie3.swf", id: "movie3_mc", depth: 3 }); > > > > > > > > for( i:Number=0; i > > > { > > > > _root.loadClip( mainArray[i].path, > > > > this.createEmptyMovieClip( > > > > mainArray[i].id,mainSwfArray[i].depth ) ); > > > > } > > > > > > > > what i want to do is read how much is loaded of the total weight ( the > > > > sum of all swfs ) and target my preloader for every 10%. i assume the > > > > best place to read the loaded bytes is in the onLoadProgress handler > > > > for MCL, a la: > > > > > > > > mainMclListener.onLoadProgress = function( targetMC, loadedBytes, > > > > totalBytes ) > > > > { > > > > currentWeight += loadedBytes; > > > > var currentPercentage = Math.floor( ( loadedBytes / totalWeight > > > > ) * 100 ); > > > > } > > >
Re: [Flashcoders] reading 'loadedBytes' from MovieClipLoader onLoadProgress
hi dave. thanks for your response. i understand the problem. but i am now resetting currentWeight to 0 directly after i test what percentage i'm at and i'm still getting skewed values: here is my code: mclListener.onLoadProgress = function( targetMC, loadedBytes, totalBytes ) { currentWeight += loadedBytes; var currentPercentage = Math.floor( ( currentWeight / totalWeight ) * 100 ); if( currentPercentage % 10 == 0 ) { trace( "another 10% completed" ); } switch( String( currentPercentage ) ) { case "10" : trace( "10% has loaded..." ); break; case "20" : trace( "20% has loaded..." ); break; // etc...etc); } currentWeight = 0; }; when i test each external swf individually, i still get skewed results, for example: swf1 = 312KB = 316,020 bytes // the trace value is 353,483 // NOW ADD swf2 987K = 1330176 byets // the trace value is 1079498 // THEN ADD THIS swf3 2.6MB = 4056473 bytes// the trace value is 2819958 i just can't seem to get this right. is there a better way i can approach this? thanks again for your help. -- matt. On 11/18/05, David Rorex <[EMAIL PROTECTED]> wrote: > On 11/18/05, Matt Ganz <[EMAIL PROTECTED]> wrote: > > hi. > > > > i'm using the MovieClipLoader class to load a few swfs that are > > defined in an array a la: > > > > > > var totalWeight = 41079759; // total weight in bytes (3.9MB) > > var currentWeight = 0; > > > > var mainArray:Array = new Array( { path: "movie1.swf", id: > > "movie1_mc", depth: 1 }, > > { > > path: "movie2.swf", id: "movie2_mc", depth: 2 }, > > { > > path: "movie3.swf", id: "movie3_mc", depth: 3 }); > > > > for( i:Number=0; i > { > > _root.loadClip( mainArray[i].path, > > this.createEmptyMovieClip( > > mainArray[i].id,mainSwfArray[i].depth ) ); > > } > > > > what i want to do is read how much is loaded of the total weight ( the > > sum of all swfs ) and target my preloader for every 10%. i assume the > > best place to read the loaded bytes is in the onLoadProgress handler > > for MCL, a la: > > > > mainMclListener.onLoadProgress = function( targetMC, loadedBytes, > > totalBytes ) > > { > > currentWeight += loadedBytes; > > var currentPercentage = Math.floor( ( loadedBytes / totalWeight ) * > > 100 ); > > } > > > > the 3 swfs weight approximately 3.9 megabytes but when i trace out the > > value of "currentWeight", i get this value: > > > > 407,970,619.but this equals 389 megabytes, not 3.9. what am i > > doing wrong here? > > > > thanks for any tips. -- matt. > > It's because you are continuously adding to 'currentWeight', and never > resetting it to 0. > > For example, in the case of loading just one file: > > if my file was 1000 bytes, and the load progress was: > 200 bytes finished... > 300 bytes finished.. > 500 bytes finished... > 700 bytes finished... > 1000 bytes finished...all done! > > then obviously, just adding those numbers together would be incorrect, > it would give me 2700, which means nothing. > > -David R > ___ > 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] reading 'loadedBytes' from MovieClipLoader onLoadProgress
hi. i'm using the MovieClipLoader class to load a few swfs that are defined in an array a la: var totalWeight = 41079759; // total weight in bytes (3.9MB) var currentWeight = 0; var mainArray:Array = new Array( { path: "movie1.swf", id: "movie1_mc", depth: 1 }, { path: "movie2.swf", id: "movie2_mc", depth: 2 }, { path: "movie3.swf", id: "movie3_mc", depth: 3 }); for( i:Number=0; i___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] tracing every 10% of loading files
hi. thanks for your responses. i tried out the first idea and it works 98% of the time. here's the code ( notice that i'm doing this in the 'onLoadProgress' handler of a MovieClipLoader instance ): mclListener.onLoadProgress = function( targetMC, loadedBytes, totalBytes ) { var currentPercentage = Math.floor( ( loadedBytes / totalWeight ) * 100 ); // for each increase in 10%, move to next frame if( currentPercentage % 10 == 0 ) { _level0.main_mc.nextFrame(); } }; the other 2% of the time it either: A.) doesn't reach the last frame of main_mc B.) it does reach the last frame of main_mc but seems to get stuck there. i then tried the 2nd method like this: var oldPercentage = 0; mainMclListener.onLoadProgress = function( targetMC, loadedBytes, totalBytes ) { var currentPercentage = Math.floor( ( loadedBytes / totalWeight ) * 100 ); if( Math.floor( currentPercentage / 10 ) != oldPercentage ) { oldPercentage = Math.floor( currentPercentage / 10 ); _level0.main_mc.nextFrame(); } }; and in this case, the nextFrame() gets called NOT with each new 10% loaded, but one immediately after the other. i can't quite figure out what is going wrong. can anyone see the problem? thanks for lending a hand. -- matt. On 11/17/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > What if percentage doesn't increase with 1 every frame? That if > statement will then miss sometimes. > > You could do something like: > > > var oldPercentage = 0; > > //then in update loop > if (Math.floor(percentage/10) != oldPercentage) { > trace("Another 10% loaded"); > oldPercentage = Math.floor(percentage/10); > } > > > Not the nicest solution but at least it works. > > /Andreas > > > Adrian Lynch wrote: > > How about... > > > > if ( percentage % 10 == 0 ) { > > trace("Another 10% loaded"); > > } > > > > Ade > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] Behalf Of Matt Ganz > > Sent: 16 November 2005 21:31 > > To: Flashcoders mailing list > > Subject: [Flashcoders] tracing every 10% of loading files > > > > > > hi. > > > > hopefully this question isn't too newbie. > > > > i'm loading a bunch of external swfs and i am trying to determine what > > percentage of 'totalWeight' is 'currentWeight'. here's my equation: > > > > var percentage = (currentWeight/totalWeight) * 100; > > > > i believe that's fine. but my question is how can i express the following: > > > > "for every increase of 10%, up to 100%" // trace( "another 10% loaded" ) > > > > thanks. -- matt. > > > > ___ > > 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
[Flashcoders] tracing every 10% of loading files
hi. hopefully this question isn't too newbie. i'm loading a bunch of external swfs and i am trying to determine what percentage of 'totalWeight' is 'currentWeight'. here's my equation: var percentage = (currentWeight/totalWeight) * 100; i believe that's fine. but my question is how can i express the following: "for every increase of 10%, up to 100%" // trace( "another 10% loaded" ) thanks. -- matt. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] sorensen squeeze shaving off 1 pixel
i just read an interesting thread about squeeze having difficulties exporting to odd width/heights. i'm finding it hard to believe but here's the link: http://72.14.207.104/search?q=cache:iUOz9CfXDbgJ:p094.ezboard.com/fsorensonsqueezefrm2.showMessage%3FtopicID%3D635.topic+flv+squeeze+odd+number+of+pixels&hl=en&client=safari On 11/15/05, Kris Hadlock <[EMAIL PROTECTED]> wrote: > I've never had the issue, but what if you try publishing it as 166 x 370? > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Matt Ganz > Sent: Tuesday, November 15, 2005 2:07 PM > To: Flashcoders mailing list > Subject: [Flashcoders] sorensen squeeze shaving off 1 pixel > > > hi. > > has anyone had any problems with sorensen squeeze shaving off 1 pixel > from their exported flv? > > i set the dimensions to 166 x 369 and it keeps exporting to 166 x > 368...i'm even testing by checking and unchecking 'maintain aspect > ratio'. > > thanks. -- matt. > > ___ > 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] sorensen squeeze shaving off 1 pixel
hi. has anyone had any problems with sorensen squeeze shaving off 1 pixel from their exported flv? i set the dimensions to 166 x 369 and it keeps exporting to 166 x 368...i'm even testing by checking and unchecking 'maintain aspect ratio'. thanks. -- matt. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] media display v. netstream and video object
hi. quick question. will an external flv begin playing faster thru a media display component or using the netstream with a video object? thanks. -- matt. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] chaining flvs to appear seamless.
hi. i have a website with a video host who walks you thru all the sections of the site. currently, we are using 50 external flv files. each one weighs around 1mb. every time the video host moves, we switch to another flv. why? because the background changes and we need to throw the new one in. we want to make it as seamless as possible so the user doesn't see we're loading in new flvs whenever the video host moves. but i just did a test trying to see how quickly i can switch between 3 of these flv files where i reset the flv via setMedia() and then invoked play() ( i'm using the media display component ). each new video needed between 1-2 seconds before it started again. has anyone attempted s/thing like this before? what solutions should i be looking for or how can i restructure my project to get around this problem? any tips are very much appreciated. thank you. -- matt. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Fwd: casting to a boolean -- SOLVED.
apparently the problem was with the encoding of the text file. it was originally encoded as Western Roman and as soon as i encoded it as utf-8 it worked just fine. -- Forwarded message -- From: Matt Ganz <[EMAIL PROTECTED]> Date: Oct 31, 2005 4:23 PM Subject: casting to a boolean To: Flashcoders mailing list hi. i had a similar problem casting a string to a boolean last week but someone showed me the correct way to do it. unfortunately, it's not working in my latest exercise. when i trace out the value i always get "false" even when i change it to "true". what happened to my conditional? ( i'm publishing to fp7 ) loadVariablesNum( "text.txt", 2 ); function checkParamsLoaded() { if ( _level2 == undefined ) { trace( "not yet." ); } else { trace( "finished loading. killing interval." ); trace( "-" ); for ( i in _level2 ) { trace( i + ": " + _level2[i] ); } var temp:Boolean = ( _level2.textloaded == "true" ); // 'textloaded' is the var specified in the text file trace( "temp: " + temp ); // PROBLEM -- always outputs to 'false', even when var is set to 'true' trace( "typeof(temp): " + typeof(temp) ); // outputs to "Boolean" = GOOD. trace("-"); clearInterval( param_interval ); } } var param_interval = setInterval(checkParamsLoaded, 100); i know that loadVariablesNum changed its behavior in fp7 but i'm not sure if that has anything to do with it. does anyone spot anything wrong in there? thanks for any tips. -- matt. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] casting to a boolean
hi. i had a similar problem casting a string to a boolean last week but someone showed me the correct way to do it. unfortunately, it's not working in my latest exercise. when i trace out the value i always get "false" even when i change it to "true". what happened to my conditional? ( i'm publishing to fp7 ) loadVariablesNum( "text.txt", 2 ); function checkParamsLoaded() { if ( _level2 == undefined ) { trace( "not yet." ); } else { trace( "finished loading. killing interval." ); trace( "-" ); for ( i in _level2 ) { trace( i + ": " + _level2[i] ); } var temp:Boolean = ( _level2.textloaded == "true" ); // 'textloaded' is the var specified in the text file trace( "temp: " + temp ); // PROBLEM -- always outputs to 'false', even when var is set to 'true' trace( "typeof(temp): " + typeof(temp) ); // outputs to "Boolean" = GOOD. trace("-"); clearInterval( param_interval ); } } var param_interval = setInterval(checkParamsLoaded, 100); i know that loadVariablesNum changed its behavior in fp7 but i'm not sure if that has anything to do with it. does anyone spot anything wrong in there? thanks for any tips. -- matt. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] cast string to a boolean value
both methods work nicely. thank you. On 10/28/05, Ian Thomas <[EMAIL PROTECTED]> wrote: > What's wrong with the following? > > var my_bool:Boolean=(flashvar_bool=="true"); > > Ian > > On 10/28/05, Steve Mathews <[EMAIL PROTECTED]> wrote: > > > > Try: > > var my_bool:Boolean = flashvar_bool=="false"?false:true; > > > > The basic problem is creating a Boolean with any string makes it true. > > So creating it with the string "false" still makes it true. > > > ___ > 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] cast string to a boolean value
hi. i'm receiving FlashVars in my object and embed code and the values are either "true" or "false". i assume they're brought into flash as strings and i need them as booleans. it is my understanding that boolean() won't do what i want because all it does is evaluate the expression inside the parantheses instead of converting the value to a boolean. i also read a very brief comment on livedocs that the appropriate way to do it is cast to a number first and then a boolean. but that doesn't make sense to me. anyone have any experience with this? thanks. -- matt. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Re: am i approaching this problem correctly?
a quick update on this. if i want to check for inactivity in the flash movie can i not simply use javascript to listen for "onMouseMove" on the browser page...and when it doesn't detect it, simply redirect to another page? the question being can javascript keep track of mouse movements using onMouseMove when the focus is on the flash movie? thanks. -- matt. On 10/27/05, Matt Ganz <[EMAIL PROTECTED]> wrote: > hi. > > i want to ask people's opinions about an issue and see if my solution > is on target. > > i have a navigation.swf that sits in a frame on an html page. on click > of nav button, a getURL loads another swf into the frame below. ugly, > i know. but i don't have the option to recode the piece at this point. > > what i need to do is track inactivity. if there's been no action for > 90 seconds (in both swf files), i'm going to getURL() and send them to > a screensaver page. > > i have code that tracks inactivity without a problem but i'm assuming > i'll need to compare it to see if there's been inactivity in both the > navigation.swf and the swf currently being viewed. if both have been > inactive for 90 seconds, then getURL. so i'm going to need to use > local connection. > > am i thinking about this correctly so far or is there a more elegant > solution? here's my code so far. > > // FOR NAVIGATION.SWF * > * > // init > var intervalID; > var status:String = "active"; > var timeOut = 1; > > // local connection > var navigation_lc:LocalConnection = new LocalConnection(); > navigation_lc.connect( "navigation_lc" ); > > navigation_lc.loadScreensaver = function( obj:String ) > { > if( status == "inactive" && obj == "inactive" ) > { > trace( "load the screensaver" ); > } > else > { > // what do we do? > } > }; > > // callTimeOut() > function callTimeOut () > { > clearInterval( intervalID ); >status = "inactive"; > } > > mouseListener = new Object(); > mouseListener.onMouseMove = function() > { > clearInterval( intervalID ); > intervalID = setInterval( _root, "callTimeOut", timeOut ); > }; > Mouse.addListener( mouseListener ); > > // FOR MAIN.SWF ** > * > // init > var intervalID; > var timeOut = 1; > > // local connection > var main_lc:LocalConnection = new LocalConnection(); > main_lc.connect( "main_lc" ); > > // callTimeOut() > function callTimeOut () > { > main_lc.send( "navigation_lc", "loadScreensaver", "inactive" ); > } > > mouseListener = new Object(); > mouseListener.onMouseMove = function() > { > clearInterval( intervalID ); > intervalID = setInterval( _root, "callTimeOut", timeOut ); > }; > Mouse.addListener( mouseListener ); > > thanks in advance for any helpful tips and suggestions. -- matt. > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] am i approaching this problem correctly?
hi. i want to ask people's opinions about an issue and see if my solution is on target. i have a navigation.swf that sits in a frame on an html page. on click of nav button, a getURL loads another swf into the frame below. ugly, i know. but i don't have the option to recode the piece at this point. what i need to do is track inactivity. if there's been no action for 90 seconds (in both swf files), i'm going to getURL() and send them to a screensaver page. i have code that tracks inactivity without a problem but i'm assuming i'll need to compare it to see if there's been inactivity in both the navigation.swf and the swf currently being viewed. if both have been inactive for 90 seconds, then getURL. so i'm going to need to use local connection. am i thinking about this correctly so far or is there a more elegant solution? here's my code so far. // FOR NAVIGATION.SWF * * // init var intervalID; var status:String = "active"; var timeOut = 1; // local connection var navigation_lc:LocalConnection = new LocalConnection(); navigation_lc.connect( "navigation_lc" ); navigation_lc.loadScreensaver = function( obj:String ) { if( status == "inactive" && obj == "inactive" ) { trace( "load the screensaver" ); } else { // what do we do? } }; // callTimeOut() function callTimeOut () { clearInterval( intervalID ); status = "inactive"; } mouseListener = new Object(); mouseListener.onMouseMove = function() { clearInterval( intervalID ); intervalID = setInterval( _root, "callTimeOut", timeOut ); }; Mouse.addListener( mouseListener ); // FOR MAIN.SWF ** * // init var intervalID; var timeOut = 1; // local connection var main_lc:LocalConnection = new LocalConnection(); main_lc.connect( "main_lc" ); // callTimeOut() function callTimeOut () { main_lc.send( "navigation_lc", "loadScreensaver", "inactive" ); } mouseListener = new Object(); mouseListener.onMouseMove = function() { clearInterval( intervalID ); intervalID = setInterval( _root, "callTimeOut", timeOut ); }; Mouse.addListener( mouseListener ); thanks in advance for any helpful tips and suggestions. -- matt. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] listening for all button events
that's exactly what i had in mind but couldn't quite work out. i didn't feel good about using _root, even though it worked, i wanted to create a generic listener for all mouse actions. thank you both for helping. matt. On 10/26/05, Weyert de Boer <[EMAIL PROTECTED]> wrote: > Matt Ganz wrote: > > >i've been using this method to listen for mouse movements and mouse > >clicks on the first frame of my .fla > > > You might want to consider to use a MouseListener. > > var mouseListener:Object = new Object(); > mouseListener.onMouseUp = function() { > print "CLICKERDE CLICK"; > } > > Mouse.addListener( mouseListener ); > > > ___ > 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] tracking inactivity
yes, big oversight on my part. thank you. i've just changed from using an onEnterFrame to a setInterval, but i'm not getting it to work here. i believe it might be because my setInterval isn't first started. does that look like the culprit to you? by the way, thanks for lending a hand. this.stillFor = 1; // 10 seconds this.startTime = getTimer(); this.onMouseMove = function() { this.time = 0; this.startTime = getTimer(); if( blah != undefined ) { clearInterval( blah ); blah = setInterval( this.checkTime, this.stillFor, this ); } } this.checkTime = function() { this.time = getTimer() - this.startTime; if ( this.time>this.stillFor ) { trace ('mouse has been still for 10 seconds!' ); clearInterval(blah); } } On 10/26/05, Alistair Miller <[EMAIL PROTECTED]> wrote: > You are setting a value here rather than comparing > > if (this.time=this.stillFor) { > > change to > > if (this.time >=this.stillFor) { > > Ali > > -Original Message- > From: Matt Ganz [mailto:[EMAIL PROTECTED] > Sent: 26 October 2005 16:44 > To: Flashcoders mailing list > Subject: [Flashcoders] tracking inactivity > > hi. > > i'm trying to record when there's been inactivity in my site. i got > this code from the archive but don't understand where it's going > wrong. for example, i set it to trace out if the mouse has been > inactive for 10 seconds, but instead i get this message right away. > does anyone see anything out of place? > > thanks. -- matt. > > this.stillFor = 1; // 10 seconds > this.startTime = getTimer(); > > > this.onMouseMove = function(){ > this.time = 0; > this.startTime = getTimer(); > trace('Starting timer again'); > } > > this.onEnterFrame = function(){ > this.time = getTimer()-this.startTime; > > > if (this.time=this.stillFor) { > this.time = 0; > this.startTime = getTimer(); > trace('mouse has been still for 10 seconds!'); > } > } > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* > Dyson -- the cleaner that doesn't lose suction. > > http://www.dyson.com > *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* > > ___ > 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] tracking inactivity
hi. i'm trying to record when there's been inactivity in my site. i got this code from the archive but don't understand where it's going wrong. for example, i set it to trace out if the mouse has been inactive for 10 seconds, but instead i get this message right away. does anyone see anything out of place? thanks. -- matt. this.stillFor = 1; // 10 seconds this.startTime = getTimer(); this.onMouseMove = function(){ this.time = 0; this.startTime = getTimer(); trace('Starting timer again'); } this.onEnterFrame = function(){ this.time = getTimer()-this.startTime; if (this.time=this.stillFor) { this.time = 0; this.startTime = getTimer(); trace('mouse has been still for 10 seconds!'); } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] listening for all button events
i've been using this method to listen for mouse movements and mouse clicks on the first frame of my .fla: _root.onMouseMove = function() { trace( "mouse moving" ); }; _root.onMouseUp = function() { trace( "mouse being clicked" ); }; is that not a good way to do this? On 10/26/05, JesterXL <[EMAIL PROTECTED]> wrote: > Mouse.onMouseDown/onMouseUp already does this. If you are using the v2 > component framework, or if you are not, you can see how they are doing it > via mx.events.LowLevelEvents. > > - Original Message - > From: "Matt Ganz" <[EMAIL PROTECTED]> > To: "Flashcoders mailing list" > Sent: Wednesday, October 26, 2005 10:38 AM > Subject: [Flashcoders] listening for all button events > > > hi. > > is there any way to have one listener listen for all button events. > you know, like you can have with "Key". or do i have to give all my > buttons instance names and use addListener on each instance? > > thanks. > > matt. > ___ > 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
[Flashcoders] listening for all button events
hi. is there any way to have one listener listen for all button events. you know, like you can have with "Key". or do i have to give all my buttons instance names and use addListener on each instance? thanks. matt. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Passing param to cuePoint object
you might want to keep everything in your xml document in seconds, i.e. 1:15 would be 75 seconds. you would then have an onEnterFrame or setInterval that would continuously read the net stream time and compare it to your cue point time. On 10/21/05, Josh Gormley <[EMAIL PROTECTED]> wrote: > Hi Steve, > > I'm actually just starting out my research into how to use Flash 8's > embedded cuepoints to handle closed captioning. Needless to say, > documentation is rather weak right now. > > Below is my working code for displaying the captions that I embedded > in the FLV file using the Flash 8 video encoder tool. It's not what > you were looking for in terms of merging the captions from an XML > file during runtime, but it does show how to get those captions while > the video is playing. > > The biggest confusion for me was linking the netstream with the video > object. I did not realize that there is a new video object in Flash > 8 and that's what you need to have on stage to display the video. > Here is what the help docs say about creating a new video object: > > To display the video stream, first place a Video object on the Stage. > Then use Video.attachVideo() to attach the video stream to the Video > object. > > If the Library panel isn't visible, select Window > Library to > display it. > Add an embedded Video object to the library by clicking the Options > menu on the right side of the Library panel title bar and selecting > New Video. > Drag the Video object to the Stage and use the Property inspector to > give it a unique instance name, such as my_video. (Do not name it > Video.) > > /// BEGIN CODE > import mx.utils.Delegate > import mx.video.* > > var nc:NetConnection = new NetConnection(); > nc.connect(null); > var ns:NetStream = new NetStream(nc); > player.attachVideo(ns); // player is the video object (not an > FLVPlayback) that I have on stage > > ns.onCuePoint = Delegate.create(this, handleCuepoint); > ns.play("test.flv"); > > function handleCuepoint(infoObject:Object){ > captionText.text = infoObject.parameters.caption; > } > > pauseButton.onPress = function(){ > ns.pause(); > } > /// END CODE > > Hope this helps, and please post any code you get to combine XML with > FLV's at runtime, I am also looking in that direction. > Josh > > > On Oct 21, 2005, at 9:32 AM, Stephen Hueners wrote: > > > Given the potential utility of cupoints in general the supplied > > documentation seems ummlite. > > > > To import cuepoint information from an XML file structured as: > > ... SNIP ... > > I'd very much appreciate any direction in these documentary holes > > by anyone > > able to address. > > ___ > 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] TransitionManager documentation?
there's definitely a derth of documentation re: Transition and Tween classes. the tutorial you point to is the comprehensive source...but it doesn't cover everything. i have not seen documentation for the addTransition() method of the mx.transitions.TransitionManager class. Even the comments for that method in that class aren't very explicit ( except that it increases some ID count var ). as far as the parameters for 'type', you'll find that on the first page of the tutorial, i.e. iris, wipe, pixel dissolve, blinds, etc...with a short explanation of what they do. for 'easing', those parameters are explained on page 4 of the tutorial, i.e. Bounce, Elastic, easeIn, easeInOut, etc.. 'duration' seems self-explanatory and is listed as a param in the Tween constructor where it says 'duration: number - the length of time of the motion; set to infinity if negative or omitted'. hth. On 10/21/05, Helen Triolo <[EMAIL PROTECTED]> wrote: > Trying again: is it anywhere documented what each of the parameters > are, and what values they can be set to, for this statement (copied from > http://www.macromedia.com/devnet/flash/articles/tweening_09.html)? And > how to use the addTransition method of TransitionManager? > > TransitionManager.start(target_mc, {type:Fly, direction:0, duration:3, > easing:Elastic.easeInOut, startPoint:6, param2:empty}); > > Helen > > > ___ > 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