[Flashcoders] Unable to create button greater than stage size
Hi All, Please check following code... I am trying to make a button whose size is greater than stage size then in that case button is not created. Please help. Thanks in advance. Stage.scaleMode = "showAll"; _root.createEmptyMovieClip("rootButton", 100); var rootBtn = _root.rootButton; rootBtn.onPress = function() {trace("Mouse Pressed");}; with (rootBtn) { var topLeft = -5000; var bottomRight = 1; beginFill("#FF000", 100); moveTo(topLeft, topLeft); lineTo(topLeft, bottomRight); lineTo( bottomRight, bottomRight); lineTo(bottomRight, topLeft); lineTo(topLeft,topLeft); endFill(); } Regards: Gaurav ___ 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] LoadMovie Problem?
Hi Jason, Again thanks for your reply. But still my doubt is not clear. Please check the following code... // Code on first movie clip. _root.createEmptyMovieClip("Test", 1); _root.Test.loadMovie("clip.swf", _root); // Introducing a dummy time interval to wait until SWF file is not loaded. _root.$SI = setInterval(_root.func, 10); function func () { if ((_root. Test.getBytesLoaded() == _root. Test.getBytesTotal()) && _root. Test._height > 0 && _root. Test._width > 0) { // Going to second page in loaded movie. _root.Test.gotoAndStop(2); clearInterval(_root.$SI); _root.$SI = undefined; } } // code in second movie clip. // Displaying the name of the movie clip creating in first clip to load the clip. trace(_root.Test._name); Now it will work fine. But in case of loading the movie in root it is not working. It will load its first page only. Please let me know if I am not able to clear the problem. Dhiraj -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Tuesday, January 31, 2006 5:14 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] LoadMovie Problem? Well, a couple of reasons. I mean you can, it's possible, but the reason for container clips is so you have the ability to load more than one clip. If you load into _root, everything in that movie clip will be replaced by the new clip you are loading in, and if you try and load a second clip into _root, only the second clip will appear, the first clip will be overwritten: loadMovie("clip1.swf", _root); loadMovie("clip2.swf", _root); //only clip2.swf will appear And loading from c:, I can't see how that would be wise in almost any circumstance, but maybe you have a reason to do so. As for _root itself, a lot of people will tell you its not wise to reference it, because as Flash applications gain hierarchies, _root changes often and is not a reliable reference to hard code into your application. I don't mean to be harsh, only to answer your questions. Hope that helps. Jason Merrill >>-Original Message----- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED] Behalf Of Dhiraj >>Girdhar >>Sent: Tuesday, January 31, 2006 6:33 AM >>To: Flashcoders mailing list >>Subject: RE: [Flashcoders] LoadMovie Problem? >> >> >>Hey Jason, >> Thanks for your reply. Sorry, it was just a typo mistake ("C:\\ >>pages.swf"). I just want to know problems of loading the SWF file on >>root movie. Creating a new movie clip and loading that SWF >>file in that >>will solve the purpose but it is not clearing my doubt. >> >>Let me explore this problem in more detail. >>If I am loading the movie clip in some other movie clip (except root) >>then the control will be still in previous movie. But I want >>the control >>in new movie clip which I am going to load. Is it making any sense? >>Please correct if I am wrong. >> >>Dhiraj >> >>-Original Message- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED] On Behalf >>Of Merrill, >>Jason >>Sent: Tuesday, January 31, 2006 4:30 PM >>To: Flashcoders mailing list >>Subject: RE: [Flashcoders] LoadMovie Problem? >> >>You also have a space in there: >> >>"C:\\ pages.swf" >> >>I would not recommend loading from c: -you can't guarantee the file >>will always be there can you? Loal from a relative url instead, and >>don't try and load into _root - create and empty movie clip instance, >>and load into that. >> >>Jason Merrill >> >> >> >> >> >> >> >> >>>>-Original Message- >>>>From: [EMAIL PROTECTED] >>>>[mailto:[EMAIL PROTECTED] Behalf >>Of Dhiraj >>>>Girdhar >>>>Sent: Tuesday, January 31, 2006 2:35 AM >>>>To: Flashcoders mailing list >>>>Subject: [Flashcoders] LoadMovie Problem? >>>> >>>> >>>>Hi All, >>>> >>>> >>>> >>>>I am trying to load a new SWF file on root movie clip using >>following >>>>action script code, but it is not working properly. It is >>loading its >>>>first frame only. But the SWF file (to be loaded) is having >>more than >>>>one pages. >>>> >>>> >>>> >>>>loadMovie("C:\\ pages.swf", _root); >>>> >>>>_root.gotoAndStop(3)
RE: [Flashcoders] LoadMovie Problem?
Hey Jason, Thanks for your reply. Sorry, it was just a typo mistake ("C:\\ pages.swf"). I just want to know problems of loading the SWF file on root movie. Creating a new movie clip and loading that SWF file in that will solve the purpose but it is not clearing my doubt. Let me explore this problem in more detail. If I am loading the movie clip in some other movie clip (except root) then the control will be still in previous movie. But I want the control in new movie clip which I am going to load. Is it making any sense? Please correct if I am wrong. Dhiraj -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Tuesday, January 31, 2006 4:30 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] LoadMovie Problem? You also have a space in there: "C:\\ pages.swf" I would not recommend loading from c: -you can't guarantee the file will always be there can you? Loal from a relative url instead, and don't try and load into _root - create and empty movie clip instance, and load into that. Jason Merrill >>-Original Message- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED] Behalf Of Dhiraj >>Girdhar >>Sent: Tuesday, January 31, 2006 2:35 AM >>To: Flashcoders mailing list >>Subject: [Flashcoders] LoadMovie Problem? >> >> >>Hi All, >> >> >> >>I am trying to load a new SWF file on root movie clip using following >>action script code, but it is not working properly. It is loading its >>first frame only. But the SWF file (to be loaded) is having more than >>one pages. >> >> >> >>loadMovie("C:\\ pages.swf", _root); >> >>_root.gotoAndStop(3); >> >> >> >>Any solution? >> >> >> >> >> >>Regards: >> >>Dhiraj >> >>___ >>Flashcoders mailing list >>Flashcoders@chattyfig.figleaf.com >>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> NOTICE: This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of this e-mail by you is prohibited. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] LoadMovie Problem?
Hi, Please tell me, what is the main problem with loading the movie on root? I tried another solution i.e. loading in some other movie which is working fine but I don't know the reason. :( Please clear my doubts. DJ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Martin Weiser Sent: Tuesday, January 31, 2006 3:23 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] LoadMovie Problem? this is complete nonsesnse, take a look to the manual, first, not sure if loadMovie to _root is proper solution, create new movieClip, and load to it and most important: you have to wait for the movie being loaded, which is the hardCore and basic knowledge for every flash programmer :-) good luck Martin - Original Message - From: "Dhiraj Girdhar" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Tuesday, January 31, 2006 8:35 AM Subject: [Flashcoders] LoadMovie Problem? > Hi All, > > > > I am trying to load a new SWF file on root movie clip using following > action script code, but it is not working properly. It is loading its > first frame only. But the SWF file (to be loaded) is having more than > one pages. > > > > loadMovie("C:\\ pages.swf", _root); > > _root.gotoAndStop(3); > > > > Any solution? > > > > > > Regards: > > Dhiraj > > ___ > 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] LoadMovie Problem?
Hi All, I am trying to load a new SWF file on root movie clip using following action script code, but it is not working properly. It is loading its first frame only. But the SWF file (to be loaded) is having more than one pages. loadMovie("C:\\ pages.swf", _root); _root.gotoAndStop(3); Any solution? Regards: Dhiraj ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] SetInterval Magic
Hi Guys, I am using second option of setInterval, but I am not able to understand the scope issue here. Is there any solution other than Delegates? As, I am working for Flash 6 also. 'D' -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alias Sent: Wednesday, January 11, 2006 6:09 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] SetInterval Magic Hi guys, It's important to realise that setInterval has two different ways to call it. The first, and most commonly used, is this: setInterval(functionReference:Function, interval:Number, [param1:Object, param2, ..., paramN]) : Number The second, which is less well known, but substantially more reliable, is this: setInterval(objectReference:Object, methodName:String, interval:Number, [param1:Object, param2, ..., paramN]) : Number Although the first example will work, the function will execute in the wrong scope. The second, however, because it allows you to specify the scope in which it executes, is far more reliable. For example, if I'm inside a class, and want to call a public method of that same class every 1000 ms, I would use: setInterval(this,"myFunction",1000); What's important to understand here is the difference between passing the name of the function, and *the function itself* - which is what's happening in the first example. There has been a lot of confusion about this over the past few years, mostly due to ambiguous documentation. Have a look here for a well written piece of documentation on the subject: http://livedocs.macromedia.com/flash/8/main/1766.html Hope this helps, Alias On 1/11/06, Sönke Rohde <[EMAIL PROTECTED]> wrote: > Hi, > This is a scope-issue. Try > > import mx.utils.Delegate > ... > setInterval(Delegate.create(this, func), 2000); > > Cheers, > Sönke > > > Hi Coders, > > > > In following code, I am creating a new dynamic movie clip (in > > function N1 of script object) and associating the handler for unload > > event. Next I am deleting the same movie clip in function N3 of script > > object. But if we are calling the function N3 through setInterval > > function, movieclip unload event is not called. > > > > Now if we are calling the same function N3 directly without > > setInterval, > > unload event will be called. > > > > Someone please tell me what is happening here? > > > > > > > > script = new Object(); > > > > Delay = new Object(); > > > > > > > > // Delay Object > > > > Delay.delay = function(obj, func) > > > > { > > > > this.mObj = obj; > > > > this.mFunc = func; > > > > // Calling function after an interval of 2 seconds. > > > > setInterval(this.func, 2000, this); > > > > } > > > > > > > > Delay.func = function(obj) > > > > { > > > > var temp = obj; > > > > // Calling function N3 of class script. > > > > temp.mObj[temp.mFunc](); > > > > } > > > > > > > > // Script Object > > > > script.N1 = function() > > > > { > > > > // Creating a new movie clip. > > > > _root.createEmptyMovieClip("Dhiraj", 1); > > > > > > > > // Associating unload event with it. > > > > _root.Dhiraj.onUnload = function() > > > > { > > > > trace("Dhiraj Unload"); > > > > } > > > > > > > > // Storing the movie clip instance in member variable. > > > > this.mMC = _root.Dhiraj; > > > > > > > > // Calling next function of script. > > > > this.N2(); > > > > } > > > > > > > > script.N2 = function() > > > > { > > > > // Calling N3 after some delay. > > > > Delay.delay(this, "N3"); > > > > } > > > > > > > > script.N3 = function() > > > > { > > > > this.mMC.removeMovieClip(); > > > > } > > > > > > > > script.N1(); // Calling first function of script. > > > > > > > > Regards: > > > > Dhiraj > > > > ___ > > Flashcoders mailing list > > Flashcoders@chattyfig.figleaf.com > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] SetInterval Magic
Hi Coders, In following code, I am creating a new dynamic movie clip (in function N1 of script object) and associating the handler for unload event. Next I am deleting the same movie clip in function N3 of script object. But if we are calling the function N3 through setInterval function, movieclip unload event is not called. Now if we are calling the same function N3 directly without setInterval, unload event will be called. Someone please tell me what is happening here? script = new Object(); Delay = new Object(); // Delay Object Delay.delay = function(obj, func) { this.mObj = obj; this.mFunc = func; // Calling function after an interval of 2 seconds. setInterval(this.func, 2000, this); } Delay.func = function(obj) { var temp = obj; // Calling function N3 of class script. temp.mObj[temp.mFunc](); } // Script Object script.N1 = function() { // Creating a new movie clip. _root.createEmptyMovieClip("Dhiraj", 1); // Associating unload event with it. _root.Dhiraj.onUnload = function() { trace("Dhiraj Unload"); } // Storing the movie clip instance in member variable. this.mMC = _root.Dhiraj; // Calling next function of script. this.N2(); } script.N2 = function() { // Calling N3 after some delay. Delay.delay(this, "N3"); } script.N3 = function() { this.mMC.removeMovieClip(); } script.N1(); // Calling first function of script. Regards: Dhiraj ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Mouse events issue on button
Hi, I have a button with following AS on it. // It selects the text in the textField. on(rollOver) { Selection.setFocus(textField); Selection.setSelection(0, textField.text.length); } on (rollOut) { trace("Mouse rollout"); } Issue: when rollOver is called the text get selected in the text field, but due to focus change rollOut event of button also get called. As the user haven't done the roll over so this event should not be called. So how Can I stop the call to rollOut? Also after roll out event, since the mouse is on button so here again the rollOver will be called again text field get focused that again fires the rollout event this goes infinitely. Can anybody suggest me a solution for this? Thanx ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] HTML text font size issue
Hi, Does anyone know about what is the maximum font size can be given toHTML text in Flash? If I create a HTML text field and change the font size to > 127 pt, when I compare the SWF text size and text size in Flash authoring, SWF text size is smaller than what is in the authoring. When I trace textField.htmlText the size comes out to be 127, but it writes the correct HTML tags to SWF file with whatever size was given. I couldn't figure out about this type of behavior? Does anyone have clue about this? Regards: Dhiraj ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Stopping sounds inside the loaded SWF.
Thanks Ian, it worked. Any way by which it can be played again? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas Sent: Thursday, November 17, 2005 7:27 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Stopping sounds inside the loaded SWF. >From memory... Assuming myClip was a reference to the loaded MovieClip: new Sound(myClip).stop(); HTH, Ian On 11/17/05, Dhiraj Girdhar <[EMAIL PROTECTED]> wrote: > > Hello, > > I have a SWF file which contains sound (whether in the form of sound > object or streaming). > > I loaded that SWF in another movie clip using LoadMovie. > > Now, I want to stop the sounds of that SWF, how to do it? > > There is a way of stopAllSounds, but it also stops the sounds in main > SWF. > > > > Can anyone suggest whether it is possible or not? > > ___ 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] Stopping sounds inside the loaded SWF.
Hello, I have a SWF file which contains sound (whether in the form of sound object or streaming). I loaded that SWF in another movie clip using LoadMovie. Now, I want to stop the sounds of that SWF, how to do it? There is a way of stopAllSounds, but it also stops the sounds in main SWF. Can anyone suggest whether it is possible or not? Regards, Dhiraj. Dhiraj Girdhar Taurus R&D ___ 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
[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