[F8] Window Component...
Hello,
How do you use the window component? It's ever so confusing.
How do you make it appear, on button click (With Parameters)?
How do you make it dissapear, when you close the button?
Any help?
FlashKit > Flash Help > Flash General Help
Posted on: 10-15-2006, 09:21 AM
View Complete Forum Thread with Replies
Sponsored Links:
Window Content Management (using Window Component)
Hello,
I usually preffer clean code, so this is my problem:
I'm writing the following code in the .fla file:
var main:SmthMain = new SmthMain();
And the rest of the code is in .as files only.
I can't seem to find a way to control the content of a window (mx 2004 component). That is asigning handlers on buttons, retrieving values from textinputs and so on.
onLoad and onComplete does not have the content fully loaded.
only onEnterFrame seems to work but this is bad coding.
I could use a sample code. Maybe from someone that really has it with AS2.0 and MX 2004 components.
View Replies !
View Related
Window Content Management (using Window Component)
Hello,
I usually preffer clean code, so this is my problem:
I'm writing the following code in the .fla file:
var main:SmthMain = new SmthMain();
And the rest of the code is in .as files only.
I can't seem to find a way to control the content of a window (mx 2004 component). That is asigning handlers on buttons, retrieving values from textinputs and so on.
onLoad and onComplete does not have the content fully loaded.
only onEnterFrame seems to work but this is bad coding.
I could use a sample code. Maybe from someone that really has it with AS2.0 and MX 2004 components.
View Replies !
View Related
Window Component With Loader Component
I have the SWF loading into a shell using a Loader component. Within one swf is a trigger for a window - which ,suprise suprise, doesn't work. It works fine if I access the swf directly just not when loaded through the shell. I have added the component to the shell fla and then although a window component loads up, the content (which is linked in the library) is not found. Anyone come across this before?
Attach Code
correctAnswerBtn.onRelease = function() {
var my_win:MovieClip = PopUpManager.createPopUp(this, Window, true, {closeButton:true, contentPath:"CorrectAnswers"});
my_win.title = "Correct Answers";
var winListener:Object = new Object();
winListener.click = function(evt_obj:Object) {
my_win.deletePopUp();
};
winListener.complete = function(evt_obj:Object) {
my_win.setSize(my_win.content._width+7, my_win.content._height+32);
my_win._x = ((Stage.width/2)-(my_win._width/2));
my_win._y = ((Stage.height/2)-(my_win._height/2));
};
my_win.addEventListener("click", winListener);
my_win.addEventListener("complete", winListener);
};
View Replies !
View Related
Menu Component And Window Component
I have a dilema. I'm trying to create a flash application that is basically a rich text editor
well, I'm trying to make a menu component to open a window component which has a close button
here is a part of my code (attempt 1):
PHP Code:
import mx.controls.Menu;import mx.controls.MenuBar;import mx.managers.PopUpManager;import mx.containers.Window;var my_mb:MenuBar;var myProfile:Menu = my_mb.addMenu("My Profile");myProfile.addMenuItem({label:"View/Edit Profile Information", instanceName:"newInst"});myProfile.addMenuItem({label:"See My Profile", instanceName:"openInst"});//THE LISTENERSvar mbListener:Object = new Object();mbListener.change = function(evt_obj:Object) { var menuItem_obj:Object = evt_obj.menuItem; switch (menuItem_obj.attributes.instanceName) { case "openInst": var my_win:MovieClip = PopUpManager.createPopUp(this, Window, true, {closeButton:true, contentPath:"openDialog"}); var winListener:Object = new Object(); winListener.click = function() { my_win.deletePopUp(); }; my_win.addEventListener("click", winListener); break;}
The problem with this script: when I test the movie, the movie freezes and Flash asks do you want to disable the script and etc..
so I tried doing the same by attachMovie() :
PHP Code:
//THE STUFF FROM BEFORE switch (menuItem_obj.attributes.instanceName) { case "openInst": _root.attachMovie("Window","openInst",this.getNextHighestDepth()); openDialog.setSize(623.9,310) openDialog.closeButton = true; openDialog.contentPath = "openDialog"; openDialog.title = "Open Document";//HERE IS THE PROBLEM: openDialog.close = function() { trace("Closing..."); removeMovieClip(_level0.openInst); } break;
The problem from the 2nd Code Box: I can't close the box. When I press the X, it won't close it.
So...basically what I'm asking is...How do I call a Window Component from a Menu Bar Component and let the Window Component also close correctly when the user closes it.
Thanks in advance for your great help!
View Replies !
View Related
AS2: Menu Component & Window Component
well, I had a question Yesterday, and posted in the Flash 8 Section of this forum...well, I have a question now...When I open a Window Component(with a movie clip inside it ...ofcourse) via Popup Manager from the Menu Component, the Window opens up, but I can't go back to the menu and open it. Any suggestions on how?
Here is a part of my code (which I believe will summarize the rest of my code):
PHP Code:
import mx.controls.Menu;import mx.controls.MenuBar;import mx.managers.PopUpManager;import mx.containers.Window;var myProfile:Menu = my_mb.addMenu("File");myProfile.addMenuItem({label:"Open", instanceName:"openInstance"});var mbListener:Object = new Object();mbListener.change = function(evt_obj:Object) { var menuItem_obj:Object = evt_obj.menuItem; switch (menuItem_obj.attributes.instanceName) { case "seemyProfileInstance": var my_win:MovieClip = mx.managers.PopUpManager.createPopUp(evt_obj.target, Window, true, {title:"Open Document", contentPath:"openDialog", closeButton:true}); my_win.setSize(320, 240); var winListener:Object = new Object(); winListener.click = function() { my_win.deletePopUp(); }; my_win.addEventListener("click", winListener); break;
View Replies !
View Related
Window Component
Hello...
I'm using the window component (MX 2004). Now in there is easy to put a close button, but i also need to put a maximize and minimize button there.
Can anyone help me on how to get this effect, since the component only have the close method
Thanks for your help
View Replies !
View Related
Window Component
Anyone know where I can find more information regarding the Window Component that is included with Flash 2004 MX. I see it as a component in the program UI but can't seem to find any information regarding how to use it.
View Replies !
View Related
Help With Window Component
Is it possible to use the same highlighted border on the textfield component in other components?
i would like to use the highlighted border on the window component when it is selected. is it possible?
Thanks
Paul
View Replies !
View Related
Window Component From A To Z
Hallo, all day I have been looking for a tutorial which would help me to understand how to create, modify and use the window component. I am a complete begginer so I don't understand it when I see enormous, complex code... than I don't know what to do with this at all. Where to paste it... and suchlike...
The question is: do you have some intelligible tutorial on this subject? I just want a button, that when is clicked, cause an appearance of a window. It would also be nice if the window had function to drag it. That's all. Any special effects aren't needed :-).
Hope this is not a problem.
View Replies !
View Related
Window Component Help
Can someone please help me. I am trying to make a window component pop up when a button is pressed. I successfully made this in a blank flash document using examples from these forums. But when i use the same method in my existing flash document, nothing happens when i click the button. I added a window component to the library, and renamed the button instance, so I know it is not that. I am using a non existant contentPath, so it would give me an error, but nothing happens when i click the button - no error, no window - nothing. Can anyone tell me why this might be? Thank you
View Replies !
View Related
Using Window Component
Hi, is this possible.?
Swf A launches Window component (createPopUp) and loads in Swf B.
Swf A uses LocalConnection() to pass variable to Swf B.
My problem is I cannot get Swf A to talk to Swf B when Swf is in a Window Component. Standalone players work fine.
Please can someone get back to me, its a major roadblock :(
Cheers!!
M
View Replies !
View Related
Window Component
Hi all,
I am currently working on a FAQ application, the app is working better than I expected and I have learnt a hell of a lot just with this simple project. To make my application look more pleasing I used the window component, which I need to keep as the tile of the window is taken from a global variable depending on what the user selects from two diferent combo boxes.
I have just found out that the window component can be moved by the user which is not what I wanted to use it for, it was purely for the design and layout. Is there any way to stop the windows component dragable? Your help with this would be appreciated.
View Replies !
View Related
Using The Window Component
Hy,
Could someone help me out with the code for the Window component in as 2.0 plz?
For example if my button name is "win_btn" and the window is named "window".
:D....thx....
Edited: 06/13/2007 at 12:46:38 PM by vedtam
View Replies !
View Related
Window Component, Swf, And PHP
Hi everyone,
I have a simple mail form, which communicates with a PHP script on the server. When I go to the swf directly it works just fine. When I put it inside the window component it stops working. I think it has something to do with how the data gets sent from the window component.
Anybody have a suggestion what to do?
Thanks,
- Jan
View Replies !
View Related
AS3 Window Component
I am currently searching for an AS3 Window Component with similar functionality to the old AS2 one. I have been unable to find one. Does anyone have any suggestions?
Thanks,
Patrick
View Replies !
View Related
Window Component
hi for all, any one can help me ? i want use the window componnent but i dont know apply one swf movie inside this! if any know how do this ! post pleae
-->
_thanks.forAll(aovivo);
View Replies !
View Related
Help With Window Component
Is it possible to use the same highlighted border on the textfield component in other components?
i would like to use the highlighted border on the window component when it is selected. is it possible?
Thanks
Paul
View Replies !
View Related
Window Component
I want to make a window component play an swf. KEEP READING DON'T EXIT NOW. I got it to that. But when I click the "x" to close to window it closes. Then I click my window opener button on the stage to open the window again it opens fine. But it has no video unlike the first time I opened it and it has 2 clips echoing each other. I know it is really weird and complicated.Quack Quack Quack! Look at the FLA I explained everything clearer in the FLA. PLEASE REPLY.
:flower :
View Replies !
View Related
Window Component
Guys, how the hell do you get a button to display into a Window Component??
Or for that matter...get an empty movie clip that has been created using code to display into the window?
newName.title = "Sample Window";
newName.closeButton = true;
newName.contentPath = "ani"; <----- It works if the MC is within the library, but anything dynamically created and attached doesnt work, same goes for trying to add a Button component to it - it doesnt work for me.
newName.setSize(500,500);
View Replies !
View Related
Window Component
hi for all, any one can help me ? i want use the window componnent but i dont know apply one swf movie inside this! if any know how do this ! post pleae
-->
_thanks.forAll(aovivo);
View Replies !
View Related
Window Component
When you set the window component to have the little "x" in the corner...how do you make the window close?
Also how do you make it so that when you click a button it opens and plays a movie saved in the same file?
View Replies !
View Related
Window Component Question
I have created a Window component properly and am trying to change the color of the title bar, but have been unsuccessful. I have tried all of the setStyle() options and it seems none of them allow you to change the title bar background color. I can change the text color on the title bar but that's it. Any thoughts??? Thanks in advance.
View Replies !
View Related
Window Component (MX 2004 Pro)
Hi
Im having a bit of a hard time trying to edit the appearance of the 'Window' component (MX 2004 Pro). I would like the component to be totaly transparent, but yet still be able to see the contents of it. If this is not possible, how about just making the title bar dissapear/transparent? If this is still not possible - does anyone know how this component works, so i could make a version for myself?
Sorry if the answer is blatantly obvious, but im sorta new to Flash.
Thanx in advance,
KungFuSheep
View Replies !
View Related
Window Component Won't Close... Please Help
I can get the window open, no problem, with the first part of the code but the rest of the code won't close it. Anyone know what's wrong with it? Thanks
PHP Code:
// open new window for charts
openWinListener = new Object();
openWinListener.change = function(eventObject) {
newWindow = mx.managers.PopUpManager.createPopUp(_root, mx.containers.Window, false, {title:tfStats_list.selectedItem.label, contentPath:statsUrlHolder_label.text, closeButton:true});
newWindow.setSize(307,234);
pBar.source = newWindow;
};
_root.tfStats_list.addEventListener("change", openWinListener);
//
//close charts window
closeWinListener = new Object();
closeWinListener.click = function() {
_root.newWindow.deletePopUp();
}
newWindow.addEventListener("click", closeWinListener);
View Replies !
View Related
[help]Spawning Window Component
Hi evryone!
I'm using this code:
Code:
myWindow = mx.managers.PopUpManager.createPopUp(_root, mx.containers.Window, true, {title:"Login", contentPath:"login_mc"});
To spawn a window component. The content is loaded inside the window, but for some reason, the text inside won't show. The input txt and the button DO load, but the txt above it doesn't. How come??
Greets,
Dauntless
View Replies !
View Related
Resizing The Window Component
Hi all,
I was wondering if it is possible to resize the windows component and all of its content. The windows I am using are populated via FORM pages using contentPath. I am using flash mx 2004 prof...
Any help would be really appreciated.. ;-)
Kinnego
View Replies !
View Related
Insert Swf Into Window Component
Hallo
Problem girl again!
Im trying to insert an swf into a window using the component - is there some special trick to this or do you have any pointers to tutorials - i have tried to pinpoint the route to it in the content path area but nothing works
Any ideas?
Thanks x
View Replies !
View Related
Window Component Problem
Hello,
I am using Flash MX 2004 Pro. I have an instance of the Window component on the stage, and I'm wanting to not let the user be able to move it around. I solved that problem with this code:
Code:
var WindowX:Number = WindowMain._x;
var WindowY:Number = WindowMain._y;
var WindowMoveListener:Object = new Object();
WindowMoveListener.handleEvent = function()
{
WindowMain._x = WindowX;
WindowMain._y = WindowY;
trace(WindowMain._x);
trace(WindowMain._y);
}
WindowMain.addEventListener("move", WindowMoveListener);
However, if I click on the title bar of the Window.... it will still focus on the entire window, and bring it in front of all my other pictures and components. Is there any way I can tell the window to stay to the back of the layers?
View Replies !
View Related
Please Help Cant Close My Window Component
Hi guys,
I'm having a problem detecting what seems to be the problem in my code. The close button does not work at all.
What I want to do is to have a movie clip which is clickable and once clicked a popup window will appear, however as I try to click the close button the code does not work. Please help. Thanks guys!
Here's the code:
mc_calculator.onRelease = function()
{
import mx.managers.PopUpManager
import mx.containers.Window
var myTW = PopUpManager.createPopUp(_root, Window, true, {contentPath: "kbMb", closeButton: true, title:"Kb to Mb Converter", _width: 130, _height: 265, _x: 200, _y: 160 });
windowListener1 = new Object();
windowListener1.click = function(evt)
{
//_root.myTW.deletePopUp();
_root.myTW.deletePopUp();
}
myTW.addEventListener("click", windowListener1);
}
View Replies !
View Related
Alert Or Window Component
Trying to decide to use Alert or Window component. I have a series of scenarios that have different text that needs displayed based on the user answer.
I would prefer the alert because I can easily change the text in there but can't seem to get the X in the corner to show even though it is inherited from the window component and I am using the importer for that.
The downside of the window component is that I need my text to be in a movie clip.
Any suggestions or ways to make the alert display an X? Thanks.
View Replies !
View Related
Don't Know How To Close UI-Window Component
When i click the button, the window component appears with a close button to right-top. I don't know how to write a close function for UI windows component.
This is what i did.
1) Dragged windows UI component to the library.
2) Dragged button from UI to stage
3) Gave instance name to the button as my_button
4) For frame 1, i added this actionscript
Code:
//--------------------------------
import mx.containers.Window;
var my_button:mx.controls.Button;
// Create listener object.
var buttonListener:Object = new Object();
buttonListener.click = function(evt_obj:Object) {
// Instantiate Window.
var my_win:MovieClip = mx.managers.PopUpManager.createPopUp(evt_obj.target, Window, true, {title:"Sample Image", closeButton:true,contentPath:"alm.jpg"});
my_win.setSize(320, 240);
};
// Add listener.
my_button.addEventListener("click", buttonListener);
//----------------------------------------------------
View Replies !
View Related
Working With The Window Component
Hello!
I have a Problem
My PLAN:
I use CS3
Bring up a Window(Flash Component) with a Button!
The Component should be dragable and still have the close button!
I dont Know what code and what command to use and Where to put them
ANY HELP IS WELCOME
thank u Mike Germany
View Replies !
View Related
Swf From Internet In Window Component
Hi... I have a problem... I want to use the window component to load a swf file from my website. When I try it says something with security problem.. Can anyone help me? if there is no way to do this using the window component, can you tell me a different way I can do this? THANKS
View Replies !
View Related
Window Component Non-modal
Hi
I have a number of buttons which will open window components at anytime for the user (hence they are non-modal). Problem is that clicking on a button twice, displays two of the same windows (and so on).
I'm sure there is a way to trap for this, for example using the window.complete handler . However I'm not sure if this will work as I think that once a window has been opened then it will remain 'complete' after closed (??).
Basically I just want the same button to close the window if it is open, else open a new instance of it if it is not already open.
Here is my code to open one of the windows:
Code:
function patientRecords(wContent:String) {
patientRecord_btn.onPress = function() {
patientRecords_win = mx.managers.PopUpManager.createPopUp(this, mx.containers.Window, false, {closeButton:true, titleStyleDeclaration:"TitleStyles"});
patientRecords_win.title = "Patient Records";
patientRecords_win.setSize(205,218);
patientRecords_win.contentPath = "panels/patient_records.swf";
patientRecords_win.move(550,111);
patientRecords_win.setStyle("backgroundColor","0xAEC6D2");
patientRecords_win.setStyle("fontSize","12");
patientRecords_win.setStyle("fontWeight","bold");
patientRecords_win.setStyle("color","0xffffff");
var handleCloseObject:Object = new Object();
handleCloseObject.click = function(evt:Object) {
evt.target.deletePopUp();
};
handleCloseObject2.click = function(evt:Object) {
evt.target.deletePopUp();
};
patientRecords_win.addEventListener("click",handleCloseObject);
};
}
patientRecords();
Thanks for any help with this (actual code would be helpful )!!
Cheers,
Peter
Darwin, Northern Territory, AUSTRALIA
View Replies !
View Related
Window Component Questions
Hi all
I wonder how to make an Window Component to work like the one in the LOGIN SECTION of Ultrashock Website (http://www.ultrashock.com/)
I explain, I have a MAIN movie that has a LOADER component that loads a section of my website, called STORES which has a simple menu on.
After clicking at any button I want a pop up to apear in the screen that take over the whole MAIN MOVIE area. And loads a Movie Clip inside itself.
Can anybody help me out? Tkz
View Replies !
View Related
[CS3] Window Component Help (Actionscript 2.0)
Hey guys,
I used a nifty solution that a nice moderator gave me to solve a previous problem, but this solution created a problem.
I first had this code pasted in a circle movieclip:
PHP Code:
if ((_root.main.passwrd.hitTest(_x, _y+radius, true)) or (_root.main.passwrd.hitTest(_x, _y-radius, true)) or (_root.main.passwrd.hitTest(_x+radius, _y, true)) or (_root.main.passwrd.hitTest(_x-radius, _y, true))) {
alertMe();
_root.main.passwrd.gotoAndStop(2);
} else {
alerted = false;
}
function alertMe(){
if(!alerted){
Alert.show("Unlock Code Sequence lock: 75jgnf4", "Unlock Code Sequence");
alerted = true;
}
};
The code pretty much says that if the circle movieclip collided with the movieclip with the instance name of "passwrd", it would make an alert popup once (alert component).
So then I added another piece of code after the code above.
PHP Code:
if ((_root.main.hehe.hitTest(_x, _y+radius, true)) or (_root.main.hehe.hitTest(_x, _y-radius, true)) or (_root.main.hehe.hitTest(_x+radius, _y, true)) or (_root.main.hehe.hitTest(_x-radius, _y, true))){
alertMe();
} else {
alerted = false;
}
function alertMe(){
if(!alerted){
myWindow = mx.managers.PopUpManager.createPopUp(_root,
mx.containers.Window, true, {title:"Change Password",
contentPath:"PasswordForm"});
myWindow.setSize(240,110);
alerted = true;
}
};
That code pretty much says that if the circle movieclip collides with another movieclip with the instance name of "hehe", then it would pop up one window. This is the window component. Unfortunately, the moment the circle collides with other movieclip, it makes heaps of windows pop up, instead of just one.
After scratching my head a lot and playing around with things, I figured that if I removed the first section of code about the alert thing, then the second section of code about the Window component started working the way it should (make only one window pop up).
I really need code that allows for both the alert and the window component to function the way it should (make only one alert/window pop up).
Thanks guys. Love ya all.
View Replies !
View Related
[CS3] Close The Window Component (AS2)
Hey guys,
I have this window component that imports a movieclip into the window. I've also enabled a close button and made it close the window. But I need some actionscript (actionscript 2.0) to close the window from the movieclip that the window is importing.
Here is my dilemma:
I made a movieclip in the library with an identifier of "PasswordForm". My Window pops up and imports the PasswordForm through actionscript. I want actionscript that I can put in the movieclip "PasswordForm" so that when PasswordForm reaches a certain frame, it will close the window.
Thanks all! You guys are awesome.
View Replies !
View Related
Window Component Question
Hi,
I am creating a dynamic popupwindow with contents of a form. I am unable to set the contents in the form using window.content. I am using a movie clip as the content of the window. ( I tried using setup form as well but no result, i am unable to set the content of the window at runtime)
code :
_global.buildWindow = mx.managers.PopUpManager.createPopUp(this._parent. _parent, mx.containers.Window, true, { title:"Build New Model"});
// setup_mc is a movieclip same as setup form
buildWindow.contentPath="setup_mc";
//setup is a form
//buildWindow.contentPath="setup";
buildWindow.closeButton=true;
buildWindow.setSize(450,250);
//this statement is not working...
buildWindow.content.actName_txt.text="test";
//actName_txt is a field on the setup form
Can anyone help on how to set the window contents during runtime.
Thanks in advance..
View Replies !
View Related
Error Regarding Window Component
Hi ,
Im currently working on a flash remoting project.Actually Im trying to load a movieclip inside a window component..I have given the linkage id for the movie clip..but I get a error saying "error opening url"
Actually I have given the symbol name of the movie clip to load as the content path..I don want to load any external file..Why am I getting this error? Im using flashmx2004
Why should we sometimes drag components on the stage and delete them to make them work..Is this error has something to do with ..please help
regards,
jaci
View Replies !
View Related
Window Component On Top Over Other Components
Hi,
i create some component via actionscript, then I create a modal window. I'm surprise but my window object don't appare over other components. Could you say me why and how could I solve this problem.
There is a little example:
_root.createObject("button","btn1",_root.getNextHi ghestDepth());
_root.createObject("button","btn2",_root.getNextHi ghestDepth(),{_x:30,_y:10});
mx.managers.PopUpManager.createPopUp(_root, mx.containers.Window, true, {_width:160,_height:144,closeButton:true, contentPath:"uno"});
In this case, the window appear under the buttons but I would like to have a NON-MODAL window OVER ALL component on the stage.
Could you help me?
Thak you in advance
View Replies !
View Related
Window Component / External Swf - Plz Help :(
Hi,
any clues here would be appreciated, its kept me up lately.
My flash app consists of a main swf, a button on the stage which when clicked creates a Popup and loads an external swf like so
myWindow = mx.managers.PopUpManager.createPopup(_root, mx.containers.Window, true, (title:"My Title", contentPath:"Status.swf"});
so far so good...
After I create the window and load the external swf I use LocalConnection to pass values between the swfs eg.
sendingLC = new LocalConnection();
sendingLC.send("lc_name", "myMethod", txtUniqueID);
now i can pass values between swfs fine if I run the swfs in separate players (or debugging both swfs in flash mx), but I cannot pass in a value to a swf that is loaded in a window component into the main swf
Would be really grateful if someone could post a sample fla of the Window component loading external swfs and passing values between the swfs or some ideas about how to achieve the same thing.
Thanks
Mike
View Replies !
View Related
|