[Flashcoders] Motion to combine coders and newbies.
I have to cast a vote here too because it is encouraging to see that other people have run into the same stumbling blocks. I found Flashcoders first and was referred to Flashnewbies in response to a question. Unfortunately, the same question was posted to Flashcoders a couple weeks later and answered without a referral to Flashnewbies. I am not whining. I am still listening to both lists. (with the help of the filter in gmail.) However, I have sat for too long wondering where to post based on the level of the question. So some guidelines are definitely in order. It would be very valuable to recommend directions and levels to the two groups on the subscribe pages of both, and/or on the confirmation email. It is also an opportunity to recommend Flashnewbies as a first check. Flashcoders came up first in my searches. I cast my vote for keeping the two groups, not four, not one, two groups properly advertised for their discussion level. And thanks to Jason and all the others who are answering questions on both. The two forums have been a great help to me over the past few months. Teresa -- Forwarded message -- From: Merrill, Jason <[EMAIL PROTECTED]> Date: May 14, 2007 8:25 AM Subject: RE: [Flashcoders] Motion to combine coders and newbies. To: flashcoders@chattyfig.figleaf.com FYI - the link to subscribe to Flashnewbies is right below the option to subscribe to this list. chattyfig.figleaf.com or: http://training.figleaf.com/resources/ Jason Merrill Bank of America GT&O Learning & Leadership Development eTools & Multimedia Team ___ 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] I have small doubt
We just covered this last week in another thread. Omar recommended PHP it is a very simple php function called write(). look for it at www.php.net but I had already written it in Python using the minidom module. It makes for a nice little cgi bin script. Teresa On 3/13/07, Merrill, Jason <[EMAIL PROTECTED]> wrote: >>I have the files in a web server, a coldfusion serverso I >>need the server language in order to write this data into a >>xml...right? >>I was wondering if I just send the data over a flash form >>directly to the xml...and that's it...tell me if I wrong. >>because If I don't ask, I wouldn't learn. Sorry, no way - it's a security thing - you have to use server-side scripts to edit server-side files. If we could write scripts on web pages that could directly alter files on remote servers, imagine the havok hackers could unleash doing the same. Jason Merrill Bank of America Global Technology & Operations Learning & Leadership Development eTools & Multimedia Team ___ 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] Help with updating a nodeValue in an XML file
Omar, Thanks for the php references. I need that for a different piece of this puzzle. I left out the the non-Flash part of this story in the original description. I have a bunch of Python wrapped around the Flash. So I wrote a Python CGI to write the variable out to XML and bridge my little misunderstanding with Flash. I use a .send() to invoke the Python with a query string and it works fine. Thanks, Teresa On 3/11/07, Omar Fouad <[EMAIL PROTECTED]> wrote: teresa i Remeber i sent you the link at php.net where u can find some php code to alterate and save external xml files it is a very simple php function called write(). look for it at www.php.net regards On 3/9/07, Sebastián Sirvent <[EMAIL PROTECTED]> wrote: > > > > > On 3/8/07 7:48 PM, "Teresa Hardy" <[EMAIL PROTECTED]> wrote: > > > Wow, I seriously misread something along the line. But it sounds like I > can > > pass something back to the script and that would work. Thanks I'll go > look > > at the other forum but I thought this was way above a newbie question. > > Teresa > > > > On 3/8/07, Muzak <[EMAIL PROTECTED]> wrote: > >> > >> That's because Flash can't write any files, only read. > >> You'll need a server side language to handle that for you (ASP, PHP, > >> ColdFusion, etc..) or look into Remoting. > >> > >> And you probably may wanna join the Flash Newbie (figleaf) or > >> FlashMacromedia (yahoogroups) list for this type of questions. > >> http://chattyfig.figleaf.com/mailman/listinfo/flashnewbie > >> http://tech.groups.yahoo.com/group/FLASHmacromedia/ > >> > >> regards, > >> Muzak > >> > >> - Original Message - > >> From: "Teresa Hardy" <[EMAIL PROTECTED]> > >> To: > >> Sent: Thursday, March 08, 2007 11:12 PM > >> Subject: Re: [Flashcoders] Help with updating a nodeValue in an XML > file > >> > >> > >>> This definitely loads the Flash object...I get that part. But it > doesn't > >>> write to my file called setup.xml. I am in the OReilly ActionScript > book > >> now > >>> and this is the first time it has ever failed me. I tried parseXML and > >>> sendAndLoad but I can't seem to write into the file. > >>> > >>> Thanks for helping me. > >>> Teresa > >>> > >>> On 3/8/07, Rost, Andrew <[EMAIL PROTECTED]> wrote: > >>>> > >>>> All you need to do is set the nodeValue rather than access it. > >>>> > >>>> var trial_xml:XML = new XML("This is a > >>>> category"); > >>>> trace(trial_xml.firstChild.firstChild.firstChild.nodeValue); > >>>> trial_xml.firstChild.firstChild.firstChild.nodeValue = "This is a NEW > >>>> category"; > >>>> trace(trial_xml.firstChild.firstChild.firstChild.nodeValue); > >>>> trace(trial_xml); > >>>> stop(); > >>>> > >>>> trace output: > >>>> > >>>> This is a category > >>>> This is a NEW category > >>>> This is a NEW category > >>>> > >>>> Hope that helps, > >>>> Andrew > >> > >> > >> ___ > >> 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 > > > > -- > > Sebastián Sirvent > > > ___ > 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 Em
Re: [Flashcoders] Help with updating a nodeValue in an XML file
Wow, I seriously misread something along the line. But it sounds like I can pass something back to the script and that would work. Thanks I'll go look at the other forum but I thought this was way above a newbie question. Teresa On 3/8/07, Muzak <[EMAIL PROTECTED]> wrote: That's because Flash can't write any files, only read. You'll need a server side language to handle that for you (ASP, PHP, ColdFusion, etc..) or look into Remoting. And you probably may wanna join the Flash Newbie (figleaf) or FlashMacromedia (yahoogroups) list for this type of questions. http://chattyfig.figleaf.com/mailman/listinfo/flashnewbie http://tech.groups.yahoo.com/group/FLASHmacromedia/ regards, Muzak - Original Message - From: "Teresa Hardy" <[EMAIL PROTECTED]> To: Sent: Thursday, March 08, 2007 11:12 PM Subject: Re: [Flashcoders] Help with updating a nodeValue in an XML file > This definitely loads the Flash object...I get that part. But it doesn't > write to my file called setup.xml. I am in the OReilly ActionScript book now > and this is the first time it has ever failed me. I tried parseXML and > sendAndLoad but I can't seem to write into the file. > > Thanks for helping me. > Teresa > > On 3/8/07, Rost, Andrew <[EMAIL PROTECTED]> wrote: >> >> All you need to do is set the nodeValue rather than access it. >> >> var trial_xml:XML = new XML("This is a >> category"); >> trace(trial_xml.firstChild.firstChild.firstChild.nodeValue); >> trial_xml.firstChild.firstChild.firstChild.nodeValue = "This is a NEW >> category"; >> trace(trial_xml.firstChild.firstChild.firstChild.nodeValue); >> trace(trial_xml); >> stop(); >> >> trace output: >> >> This is a category >> This is a NEW category >> This is a NEW category >> >> Hope that helps, >> Andrew ___ 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] Help with updating a nodeValue in an XML file
This definitely loads the Flash object...I get that part. But it doesn't write to my file called setup.xml. I am in the OReilly ActionScript book now and this is the first time it has ever failed me. I tried parseXML and sendAndLoad but I can't seem to write into the file. Thanks for helping me. Teresa On 3/8/07, Rost, Andrew <[EMAIL PROTECTED]> wrote: All you need to do is set the nodeValue rather than access it. var trial_xml:XML = new XML("This is a category"); trace(trial_xml.firstChild.firstChild.firstChild.nodeValue); trial_xml.firstChild.firstChild.firstChild.nodeValue = "This is a NEW category"; trace(trial_xml.firstChild.firstChild.firstChild.nodeValue); trace(trial_xml); stop(); trace output: This is a category This is a NEW category This is a NEW category Hope that helps, Andrew -----Original Message- From: Teresa Hardy [mailto:[EMAIL PROTECTED] Sent: Thursday, March 08, 2007 2:49 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Help with updating a nodeValue in an XML file I have been through more manuals than I can list, have also been through the complete www.lynda.com tutorial. All the examples create new nodes. I have not seen any example that writes to an existing node. Teresa On 3/8/07, dr.ache <[EMAIL PROTECTED]> wrote: > > Maybe i get you wrong, but maybe |nodeValue:String is, what you are > looking for. > Give the manual a chance - search for XMLNode > > greez, > dr.ache > > > > |Teresa Hardy schrieb: > > I thought this was really basic and easy but I just can't find the > > syntax to > > do it. All I am trying to do is update one nodeValue from the swf to > > the xml > > based on which button is selected. I don't want to make a new node, just > > update the that exists. The reading part listed below works > > fine. I > > just can't figure out how to write TO a specified child node and all the > > documentation has me totally confused. I am starting to wonder if I > > have to > > .removeNode and recreate itI still don't have the syntax. > > > > Thanks in advance. I have been learning a huge amount from listening > > to all > > the conversations here as I teach myself ActionScript! > > > > Teresa > > > > my_xml = new XML(); > > my_xml.ignoreWhite = true; > > my_xml.load("setup.xml"); > > my_xml.onLoad = function(success) { > >if (success) { > >sessionInfo_xml = my_xml.firstChild; > >children = sessionInfo_xml.childNodes; > >folderName = children[0].firstChild.nodeValue; > >maxImages = children[1].firstChild.nodeValue; > >domainName = children[2].firstChild.nodeValue; > >searchSubject = children[3].firstChild.nodeValue; > >theme = children[4].firstChild.nodeValue; > >} else { > >trace("XML error"); > >} > > }; > > ___ > > 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@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] Help with updating a nodeValue in an XML file
I have been through more manuals than I can list, have also been through the complete www.lynda.com tutorial. All the examples create new nodes. I have not seen any example that writes to an existing node. Teresa On 3/8/07, dr.ache <[EMAIL PROTECTED]> wrote: Maybe i get you wrong, but maybe |nodeValue:String is, what you are looking for. Give the manual a chance - search for XMLNode greez, dr.ache |Teresa Hardy schrieb: > I thought this was really basic and easy but I just can't find the > syntax to > do it. All I am trying to do is update one nodeValue from the swf to > the xml > based on which button is selected. I don't want to make a new node, just > update the that exists. The reading part listed below works > fine. I > just can't figure out how to write TO a specified child node and all the > documentation has me totally confused. I am starting to wonder if I > have to > .removeNode and recreate itI still don't have the syntax. > > Thanks in advance. I have been learning a huge amount from listening > to all > the conversations here as I teach myself ActionScript! > > Teresa > > my_xml = new XML(); > my_xml.ignoreWhite = true; > my_xml.load("setup.xml"); > my_xml.onLoad = function(success) { >if (success) { >sessionInfo_xml = my_xml.firstChild; >children = sessionInfo_xml.childNodes; >folderName = children[0].firstChild.nodeValue; >maxImages = children[1].firstChild.nodeValue; >domainName = children[2].firstChild.nodeValue; >searchSubject = children[3].firstChild.nodeValue; >theme = children[4].firstChild.nodeValue; >} else { >trace("XML error"); >} > }; > ___ > 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] Help with updating a nodeValue in an XML file
I thought this was really basic and easy but I just can't find the syntax to do it. All I am trying to do is update one nodeValue from the swf to the xml based on which button is selected. I don't want to make a new node, just update the that exists. The reading part listed below works fine. I just can't figure out how to write TO a specified child node and all the documentation has me totally confused. I am starting to wonder if I have to .removeNode and recreate itI still don't have the syntax. Thanks in advance. I have been learning a huge amount from listening to all the conversations here as I teach myself ActionScript! Teresa my_xml = new XML(); my_xml.ignoreWhite = true; my_xml.load("setup.xml"); my_xml.onLoad = function(success) { if (success) { sessionInfo_xml = my_xml.firstChild; children = sessionInfo_xml.childNodes; folderName = children[0].firstChild.nodeValue; maxImages = children[1].firstChild.nodeValue; domainName = children[2].firstChild.nodeValue; searchSubject = children[3].firstChild.nodeValue; theme = children[4].firstChild.nodeValue; } else { trace("XML error"); } }; ___ 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: Is this done in processing?
http://link.brightcove.com/services/player/bcpid533361602?bctid=4225630 06 Multi touch displays are here! The demo interfaces look so awesome! does anyone know any details on the package used to develop the UI? Yes, that's Jefferson Han. He's at a research group at NYU. I met him at SIGGRAPH '06 where this display was in the Emerging Technologies Room. I know it uses OpenGL and what he called frustrated light. You are basically breaking the path of light when you touch the screen. So it can detect multiple touches. (In over my head here.) Check out MERL which is Mitsubishi Electronics Research Lab. And if you Google Jeff, you'll find the other things he's doing. The guy is brilliant! Teresa On 3/2/07, nelson ramirez <[EMAIL PROTECTED]> wrote: http://link.brightcove.com/services/player/bcpid533361602?bctid=422563006 Multi touch displays are here! The demo interfaces look so awesome! does anyone know any details on the package used to develop the UI? ___ 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: Need help dynamically adding a layer to a MC.
Ah ha! This is what Andrei meant by the strings may be causing the problem. As far as I can tell, the declaring them MovieClips and the extra createEmptyMovieClip at the beginning are the keys to making this work. I made mine work for a single image. Now I have to figure out how to put it all in a function that I can call multiple times. I just can't sit here anymore tonight. THANK YOU BOTH for the great help. I would have never figured this out on my own. Teresa On 2/4/07, jason vancleave <[EMAIL PROTECTED]> wrote: Here's what I do: this.stop(); // var mcImageWindow:MovieClip; var mcImageContent:MovieClip; var mcImageMask:MovieClip; var mcl:MovieClipLoader = new MovieClipLoader(); // mcl.addListener(this); // mcImageWindow = this.createEmptyMovieClip("mcImageWindow", this.getNextHighestDepth()); mcImageContent = mcImageWindow.createEmptyMovieClip("mcImageWindow", mcImageWindow.getNextHighestDepth()); mcl.loadClip("image.jpg", mcImageContent); // function onLoadInit() { mcImageMask = mcImageWindow.attachMovie("mcImageMask", "mcImageMask", mcImageWindow.getNextHighestDepth()); mcImageWindow.setMask(mcImageMask); } heres a sample of the above code: http://www.jasonvancleave.com/examples/mask.zip ___ 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] Need help dynamically adding a layer to a MC.
Andrei, themask is in there according to debug lists but I can't see it in the .swf... What/where is Frame 0 ? Seems to be instanciated but not loaded. Can't find a command to explicitly load it. Also interesting that I can't seem to force the level on any of the movie clips. Thanks, Teresa Level #0: Frame=1 Shape: Movie Clip: Frame=1 Target="_level0.img_mc0" Shape: Movie Clip: Frame=0 Target="_level0.img_mc0.themask" Movie Clip: Frame=1 Target="_level0.img_mc1" Shape: Movie Clip: Frame=0 Target="_level0.img_mc1.themask" . . .etc On 2/4/07, Andrei Thomaz <[EMAIL PROTECTED]> wrote: i guess you need to change: mcTemp.duplicateMovieClip("themask", "idono"+k, this.getNextHighestDepth ()); to: mcTemp.duplicateMovieClip("themask", "idono"+k, mcTemp.getNextHighestDepth ()); []'s andrei On 2/4/07, Teresa Hardy <[EMAIL PROTECTED]> wrote: > > Andrei, > Significant progress...following your suggestions... > > temp = "wrapper"+k; > mcTemp = target_mc.createEmptyMovieClip(temp, this.getNextHighestDepth > ()); > mcTemp.duplicateMovieClip("themask", "idono"+k, > this.getNextHighestDepth > ()); > mcTemp.blendMode = "layer"; > trace(k); > > I made one further change because the .attachMovieClip was not executing. > I > moved to .duplicateMovieClip and now see "themask" showing up in debug > list. > (Although still not in the .swf) In the process, I found this variable > list > in the debug mode. I have no idea what this means but anything that says > must be a hint! > > Thanks so much for being here today to help me through this! > T > > > Variable _level0.i = 13 > Variable _level0.j = 22 > Variable _level0.instofimg = "img_mc12" > Variable _level0.img_mcl = [object #5, class 'MovieClipLoader'] {} > Variable _level0.ratio = 4 > Variable _level0.temp = "wrapper3" > Variable _level0.mcTemp = [movieclip:] > Movie Clip: Target="_level0.img_mc0" > Movie Clip: Target="_level0.img_mc1" > Movie Clip: Target="_level0.img_mc2" > Movie Clip: Target="_level0.img_mc3" > Movie Clip: Target="_level0.img_mc4" > Movie Clip: Target="_level0.img_mc5" > Movie Clip: Target="_level0.img_mc6" > Movie Clip: Target="_level0.img_mc7" > Movie Clip: Target="_level0.img_mc8" > Movie Clip: Target="_level0.img_mc9" > > On 2/4/07, Andrei Thomaz <[EMAIL PROTECTED]> wrote: > > > > change > > > > temp.attachMovie("themask", "idono"+k, this.getNextHighestDepth()); > > > > for > > > > temp.attachMovie("themask", "idono"+k, temp.getNextHighestDepth()); > > > > you need the next depth inside the empty movieclip. And you also need a > > reference to the empty movieclip: > > > > > > //target_mc.addMask = function() { > > temp = "wrapper" + k; > > mcTemp = target_mc.createEmptyMovieClip(temp, > > this.getNextHighestDepth()); > > > > mcTemp.attachMovie("themask", "idono"+k, this.getNextHighestDepth > ()); > > mcTemp.blendMode = "layer"; > > trace(k); > > //}; > > > > in your code, temp is a string, not a movieclip. This may be the > problem. > > > > []'s > > andrei > > > > > > On 2/4/07, Teresa Hardy <[EMAIL PROTECTED]> wrote: > > > > > > I ditched the function() since it wasn't executing and tried your > > > suggestion. The debugger now shows the "wrapper"..s getting added to > the > > > movieclips. Hmm...progress. But the temp.attachMovie is not executing > on > > > any > > > layer anywhere. I just don't see why. > > > Thanks, > > > T > > > > > > //target_mc.addMask = function() { > > > temp = "wrapper" + k; > > > target_mc.createEmptyMovieClip(temp, this.getNextHighestDepth ()); > > > > > > temp.attachMovie("themask", "idono"+k, this.getNextHighestDepth > ()); > > > temp.blendMode = "layer"; > > > trace(k); > > > //}; > > > > > > On 2/4/07, Andrei Thomaz <[EMAIL PROTECTED]> wrote: > > > > > > > > I guess you have to create an empty movie clip inside target_mc, and > > > > attach > > > > the mask to it. > > > > > > > > []'s > > > > andrei
Re: [Flashcoders] Need help dynamically adding a layer to a MC.
Andrei, Significant progress...following your suggestions... temp = "wrapper"+k; mcTemp = target_mc.createEmptyMovieClip(temp, this.getNextHighestDepth ()); mcTemp.duplicateMovieClip("themask", "idono"+k, this.getNextHighestDepth ()); mcTemp.blendMode = "layer"; trace(k); I made one further change because the .attachMovieClip was not executing. I moved to .duplicateMovieClip and now see "themask" showing up in debug list. (Although still not in the .swf) In the process, I found this variable list in the debug mode. I have no idea what this means but anything that says must be a hint! Thanks so much for being here today to help me through this! T Variable _level0.i = 13 Variable _level0.j = 22 Variable _level0.instofimg = "img_mc12" Variable _level0.img_mcl = [object #5, class 'MovieClipLoader'] {} Variable _level0.ratio = 4 Variable _level0.temp = "wrapper3" Variable _level0.mcTemp = [movieclip:] Movie Clip: Target="_level0.img_mc0" Movie Clip: Target="_level0.img_mc1" Movie Clip: Target="_level0.img_mc2" Movie Clip: Target="_level0.img_mc3" Movie Clip: Target="_level0.img_mc4" Movie Clip: Target="_level0.img_mc5" Movie Clip: Target="_level0.img_mc6" Movie Clip: Target="_level0.img_mc7" Movie Clip: Target="_level0.img_mc8" Movie Clip: Target="_level0.img_mc9" On 2/4/07, Andrei Thomaz <[EMAIL PROTECTED]> wrote: change temp.attachMovie("themask", "idono"+k, this.getNextHighestDepth()); for temp.attachMovie("themask", "idono"+k, temp.getNextHighestDepth()); you need the next depth inside the empty movieclip. And you also need a reference to the empty movieclip: //target_mc.addMask = function() { temp = "wrapper" + k; mcTemp = target_mc.createEmptyMovieClip(temp, this.getNextHighestDepth()); mcTemp.attachMovie("themask", "idono"+k, this.getNextHighestDepth()); mcTemp.blendMode = "layer"; trace(k); //}; in your code, temp is a string, not a movieclip. This may be the problem. []'s andrei On 2/4/07, Teresa Hardy <[EMAIL PROTECTED]> wrote: > > I ditched the function() since it wasn't executing and tried your > suggestion. The debugger now shows the "wrapper"..s getting added to the > movieclips. Hmm...progress. But the temp.attachMovie is not executing on > any > layer anywhere. I just don't see why. > Thanks, > T > > //target_mc.addMask = function() { > temp = "wrapper" + k; > target_mc.createEmptyMovieClip(temp, this.getNextHighestDepth()); > > temp.attachMovie("themask", "idono"+k, this.getNextHighestDepth()); > temp.blendMode = "layer"; > trace(k); > //}; > > On 2/4/07, Andrei Thomaz <[EMAIL PROTECTED]> wrote: > > > > I guess you have to create an empty movie clip inside target_mc, and > > attach > > the mask to it. > > > > []'s > > andrei > > > > > > On 2/4/07, Teresa Hardy <[EMAIL PROTECTED]> wrote: > > > > > > Just joined... and by reading today's posts, it looks like I am in the > > > right > > > place to get help on this. > > > > > > I am dynamically creating movie clips and loading each with a .jpg and > a > > > layer with a mask. It is the addMask step that doesn't work. I have > > > written > > > this a dozen different ways and have only confused myself. Stepping > > > through > > > the code I learned that it creates all the movie clips first and then > > goes > > > to the onLoadInit and sets all the properties. It skips my attempt at > an > > > addMask function. The linkage id of the mask in the library is > > "themask". > > > I > > > tested this line separately in a different file. It sort of works > > although > > > I > > > couldn't tell if it was loading the mask into the movie clip or the > main > > > timeline. Yes, I am a beginner. And yes, I am going to go out and get > > the > > > Flash 8 Essentials book based on the posts I read today. Any > suggestions > > > greatly appreciated!!! > > > > > > Thanks, > > > T > > > > > > ... > > > max = 12; > > > //array of positions for x and y > > > var pos_x:Array = new Array(0, 200, 400, 600, 0, 200, 400, 600, 0, > 200, > > > 400, > > > 600, 0); > > > var pos_y:Array = new Array(0, 0, 0, 0, 200, 200, 200, 200, 400, 400, > > 400, > > > 400, 600); > > > k
Re: [Flashcoders] Need help dynamically adding a layer to a MC.
I ditched the function() since it wasn't executing and tried your suggestion. The debugger now shows the "wrapper"..s getting added to the movieclips. Hmm...progress. But the temp.attachMovie is not executing on any layer anywhere. I just don't see why. Thanks, T //target_mc.addMask = function() { temp = "wrapper" + k; target_mc.createEmptyMovieClip(temp, this.getNextHighestDepth()); temp.attachMovie("themask", "idono"+k, this.getNextHighestDepth()); temp.blendMode = "layer"; trace(k); //}; On 2/4/07, Andrei Thomaz <[EMAIL PROTECTED]> wrote: I guess you have to create an empty movie clip inside target_mc, and attach the mask to it. []'s andrei On 2/4/07, Teresa Hardy <[EMAIL PROTECTED]> wrote: > > Just joined... and by reading today's posts, it looks like I am in the > right > place to get help on this. > > I am dynamically creating movie clips and loading each with a .jpg and a > layer with a mask. It is the addMask step that doesn't work. I have > written > this a dozen different ways and have only confused myself. Stepping > through > the code I learned that it creates all the movie clips first and then goes > to the onLoadInit and sets all the properties. It skips my attempt at an > addMask function. The linkage id of the mask in the library is "themask". > I > tested this line separately in a different file. It sort of works although > I > couldn't tell if it was loading the mask into the movie clip or the main > timeline. Yes, I am a beginner. And yes, I am going to go out and get the > Flash 8 Essentials book based on the posts I read today. Any suggestions > greatly appreciated!!! > > Thanks, > T > > ... > max = 12; > //array of positions for x and y > var pos_x:Array = new Array(0, 200, 400, 600, 0, 200, 400, 600, 0, 200, > 400, > 600, 0); > var pos_y:Array = new Array(0, 0, 0, 0, 200, 200, 200, 200, 400, 400, 400, > 400, 600); > k = 0; > var mcl_obj:Object = new Object(); > mcl_obj.onLoadInit = function(target_mc:MovieClip):Void { > target_mc._x = pos_x[k]; > target_mc._y = pos_y[k]; > if (target_mc._width>200) { > ratio = target_mc._width/200; > target_mc._width = target_mc._width/ratio; > target_mc._height = target_mc._height/ratio; > } > //---broken part starts here-- > target_mc.addMask = function() { > target_mc.attachMovie("themask", "idono"+i, > this.getNextHighestDepth > ()); > target_mc.blendMode = "layer"; > trace(i); > }; > //--end of broken part -- > //trace ("x "+pos_x[k]); > //trace ("y "+pos_y[k]); > target_mc.onPress = function() { > trace("drag goes here"); > }; > k = k+1; > }; > for (var i = 0; i<=max; i++) { > //trace(i); > j = 10+i; > var instofimg = new Object(); > instofimg = "img_mc"+i; > this.createEmptyMovieClip(instofimg, j); > var img_mcl:MovieClipLoader = new MovieClipLoader(); > img_mcl.addListener(mcl_obj); > //load image into movieclip > img_mcl.loadClip("image"+i+".jpg", instofimg); > > } > ___ > 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] Need help dynamically adding a layer to a MC.
Just joined... and by reading today's posts, it looks like I am in the right place to get help on this. I am dynamically creating movie clips and loading each with a .jpg and a layer with a mask. It is the addMask step that doesn't work. I have written this a dozen different ways and have only confused myself. Stepping through the code I learned that it creates all the movie clips first and then goes to the onLoadInit and sets all the properties. It skips my attempt at an addMask function. The linkage id of the mask in the library is "themask". I tested this line separately in a different file. It sort of works although I couldn't tell if it was loading the mask into the movie clip or the main timeline. Yes, I am a beginner. And yes, I am going to go out and get the Flash 8 Essentials book based on the posts I read today. Any suggestions greatly appreciated!!! Thanks, T ... max = 12; //array of positions for x and y var pos_x:Array = new Array(0, 200, 400, 600, 0, 200, 400, 600, 0, 200, 400, 600, 0); var pos_y:Array = new Array(0, 0, 0, 0, 200, 200, 200, 200, 400, 400, 400, 400, 600); k = 0; var mcl_obj:Object = new Object(); mcl_obj.onLoadInit = function(target_mc:MovieClip):Void { target_mc._x = pos_x[k]; target_mc._y = pos_y[k]; if (target_mc._width>200) { ratio = target_mc._width/200; target_mc._width = target_mc._width/ratio; target_mc._height = target_mc._height/ratio; } //---broken part starts here-- target_mc.addMask = function() { target_mc.attachMovie("themask", "idono"+i, this.getNextHighestDepth ()); target_mc.blendMode = "layer"; trace(i); }; //--end of broken part -- //trace ("x "+pos_x[k]); //trace ("y "+pos_y[k]); target_mc.onPress = function() { trace("drag goes here"); }; k = k+1; }; for (var i = 0; i<=max; i++) { //trace(i); j = 10+i; var instofimg = new Object(); instofimg = "img_mc"+i; this.createEmptyMovieClip(instofimg, j); var img_mcl:MovieClipLoader = new MovieClipLoader(); img_mcl.addListener(mcl_obj); //load image into movieclip img_mcl.loadClip("image"+i+".jpg", instofimg); } ___ 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