Ron Colmen
Participant
Ron Colmen
Participant
Activity
‎Sep 19, 2014
09:15 AM
How do I delete this onEnterframe? CODE: function myFunc(){ if(i >= endPoint){ //do something } else { //delete this onEnterFrame ??? } } btn_mc.onRollOver = function(){ _root.onEnterFrame = myFunc; }
... View more
‎Jun 17, 2014
10:15 AM
Thanks Kglad. Instead of using attachMovie() to the load target will it work if I apply the attachMovie() within the loadMovie() swf? so once it's loaded the tile effect could be achieved?
... View more
‎Jun 17, 2014
09:09 AM
Yes, you're correct 'clip0' is empty in my sample code. I'm using the empty movieclip with attachMovie() to tile a background. This is what I want to be able to do. This works if I manually add the "clip1" movieclip instead of using loadMovie() But I want to use loadMovie to import external swfs loadMovie("http://www.example.com/swfFile.swf", _root.mc1_mc.mc2_mc); //this external swf's instance name is clip1 abc_btn.onRelease=function(){ NuX = NuY = 0; for(j=0;j<296;j++){ if(NuX>=650){ NuX=0; NuY=NuY+50; } _root.mc1_mc.mc2_mc.createEmptyMovieClip("clip0", _root.mc1_mc.mc2_mc.getNextHighestDepth()); _root.mc1_mc.mc2_mc.clip0.attachMovie(attX[this.pvar], "tileB"+j, _root.mc1_mc.mc2_mc.clip0.getNextHighestDepth(), {_x:NuX, _y:NuY}); //trace(_root.mc1_mc.mc2_mc.clip0["tileB"+j]) //undefined when loadMovie() is used. NuX=NuX+50; if(j==296){ _root.mc1_mc.mc2_mc.clip0.setMask( _root.mc1_mc.mc2_mc.clip1); } }
... View more
‎Jun 17, 2014
06:33 AM
I need to load an external swf in to a movieclip and use setMask() to mask another movieclip. This is not working. Is it possible to do this in AS2? example: loadMovie("http://www.example.com/swfFile.swf", _root.mc1_mc.mc2_mc); //this external swf's instance name is clip1 abc_btn.onRelease=function(){ _root.mc1_mc.mc2_mc.createEmptyMovieClip("clip0", _root.mc1_mc.mc2_mc.getNextHighestDepth()); _root.mc1_mc.mc2_mc.clip0.setMask( _root.mc1_mc.mc2_mc.clip1); }
... View more
‎Jun 06, 2014
09:26 AM
Thanks. But my problem is that the code is not working at all? There might be some error in the code? I have doubts with this particular line? _root.movieC1.movieC2.clip0.attachMovie(attX[this.pvar], attX[this.pvar]+j, _root.movieC1.movieC2.getNextHighestDepth(), {_x:NuX, _y:NuY});
... View more
‎Jun 06, 2014
05:41 AM
I'm want to tile a 700 x 700 area using attachMovie(). The movieclips used for the attachMovie is 50 x 50 This is the code. Something is wrong here. var NuX:Number=0; var NuY:Number=0; var btnX:Array=[gpat_btn0, gpat_btn1, gpat_btn2]; var attX:Array=["pat0","pat1","pat2"]; for(i=0;i<btnX.length;i++){ btnX.pvar=i; btnX.onRelease = function(){ NuX=NuY=0; for(j=0;j<14;j++){ if(NuX>=650){ NuX=0; NuY=NuY+50; } _root.movieC1.movieC2.clip0.attachMovie(attX[this.pvar], attX[this.pvar]+j, _root.movieC1.movieC2.getNextHighestDepth(), {_x:NuX, _y:NuY}); NuX=NuX+50; //trace(NuX) } } }
... View more
‎Jun 05, 2014
10:35 AM
Great as always! thanks.
... View more
‎Jun 05, 2014
10:04 AM
Thanks but I don't need to reparent the duplicate movieclips, I want to be able to duplicate the movieclips within the same original movieclip. Eg: Original movieclip is C2. resides in _root.movieC1.movieC2 Duplicates to be created are clip0 and clip1 inside _root.movieC1.movieC2 Any suggestions how I can achieve my requirement?
... View more
‎Jun 05, 2014
04:44 AM
My AS2 code (not working): var btnX:Array=[gpat_btn0, gpat_btn1, gpat_btn2]; var attX:Array=["pat0","pat1","pat2"]; for(i=0;i<btnX.length;i++){ btnX.pvar=i; btnX.onRelease = function(){ for(s=0;s<2;s++){ _root.movieC1.movieC2.C2.duplicateMovieClip(_root.movieC1.movieC2["clip"+s], _root.movieC1.movieC2.getNextHighestDepth()); } _root.movieC1.movieC2.clip0.attachMovie(attX[this.pvar], attX[this.pvar], _root.movieC1.movieC2.C2.getNextHighestDepth()); _root.movieC1.movieC2.clip1.setMask(_root.movieC1.movieC2.clip0); } } I want to create 2 duplicates of [ _root.movieC1.movieC2.C2 ] inside the same movieclip [ _root.movieC1.movieC2 ]. Attach a [ attX ] in one of the duplicates created. Mask the above attached movieclip with the other duplicate.
... View more
‎May 07, 2014
07:05 PM
you're amazing... thanks!
... View more
‎May 06, 2014
06:34 AM
I need to trigger a AS function when a user close the browser window. This is what I've done so far... but no luck. AS: import flash.external.*; function test1() { //do something } JS: <script type="text/javascript"> window.onbeforeunload = function(){ test1(); return 'text here' }; </script>
... View more
‎Oct 17, 2013
04:30 PM
You've got it right now but I didn't quite get it this time around? How can new_mc be kept apart from sub_mc while it's inside sub_mc?
... View more
‎Oct 17, 2013
04:18 PM
Does your countdwon clock require a serverside script to work? (i.e. php)
... View more
‎Oct 17, 2013
04:14 PM
oh! sorry. you're correct. I was experementing and had changed mc instances from the first post. the trace output is as for _level0.main_mc.tf_mc_1.tf _level0.main_mc.tf_mc_2.tf _level0.main_mc.tf_mc_3.tf... is 16 16 16 ...
... View more
‎Oct 17, 2013
03:58 PM
Thatnks Ned. May be this would explain better? When my_btn is clicked I want sub_mc (blue squire) to be same size as main_mc (grey squire). As you can see new_mc should be ignored to be able to do this.
... View more
‎Oct 17, 2013
03:18 PM
Thanks Ned. Any resized mc (inside sub_mc) should maintain it's scale while sub_mc fits inside main_mc. Is that possible? (That's the reason for asking a way to ignore any MC over the size of sub_mc) Simple example my_btn.onRelease = function () { sub_mc._width = main_mc._width; //works perfect! } now if a squire is drawn inside sub_mc, and now my_btn is clicked - sub_mc doesn't fit/match main_mc
... View more
‎Oct 17, 2013
03:03 PM
Yes. There is a typo in my above post. The path to the TFs are as below. trace: _level0.main_mc.tf_mc_1.tf _level0.main_mc.tf_mc_2.tf _level0.main_mc.tf_mc_3.tf...
... View more
‎Oct 17, 2013
01:51 PM
main_mc = sub_mc = 100px X 100px an OnRelease action is assigned to fit sub_mc inside main_mc (again same theory as the above line). The user resizes an existing mc inside sub_mc to 200px X 120px How do I still fit sub_mc inside main_mc, ignoring the resized mc?
... View more
‎Oct 17, 2013
01:36 PM
I need to be able to detect if any of the text fields are not in use. TFs resides in root.main_mc.tf_mc.tf1 - up to root.main_mc.tf_mc.tf40 Is this the way to go? if(Selection.getFocus().indexOf("tf")==-1){ // } I just did a trace trace(Selection.getFocus().indexOf("tf")) // output was 27 27 27 27...
... View more
‎Oct 11, 2013
12:18 PM
You're correct. Instead of using the textfield form the library (attachMovie), I used .createTextField to create 'message' and it worked. I don't know why the textfield in attachMovie() did not show spaces, but I've got my answer. Thanks ned!
... View more
‎Oct 11, 2013
09:45 AM
That doesn't not work. It ignores the spaces at the end shows clearly whe I add a border to the tf. h.tray_mc.message.border=true;
... View more
‎Oct 11, 2013
09:22 AM
This is my code. I need to add couple of extra spacees at the end of message.text How? h = _root.createEmptyMovieClip("h", 5); h.attachMovie("tray_mc", "tray_mc", 10); h.tray_mc.message.autoSize=true; h.tray_mc.message.text = "test";
... View more
‎Oct 05, 2013
10:55 AM
When I run this, the flash player gives a warning (A script in this movie is causing flash player to run slowly...). What's wrong? var i:Number; var n:Number=3000000000; var s:Number=0; var startTime:Number=getTimer(); // This is the number chunks Numbero which the previous for-loop will broken. If the // previous for-loop took about 9 seconds, using 10 chunks means there will be updates // about every 0.9 seconds. var chunks:Number=10; var startI:Number=1; var endI:Number=n/chunks; clearInterval(fI); var fI:Number = setInterval(f,100); f(); function f():Void{ for (i=startI; i<endI; i+=2) { s+=i; } trace("stage update "+startI+" "+endI+" "+s); if (endI==n) { trace((getTimer()-startTime)/1000+" "+s+" "+n*n/4+" "+s-n*n/4); clearInterval(fI); } else { startI+=n/chunks; endI+=n/chunks; } }
... View more
‎Oct 05, 2013
10:06 AM
Thanks once again. The bold line is not recoganized in as2. var i:Number; var n:Number=3000000000; var s:Number=0; var startTime:Number=getTimer(); // This is the number chunks Numbero which the previous for-loop will broken. If the // previous for-loop took about 9 seconds, using 10 chunks means there will be updates // about every 0.9 seconds. var chunks:Number=10; var startI:Number=1; var endI:Number=n/chunks; clearInterval(fI); var fI:Number = setInterval(f,100); f(); function f(e:Event=null):Void { //this line requested argument to null doesn't work in as2? for (i=startI; i<endI; i+=2) { s+=i; } trace("stage update"+" "+startI+" "+endI+" "+s); if (endI==n) { trace((getTimer()-startTime)/1000+" "+s+" "+n*n/4+" "+s-n*n/4); clearInterval(fI); } else { startI+=n/chunks; endI+=n/chunks; } }
... View more
‎Oct 05, 2013
09:42 AM
This works almost perfectly but it doesn't recoganize the active mc. e.g. If the user input data in tf3 (works perfectly) and then starts typing in tf1, it tabs thru tf1 and tf3. can the tabIndex work only for within the active mcs textFields? function focusF():Void{ for(var i:Number=1;i<=4;i++){ if(memberOf(this,tl["tf"+i])){ for(var j:Number=0;j<tl["tf"+i].length;j++){ tl["tf"+i] .tabIndex=j; trace(tl["tf"+i] +" "+j) } break; } } } trace _level0.b_mc3.tf3 0 _level0.b_mc3.tf1 1 _level0.b_mc3.tf2 2 _level0.b_mc3.tf3 0 _level0.b_mc3.tf1 1 _level0.b_mc3.tf2 2 _level0.b_mc3.tf3 0 _level0.b_mc3.tf1 1 _level0.b_mc3.tf2 2 _level0.my_mc1.tf1 0 _level0.my_mc1.tf3 1 _level0.my_mc1.tf2 2 _level0.b_mc3.tf3 0 _level0.b_mc3.tf1 1 _level0.b_mc3.tf2 2 _level0.my_mc1.tf1 0 _level0.my_mc1.tf3 1 _level0.my_mc1.tf2 2 _level0.b_mc3.tf3 0 _level0.b_mc3.tf1 1 _level0.b_mc3.tf2 2
... View more