ActionScript 2.0 :: Open A New Flash Movie From Existing?
Jan 26, 2009
I've created a fullscreen Flash .exe. I want to be able to build a button that can allow you to close the exiting movie and open a new one (kinda like Lingo's OpenMovie command). I'm sure there's an easy way to do this in AS, I just can't find it.
I'm trying to open a new window from a button in my main window and load a movie clip into it. I have not yet found a solution that works though. From the documentation I have found and tried:
Code: loadMovie(filepath, this);
This works, but it replaces my existing one. I want a new window, so I tried to add:
Code: this.createEmptyMovieClip("chat_mc", 999);
This loads all the components from the movie clip ontop of my existing one, it gets it half way there sort of, lol. All in all this is what I have:
Code: on (release) { this.createEmptyMovieClip("chat_mc", 999); loadMovie("C:\Documents and Settings\foo\Desktop\Server.swf", chat_mc); }
how I can get this to work? I would like two windows with two movies, the new one created on the press of a button.
I work with 3d animation. Im have a problem with a personal website Im doing, I have a link in a button inside a flash movie to open a new window and play a youtube movie:
on (release) { var jscommand:String = "window.open('http://www.youtube.com/v/b0L4XLODhAA&hl=en&fs=1&','win','height=344,width=4 25,toolbar=no,scrollbars=yes');"; getURL("javascript:" + jscommand + " void(0);"); }
This works fine in Firefox but in IE it doesnt work, I then change the /v/ in the youtube link with /p.swf?video_id= and now I have the window open showing the small youtube thumbnail of my video but once a click play, nothing happens, I check it and is not loading anything.
I have a working script on the one hand (in a working movie) and a flash movie on the other.The script handles a form, I changed the names of elements in the target movie as appropriate.The source movie contains only one layer and one frame. The target movie contains multiple layers and plays an animation before displaying the form.How do I go about making the script work on the target movie?
Edit:I've made some progress, the textfield works, but the button produces exceptions:Cannot access a property or method of a null object reference.
The name of the button and the variable are the same.
1) how do you open a new window if you have thumbnail pics in the flash movie but want the full pic to open up in a new window? Is this Javascript inside flash?
2) How do they do the menu bar here at this site:[URL]
I am updating a movie created by a previous employer. It involves screen shots and voice overs. There is a navigation bar at the bottom with scrubber, stop, next, etc.
I named the new screen shots the same as the old ones and imported them and everything works fine. But this doesn't seem to work with the voice overs. As soon as I save over an old mp3 with the new one, the nav bar no longer works.
I am placing a movie clip in the swf by AS. In the resulting swf, It's hiding the buttons that are already on the stage. How do I get that movie clip to be behind other elements on the stage?
Here's the background and details: In Flash CS4, I have existing "Forward" and "Back" buttons on the stage, frame1 of the topmost layer Artwork, placed manually, nothing else on the stage. I made a movie clip and it exists in the library but is not on the stage, it's called up via AS, which is in frame 1, actions layer (the layer below the artwork). [code]....
I'm currently making an animation which will eventually exceed the 16,000 frame limit (don't ask haha), so, short of making two movies and having to just start up the next one, what is the code for loading a movie? I presume they need to be in the same directory? So basically all I want is on the last frame of the movie the code executes and the second movie file opens up and starts. I guess I'd want the current movie to close, too.
I have made a flash autorun splash screen for a CD containing numerous pdf' files. When I click on the files in the flash movie however, they open in a browser window. Is there any way to make them open in acrobat by default?
If I already have an existing movie, what is the best way to add a preloader to this movie?I have 1 frame with a few layers right now. Then, I have some movie clips on frame 1 Should I just move everything to frame 2? Does that throw anything out of sync? I am using labels in the movie clips that that I can use gotoAndPlay("label");
I've got 100 instances of a particular class of MovieClip on my stage, and I'm trying to find a way to get functions that affect them all. The obvious way to do this is through their common class, but I'm having a lot of trouble finding out how to do it. Most of the tutorials I've found are about creating custom classes or creating new instances of classes. This isn't what I want to do, as I've already got all my instances on the stage already.
There are actually several things I want to use this for, but I'll just mention one for the sake of brevity.
I want to set the alpha of each MovieClip to 0 when I click on it. Here's the code I'm using for a single MovieClip at the moment:
ActionScript Code: boxcover1.addEventListener(MouseEvent.CLICK, removecover1); function removecover1(evt:MouseEvent):void{ boxcover1.alpha=0; }
While this works perfectly, it means I'm going to have to repeat it 99 times, once for each MovieClip, and later on I need to do some more complicated stuff with it that 99 copies would make near-impossible to pull off. I'm hoping that by using the class ('box_cover') I'll be able to have this apply to every MovieClip on the stage.
I have a PNG imported into my library and exported for use in Action script. On the stage, I have a swatchFill movie clip.Currently I have code that will transform the fill to a solid color, however I'm getting into metallic swatches and the colorTransform function will no longer work.[code]
I tried posting this in the general flash forum with no sucess. I'm guessing my question is more geared towards AS3 anyway. So here goes:
I've created a flash intro for a website and I have it setup so that in the first frame of the intro it opens a popup window, and then in the last frame it opens the actual site in the same window as the intro. Right now when it hits the last frame it opens up the popup window a second time! In a lot of cases this would be fine but the popup is a music player and the two players playing on top of eachother just doesnt work.[code]...
I want to clic a button and open a new window with a flash movie (with the exact dimensions of the SWF), without the browser options and centered, how to?
However, I have a main movie and in there I open the multiple scenes. If I use the preloader alone with the scenes it works, but when I want to load the preloader that should open the scenes inside the main movie it doesn't do anything.
var l:Loader = new Loader(); l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop); l.contentLoaderInfo.addEventListener(Event.COMPLETE, done); l.load(new URLRequest("magazine.swf")); function loop(e:ProgressEvent):void{ [Code] .....
In the old situation I use a button goto frame - and on the frame there is actionscript that says: stop(); loadMovie("magazine.swf", 'placeholder'); have changed that to stop(); loadMovie("preloader.swf", 'placeholder');
I have been struggling with what I suppose is a very simple issue: I am importing content into my application via a text file, this all works fine. I have about 10 different movie clips on the parent timeline that I have hidden (dc_mc.visible = false.So what I need to do is take one of the variable names that I've got from my text file and use its value to "turn on" one of these hidden movie clips.So I'm trying stuff like:
var directory = e.target.data.directory; // Grabs the data, sets var var raceNameButton:String = directory+"_mc"; // Set data into new var raceNamesButton.visible = true; // display movie clip with var name
I have a html file with a flash movie-menu embedded into it. I'd like one of the buttons to open an external html page strictly in a new maximized window. It does not matter if the new window has toolbar or not. I want it to open a new maximized window (not the full screen thing) onclick.
I am trying to open a greybox window from my flash movie. I am not getting a syntax error, but the window will not open when I click the button, either.
Here is my actionScript 3 code:
ActionScript Code: ericEmail.addEventListener(MouseEvent.CLICK, buttonclicked); function buttonclicked(event:MouseEvent){ ExternalInterface.call("opengreybox",'http://www.cosmogrey.com/contacts/trautmann.html'); }
1) how do you open a new window if you have thumbnail pictures in the flash movie but want the full pic to open up in a new window? Is this Javascript inside flash?[url]...
I want to make a new instance of an existing symbol (movie clip or graphic) when an object hits the side of the stage. I have the code to figure out if it hit the side of the stage, i just need to know how to make a new instance and make it show up where the ball hit. I also want to be able to have multiple of these instances on screen.
I own and I am trying learn and use the CS3 Master collection which comes with Flash 9. I own and had a website built several (9) years ago which I am trying to update the files, So basiclly, I am trying to make updated changes to my own orginal .swf files and todays Flash program give me the message of "cannot open protected movie" I was not ever aware we locked any of the oringal .swf files we produced.
Flash crashes when I try to open any Movie Clip with a text field. This happens with both CS 5 and CS5.5. I am on a Mac Running 10.6.8. The files in question began as a CS4 about a year ago and have been converted to CS5 and CS55 since.
This problem happens sometime but not always, but it has definitely gotten worse with the latest Flash Pro update. (Flash Pro CS5.5 v. 11.5.1.349)This appears to be related to Mac only. I have reprouced on two other Macs, but have not been able to on a PC. (all running CS 5 or CS 5.5)We have a Javascript that goes through the FLA and embeds the fonts in all text fields. (Because font embedding in CS5 or CS5.5 infamously does not work at all). Sometimes if you run this script before you try to open the MC it will apparently fix the problem and let you in, sometimes it will not.
I am making a flash site and there is a main SWF which loads and unloads all other SWFs into and from it. For example, there are links to pages Home, Biography, Gallery, etc. When you click the Gallery link, gallery.swf loads and it is added to the main SWF.
So here's my problem: when I test my movie, everything works perfectly, but when I open the SWF that was created by testing movie in a stand-alone Flash Player or a browser, those SWF's sometimes don't load. If I click Biography link, for example, it usually doesn't load biography.swf but if I click Gallery link, which may or may not load gallery.swf, and then Biography link, there's a greater chance that biography.swf will be loaded.
I want the other file to open in same window bellow the first one.But the problem here is when i run this in IE8 the other frame opens in a different window but in Firefox im not getting any respose.
Note:- Javascript is enabled in both browsers and popup are not blocked