Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dragable window... 1

Status
Not open for further replies.

coldfused

Technical User
Jan 27, 2001
2,442
US
Scene=Scene 1, Layer=Layer 2, Frame=1: Line 2: Unexpected '.' encountered
.duplicateMovieClip("/window","/window"&x, x);

Scene=Scene 1, Layer=Layer 2, Frame=1: Line 3: Statement must appear within on handler
x = "x+1";

Scene=Scene 1, Layer=Layer 2, Frame=1: Line 4: Unexpected '}' encountered
}


this is the error i'm getting guys, what does this mean..


this is the code i used....

On (Release)
Duplicate Movie Clip ("/window", "/window" & x, x)
Set Variable: "x" = x + 1
End On


execpt his variable had perenthesis and my value does..is that the problem?.the way the load veriable worked in the actions tab it put the "" around the value, i could not stop it from doing that..is that my problem?..also in this tutorial it did not explain to me how to get this movie clip to drop down inside my current scene where i want it to..how do i do that?.i want to click on the button and have that clip drop down in the middle of scene one frame one..the clip is in the fla, labled window..it is just a chessy one, was planning on making the window alot nicer..just wanted to do a quick one to see if i could get it to work..the actions to open the window are nested in the actions for the services button..


please help dave or old...
 
you're using f4 actions in f5......having a look just now davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
hi Virt

I've had a look at your fla. There were a lot of errors in the scripting. I've uploaded a fixed version of the 'window' movie-clip to:


when you transfer this to your main movie, drag it onto the main stage into the position you want it to appear and give it the instance name "window".

I also changed the actions on your "services" button to:

on (release) {
with (window) {
gotoAndPlay (2);
}
}


The reason I changed the actions on "services" was purely because I couldn't see why there was a need to perform a duplicate operation on the "window" mc. So let me know if jumping to the wrong conclusions.

This example also provides the motion tween you talked about.

dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
hi Virt

I've had a look at your fla. There were a lot of errors in the scripting. I've uploaded a fixed version of the 'window' movie-clip to:


when you transfer this to your main movie, drag it onto the main stage into the position you want it to appear and give it the instance name "window".

I also changed the actions on your "services" button to:

on (release) {
with (window) {
gotoAndPlay (1);
}
}


The reason I changed the actions on "services" was purely because I couldn't see why there was a need to perform a duplicate operation on the "window" mc. So let me know if jumping to the wrong conclusions.

This example also provides the motion tween you talked about.

dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
no dave you are probably not jumping to conclusions..i was just following the tutorial exactly the way it was..only i did not know that it was for 4 instead of 5..how do you tell the difference between the two so i know in the future..thanks for your help man..would be nice if from now on i could post want i wanted to do and get the tutorial from you..but i know you are a busy man..just sometimes copying the code is not enough i need tutorials for first hand learning..once again thanks..
 
I often mix between the two versions. Mainly due to the fact that F4 actions are carved into my head and I sometimes get the syntax wrong in 5, so I sometimes make things in 4 then transfer them over to see where I was going wrong with my scripting.

You can see that it was made for 4 at a glance by the "set variable" statement. In flash 5 it looks this this:

x = x+1; <<ie:without the &quot;set variable&quot;

Some of the syntax also gets converted to something you don't want (ie: the duplicate statement converts to a statement assuming the action is on a movie-clip, rather than being a general duplicate, hence the 'dot' before duplicate in the transferred version, it's expecting the name of a movieclip before that dot).

I know what you're syaing about the tutorial side of things. I tend to make tutorials only for fla's I've made which I wouldn't expect people to readily rip apart and work out for themselves (ie:slightly more advanced). Theres also the matter of feedback, there's no way of knowing whether or not the FAQ tutorials are being used or are of use unless people e-mail me or give it a 'rating', and considering all of my FAQ's only have (at most) a single rating it tends to make me wonder whether it's worth spending the extra time to compose a tutorial. The logs at davdesign for tha past month showed over 500 downloads from my 'tektips' directory, if each of those downloads were followed by a 'rating' or 'thanks' (and I don't necessarily mean stars) then I would spend less time answering the easier problems (because they always get answered quickly anyway) and more time creating tutorials for everyone to benefit from.

anyway, I didn't see the tutorial you're working from so I had to guess at what you were after. Is it what you wanted?

dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
dave explain this to me..the clip that you created in the first frame has a stop action..and all four frames are empty..in the fla you sent if i drag the clip in to the timeline it is invisible, of course due to the 1st frame of each layer being empty waiting on the button action that sends it to frame 2..but if i drag the same clip into the time line of my fla the clip shows up immediatly, it should invisible should it not..it should not play until the button calls it to go to frame 2?..why is it not working?..
 
i understand what you mean..you put forth all that time and effort and not even a &quot;thanks&quot; or &quot;hey that helped alot&quot;.but as far as for me, your help is always appreciated and i could not rate your efforts here in the forum high enough..personally i don't know how you do it..keeping up with work and finding the time to make all these fla's for people..you and old have been great help to me man, without a doubt..could never repay all the help..but will remember it..i have only had flash for about a month and a half, and have a good understanding of things by reading you guys post and explanations to problems..i'll rate you guys right on up there with coffee and bananna nut coffee cake..and for me that is # 1..
 
ok dave i got it..because of the fact that i had the same clip name in my library, when i pulled the clip from your library i'm guessing it pulled mine instead..im guessing..i removed mine and it came in fine from your library to my timeline..but now the clip won't play..in your new actions for the services button that calls the clip you have gotoandplay(1)..wouldn't it be gotoandplay(2) due to the fact that frame one is blank with a stop action waiting for the gotoframe 2 command..i replaced the action in the button telling it to gotoandplay(2)..but that still does not work..why won't it play?..
 
ok

delete the &quot;window&quot; movie-clip from your existing 'momentintime' library, then drag on my updated version. Should work now.

dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
sorry virt

must've both been typing at the same time. Have you given the instance name &quot;window&quot; to the mc? davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
got it now dave i was using the gotoandplay command from the objects>movieclip folder which was putting a period before the command....what is the difference between the basic action gotoandplay and the object > movieclip > gotoandplay action..also i hope you read the post about coffee and bannana nut cake..thanks for all your help man..
have a good night.. :)
 
hey virt don't go away just yet...I'm about to post a breakthrough......been working on it for 2 days! davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top