ActionScript 3.0 :: Loading Swf's Into Specific Frames?
Feb 2, 2010
I'm having a some trouble with loading an SWF into my main SWF. I have a main SWF with 4 frames. I want to click two buttons that will then load two SWF's into Frame 2 and Frame 3. Below is the script I wrote for the buttons. The earlywork_btn needs to load RColeman_EarlyWork.swf into frame 2. This swf is a slide show. The currentwork_btn needs to load RColemna_CurrentWork.swf into frame 3.
HERE IS MY SCRIPTS FOR MY BUTTONS:
stop();
function onbiographybuttonClick(evt:MouseEvent):void {
gotoAndStop("1");
[code]....
And in Frame 2 I have this script to load RColeman_EarlyWork.swf. It works, however, once it loads then it is in my enitre main swf file, basically each time I click a button it is ontop of the content in the other frames. How do I make it just stay in Frame 2? Also, I can only load this one swf file, not the other one into FRAME 3.
HERE IS MY SCRIPT TO LOAD THE SWF FILES:
var ldr:Loader = new Loader();
var url:String = "RColeman_EarlyWork.swf";
var urlReq:URLRequest = new URLRequest(url);
ldr.load(urlReq);
addChild(ldr);
View 1 Replies
Similar Posts:
Dec 5, 2004
cutting to the chase, Basically im loading a movie externally using this code...
Code:
on (release) {
if (S_Init == Number(S_Init)) {
loadMovieNum("s_menu.swf", _root.S_Init);
[Code].....
View 4 Replies
Dec 5, 2004
cutting to the chase, Basically im loading a movie externally using this code...
Code:
on (release) {
if (S_Init == Number(S_Init)) {
[code].....
View 4 Replies
Aug 10, 2010
how to add an image to a specific frame?
I am dynamically loading images onto the stage but I want each image to be loaded onto separate frames.
View 7 Replies
Sep 15, 2010
how do i export specific frames not all frame. ex: if flash has 1 to 200 frames. here i want to export 51 to 150 frames as a movie. if there is any command or plugin to export movie like this.
View 0 Replies
Jan 30, 2010
Basically, I have my main set of menu buttons for navigating my site. For argument sake let's call them:
menu1, menu2, menu3, menu 4 etc. , where menu1 takes you to scene1, menu2 to scene2 etc.
Each scene morhphs into the next, so instead of simply having gotoAndStop("scene 1"), I would like the movie to play until it reaches the desired scene. I guess one way of thinking of it, is that it's a bit like coverflow in itunes.
That's stage one of the question - if I can at least get that far I'd be happy. But to add one level of complexity, I would love it to also play in reverse if you're going say from scene4 to scene1. Again, similar to cover flow.
View 1 Replies
Aug 6, 2009
My actionscript plays through out the entire animation. Is there a way to have it play on specific frames?[code]...
View 2 Replies
Aug 8, 2010
I have created a flash website and I would like to create links to specific frames of an external swf in another html page. I have researched flashvar a little bit and I have also been told that I am going to need to do some dynamic coding.
View 1 Replies
Sep 16, 2009
I have a need to add an object to the display list at a specified frame number. Something equivalent to addChildAtFrame(mc, 100).
I know I could achieved this by creating a layer within the fla, making a new frame at the desired location, and placing a blank movieclip within the frame in order to have a target displayObject to addChild to but I would prefer to do this via code.
Is there anyway to accomplish this dynamically?
View 2 Replies
Apr 18, 2011
I am building a menu.. When I rollover the mouse over the menu, it opens sub menu Something like that...
(when rollover btn1)
(open submenu1)
(when rollover btn2)
[code].....
View 3 Replies
Jan 28, 2009
When the value of _root.mc1._currentframe is 10 I want the value of _root.mc2._currentframe to be written (sent or changed) to a variable which I can use in mc1. So I want to be able to use this variable in different clips but I do not want it to be changed until the playhead in mc1 is in frame 10. However I do want the variable to be valid even if the playhead is not in frame 10. This should be so simple.
This is what I have in mc1:
Code: Select allon (press) {
press = true;
if (press == true) {
[Code]....
View 1 Replies
Mar 23, 2009
I have a simple animation that displays some text, and swaps out for a new one using FlashEff effects. It's all very simple, with each section containing only two dynamic text boxes and a background image along one timeline. At the end, I use an AS to loop. What I'd like, to impart some sense of variety, is for when the movie starts to actually begin at any one of the following frames: 2, 137, 329, 489, 618 or 750. It plays through to the end, and then goes to frame 2 to play through them all. In effect, just choosing a random start point for the whole cycle.
I can't get a handle on what AS to put in frame 1 that will select from THAT SET of random numbers.
Halp!
View 1 Replies
Jan 19, 2006
I am trying to work out printing from Flash. I have seen that to print a frame you make it's frame label '#p'. This however always prints each frame labelled '#p' on a print command.
I was wondering if there is a way to print specific frames depending on what the user has entered. For instance pressing one button prints one hidden frame and pressing another button prints a different hidden frame.
The print command im am using is : print(this,"bmax");
View 3 Replies
Jul 1, 2009
I'm using Flash CS3 and AC2... I have a button on my main TL and I want to go back a few frames and play a MC at a specific frame when hit.
View 3 Replies
Sep 27, 2009
I am using Flex Builder 2 to create classes, leaving my FLA file void of scripts. I wish to extend a MovieClip class so that my new class would dispatch a specific event everytime it reaches the last frame. I could do this using an ENTER_FRAME listener which would launch a function call to see if the current frame is actually the last one, but I don't wish to do that and drop lag down my users' throat. I would rather prefer adding manually "endSequence()" to all of the animation sequences using Flash... which I really don't want to be doing as it would make updating very bothersome. Is there a way to add a script to a frame programmatically so I don't have to use Flash to add bits of script to the last frame of each of my concerned MovieClips?
View 2 Replies
May 22, 2010
Are there anyway to get number of frames in a specific scene? There's a totalFrames property of MovieClip class, but that's the total frames of all scenes.
View 3 Replies
Jul 8, 2010
I want to use this on multiple frames however, when I do so I get errors.
The text frame is named --> theText
1 stop();
2 var str:String = "Sample text!";
3
4 var sInt = setInterval(writeIt,20);
[Code]....
How can use this function on other frames? Also I have considered that it might be some kind class I need to import, I don't know, I am still new AS and I and more familiar with AS2.
View 9 Replies
Nov 4, 2011
I have a class called 'Main' that runs as document class but the class i only want to work on a few frames. I can't use MyClass:Classname = new Classname(); because it doesn't work the same.
What happened with it being document class is that all my game functions happened on all of the frames when i want the games functions to happen on certain frames. So my question is, how do you get a class to work the same a document class for specific frames?
Is there a way to import the class 'Main' that will work the same as document class using MyClass:Main = new Main();? Because from my knowledge that is for objects.
View 7 Replies
Sep 27, 2009
I am using Flex Builder 2 to create classes, leaving my FLA file void of scripts.
I wish to extend a MovieClip class so that my new class would dispatch a specific event everytime it reaches the last frame.
I could do this using an ENTER_FRAME listener which would launch a function call to see if the current frame is actually the last one, but I don't wish to do that and drop lag down my users' throat. I would rather prefer adding manually "endSequence()" to all of the animation sequences using Flash... which I really don't want to be doing as it would make updating very bothersome.
Is there a way to add a script to a frame programmatically so I don't have to use Flash to add bits of script to the last frame of each of my concerned MovieClips?
View 1 Replies
Aug 15, 2010
Lets say I have 50 frames and I want to replay a period of frames from frame 40 to 50, what action script should we write at frame 50?
View 1 Replies
Mar 2, 2011
I want to show text between specific frames. [code]I want it to be together with fla file, not in an external .xml file...
View 2 Replies
May 17, 2011
I want to play a movieclip between some specific frames. For example, if the user puts the cursor over a button, it will play from frame 1 and stop at frame 27, when the user roll the cursor out of the button, it will play from frame 28 to 45.
I've tried something like this but of course it didn't work...
gotoAndPlay(1 -27);
View 2 Replies
Mar 3, 2009
i'm trying to create a simple "slide show" where i am able to control the speed using a simple setInterval function. where i am running into trouble is that on a few of the frames i have some content (flv's etc...) that needs to play through before moving on to the next frame. so i need to stop at these frames while they play through and then continue (using the same interval set at the beginning) once they complete. i need this to be as flexible as possible as there will be alot of changes etc... i basically have it set up so far like this:
//main "wait"
var xInterval:Number;
xInterval = setInterval(nxtFrame, 2000);
function nxtFrame():Void
[Code].....
i'd also like to be able to have all of my script on the first frame.
View 6 Replies
Oct 8, 2009
I'm looking for a simple way to have a button do 2 things:1. Play main timeline a specific amount of frameshen2. Goto a specific spot in the main timelineHow do I specify how many frames to play before the second bit happens?So far I'm trying to get something like this to do it but what to add in play()
Code:
Main.onRelease = function() {
play();
[code]....
View 1 Replies
Jan 8, 2010
I want to preload all of the voiceover swf files before a lesson starts so that they are instantly available when each frame / page that incorporates a voiceover is first visited.
View 4 Replies
Feb 2, 2012
In the live preview mode, buttons/frames enabled I can navigate between scenes to specific labelled frames.However, when I view the 'movie' I can not navigate between scenes at all.My frames are all labelled.
View 1 Replies
Oct 28, 2010
I have 4 movieclips that are animated around the stage and a basket movieclip button as the home button in the far left corner. When I click the basket I would like to have actionscript animate those 4 movieclips into the basket with an acceleration in 20 frames. This I can easily do without acceleration as I can find out the current location of the movie clips, find out the distance between it and the basket and then divide it by the number of frames I need, and then use that as the speed. But to be honest I am not sure where to begin when I include acceleration. I have dabbled with acceleration in the past but not with a specific number of frames in mind.
View 2 Replies
Jul 10, 2010
I have been having some trouble with a movie clip basically designed to act as a button for a store front for a website.This movie clip has, stored as the front of the movie (i.e. before you click in to edit the movie) the following code:
on(rollOver){
gotoAndPlay("Over");
}[code]..........
This gives the movie the hover over and out effect and animates the button so as once pressed the button expands to give a 'Product Details' view.However, when clicked the info shows up as it should but the hit area which I put into the Movie Clip is still on the info area so none of the contents on this new window are accessible and when the cursor leaves the designated info area the movie clip returns to its first stage as it would appear at the start of the animation.Is there any simple way to disable the HitArea on specific frames within a Movie Clip?
View 16 Replies
May 31, 2010
I guess its some kind of random array.. but i dont know how to form it, need it for game(dont want same frames repeat its stupid ) And only specific frame numbers(i have motions between specific frame numbers).
View 1 Replies
Mar 8, 2012
I'm actually creating a pretty simple banner that needs to stay under 40k size. I'm trying to load and unload an external .swf to my main swf file. So far, I only managed to load my external .swf, without finding a way to make it appear and disappear at specific frames (the external .swf shows up directly at frame 1, then when the animation loops over, it stacks over and over).
I read some things about onEnterFrame and counters but still wasn't able to solve my issue.
Here's my actual code. It makes the "horse.swf" file (located in the same folder as my main swf) fades in into my main swf after it has been loaded.
By the way, I used The LoaderMax system from greensock. because it seemed lighter and easier to manage than the native Adobe Loader one.
Code:
import com.greensock.*;
import com.greensock.loading.*;
import com.greensock.events.LoaderEvent;
[Code].....
View 6 Replies