Re: [Flashcoders] attachMovie() with non-library-symbols
On Fri, Oct 24, 2008 at 03:17:32PM +0200, Matthias Dittgen wrote: Have your received my email with the Test SWF? Yes, thanks. Haven't looked at it yet but I plan to do next week. What's an RSL ? Remote Shared Library. Mat, you're being *very* helpful ! I drafted a page on our wiki for use when we're to improve Gnash implementation of symbols libraries: http://wiki.gnashdev.org/SharedSymbols If there's anything you may want to add we'd appreciate it. Like: - How does a symbol library with RSL enabled look like ? Can you send a small SWF with that ? (we don't parse that, I'm afraid) - Which SWF version introduced this feature ? TIA! --strk; ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] attachMovie() with non-library-symbols
On Thu, Oct 23, 2008 at 01:45:01PM +0200, Matthias Dittgen wrote: @strk: I should try var func:String = register; Object[func](args); instead of Object.registerClass(args); to see, if an all code based attempt is working without having the compiler do EXPORT tags. Yes please :) I have attached a test situation build in current FlashDevelop on WinXP as AS2 project. Let us know, how it goes. It does contain the EXPORT, pretty much expected (as Peter pointed out). --strk; ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] attachMovie() with non-library-symbols
Have your received my email with the Test SWF? What's an RSL ? Remote Shared Library. Imagine Main.swf loading Sub.swf. Sub.swf consists of Library Symbol exported for AS and for runtime sharing! Then in Main.swf Symbols from Sub.swf can be attached as if they were directly in Main.swf. Symbols from Main.swf can always be attached to Sub.swf or its childs (without being exported for runtime sharing). I'm not sure that the movie *is* working. I mean, could as well be that the attachMovie with unexistent symbols are just garbage in the SWF, or hooks for the case in which the movie is loaded by another one, which contain the syms, but optional. As long as you work with third party SWF files, we can only make speculations about its content and how it was coded. You should work with SWF files, where the source is available. Is the sym library of a 'loader' movie supposed to be available to 'loaded' movies for use ? yes, see above but the sym library of a loadED movie is only available to the loadER movie, when exported for runtime sharing (RSL). hth, Matthias ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] attachMovie() with non-library-symbols
Talking about SWF8: which btw. means Actionscript 2.0 (AS2) Thank you for the pointer, but reading that article doesn't help me much. For example, I don't understand if the resulting SWF from that syntax is expected to contain EXPORT tags or not. if you mean EXPORT tags in the swf bytecode, I am not aware of the tags that are written by the compiler when using the code explained by Peter Joel, but I could imagine, that when using MTASC for compiling only DOACTION tags are written and no EXPORT tags. But I usually don't read SWF bytecode after comiling. ;) My problem with the dmplayer.swf above is that it ends up looking for symbols like 'video_frame': ERROR: No export symbol video_frame found in movie dmplayer.swf. Which do NOT appear in any EXPORT tag. How do you know? Where does the SWF come from? Do you do some kind of reverse engineering? This way you can attach classes that don't have a library symbol but extend MovieClip. You mean it is possible to add entries to the 'symbols library' trough DOACTION blocks only ? I mean, not something automatically done by the AS *compiler* but something done by the actual VM/player ? I think so, but I am not sure about the bytecode/tags written by the compiler interpreting the code. The magic line of code actually is this one: Object.registerClass(__Packages.com.peterjoel.shapes.Rectangle, Rectangle); (http://livedocs.adobe.com/flash/8/main/2587.html) first argument is of type String, specifying the classpath of the Rectangle class. second argument is of type Function and is a reference to the Rectangle class constructor function. In Peter's example Rectangle extends MovieClip. this way if becomes possible to do the attachMovie call: attachMovie(__Packages.com.peterjoel.shapes.Rectangle, RectangleInstance, getNextHighestDepth()); If so, can you provide the smallest example of such thing ? see above and Peter's blog entry. hth, Matthias ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] attachMovie() with non-library-symbols
On Thu, Oct 23, 2008 at 10:01:37AM +0200, Matthias Dittgen wrote: if you mean EXPORT tags in the swf bytecode, I am not aware of the tags that are written by the compiler when using the code explained by Peter Joel, but I could imagine, that when using MTASC for compiling only DOACTION tags are written and no EXPORT tags. But I usually don't read SWF bytecode after comiling. ;) I've seen a few compilers automatically adding non-action tags as a side effect of AS interpretation... My problem with the dmplayer.swf above is that it ends up looking for symbols like 'video_frame': ERROR: No export symbol video_frame found in movie dmplayer.swf. Which do NOT appear in any EXPORT tag. How do you know? Where does the SWF come from? Do you do some kind of reverse engineering? The SWF comes from the web. I know by using an SWF dumper (listswf from Ming - libming.org). This way you can attach classes that don't have a library symbol but extend MovieClip. You mean it is possible to add entries to the 'symbols library' trough DOACTION blocks only ? I mean, not something automatically done by the AS *compiler* but something done by the actual VM/player ? I think so, but I am not sure about the bytecode/tags written by the compiler interpreting the code. Could you send me (a private attachment if the list doesn't let you) a small SWF produced as a proof of concept ? If it contains no EXPORT tags but has a working attachMovie('symbol',..) I'll go on with the research. This is for eventual compatibility fixes in Gnash (The GNU SWF Player). --strk; ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] attachMovie() with non-library-symbols
The code on my old blog works for content published with Flash authoring. However, it works because Flash inserts the export tags in the swf automatically. If you have a swf that has a working attachMovie, but no export tags, then it must be attaching the symbol from another swf. An RSL perhaps? Peter On Thu, Oct 23, 2008 at 9:31 AM, strk [EMAIL PROTECTED] wrote: On Thu, Oct 23, 2008 at 10:01:37AM +0200, Matthias Dittgen wrote: if you mean EXPORT tags in the swf bytecode, I am not aware of the tags that are written by the compiler when using the code explained by Peter Joel, but I could imagine, that when using MTASC for compiling only DOACTION tags are written and no EXPORT tags. But I usually don't read SWF bytecode after comiling. ;) I've seen a few compilers automatically adding non-action tags as a side effect of AS interpretation... My problem with the dmplayer.swf above is that it ends up looking for symbols like 'video_frame': ERROR: No export symbol video_frame found in movie dmplayer.swf. Which do NOT appear in any EXPORT tag. How do you know? Where does the SWF come from? Do you do some kind of reverse engineering? The SWF comes from the web. I know by using an SWF dumper (listswf from Ming - libming.org). This way you can attach classes that don't have a library symbol but extend MovieClip. You mean it is possible to add entries to the 'symbols library' trough DOACTION blocks only ? I mean, not something automatically done by the AS *compiler* but something done by the actual VM/player ? I think so, but I am not sure about the bytecode/tags written by the compiler interpreting the code. Could you send me (a private attachment if the list doesn't let you) a small SWF produced as a proof of concept ? If it contains no EXPORT tags but has a working attachMovie('symbol',..) I'll go on with the research. This is for eventual compatibility fixes in Gnash (The GNU SWF Player). --strk; ___ 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] attachMovie() with non-library-symbols
@strk: I should try var func:String = register; Object[func](args); instead of Object.registerClass(args); to see, if an all code based attempt is working without having the compiler do EXPORT tags. I have attached a test situation build in current FlashDevelop on WinXP as AS2 project. Let us know, how it goes. btw. what is your realname and what is your motivation working on gnash? What else do you do? @Peter: nice to read you! You've been a motivation to play with AS2 for a long time for me. Matthias On Thu, Oct 23, 2008 at 11:38 AM, Peter Hall [EMAIL PROTECTED] wrote: The code on my old blog works for content published with Flash authoring. However, it works because Flash inserts the export tags in the swf automatically. If you have a swf that has a working attachMovie, but no export tags, then it must be attaching the symbol from another swf. An RSL perhaps? Peter On Thu, Oct 23, 2008 at 9:31 AM, strk [EMAIL PROTECTED] wrote: On Thu, Oct 23, 2008 at 10:01:37AM +0200, Matthias Dittgen wrote: if you mean EXPORT tags in the swf bytecode, I am not aware of the tags that are written by the compiler when using the code explained by Peter Joel, but I could imagine, that when using MTASC for compiling only DOACTION tags are written and no EXPORT tags. But I usually don't read SWF bytecode after comiling. ;) I've seen a few compilers automatically adding non-action tags as a side effect of AS interpretation... My problem with the dmplayer.swf above is that it ends up looking for symbols like 'video_frame': ERROR: No export symbol video_frame found in movie dmplayer.swf. Which do NOT appear in any EXPORT tag. How do you know? Where does the SWF come from? Do you do some kind of reverse engineering? The SWF comes from the web. I know by using an SWF dumper (listswf from Ming - libming.org). This way you can attach classes that don't have a library symbol but extend MovieClip. You mean it is possible to add entries to the 'symbols library' trough DOACTION blocks only ? I mean, not something automatically done by the AS *compiler* but something done by the actual VM/player ? I think so, but I am not sure about the bytecode/tags written by the compiler interpreting the code. Could you send me (a private attachment if the list doesn't let you) a small SWF produced as a proof of concept ? If it contains no EXPORT tags but has a working attachMovie('symbol',..) I'll go on with the research. This is for eventual compatibility fixes in Gnash (The GNU SWF Player). --strk; ___ 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] attachMovie() with non-library-symbols
On Thu, Oct 23, 2008 at 10:38:52AM +0100, Peter Hall wrote: The code on my old blog works for content published with Flash authoring. However, it works because Flash inserts the export tags in the swf automatically. If you have a swf that has a working attachMovie, but no export tags, then it must be attaching the symbol from another swf. An RSL perhaps? What's an RSL ? I'm not sure that the movie *is* working. I mean, could as well be that the attachMovie with unexistent symbols are just garbage in the SWF, or hooks for the case in which the movie is loaded by another one, which contain the syms, but optional. Is the sym library of a 'loader' movie supposed to be available to 'loaded' movies for use ? --strk; ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] attachMovie() with non-library-symbols
On Tue, Oct 14, 2008 at 09:45:56AM +0200, Matthias Dittgen wrote: You're talking about AS2? Talking about SWF8: http://dailymotion.alice.it/flash/dmplayer/dmplayer.swf See here for the answer: http://www.peterjoel.com/blog/?archive=2004_01_01_archive.xml Thank you for the pointer, but reading that article doesn't help me much. For example, I don't understand if the resulting SWF from that syntax is expected to contain EXPORT tags or not. My problem with the dmplayer.swf above is that it ends up looking for symbols like 'video_frame': ERROR: No export symbol video_frame found in movie dmplayer.swf. Which do NOT appear in any EXPORT tag. This way you can attach classes that don't have a library symbol but extend MovieClip. You mean it is possible to add entries to the 'symbols library' trough DOACTION blocks only ? I mean, not something automatically done by the AS *compiler* but something done by the actual VM/player ? If so, can you provide the smallest example of such thing ? --strk; ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] attachMovie() with non-library-symbols
You're talking about AS2? See here for the answer: http://www.peterjoel.com/blog/?archive=2004_01_01_archive.xml This way you can attach classes that don't have a library symbol but extend MovieClip. These classes can for example have visual content using the drawing API. Have fun! Matthias On Mon, Oct 6, 2008 at 3:49 PM, strk [EMAIL PROTECTED] wrote: I've found a few movies out there using attachMovie() with symbol names which are NOT exported in the SWF movie containing the call. Are the SWF bogus (containing useless actionscript) or is there another interpretation of attachMovie() first argument ? --strk; () ASCII Ribbon Campaign /\ Keep it simple! ___ 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] attachMovie() with non-library-symbols
I've found a few movies out there using attachMovie() with symbol names which are NOT exported in the SWF movie containing the call. Are the SWF bogus (containing useless actionscript) or is there another interpretation of attachMovie() first argument ? --strk; () ASCII Ribbon Campaign /\ Keep it simple! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] attachMovie(LibrarySymbol). Right way to access custom clip variables and functions.
Hey! Consider this. There is a symbol in the library - Ball. It has a variable declared in the first frame - size. I want to instantiate the symbol and then read the variable value. Trying to access the variable synchronously, right after the the symbol has been instantiated, does not work: var ball_mc = _root.attachMovie(Ball, ball_mc, _root.getNextHighestDepth()); trace(size = + ball_mc.size); //size = undefined Then I came up with the following solution. In the first frame of Ball symbol, at the end of code I insert the following statement onLoad(); And then inside the main program I register the listener to onLoad() funciton call. var ball_mc = _root.attachMovie(Ball, ball_mc, _root.getNextHighestDepth()); ball_mc.onLoad = function() { trace(size = + ball_mc.size); //size = 20 } This technique works fine. However, I don't like the fact that I have manually add onLoad() call to every symbol which properties or functions I want to access. Do you think this is the right way to solve the problem? What is the best way to? Pasha ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] AttachMovie?!!?
Hello. I am sorry of posting this easy question here(i should post it to the newbies list but i think there is a problem with it) and i am sorry if this is a double post. Nobody replyed and i don't know if you actually received the mail or not. And i really need the answer as soon as possible. : I need to load two flash movies into a single one. One is containig the sound, the other the animation. I think i cannot put the sound directly into the movie because i made de movie of a lot of scenes(or can I?) Can you tell me a good tutorial for this or only giving me the piece of code neceserly for this. Thanks Pedro ps: I tried with this: this.attachMovie(genesis 7, genesis, this.getNextHighestDepth()); //to attach the film but the problem is that the animated movieclips inside the movie didn't play. Should sth like this work? this.attachMovie(genesis 7, genesis, this.getNextHighestDepth ()); //to attach the film genesis.play();??? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AttachMovie?!!?
Hi, I wouldn't use scenes, I think it's even in adobe's best practice document. Attachmovie is used for attaching movies from the library, loadMovie is used for loading movies from an external source, which one are you trying to do? As far as tutorials go, I'd recommend doing the flash tutorials that come with flash, reading through the manual that comes with flash and pick up a book like game development. Those books usually don't go hardcore OO on you which is nice when ur just getting started but they do discuss sounds, graphics etc.. greetz JC On Dec 20, 2007 9:59 AM, Pedro Kostelec [EMAIL PROTECTED] wrote: Hello. I am sorry of posting this easy question here(i should post it to the newbies list but i think there is a problem with it) and i am sorry if this is a double post. Nobody replyed and i don't know if you actually received the mail or not. And i really need the answer as soon as possible. : I need to load two flash movies into a single one. One is containig the sound, the other the animation. I think i cannot put the sound directly into the movie because i made de movie of a lot of scenes(or can I?) Can you tell me a good tutorial for this or only giving me the piece of code neceserly for this. Thanks Pedro ps: I tried with this: this.attachMovie(genesis 7, genesis, this.getNextHighestDepth()); //to attach the film but the problem is that the animated movieclips inside the movie didn't play. Should sth like this work? this.attachMovie(genesis 7, genesis, this.getNextHighestDepth ()); //to attach the film genesis.play();??? ___ 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] AttachMovie?!!?
On Dec 20, 2007 6:06 AM, Hans Wichman [EMAIL PROTECTED] wrote: Hi, I wouldn't use scenes, I think it's even in adobe's best practice document. Which really makes you wonder why they still even include the Scenes option. It seems like Scenes have been widely accepted as taboo for 5 years now if not more, and if your own best practices document says to avoid them, maybe its time to phase them out. .m ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] AttachMovie?!!?
Which really makes you wonder why they still even include the Scenes option. It seems like Scenes have been widely accepted as taboo for 5 years now if not more, and if your own best practices document says to avoid them, maybe its time to phase them out. I've heard flash cartoon animators use it a lot, and an Adobe person said it allows backwards compatibility with .flas. I agree though, take it out, it only encourages bad design. Jason Merrill Bank of America LLD GTO eTools Multimedia Research Development ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AttachMovie?!!?
___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AttachMovie?!!?
I allways knew that scenes wheren't the best choice, but the animation lasts about 10 minutes, which would be really complicated to do in anly one scene. Yes, hans it is really loadMovie the one that i should use. I don't know where did i mix this with attachMovie. It worked, but it is not really in syncronisation. How ca i fix that? Pedro 2007/12/20, Andrew Sinning [EMAIL PROTECTED]: ___ 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] AttachMovie?!!?
could you elaborate on what kind of synchronization you are trying to achieve? On 12/20/07, Pedro Kostelec [EMAIL PROTECTED] wrote: I allways knew that scenes wheren't the best choice, but the animation lasts about 10 minutes, which would be really complicated to do in anly one scene. Yes, hans it is really loadMovie the one that i should use. I don't know where did i mix this with attachMovie. It worked, but it is not really in syncronisation. How ca i fix that? Pedro 2007/12/20, Andrew Sinning [EMAIL PROTECTED]: ___ 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 -- ...helmut ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AttachMovie?!!?
Hi, You may have problems forcing one timeline without a sound on to sync with another. Here is a suggested workaround for the separate scenes problem: Save multiple copies of your original animation - one copy for each scene. Open up the first animation and delete all scenes except for #1 Repeat this for each file - deleting the corresponding scene. You will then need to publish these and load each SWF's into your movie - this will need a bit of coding to start the next movie playing after one finishes, so I don't know how up you are for this. The main problem here is sync'ing each animation to the sound track - most of the time, animations are on the timeline with the sound they are animated to and the Sound is set to Stream Sync type. This may not help you here, but having the sound on the same timeline is possibly the only way to force sync - see this document: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14108sliceId=2 http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14108sliceId=2 You may find that the only way to ensure Sync is to put the audio in with the animations - either put each scene onto one big timeline, which is a pain for preloading, or cut up the sound for each scene and put the separate files into each movie. The latter may be easier to manage and you can always preload the files that follow the first one. HTH Glen Pedro Kostelec wrote: I allways knew that scenes wheren't the best choice, but the animation lasts about 10 minutes, which would be really complicated to do in anly one scene. Yes, hans it is really loadMovie the one that i should use. I don't know where did i mix this with attachMovie. It worked, but it is not really in syncronisation. How ca i fix that? Pedro 2007/12/20, Andrew Sinning [EMAIL PROTECTED]: ___ 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 -- Glen Pike 01736 759321 www.glenpike.co.uk http://www.glenpike.co.uk ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AttachMovie?!!?
It worked. Because the sound was played a bit before the movie started i moved it for two frames and now it works. I must make the same but doing it on the pc whit which the presentations will be displayed and i hope that it will work. Thank you guys for your help and your time for such an easy question. Bye Pedro 2007/12/20, Glen Pike [EMAIL PROTECTED]: Hi, You may have problems forcing one timeline without a sound on to sync with another. Here is a suggested workaround for the separate scenes problem: Save multiple copies of your original animation - one copy for each scene. Open up the first animation and delete all scenes except for #1 Repeat this for each file - deleting the corresponding scene. You will then need to publish these and load each SWF's into your movie - this will need a bit of coding to start the next movie playing after one finishes, so I don't know how up you are for this. The main problem here is sync'ing each animation to the sound track - most of the time, animations are on the timeline with the sound they are animated to and the Sound is set to Stream Sync type. This may not help you here, but having the sound on the same timeline is possibly the only way to force sync - see this document: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14108sliceId=2 http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14108sliceId=2 You may find that the only way to ensure Sync is to put the audio in with the animations - either put each scene onto one big timeline, which is a pain for preloading, or cut up the sound for each scene and put the separate files into each movie. The latter may be easier to manage and you can always preload the files that follow the first one. HTH Glen Pedro Kostelec wrote: I allways knew that scenes wheren't the best choice, but the animation lasts about 10 minutes, which would be really complicated to do in anly one scene. Yes, hans it is really loadMovie the one that i should use. I don't know where did i mix this with attachMovie. It worked, but it is not really in syncronisation. How ca i fix that? Pedro 2007/12/20, Andrew Sinning [EMAIL PROTECTED]: ___ 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 -- Glen Pike 01736 759321 www.glenpike.co.uk http://www.glenpike.co.uk ___ 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] attachMovie from loaded .swf
Hey guys, I'm loading an external .swf into a main .swf. From the loaded file I can access variables from the main file, create a movie clip in the main file, and use BitmapData to draw shapes to the main file. However, I can't seem to attach a movie clip (a custom component, in fact) from the loaded .swf's library to the main file. Is this a security restriction? Any workarounds? Do you even get what I mean? :) Flash 8, CS2. Niclas ___ 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] attachMovie from loaded .swf
Thanks for your reply. I solved it by putting my component in yet another .swf file, which loads fine into the holder clip's _root. Thanks, Niclas Hans Wichman wrote: Hi, not possible, sorry :) Shared libraries might help or creating an empty clip in the loaded swf itself and attaching your stuff there. greetz JC On 7/13/07, Niclas Åberg [EMAIL PROTECTED] wrote: Hey guys, I'm loading an external .swf into a main .swf. From the loaded file I can access variables from the main file, create a movie clip in the main file, and use BitmapData to draw shapes to the main file. However, I can't seem to attach a movie clip (a custom component, in fact) from the loaded .swf's library to the main file. Is this a security restriction? Any workarounds? Do you even get what I mean? :) Flash 8, CS2. Niclas ___ 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] attachMovie from loaded .swf
Hi, not possible, sorry :) Shared libraries might help or creating an empty clip in the loaded swf itself and attaching your stuff there. greetz JC On 7/13/07, Niclas Åberg [EMAIL PROTECTED] wrote: Hey guys, I'm loading an external .swf into a main .swf. From the loaded file I can access variables from the main file, create a movie clip in the main file, and use BitmapData to draw shapes to the main file. However, I can't seem to attach a movie clip (a custom component, in fact) from the loaded .swf's library to the main file. Is this a security restriction? Any workarounds? Do you even get what I mean? :) Flash 8, CS2. Niclas ___ 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] attachMovie from loaded .swf
http://www.google.com/search?hl=enq=attachmovie+from+loaded+swf - Original Message - From: Niclas Åberg [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, July 13, 2007 12:49 PM Subject: [Flashcoders] attachMovie from loaded .swf Hey guys, I'm loading an external .swf into a main .swf. From the loaded file I can access variables from the main file, create a movie clip in the main file, and use BitmapData to draw shapes to the main file. However, I can't seem to attach a movie clip (a custom component, in fact) from the loaded .swf's library to the main file. Is this a security restriction? Any workarounds? Do you even get what I mean? :) Flash 8, CS2. Niclas ___ 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] attachMovie fails on embedded clip in a movie, why?
2nd try: Forgive if this is a repeat post. I didn't see my first request make it to the list: Hi Flash Friends, attachMovie works on a clip that is inside a clip that has been loaded by attachMovie but fails on a clip that is inside a clip loaded with loadMovie. This should be so easy, but it is simply not working. I'd appreciate any tips pointing me to the part that I don't understand ... The setup: - Main movie (mainMovie) - A symbol (person1) - A symbol (template1) that contains a movieClip (chair1) - A swf (template2) in the same folder as the Main movie that contains a similar movieClip (chair2) THIS WORKS: Load the symbol (template1) using attachMovie attachMovie(template1, mainMovie, 250); //hardcoded depth here for clearness On release of a button, attach a symbol to a the chair1 movieClip inside template1 template1.chair1.attachMovie(person1, person1, 101); //hardcoded depth here for clearness THIS DOESN'T WORK: (keeping everything the same except loading the movie from an external source...) Load the swf (template2.swf) using loadMovie mainMovie.loadMovie(chosenTemplate); On release of a button, attach a symbol to a the chair2 movieClip inside template1 Template2.chair2.attachMovie(person1, person1, 101); //hardcoded depth here for clearness Is there some limitation to attachMovie that I'm missing? Any guesses, suggestions, ideas? Thanks, Chris Chris Bell IT Manager University of Colorado Law School My home phone which forwards to me while I'm out of town: 303-443-9621 [EMAIL PROTECTED] ___ 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] attachMovie fails on embedded clip in a movie, why?
Hi Chris, Is there some limitation to attachMovie that I'm missing? Any guesses, suggestions, ideas? Yes. In AS2, you can't attach a symbol from one .SWF's library into another movie's timeline. So if a parent loads a child, none of the clips in the child's library can be attached to the parent's timeline and vice-versa. It's very, very annoying -- but the way it is, unfortunately. The only exception is when using shared libraries. Ian ___ 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] attachMovie fails on embedded clip in a movie, why?
One sidenote: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15638sliceId=2 Instances of imported symbols must be manually placed on the Timeline during authoring. _ Ian Thomas wrote: The only exception is when using shared libraries. Good luck, -- Fumio Nonaka mailto:[EMAIL PROTECTED] http://www.FumioNonaka.com/ My bookshttp://www.FumioNonaka.com/Books/index.html Flash communityhttp://F-site.org/ ___ 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] attachMovie fails on embedded clip in a movie, why?
Hi Chris, I can't follow your code snippets too well, but I try to guess your mistake: You can only attach MovieClips/Symbols with attachMovie, that are available (exported for AS) within the container SWF. Example: MovieClip A.swf contains a MovieClip Symbol S in the library (exported for AS) then you can attach S to any Movieclip inside of A.swf, that was created using attachMovie or createEmptyMovieClip. MovieClip B.swf conatain a MovieClip Symbol R in the library (exported for AS) When you load B into A via loadMovie, you can then inside of B only attach R, not S. (I guess, this example is near to your description when you see person101 as S.) Tipp: To be able to attach S as well, you should read about shared at runtime. hth, Matthias 2007/6/21, Chris Bell [EMAIL PROTECTED]: Hi Flash Friends, attachMovie works on a clip that is inside a clip that has been loaded by attachMovie but fails on a clip that is inside a clip loaded with loadMovie. This should be so easy, but it is simply not working. I'd appreciate any tips pointing me to the part that I don't understand ... The setup: - Main movie (mainMovie) - A symbol (person1) - A symbol (template1) that contains a movieClip (chair1) - A swf (template2) in the same folder as the Main movie that contains a similar movieClip (chair2) THIS WORKS: Load the symbol (template1) using attachMovie attachMovie(template1, mainMovie, 250); //hardcoded depth here for clearness On release of a button, attach a symbol to a the chair1 movieClip inside template1 template1.chair1.attachMovie(person1, person1, 101); //hardcoded depth here for clearness THIS DOESN'T WORK: (keeping everything the same except loading the movie from an external source...) Load the swf (template2.swf) using loadMovie mainMovie.loadMovie(chosenTemplate); On release of a button, attach a symbol to a the chair2 movieClip inside template1 Template2.chair2.attachMovie(person1, person1, 101); //hardcoded depth here for clearness Is there some limitation to attachMovie that I'm missing? Any guesses, suggestions, ideas? Thanks, Chris Chris Bell IT Manager University of Colorado Law School My home phone which forwards to me while I'm out of town: 303-443-9621 [EMAIL PROTECTED] ___ 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] attachMovie fails on embedded clip in a movie, why?
Hi Flash Friends, attachMovie works on a clip that is inside a clip that has been loaded by attachMovie but fails on a clip that is inside a clip loaded with loadMovie. This should be so easy, but it is simply not working. I'd appreciate any tips pointing me to the part that I don't understand ... The setup: - Main movie (mainMovie) - A symbol (person1) - A symbol (template1) that contains a movieClip (chair1) - A swf (template2) in the same folder as the Main movie that contains a similar movieClip (chair2) THIS WORKS: Load the symbol (template1) using attachMovie attachMovie(template1, mainMovie, 250); //hardcoded depth here for clearness On release of a button, attach a symbol to a the chair1 movieClip inside template1 template1.chair1.attachMovie(person1, person1, 101); //hardcoded depth here for clearness THIS DOESN'T WORK: (keeping everything the same except loading the movie from an external source...) Load the swf (template2.swf) using loadMovie mainMovie.loadMovie(chosenTemplate); On release of a button, attach a symbol to a the chair2 movieClip inside template1 Template2.chair2.attachMovie(person1, person1, 101); //hardcoded depth here for clearness Is there some limitation to attachMovie that I'm missing? Any guesses, suggestions, ideas? Thanks, Chris Chris Bell IT Manager University of Colorado Law School My home phone which forwards to me while I'm out of town: 303-443-9621 [EMAIL PROTECTED] ___ 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] attachMovie from library - fails to work with preloader
Hello John and others, On 6/16/07, John VanHorn [EMAIL PROTECTED] wrote: you must force those movieclips to load before you use have access to them. what i usually do is to set the export frame for classes to 2, and then go through the library and uncheck 'export in first frame' for all exported Mc's. then, on frame 2, make a single key frame and place an instance of all exported mc's on the stage, but out of view. in frame 1, i'll have a stop action and preloader code, and when all is loaded, gotoAndPlay frame 3. thanks, it almost works here. I still have a problem though - the movieclips and graphics, that I pull out of library and put at the stage in frame 2, get displayed - eventhough I've put a gotoAndStop(3) in the actions of the 1st frame. I don't understand why does it happen. Why are my assets displayed, isn't flash player supposed to skip the frame 2, when I call gotoAndStop(3) ? Regards Alex -- http://preferans.de ___ 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] attachMovie from library - fails to work with preloader
you must force those movieclips to load before you use have access to them. what i usually do is to set the export frame for classes to 2, and then go through the library and uncheck 'export in first frame' for all exported Mc's. then, on frame 2, make a single key frame and place an instance of all exported mc's on the stage, but out of view. in frame 1, i'll have a stop action and preloader code, and when all is loaded, gotoAndPlay frame 3. On 6/16/07, Alexander Farber [EMAIL PROTECTED] wrote: Dear flash coders, I've created a class representing playing cards and it works quite well for me: http://preferans.de/flash/Card.as http://preferans.de/flash/Card.fla To reduce the file size (from 300K to 120K), I don't keep images of complete 32 cards in the library, but instead I hold the 4 suit images (spades, hearts, clubs, diamonds) and 4 x 3 pictures (jack, queen and king) there and then create a card image on the fly: public function set index(n:Number):Void { __index = n; pic_mc = this.createEmptyMovieClip('pic_mc', 10); var depth:Number = 10; var rank:Number = CARDS[n].rank; var suit:Number = CARDS[n].suit; var color:String = suit DIAMONDS ? 'Black' : 'Red'; var eye:String = (UNKNOWN == rank || (JACK = rank rank = KING)) ? CARDS[n].label : eye = SUITS[suit]; for (var key:String in EYE_POS[rank]) { var pos_obj:Object = EYE_POS[rank][key]; pic_mc.attachMovie(eye, eye + depth + '_mc', depth++, pos_obj); } // ...and so on: attach 2 card indices in the corners } Those suits and jack-queen-king images are all MovieClips in the library, with the following settings: Identifier: Hearts Class: Export for ActionScript [X] Export for runtime sharing [_] Export in first frame [X] My problem is that when I'm trying to postpone loading those MovieClips by unchecking the Export in 1st frame and by setting File-Publish Settings...-Flash- ActionScript 2.0-Settings...-Export Frame for Classes to 2 or 10, then my movie stops working: the cards are empty, no suits and no jack-queen-kings are shown. Also my preloader TextField only show ups shortly :-( Does it make any sense to convert the MovieClips to Graphics in the library? The Export in 1st frame check box is (sometimes???) greyed out then... Thank you Alex PS: Here is the code from my Actions layer (to be found in http://preferans.de/flash/Card.fla ) stop(); var depth:Number = 10; var load_txt:TextField = this.createTextField('load_txt', depth++, Stage.width / 2, Stage.height / 2, 300, 100); onEnterFrame = function() { var loaded:Number = getBytesLoaded(); var total:Number = getBytesTotal(); load_txt.text = loaded + ' / ' + total; if (loaded = total loaded 100) { delete onEnterFrame; gotoAndPlay('MAIN'); } }; And in the frame MAIN /// stop(); load_txt._visible = false; for (var i:Number = 0; i Card.CARDS.length; i++) { var card_mc:MovieClip = this.attachMovie('Card', 'card' + i + '_mc', depth++); with (card_mc) { index = i; _x = card_mc._width / 2 + Math.floor(Math.random() * (Stage.width - card_mc._width)); _y = card_mc._height / 2 + Math.floor(Math.random() * (Stage.height - card_mc._height)); _rotation = Math.floor(Math.random() * 9 - 4); addEventListener('clicked', this); } } function clicked(evt_obj:Object):Void { var card_mc:MovieClip = evt_obj.target; // put the clicked card at the top card_mc.swapDepths(depth++); } ___ 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 -- John Van Horn [EMAIL PROTECTED] ___ 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] attachMovie vs createClassObject
I'm wondering if there are any significant differences between using `attachMovie()` and `createClassObject()` for creating components (I'm targeting for Flash 7). I just ran into a weird issue creating a ComboBox where I was using `createClassObject()` to instantiate it, but saw that elsewhere in the code it was using `attachMovie()` to create one, and both were working. Specifically, both this: mc.attachMovie(ComboBox, myComboBox, mc.getNextHighestDepth()); and this: mc.createClassObject(ComboBox, myComboBox, mc.getNextHighestDepth()); seems to give the same results in most cases. Is there any benefit to using `createClassObject()` over `attachMovie()` for components? The one situation I ran into where it gives different results is when using multiple SWFs from different places. I have a main movie which loads another movie that contains all the UI resources (makes branding easier). The UI resources movie contains the ComboBox in its library. If both the movies are on the local filesystem then it works fine, but if the resources SWF is on a remote web server the `createClassObject()` call fails. However, if I change it to use `attachMovie()` it works fine. So I'm leaning towards using `attachMovie()`, just to make my life easier for testing (don't have to upload the main movie every time I want to test it), but I'm wondering if that will cause issues later. -Andy ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] attachMovie fails with runtime shared asset
Hi, from what I've experienced before, the assets are only available to the child clips. Eg. _root |- some_clip |- asset_mc |- child If you load assets into asset_mc, some_clip cannot access it, ie, _root.some_clip.attachMovie(asset...) won't work, neither will _root.attachMovie(...). Only asset_mc.attach... and child.attach... will. On 1/6/07, Mendelsohn, Michael [EMAIL PROTECTED] wrote: Hi list... I'm trying to do _root.attachMovie(runtimeShared,runtimeShared,1); where runtimeShared is an asset from another swf that's exported for runtime sharing and dropped into this movie's library as import for runtime sharing. I have found that the attachMovie method *only* works if I drop an instance of runtimeShared on the stage first. Why would this be, and is there a way around it? Can't you simply attach a movie of a runtime shared asset? Thanks, - Michael M. ___ 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 -- Cheers, Ray Chuan ___ 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] attachMovie fails with runtime shared asset
Hi, There is a workaround for this, where u dont have to drop an instance of runtimeShared on the stage first.I assume runtimeShared is the identifier of the shared asset which u import from another swf for runtime sharing. 1. Create a new blank symbol in the library, where u have the imported symbol,give a linkage indentifier to it with export for AS and Export in first frame selected. 2. Place the imported symbol runtimeShared inside the blank symbol. Now, try ur line ,_root.attachMovie(runtimeShared,runtimeShared,1); This works fine when u are importing graphical objects. regards, Arindam Mendelsohn, Michael [EMAIL PROTECTED] wrote: Hi list... I'm trying to do _root.attachMovie(runtimeShared,runtimeShared,1); where runtimeShared is an asset from another swf that's exported for runtime sharing and dropped into this movie's library as import for runtime sharing. I have found that the attachMovie method *only* works if I drop an instance of runtimeShared on the stage first. Why would this be, and is there a way around it? Can't you simply attach a movie of a runtime shared asset? Thanks, - Michael M. ___ 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 Send instant messages to your online friends http://asia.messenger.yahoo.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] attachMovie fails with runtime shared asset
Hi list... I'm trying to do _root.attachMovie(runtimeShared,runtimeShared,1); where runtimeShared is an asset from another swf that's exported for runtime sharing and dropped into this movie's library as import for runtime sharing. I have found that the attachMovie method *only* works if I drop an instance of runtimeShared on the stage first. Why would this be, and is there a way around it? Can't you simply attach a movie of a runtime shared asset? Thanks, - Michael M. ___ 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] attachMovie with MovieClipLoader loaded symbols
Hello flashcoders, I load a childSwf into my mainSwf using a MovieClipLoader. -- THIS WORKS In my childSWF I do export for actionscript and export to first frame for a movieclipSymbol. After onLoadComplete, I can attach this movieclipSymbol of the childSwf to the loaded childSWF or a child of it. -- THIS WORKS But I can't attach this movieclipSymbol of the childSwf to some other container in my mainSwf, which is sad. -- THIS WORKS NOT This is not allowed by the flashPlayer - true or false? And if true, is there a workaround? thank you, Matthias ___ 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] attachMovie _alpha
Dear god... Am I losing it or what? I create an empty movieclip (let's call this holder_mc) in the stage and set it's alpha to 0. To that holder_mc, I attach multiple other mc's... Now, I would think these wouldn't be visible but they are... If I trace the holder_mc._alpha it does return 0 to me. Is that expected behaviour or am I really going nuts? Serge ___ 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] attachMovie _alpha
Hello Serge! what if you trace the nested mcs ? are they really nested when being attached ? hth, cedric Am I losin ___ 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] attachMovie _alpha
Hey Cedric, Turns out I am really losing it... Forgot to embed the font... Man, do I feel stupid... again... Serge Hello Serge! what if you trace the nested mcs ? are they really nested when being attached ? hth, cedric Am I losin ___ 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] attachMovie(graphic_on_stage_created_by_user)??
I have an area on the stage that the user can draw on The user can make a nice pic, that I need to print out. However, the client wants other stuff on the print out like headings, etc. Using PrintJob.addPage(0, {xMin:20,xMax:400, yMin:20, yMax300}) works well, but it only prints the area specified. I need other stuff to print out also - stuff that is not on the stage. So, I guess I need to create a new movieclip with the other stuff I need printed, PLUS the picture that the user created. The other stuff is fine, but then how do I add the picture the user just created to the new movieclip?? Is there a way to say something like: attachMovie(whatever_is_showing_between_these_coords) ?? Thanks heaps!! Monicque. ___ 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] attachMovie to a loaded swf
I have a parent swf that loads in a series of children swfs and acts as a browser for them. Within the children swfs - there are a number of hotspot movieclips that trigger other events. I'd like to centralize the appearance of those 'hotspot' movieclips to the parent swf so that if i need to change how the icon's look i can change it once in the parent rather than in each child swf. I thought that the best way to do this would make the hotspot clips into placeholders and use attachMovie to put the appropriate icon on it. The problem is that is appears attachMovie doesn't work if the path to the clip is in a one of the children swfs that was loaded. Is this correct? If so, is there a workaround of some sort that I can try? Thanks! ___ 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] attachMovie to a loaded swf
if i get it right this sounds more like a initialization or depth problem. attachMovieClip should work. have you tried createEmptyMovieClip with a getNextHighestDepth and load those icons into those? hth: lars Am 07.03.2006 22:37 Uhr schrieb Marlon Harrison unter [EMAIL PROTECTED]: I have a parent swf that loads in a series of children swfs and acts as a browser for them. Within the children swfs - there are a number of hotspot movieclips that trigger other events. I'd like to centralize the appearance of those 'hotspot' movieclips to the parent swf so that if i need to change how the icon's look i can change it once in the parent rather than in each child swf. I thought that the best way to do this would make the hotspot clips into placeholders and use attachMovie to put the appropriate icon on it. The problem is that is appears attachMovie doesn't work if the path to the clip is in a one of the children swfs that was loaded. Is this correct? If so, is there a workaround of some sort that I can try? Thanks! ___ 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] attachMovie to a loaded swf
thanks I don't think attachMovieClip will work in this instance from what I've been reading. Perhaps I can clarify a bit more. I have a container swf that loads in a series of children swfs. All of my code is in the container swf, as are the icon movieclips. I want to use attachMovie to put an icon on a path that's inside of one of the children swfs. If I add the movieclips to the child's fla and export them like I have in the container swf, they load OK, but obviously that's what I want. On 3/7/06, lars [EMAIL PROTECTED] wrote: if i get it right this sounds more like a initialization or depth problem. attachMovieClip should work. have you tried createEmptyMovieClip with a getNextHighestDepth and load those icons into those? hth: lars Am 07.03.2006 22:37 Uhr schrieb Marlon Harrison unter [EMAIL PROTECTED]: I have a parent swf that loads in a series of children swfs and acts as a browser for them. Within the children swfs - there are a number of hotspot movieclips that trigger other events. I'd like to centralize the appearance of those 'hotspot' movieclips to the parent swf so that if i need to change how the icon's look i can change it once in the parent rather than in each child swf. I thought that the best way to do this would make the hotspot clips into placeholders and use attachMovie to put the appropriate icon on it. The problem is that is appears attachMovie doesn't work if the path to the clip is in a one of the children swfs that was loaded. Is this correct? If so, is there a workaround of some sort that I can try? Thanks! ___ 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] attachMovie to a loaded swf
I have always understood that you cannot attach an asset from the library of one swf into another loaded swf. I've never succeeded in doing it and haven't seen a workaround. Sorry I can't be more helpful. Please can someone prove me wrong! Adrian P On 3/7/06, Marlon Harrison [EMAIL PROTECTED] wrote: thanks I don't think attachMovieClip will work in this instance from what I've been reading. Perhaps I can clarify a bit more. I have a container swf that loads in a series of children swfs. All of my code is in the container swf, as are the icon movieclips. I want to use attachMovie to put an icon on a path that's inside of one of the children swfs. If I add the movieclips to the child's fla and export them like I have in the container swf, they load OK, but obviously that's what I want. On 3/7/06, lars [EMAIL PROTECTED] wrote: if i get it right this sounds more like a initialization or depth problem. attachMovieClip should work. have you tried createEmptyMovieClip with a getNextHighestDepth and load those icons into those? hth: lars Am 07.03.2006 22:37 Uhr schrieb Marlon Harrison unter [EMAIL PROTECTED]: I have a parent swf that loads in a series of children swfs and acts as a browser for them. Within the children swfs - there are a number of hotspot movieclips that trigger other events. I'd like to centralize the appearance of those 'hotspot' movieclips to the parent swf so that if i need to change how the icon's look i can change it once in the parent rather than in each child swf. I thought that the best way to do this would make the hotspot clips into placeholders and use attachMovie to put the appropriate icon on it. The problem is that is appears attachMovie doesn't work if the path to the clip is in a one of the children swfs that was loaded. Is this correct? If so, is there a workaround of some sort that I can try? Thanks! ___ 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] attachMovie[imgID] - attachMovie(imgID, newName, myDepth)
Adont you just miss the *newname *and *depth *param ? var myDepth=0 ... . myDepth+=1 this[rfcClip].container.attachMovie(imgID,newName,myDepth) Adrian Lynch wrote: Try: this[rfcClip].container.attachMovie(imgID); Ade -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Corban Baxter Sent: 02 February 2006 17:15 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; Hey guys I am working on this project still that is doing a whole lot of random things. Since I have not converted over to AS2 yet I am having some problems with doing this... this[rfcClip].container.attachMovie[imgID]; the rfcClip and the imgID variables are pulling from arrays and seem to trace perfect but for some reason the clip's are not showing up nor attaching to my stage. I was hoping someone could take a quick look at the file and tell me what they think might be the problem. I have uploaded a zip with the FLA to my dev server. Any help would be greatly appreciated. Thanks! http://webdev.funimation.com/fun2004/coders/s3.zip - FLA file Problem occurs in the loadImage function on frame 9 line 51. This function is called though an interval at the end of each marker: ie marker: lay_1, lay_2 etc... //cb ___ 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] .attachMovie issue
He's typecasting, so no new operator is needed. As for the original question, your getNextHighestDepth is on the wrong MC for starters.. this.PointContainer.getNextHighestDepth() -not - this.getNextHighestDepth() On Jan 29, 2006, at 8:55 PM, Nathan Derksen wrote: If Record is a class you created, then you are missing the new operator. var temprec:Record = new Record(this.PointContainer.attachMovie (Record, Record_ + String(count++), this.getNextHighestDepth())); Nathan http://www.nathanderksen.com On Jan 28, 2006, at 11:30 AM, Mark Ribau wrote: Ok. Someone please help. I use the new point function listed below twice in the test code below that. Whichever 'point' is created last is the only one displayed, while the others are lost. How do I get it to keep the old attached movies too?? bleh.NewPoint function: function NewPoint():Record { var temprec:Record = Record(this.PointContainer.attachMovie (Record, Record_ + String(count++), this.getNextHighestDepth())); return temprec; } test code in frame 1: trace(bleh.ImageContainer._width + . + bleh.PointContainer._x); trace(bleh.ImageContainer._height + . + bleh.PointContainer._y); var temprec:Record = bleh.NewPoint(); //parse line removed temprec.gotoAndPlay(Normal); temprec._x = temprec._GPSX * (bleh.ImageContainer._width / 2); temprec._y = temprec._GPSY * (bleh.ImageContainer._height / 2); var temprec2:Record = bleh.NewPoint(); //parse line removed temprec2._x = temprec2._GPSX * (bleh.ImageContainer._width / 2); temprec2._y = temprec2._GPSY * (bleh.ImageContainer._height / 2); temprec2.gotoAndPlay(Normal); trace(temprec._name); trace(temprec._GPSX + , + temprec._GPSY); trace(temprec._x + , + temprec._y) trace(temprec._width + x + temprec._height) trace(temprec2._name); trace(temprec2._GPSX + , + temprec2._GPSY); trace(temprec2._x + , + temprec2._y) trace(temprec2._width + x + temprec2._height) trace output: undefined undefined, undefined undefined , undefined undefined x undefined Record_1 0.3000, 0.3 45 , 45 10.5 x 10.5 ___ 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] attachMovie synchronization
Hello, I have a movie clip symbol, say 'X'. X has a movie clip placed inside, say 'Y'. There is code on Y i.e. onClipEvent(load) { _root.func1(); } Now when I attach X using attachMovie i.e. having following code: attachMovie(X, Instance1,1); _root.func2(); func2 gets called before func1. Which states that attachMovie is not completely synchronized. Is there any way by which I can execute func2 after whole X has been loaded i.e. even load event of movie clips inside X has been triggered? The condition is that I cannot move call of func2 to load event of Y. Thanks in advance. Dhiraj Girdhar ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] attachMovie synchronization
Hello, I have a movie clip symbol, say 'X'. X has a movie clip placed inside, say 'Y'. There is code on Y i.e. onClipEvent(load) { _root.func1(); } Now when I attach X using attachMovie i.e. having following code: attachMovie(X, Instance1,1); _root.func2(); func2 gets called before func1. Which states that attachMovie is not completely synchronized. Is there any way by which I can execute func2 after whole X has been loaded i.e. even load event of movie clips inside X has been triggered? The condition is that I cannot move call of func2 to load event of Y. Thanks in advance. Dhiraj Girdhar ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] attachMovie synchronization
Hi, You can attach en init object to your clip X like this : init_obj = new Object(); init_obj.onEnterFrame = function() { _root.func2 (); delete(this.onEnterFrame); } attachMovie(X, Instance1,1, init_obj); like this func1 is called before func2. Laurent -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Dhiraj Girdhar Envoyé : mercredi 26 octobre 2005 08:14 À : Flashcoders mailing list Objet : [Flashcoders] attachMovie synchronization Hello, I have a movie clip symbol, say 'X'. X has a movie clip placed inside, say 'Y'. There is code on Y i.e. onClipEvent(load) { _root.func1(); } Now when I attach X using attachMovie i.e. having following code: attachMovie(X, Instance1,1); _root.func2(); func2 gets called before func1. Which states that attachMovie is not completely synchronized. Is there any way by which I can execute func2 after whole X has been loaded i.e. even load event of movie clips inside X has been triggered? The condition is that I cannot move call of func2 to load event of Y. Thanks in advance. Dhiraj Girdhar ___ 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] attachMovie synchronization
Hi, Thanks for this solution. At least I got to know about initialization parameter in attachMovie. But this way I will be dependent on frame rate. Can there be some solution which is not dependent in frame rate? ~Dhiraj -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Laurent Oberlé Sent: Wednesday, October 26, 2005 3:01 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] attachMovie synchronization Hi, You can attach en init object to your clip X like this : init_obj = new Object(); init_obj.onEnterFrame = function() { _root.func2 (); delete(this.onEnterFrame); } attachMovie(X, Instance1,1, init_obj); like this func1 is called before func2. Laurent -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Dhiraj Girdhar Envoyé : mercredi 26 octobre 2005 08:14 À : Flashcoders mailing list Objet : [Flashcoders] attachMovie synchronization Hello, I have a movie clip symbol, say 'X'. X has a movie clip placed inside, say 'Y'. There is code on Y i.e. onClipEvent(load) { _root.func1(); } Now when I attach X using attachMovie i.e. having following code: attachMovie(X, Instance1,1); _root.func2(); func2 gets called before func1. Which states that attachMovie is not completely synchronized. Is there any way by which I can execute func2 after whole X has been loaded i.e. even load event of movie clips inside X has been triggered? The condition is that I cannot move call of func2 to load event of Y. Thanks in advance. Dhiraj Girdhar ___ 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] AttachMovie - where is x=0,y=0?
the initial 0,0 point for any clip, stage, button, etc .. is at the top left corner. It's allways best to position your instances that way as well, for it will be easier later on to manipulate it's positioning. Alain eric dolecki wrote: initial attach is at 0,0 of the stage. perhaps you need to check your info panel to see that the triangle you created doesn't actually have its registration point on the bottom left point of the triangle. e.d. On 10/19/05, Kevin Boyd (MMCR) [EMAIL PROTECTED] wrote: Having some issues attaching a movie clip in 7. if I draw a right-angled triangle with it left most bottom point at 0,0 in the movieclip and then I use attachMovie and position that at 0,0 on the stage; it plots the triangle's middle at 0,0 and not the tip as drawn in the mc! What are the basic rules of how MC's are attached, can't find anything in the docs about this. TIA Kevin ___ 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