ActionScript 2.0 :: Play A Frame In An External .swf With A Button From Main Flash File?
Jan 15, 2007im trying to play a frame in an external .swf with a button from my main flash file.
View 5 Repliesim trying to play a frame in an external .swf with a button from my main flash file.
View 5 RepliesI Have a flashmovie thats almost done and will soon hit the internet, but I want to add some animations into the website it�s two gears that I�m about to put at the bottom of the page and when a button releases in the main flashmovie the two bottom gears will turn a few frames and just stand still.These three movies are all separate (main movie, first gear and second gear).
It's a homepage designed in HTML and flash that has this "main flashmovie" in the middle of the screen, the size is about 1500(width)X800(height). And the gears is about 800wX200h placed at the left and right side bottom of the page. Dont worry the site is easy to apply to any screen resolution.I have been looking everywhere for any soul out there who suffering from the same problem but no success. Is it possible to script a button in the main movie to launch two separate movies in their own contents?
I'm building a website, in which the 'Gallery Page' has a link to an external swf file, which is a scrolling clip of thumbnails.
What I want to do, is create each thumbnail into a button, which will then play a Movie Clip from a frame located in the Main swf file. (So basically, each thumbnail button is a small photo, will play that photo in a large scale as a movie)
eg.
thumbnail1_btn needs to go to main swf and play movieclip1.mc, frame 1
thumbnail2_btn nends to go to main swf and play movieclip1.mc, frame 2
I finally got to link an external swf movie playing in my main movie... this external mov. has a script that when u move the mouse, a series of panels slide from left to right... when i preview the external movie, it plays fine.. but when i insert it in the main movie, and preview it, the movie plays, but the panel stays there.... static... does not move...
also, when i load a movie, how can i unload it when another is pressed?
I have some buttons in my main movie.I want each button to link to a different frame of an external movie. Is this possible?
View 2 RepliesI've beein digging forums everywhere but cant find the solution to my problem...
I have an external swf "advert_3.swf" loading into the main index.swf.
advert_3.swf has two buttons: one needs to go to "services" frame the other to "events" within a content_mc which is in the index.swf.
that is in the index.swf:
ActionScript Code:
var request:URLRequest = new URLRequest("advert_3.swf");
var loader:Loader = new Loader();
loader.x = 35;
[Code].....
when a external swf file gets loaded into main swf file, i need to detect while playing external file reach to end so that i can unload that file and move to another frame on root of main file. I am not getting how to identify external swf play reach to end so that i can unload swf and jump to root specific frame of main swf.
View 1 Repliesget the screenshot of the first frame of an external flv file without play it?
View 1 RepliesI can't seem to remove / unload the external swf files e.g when the carousel.swf (portfolio) is displayed and I press the about button the about content is overlapping the carousel (portfolio) . How can I remove / unload an external swf file from the main flash file and load a new swf file, while at the same time removing garbage collection from memory?
View 15 RepliesError #1009 cannot access a property or method of a null object reference.
But the code I use doesnt have anything that is null..
Mol.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
gotoAndStop("Main");
}
This is the code I have reapeted 5 times on multiply frames. (I do have changed the names ect.)
the "Main" is a label on a frame. When I click on 1 button, it works fine. When I click on the button that leads me back to "Main" it works, BUT then it gives the error and I cant do a thing anymore..
What I need is an AS code for a button which first play an animation ( a motion tween) and then load an external swf file.
View 2 RepliesI have been trying to create a play/pause button for the main timeline in my flash movie. Created a movie clip with 1st frame - a pause graphic, then on 2nd frame - play graphic, labelled the frames 'pause' and 'play' consecutively and put a stop action on the first frame of the movieclip. Then put the following code in the actions layer of the main timeline (and gave instance name of 'ppBtn' to the movieclip):
var pp:Boolean = true;
function ppState(event:MouseEvent) {
if(pp) {
stop();
event.target.gotoAndStop('pause');
[Code] ....
It works in stopping and starting the movie but the actual movieclip doesn't toggle between the pause and the play graphics (just stays on the 'pause' state - 1st frame).
I am loading a swf named ball.swf in the main.fla. the swf is loading but not playing the next frame that i want.[code]
View 1 RepliesI have just started using external AS3 files to try wean myself off using code in the main time line.I am importing an XML file using an external as3 file, but cant return the values to the main timelineIt worked when I used the trace option, but I need these values to dynamicly populate a movieclip on stage (another problem I cant add movie clip to stage even though I have the linkage etc)AS3 Code ----------------------------------
package com.teamSelection
{
import flash.display.DisplayObjectContainer;
[code].....
i have 2 flash file,one is mine (the main container) and one is a external swf.i want to load the external swf to my container swf.i write this code in my as2 container code inside the main timeline flash (mine flash) -----first of all i add a movie clip with instance name mc1 to the first layer
Code:
mc1._lockroot = true;
mc1.loadMovie("external.swf");
countdown = function(){
[code]....
i really try to use that code - BUT !!! -> if i use this code the external swf predominant my main swf code and all the rest of my code dosent work (like timer of trace)....
I have 2 flash files,one is mine (the main container) and one is a external swf.I want to load the external SWF to my container SWF.I write this code in my AS2 container, inside the main timeline flash (mine flash).In the first method, I add a movie clip with instance name mc1 to the first layer:
mc1._lockroot = true;
mc1.loadMovie("external.swf");
countdown = function(){
trace("ok");
}
countdownIt = setInterval(countdown,1000);
This code works fine in most of the cases, but I found many SWFs files that it dosen't work with. These SWFs and work with the following code instead:
loadMovieNum("external.swf",0);
countdown = function(){
trace("ok");
}
countdownIt = setInterval(countdown,1000);
I really try to use that code - BUT !!! -> if I use this code the external SWF predominant, my main SWF code and all the rest of my code dosen't work (like the setInterval() timer).... I want to load the SWF like the second example and still run the setInterval() function.
I have made a menu bar and linked each separate swf file to the corresponding button. Upon testing my main movie, all the text on the main page is disappearing, the new swf file is not loading and the message 1120 error appears for all my buttons. I have checked the instance names and they match along with publish settings and folder settings. I cant understand why its not working
[Code].....
I have 2 flash files, one with an intro and the second that just has a document class file that plays out a snake game. How could i import that document flash file and make it play out on like frame 100 off my other flash file.
View 1 RepliesI am trying to get a nav button in one movie (main_nav.swf) to target a my main movie (index.swf) and load a sub nav movie (metals_subnav_infinite.swf) into it. The sub nav movie will do a similar task - loading a portfolio swf into main movie (index.swf). Here is the file breakdown of my working files:index.swf - main final movie which loads "main_nav_infinite3.swf" on startmain_nav_infinite3.swf - loads main nav "main_nav.swf" and scrolls it infinitely (infinite menu)main_nav.swf - main nav with buttons that trigger sub nav "metals_subnav_infinite.swf" to load into index.swfmetals_subnav_infinite.swf - loads sub nav "metals_subnav.swf" and scrolls it infinitelymetals_subnav.swf - sub nav with buttons that trigger "folio.swf" (have not created this file yet!) to load into "index.swf"The script I was focusing on is in main_nav.fla and it is:
metals_mc_bn.onRelease = function() {
reActivateMenu();
this.gotoAndStop(3);
[code].....
how to code this on a button
onrelease
gotoandplay(10); // i need delay here before activating the next code below//
gotoandplay(80);
the trick is.. i want the button to play frame 10 to 40 then after playing from frame 10-40 the movie stops and then play frame 80 to 100
I have a flash CS3 slideshow that loads it's content from an external .xml file. If I export the HTML it plays fine, but if I move the HTML to the site root directory (just outside the directory with the .swf file), and let dreamweaver update the links the flash slideshow will not play. my site is at: [URL] the flash with the .xml is in [URL]
View 1 RepliesI built a button in one of the movie clips in my project,
when I release this button, it goes to the 41st frame of the main timeline and continue to play until the frame 70 which has got a stop; command. till here everything's just OK. But I want this button to do something more though I don't know whether it's possible or not.
I want this button to go and play the frame number 41 in the main timeline, and then after it stopped at the frame 70 , then jump to frame 73.
I have a small flash site made up of a number of pages all on the one timeline.
The query is this. When i release a button i want the timeline to roll on for x frames (fading components out) before going to the frame that button links to (The beginning of the new page).
I have no idea what AS to use for this.
No matter where in the timeline you are, the button should fade out that area and then skip to a new one.
I am currently in the middle of making a "sniping" flash game. In the first level there are a series of moving targets which are also movie clips. Inside the movie clip there is a 7 frame animation of the target exploding. Inside that is a tween of the target moving up and down. And inside that there is a plain old button.
What I want to happen is when you click on the moving target it explodes and brings you to a new frame of the main timeline. (ex. Main Timeline frame #27) But I'm pretty sure it thinks I was to play the seven frame animation of it exploding and then go to frame 27 inside the movie clip, rather then frame 27 on the main timeline.
Here's what my AS looks like on the target (ActionScript 2.0 is what I'm using.)
on (press) {
play();
}
on (release){
gotoAndStop(27)}
So how do I make it explode and then take me to frame 27 on the main timeline?
I`m working on a main swf (Main.swf). There are many seites with many themes. On each site (Frames 1,2,3,.....25) There`s a button to get to an external .swf. If I`m in the external .swf, there is a button too, to get back (back) to the mainmovie. Now what I wanted to do is, go back from the external .swf to the Main.swf to its Frame Nr.5, when i press the button "back". With that Code below I can only get to the mainmovie 1.Frame (its Home).
//Connection to LEVEL1
back.addEventListener(MouseEvent.CLICK,mouseClick3 );
function mouseClick3(event:MouseEvent):void
{
[Code]....
What should I add the code to make it work?
I am loading swfs into a movie clip. However, the contact button is not a loaded swf any longer. It's in the main flash page. This is what I want to do. All the buttons load the external swfs except when I click on the contact button that is in the main flash page. I need to get the other buttons to load after I click the contact flash button. Below is the code for the contact button and the one under for one of the other buttons.
[Code]....
I can load the image by pressing the green button (see attached file). However, How do I UNLOAD the same image by clicking onto the image, rather than adding another button on my main flash file. This means that as soon as the image is loaded, the user can click on the same image to unload it.
View 3 RepliesI have a main swf that loads 2 external swfs. I click on button to see content of external swf #1 and see stuff. I do something that causes external swf to show other stuff (i.e. not at beginning state)
In the main swf I click on button to see content of external swf #2. External swf #1 content is made invisible and I see content of external swf stuff. NOW, if I click on button to take me back to see external swf #1, I see it's content in current state. I want to force it to start over again at frame #1 which will reset content.
However, no matter what I try, I can't seem to control which frame to go to in external swf using gotoAndplay.
[Code]...
I have an external swf (is is an intro, nade in aftereffects)..and it loads in the main timeline of the site with a preloader. Everything is ok, but, when the intro in done plating. It stops and I want do see de site. I mean from the last frame of the external swf, I want to jump to the second frame of the main timeline.
Here is the script:
stop();
var req:URLRequest = new URLRequest("intro.swf");
var loader:Loader = new Loader();
function fileLoaded(event:Event):void{
addChild(loader);
[Code] .....
How do I link a button thats embedded in frame 2 (music page timeline) to a frame in the main timeline ( frame 3= biography page)? Both pages are on the same scene with link buttons embedded in each page independent timeline.
View 1 Replies