Loading Window Component with Button!
Hello! I found two tutorials that both contain pieces of what i am looking for but i cant seem to figure them out and get exactly what i want. Here is the first one:
http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveD ocs_Parts&file=00004289.html
In the first one, the general idea is what i am looking for. Except that i want to load a movieclip and not an image. My problem in this one is the button component that is used. I have no clue how to skin or customize the button, and i cant find a good tutorial to help me so i figured it might be easier to just change the actionscript for this. I want to be able to create my own button (instance button) and use that so that when people release that button, the movie clip pops up!
Now in this second tutorial that i found:
http://www.getw3help.com/2008/07/window-component.html
Its pretty much exactly what i want and it loads a movieclip. Problem is, when i add the code to a button, it doesnt work!
Can anyone help me? Hope i am clear in my explanation!
Thanks!
Ok it sort of works... here is my code:
on (release) {
trace("button works");
win.title = "Yellow Birthday Package";
win.closeButton = true;
win.contentPath = "yellowPack";
win.setSize(550,500);
var listener:Object = new Object();
listener.click = function(){
win._visible = false;
win.addEventListener("click",listener);
It order to make it work, the window component has to be on the stage but i want it to popup only when the user clicks on the button. So the window should be hidden/invisible when the page first loads. I tried changing win._visible = true; but that did nothing.
The other problem is that the movie clip inside the window, isnt aligning center. i can only see a corner of the movie clip. in the top left. I havent tested the whole thing live though!
Similar Messages
-
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?There is a discussion of modules and popups on my blog
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui -
Problem loading window component more than once
I have a swf with a button that opens a window component
(from my library). it loads fine and also closes fine when I click
the close button in the window. but when I try to open the window
again, it actually loads again, but it stalls and locks up
immediatley. can anybody tell me what is wrong with my code? I also
was going to have different buttons to open different windows (each
swf playing a song and has written lyrics). it does the same thing
when i load the first window, close it, then try to open a second
window. it stalls and locks up.
please, I really need some help!Ok it sort of works... here is my code:
on (release) {
trace("button works");
win.title = "Yellow Birthday Package";
win.closeButton = true;
win.contentPath = "yellowPack";
win.setSize(550,500);
var listener:Object = new Object();
listener.click = function(){
win._visible = false;
win.addEventListener("click",listener);
It order to make it work, the window component has to be on the stage but i want it to popup only when the user clicks on the button. So the window should be hidden/invisible when the page first loads. I tried changing win._visible = true; but that did nothing.
The other problem is that the movie clip inside the window, isnt aligning center. i can only see a corner of the movie clip. in the top left. I havent tested the whole thing live though! -
Dual loading Windows 7 with Snow Leopard Virus question
I just loaded Windows 7 onto my computer using parallels for various reasons that I don't want to get into. Will having Windows on my Apple computer make it more susceptible to viruses?
Mac OS X itself can't be infected with Windows viruses. You can get your Windows installation for Parallels infected, and could infect any file Windows can access with something that could harm another Windows system. If you allow your Windows installation to use Parallels to 'see' your files created and stored via Mac OS X, you could thus end up with files carrying an infection if your Windows install is ever infected. This could of course lead to your own files reinfecting Windows if you end up reinstalling it. You can get antivirus programs for Mac OS X, with the primary purpose really being to clean and prevent Windows viruses from being passed along or in your case getting through to your Windows installation.
To put it most simply, imagine having a pet that has a weaker immune system than you do. You can't catch the same diseases as this pet, but you might not know you are passing them along from a friend's pet or the old food dish from your previous pet. You stay healthy, but you might go through several pets before you figure out what keeps making them get sick and die. -
K7N2G will not load windows xp with any type of dvd/cd drive installed?
This is on my old computer, the specs are as follows
k7n2g
athlon 2600+
radeon 9700 pro
Caviar SE wd800
1gb samsung ddr333
It does not matter if it is keyed as master or slave, primary or secondary my old k7n2g will not load windows with a cd drive installed. I have tried three different drives and everything that I can think of, changed cables, channels, drives, everything. Windows just hangs. I cannot even get into safe mode. Is this an IRQ problem? The drives keeps trying to eject themselves, no matter what kind I use. This has never happened before, but there was a point before this problem where the vga wouldn't kick on (at the login screen) until I hit eject on the cd drive. This is driving me crazy and I have a girlfriend who just has to play her stupid sims and will not stop bothering me about it. PLEASE PLEASE PLEASE help me!
Thanks
Chris
PS here is my NEW workstation (I couldn't be happier to get rid of the old system)
two Opteron 250 90nm
2gb 2-3-2-6 Corsair Reg/ECC DDR 400
Tyan Thunder K8WE
1x BFG 7800GTX OC (one for now)
Audigy 4 Pro
Seagate Cheetah U160 10k 73.4 gb
Atlas V U160 18.3 gb
Lite on Dual Layer burnerYour Tyan based hardware listing on the first post has no relevance to anything, and might only serve to confuse. Please remove it and put the hardware you are trying to troubleshoot in a signature. Look in your profile>Forum Profile Information and enter that in the Signature box. That way we wont have to scroll to hunt down your hardware specs
So let us get this straight.
This system used to work fine? Yes? Then what prompted you to reload the OS?
You mentioned that didn't happen when you owned it. Are we to assume that at some point you sold or gave parts of this system to someone else? If so, what changed?
A little more history might prove useful in helping us to give you better suggestions.
Look at the PSU and give the Amps for the +3.3, +5v, & +12v lines.
***Edit, from what I see on the net, that is a dual rail PSU and the amps are as follows:
+3.3V@22A, +5V@21A, +12V1@18A, +12V2@16A
Is this correct?
Both the 3.3 and +5v seem a little low to me, but I am not entirely convinced that would be your problem. However, the fact that the 12v rails are split, can lead to other problems such as overvoltage protection circuitry getting in the way. Especially if the 16amp 12v rail is overloaded.
This is something to consider. Just because it is supposedly capable of wattage over it's rated power output doesn't mean it can handle what you're throwing at it all at once. If you have a single rail PSU that has at least 18 amps on the 12v rail to test with, we could almost definitively rule out power as the sole problem or a contributing factor.
I have never had a CD rejected, but if you could be more detailed about what you have connected to the board while attempting to load the OS, and then a detailed description of at what point the OS installation fails, and the CD is ejected, that would be helpful as well.
The fact that you've tried several drives, cables, with the same result. And also had a blackscreen event, does point to at least one problem that could point to a power issue. The CD rejection issue is foreign to me since I usually use the same type of PSU in all my builds or ones that I know work with a particular set of hardware, so I can't attribut that to a power issue.
Did you try clearing the CMOS and then initialize the default settings?
Do you have a cheap AGP card to try instead of the 9700? -
Load a component with jsf 2.0 and ajax
Hello i have thew next code in a index.xhtml
<h:commandLink action="index" value="Home" actionListener="#{contingut.cont}" >
<f:ajax render="content2" >
</f:ajax>
</h:commandLink>
and I wnat that when the user click the button a Component load's in content2.
I don't know how to do this.
Thanks.I have a navigation bar in the left and the components must show in the right of the page.
The components must display in "content2"
thanks
Edited by: 807399 on 17-nov-2010 7:26 -
How To Use a Custom Close Button In Window Component
Hello,
I have a window component, with the default close button
turned off, and a new custom close button added to the movie clip
that is displayed inside the window component. How do I get a click
on the close button to close the window?
This is the code I currently have to create the window (and
the listeners to close the window using the default close button):basicalyyou have to use
myWindow.deletePopUp();
if my memory serves the content mc is loaded into a mc called
contentHolder, inside the window component, so
if you are referencing the window from the scope of your
loaded mc it will be
this._parent._parent.deletePopUp();
or if from the button's scope
this._parent._parent._parent.deletePopUp();
try traceing the parantage down til you hit the window. -
Im programatically creating a Window component with a close
button using
the Tween class as animation.
When not using the Tween class all is fine but when I use the
Tween
clase window appears without the close button?
Any ideas why?
This is the code":
interactividad.onRelease = function(){
import mx.managers.PopUpManager;
import mx.containers.Window;
pop.start();
var intera:MovieClip = PopUpManager.createPopUp(this, Window,
true,
{contentPath:"",closeButton:true, title:"Interactividad A"});
mx.transitions.TransitionManager.start(intera,
{type:mx.transitions.Zoom, direction:0, duration:1,
easing:mx.transitions.easing.Bounce.easeOut, param1:empty,
param2:empty});
intera.setSize(750,500);
intera._x = 25;
intera._y = 75;
var twListener:Object = new Object();
twListener.click = function(evt:Object){
pop.start();
evt.target.deletePopUp();
intera.addEventListener("click", twListener);Fixed. I was tyring to publish version 6 as 2. Tried v8 as2
and it worked with no errors. I then backed my way back down to 6
as 2 and not problems. -
Trouble loading parallels even with new version
I am having continual trouble loading windows 7 with my parallels. Spouse has parallels version 3.0 for mac (2008) (older) and has no trouble with windowsXP I have reinstalled windows 7 and am wondering if I should try purchasing and installing this older version and the XP version. Any suggestions? Am I missing something in the basic set up? Thanks
The W7 "partition" should be at least 40-60GB on your disk, the Ram used for W7 should be more than 1GB (I have it on 1.3GB, but if you have "heavy" apps better set to even more), PD6 itself uses continiously around 0.5GB in RAM, so I think having 2GB total RAM in your MBP is not enough. But you never said how much you have in your MBP.
Update PD6 to the latest version (read: http://kb.parallels.com/en/111541).
For other issues you could research the Parallels Fourums.
Success -
Hi.
i have an fla file with 5 keyframes. Each keyframe navigates forward to the following keyframe. On the fifth keyframe, a Loader loads an external swf. The external swf has an flv playback component with sound.
The fifth keyframe, other than having a button to click to load the swf, has a movie clip that navigates you back to the first keyframe.
The loaded swf, once loaded, may be removed using removeThis function which has removeChild code as well as a _flv.stop(); which makes the flv stop when the swf is removed. So u're back on keyframe 5, no sound - good!.
ASo, all is well and the user can navigate back to the first keyframe (from keyframe 5), and from there continue on to the 2nd, 3rd, 4th and 5th keyframes again, problems start though, when you get to that 5th keyframe again: that keyframe has an FLVPlayback component playing an flv, which at that point becomes very sluggish as all the mc animations on that 5th frame. And worse, i realize, the flv in the external swf that was previously loaded, starts playing by itself, which i know, because i hear its sound track.
I tried putting a conditional statement to tell the _flv to stop on keyframes 1 and 5, but that causes errors, considering that the flv is an undefined property from the perspective of those keyframes.
Any help would be very appreciated:)
thanks.var loader:Loader = new Loader();
loader.load(new URLRequest("_.swf"));
house.addEventListener(MouseEvent.CLICK, loadswf1);
function loadswf1(event:MouseEvent):void
addChild(loader);
this is how i'm loading the swf. I tried using Loader.unloadAndStop() inside that loadswf function but get an error -
Scene 1, Layer 'a', Frame 75, Line 83
1061: Call to a possibly undefined method unloadAndStop through a reference with static type Class. -
Unloading a Module via an exit button on Window component
This is a Flex 4 project.
I have a module create with MXML.
The module uses the window component.
How do I use the "x" (exit button) on the window component to unload the module?
This is part of my code on the main application:
private function displayModule( moduleURL:String ):void
if( moduleLoader.url != moduleURL )
moduleLoader.url = moduleURL;
<s:Button x="23.35" y="50.85" label="1a" width="50" height="50" id="A1" click="displayModule('windowA1.swf');"/>
<mx:ModuleLoader id="moduleLoader" width="100%" height="100%" x="150" y="25"/>
Thanks for any helpGrab some event when the X button is clicked and set the moduleLoader.url =
null -
How to load Flash component on a Mac Native Window
Hi, I have a application working fine on Windows, Have Flash
component loaded on PC window and send and receive event through
C++, But I dont have any idea how to do it on Mac, I have used MFC
etc in PC to display the Flash component on it but how can I do the
same on Mac, Basically I require a Mac window to host a Flash
Component with some other media components and being able to send
and receive events in C++ to and fro on Mac window.
ThanksConverting a Lightweight Access Point Back to Autonomous Mode
http://www.cisco.com/en/US/docs/wireless/access_point/conversion/lwapp/upgrade/guide/lwapnote.html#wp161272 -
Window Component in Loaded Movie
I have a window component inside a "main" movie that is
loaded into a loader movie.
When the main movie is run on its own, the window displays
correctly. However, when the loader movie is run, the window shows
at a 5-pixel size. I'm using the alert component as well-- could
this possibly interfere with it?
What I've tried:
- adding the window component to the loader movie library
- removing the window component from the loader movie library
- adding the window component to the loader movie stage
- removing the window component from the loader movie stage
- adding the alert component to the loader movie library
- removing the alert component from the loader movie library
- adding the window and alert components to the loader movie
library
- removing the window and alert components from the loader
movie libraryComponents don't work when loaded into a parent. The only
real solution
would be to create your own combo box.
Dan Mode
--> Adobe Community Expert
*Flash Helps*
http://www.smithmediafusion.com/blog/?cat=11
*THE online Radio*
http://www.tornadostream.com
*Must Read*
http://www.smithmediafusion.com/blog
"maskims" <[email protected]> wrote in
message
news:eccn00$p7v$[email protected]..
>I have one main swf movie which calls (loadmovie in a
target) a child swf
> movie. The child swf contains a combobox component which
works perfectly
> fine
> when this child swf is run on its own. However when
called within the main
> swf,
> the combobox no longer reacts, showing a yellow frame
around it when it
> should
> drop as it is clicked...
>
> Does anyone know what this is due to and how I could
solve it ?
> Thanks
> -
I am working on an interactive book and have set up each page as a separate composition in edge.
I am using the edge commons JS library to load multiple compositions into a main composition.
You can see how this works here: Edge Commons - Extension Library for Edge Animate and Edge Reflow | EdgeDocks.com
The way the edge commons tutorial is set up requires a button for each composition i want to load. I am interested in loading multiple compositions with a "next" and "back" button, and a "swipe left, "swipe right" gesture on the content symbol that each composition is loaded into. I also need the swipe features on the content symbol not to interfere with the interactive elements on the loaded composition.
Please suggest a solution that will work without adding additional scripts beyond edge commons and jquery.Sort of. I'm using this code inside an action for a button symbol. But it doesn't work perfectly. Trying to debug it.
Let me know if you have any luck.
//Check to see if pageCounter already exists
if (typeof EC.pageCounter === 'undefined') {
// it doesn't exist so initialize it to first page
EC.pageCounter = 2;
//check if the page is only 1 digit -- patch for single digit
if (EC.pageCounter < 9) {
// it is, so we need to pad a 0 on the front.
EC.pageCounterString = "0" + EC.pageCounter;
//e.g. 01 ...09,11,12,13....115,222352,,....
else {
EC.pageCounterString = EC.pageCounter;
EC.loadComposition(EC.pageCounterString + "/publish/web/" + EC.pageCounterString + ".html", sym.$("container"));
EC.pageCounter = EC.pageCounter + 1;
//TODO for back -1 -
I already spent half a day in order to load windows 8.1 on my new Macbookpro Retina without success. Boot camp not reconize the USD drive with windows 8.1. Is anybody able to help me?
I already spent half a day in order to load windows 8.1 on my new Macbookpro Retina without success. Boot camp not reconize the USD drive with windows 8.1. Is anybody able to help me?
Maybe you are looking for
-
Unable to run ADFBC JUNIT Test Classes with JDEV11G 11.1.1.6
Dear All, I upgraded my project to the latest release JDEV 11G 11.1.1.6 Previously we are on JDEV 11G 11.1.1.5 I have a JUNIT class that I am running which test my ADFBC components. public class MyTestClass { @Test public void testVOAccess()
-
How to get a BigDecimal from german number (12,34)?
How can i convert a string "12,34" to a BigDecimal object (value of 12.34)? I tried using special locale NumberFormat, but this doesn't work: * Convert a string to a BigDecimal object. * @param string String to convert. * @param patter
-
Time Picker defaults time to 7:00 when the time is deleted
I have a Lightswitch 2013 desktop silverlight application with a datetime field (not required) but I only use the time portion of the field. I have a screen with a Time Picker on it and when the user deletes the time the system puts 7:00 am in the f
-
mins
-
I'm new to Mac and I'm finding the switch difficult. I have a Canon i9900 printer. This printer does up 13x17 pages. I used it to print 12x12 scrapbooking pages on my PC but switched to a Mac because of it's color matching capabilites. But now that I