PDA

View Full Version : Drag Window Problem.....Need help.....


CyberNated User 22
04-13-2001, 03:45 AM
here we go...

SWF.

it can be view from here..


http://www.geocities.com/smooth_operater_1999/prototype.swf

Click on open, and a window will come out....

and click on minimize button looks like this: -

here is the problem:

Click on the OPEN BUTTON agian...and the window will maximize. I don't want it to happen....

Here is my action script for the OPEN button:

on (release) {
tellTarget ("win") {
gotoAndStop (2);
}
}



When the window is not on the mainstage, I want the OPEN button to tell the window to appear on the mainstage by playing frame # 2

But

When the WINDOW is opened and minimized, I don't want it to play to frame 2 again.....That's my problem..


how can I solve this problem:


---
I also provide FLA.

http://www.geocities.com/smooth_operater_1999/prototype2.fla


right click to download it...


thanx for help!!!

[Edited by CyberNated User 22 on 04-12-2001 at 09:54 PM]

Jesse
04-13-2001, 04:10 AM
That FLA is not the same... it has a wierd button and no code anywhere.

However, I would recommend you do something like this:

The window should be a 2 frame MC. Frame 1 has a stop action and shows the window at full size, frame 2 also has a stop and shows the window minimized.

Then you put this window MC on the stage and give it an instance name of 'window'. Then in frame 1 of your movie you have:

_root.window._visible = false;

And on your button you put:

on (release) {
_root.window._visible = true;
}

This way, clicking the button again while the window is up will do nothing

Cheers

Jesse

CyberNated User 22
04-13-2001, 05:09 AM
sorry...wrong file..

http://www.geocities.com/smooth_operater_1999/prototype.fla

it would be nice if u can fix it up for me..

thanx for ur help..

if i used the code u recommend...Do i still have maximize and minimize function???

Jesse
04-13-2001, 05:23 AM
I'm not going to do it for you, you learn nothing that way. Use the method I've explained above. Yes it will allow you to still use your minimize button. All you need to do is edit you window MC and remove the first frame on every level, so that the new first frame shows the window open, and the 2nd frame shows it minimized.

Cheers

Jesse

CyberNated User 22
04-13-2001, 06:14 AM
Okay!! thanx you!! ur a great teacher!

CyberNated User 22
04-13-2001, 06:28 AM
I ran into another problem...

I did exactly what u said BUT the result has a problem...

When i click on open button, the window opens...

BUT...

After I closed the window. And tried to open the window again by clicking on the open button, it WON"T open....
WHY


thanx for help??

Jesse
04-13-2001, 07:15 AM
Since you're now using visibility instead of empty frames you will need to change the code on your close button to this:

on (release) {
_root.window._visible = false;
}

Cheers

Jesse

CyberNated User 22
04-13-2001, 06:09 PM
hey thanx!! but there is another problem after i did exactly what u said...


Now, I can open and close the window again fine in any sequence except...



In this sequence I can't open the window again...

click on Open Button
click on Minimize the window
click on Close
Click on OPEN button to open the window again, but the window won't appear...

what's wrong...



Is there any tutorial on using visibility?? cuz all i am doing now is copy and paste the code u gave...
I want to understand how the acticript works..


thanx!!!

Jesse
04-14-2001, 04:12 AM
I've made a working example.

http://www.actionscripts.org/help/CyberNated/

Cheers

Jesse

CyberNated User 22
04-14-2001, 05:35 AM
hey! thanx!

CyberNated User 22
04-14-2001, 05:48 AM
I actully realized what was my problem after seeing ur Fla.

I forgot to assign this code to every EXIT button on every frame... I only assigned to last one... I made a fool of myself....

(release) {
_root.window._visible = false;
}


BUT THANX YOU For ur help....

Now, I wanna to take my window to next step,
I want the window to ZOOM out when I click open...
I am curretlly playing with the widnow movie clip to figure that out..

Do u have any suggestions???

thanx!

Jesse
04-14-2001, 11:13 AM
I'll tell you how it's done and you can try it, if you have trouble, I will help out.

Look into the _xscale and _yscale elements. See the set property tutorial. If you make a loop which sets the _xscale and _yscale to their current value +10, 10 times, you will get a zoom in effect. The loop could be controlled by an OnClipEvent(enterFrame) loop...

Try it yourself first, then I'll help out.

Post a new topic if you need help on this one.

Cheers

Jesse