ActionScript 1/2 :: LoadMovie "file Name" = Timeline Frame Number?
Mar 1, 2012
I have a simple slideshow that has 70 slides. Each slide is on a frame in the main timeline and I have the following AS 2:
loadMovie("Data/5.swf", "container");
stop();
There will be 70 SWF files in that Data folder. Instead of having to manually type in 1, 2, 3, 4, 5...in that "Data/5.swf" attribute, is there a way to just tell it to load the SWF number based on the current frame? Frame 1 in the timeline loads 1.swf, frame 2 loads 2.swf, etc.
That way I can just put the same AS on each frame instead of having to manually go in and type each one.
View 3 Replies
Similar Posts:
Jun 19, 2007
My problem is :
A.swf : 5 frame (ie, page1, page2, page3, page4, page5)
B.swf : 2 frame (ie, page6, page7)
When click on back button in the page6(B.swf), wish to jump back to page5(A.swf) instead of page1 as normally
Script using :
back_btn.onRelease = function() {
loadMovie("A.swf",0);
};
B.swf jump to A.swf, but go to frame 5 instead of frame 1 in A.swf.
What should i do for the script to achieve what i mentioned above?
View 5 Replies
Nov 22, 2011
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
Dec 23, 2007
Here i'm actually not talking about a problem but rather wanted to raise a discussion thread. (Kirupa you may also move this thread to some other more relevant section. Few of my good colleagues till prefer writing code on the Flash timeline, on the frames (code as bigh as 100-150 lines), rather than using external AS files, when rest of the world has reached to AS 3.0 which is close to Java (OOP).I'm just wanted to know the big benefit of writing the code on the frames. I know that it is highly un-manageable and I have personally faced many instances of code not initializing, or behaving strange on a frame.
View 3 Replies
Jul 14, 2009
i want to load and play a swf file form a specific frame number
So when a swf finishes i want to load another swf file from frame number 6430.
Is it possible or not
View 3 Replies
Jan 21, 2010
How do i tell the playhead to gotoAndStop(); on frame 2 of the main timeline from a class file?....I'm trying to oop this program.
View 2 Replies
Aug 16, 2010
i have a main .swf that automatically loads a second .swf on its last frame (via loadMovie.) it loads this second .swf to level 0 (replacing itself).
when the second .swf reaches it's own last frame it loads the main .swf into it, beginning the whole process again. here's the thing...
i only want this to happen 3 times. in other words, the third time that the second .swf is loaded into the main .swf. i want the whole thing to stop-freeze-on the last frame of the second .swf.
View 2 Replies
Mar 16, 2006
taken from this link:
[Code]....
My problem: I am attaching variable number of MCs dynamically(not in the library), and i have to do so using flash6 or older. How can i use then loadMovie+onClipEvent handler to invoke something, if i am attaching MCs dynamically, and onClipEvent works only on MCs attached on the Stage(actions "on" those mcs, not "inside" them). Probably using classes. Any other option? and if not, can anybody guide me through assigning such class to such mc? EDIT: Ok, i also have done following:
[Code]....
and although the movieClip IS in library, and it DOES have MovieClip class assigned, onData event handler is NOT triggered and nothing is traced. Can the reason be "attachMovie" function?
EDIT2: aha. well, again it happened that attachMovie's methods are not yet initialized, so it was not yet "the proper time to assign" handler onData on those MCs. [only sen knows why ]. So that even trace(mc.stop()); at this point traces undefined, where it should trace [type Function], since stop is MovieClip's class method. Stupidstupidstupid.. relax...
View 3 Replies
Mar 16, 2007
I simply want to assign a variable to the current frame of the main timeline (not movieclip timeline) I already know about _currentframe and it doesn't help in this case.
View 4 Replies
Apr 26, 2011
I am in the learning process. Working with FlashCS5 and AS3. if the issue appears to be too simple for you. Placed a movieclip(mcassessJohn) on the main timeline and moved to the frame labelled "johnFeedback" in the movieclip timeline using the following actionscript code.
[Code]...
View 1 Replies
Oct 2, 2011
I have 3 layers in the timeline, and I want to make a new layer, and then use the new layer to be my first frame (like a startpage).
View 2 Replies
Nov 17, 2009
I have tried this a dozen different ways and I really am at my wits end.
I have a presentation that works like a powerpoint. Everything is working as it should, except one part. I have a movie clip with an instance named slides, and I want to actively display which frame number you are in this move clip.
I have tried more than one why but I see no reason why this should not work:
var frameNum:Number = this.slides.currentFrame;
this.frameText.text = "P�quina " + frameNum + " de 173";
It appears to work at first, but does not update when I navigate the slides. It constantly says 1. Before I just added a function to the back and next buttons to frameNum++ and frameNum--, but after I created the Menu I would prefer it to automatically detect what frame it is on.
View 4 Replies
Jan 30, 2012
I would like to store the value from combobox or text area-MovieClip in MyClass and then I'd like to read this from another frame in *.fla file only this :) have you another code? what can I write in frame 2 Miclass and frame 3
View 1 Replies
Aug 25, 2005
i have a problem, i want to go to frame 10 on movie.swf when using loadmovie,?oadMovie("movie.swf","movie_mc");
View 2 Replies
Oct 11, 2009
I created the following AS for a particular frame
Code:
cnx.addEventListener(CNXConnection.DIGITAL, onDigital_10);
function onDigital_10(e:DigitalEvent)
{
[code]....
While debugging everything works properly if I'm testing that frame.But, pushing a button in another frame, I get the following error:
TypeError: Error #1009: Cannot access a property or method of a null object reference at "frame number:raw number"
I'm quite sure that the problem is that the variable e.Join changes its corresponding e.Value pushing a particular button in another frame (as must be). Any ideas how to link that information to the frame that create the error?
View 1 Replies
Jun 30, 2004
I am trying to use this if statement with a frame label instead of a frame number. I believe that _currentframe is looking for a number only. Is there a different command that looks at frame labels instead of frame numbers?
View 1 Replies
Jun 20, 2007
is it possible to find the frame number of frame label with AS if a button is rolled over, the timeline jumps to a label - which plays a set of 3D rendered frames to 'raise' and element, once a user rolls out of the 'button' area the button is meant to 'lower' - which can be done by simply playing backwards to the previous label.
View 5 Replies
Jun 30, 2004
I am trying to use this if statement with a frame label instead of a frame number. I believe that _currentframe is looking for a number only. Is there a different command that looks at frame labels instead of frame numbers?
View 1 Replies
Feb 23, 2009
I have a created a menu and the pages are on a seperate swf file which is to be loaded onto the top of.
firstly i used this code but it still only went to frame 1 of the laoded movie:
on (release) {
loadMovie("a2.swf", 1);
_level1.gotoAndStop(15);
}
then i found this code. But i cant get it to work correctly. does it go on frame one of the movie or on the button instance?
[Code]...
View 1 Replies
Jul 17, 2009
I want to load a movie and have it start on a specific frame within that movie instead of starting on frame one. The code I have now is this:
stop();
loadMovieNum("mc2.swf", 2);
I want it to start on the frame label in the movie called "in" instead of on frame one. How the hell do I do this, I looked everywhere
View 1 Replies
Apr 28, 2004
I have run into a snag! I cant target a specific frame after loading swf file.I m creating a continuous slideshow with five separate swfs (movie01.swf , movie02.swf... etc) which load sequentially into one empty movieclip (named - mainMCholder) on the root timeline I control the loaded swfs with 2 buttons next and previous.These buttons simply move up or down a frame (nextFrame/prevFrame) .if I load movie02. swf into my empty movieclip and I m on frame 1 (of 10) and choose to back up to the end of movie01.swf (which would be frame 10 of movie01.swf),I end up on frame 1 of movie01.swf. Unsure why I cant move to last frame of a loaded movie?
//This is the code I've used
loadMovie( movie01.swf, "mainMCholder");
mainMCholder.gotoAndPlay("lastframe");
View 2 Replies
Nov 5, 2004
I know there's been a million "how do I load a movie and than jump to a specific frame" thead. Well all of those have been helpful :: HOWEVER I wouldn't be posting because I can't seem to get my script to run successfully First the background I have a nav. menu made up of seprate movies clips :: inside each movie clip is four buttons :: these buttons are shown using a rollOver, rollOut dealy
anyway when you click on one of the buttons it calls "student.swf" to load into an empty MC called content.I've tried everything :: What happens is the button will load the MC but will sit on the first frame and do nothing :: the movie clip "student.swf" is not that big so I doubt I'm waiting for it to load.
[Code]...
View 5 Replies
Jun 11, 2006
is there an action script code that enables the timeline to automatically enter a frame label on entering a certain frame.
View 1 Replies
Jul 16, 2010
i'd like to control MovieClip timeline witch contain several DisplayObject (like Sprite, Button, ...) these DisplayObject have Motion (AnimatorFactory). How can i do seek frame-by-frame the MovieClip Timeline and use the currentFrame to control all Motion child.
[Code]....
View 18 Replies
May 26, 2010
I'm still struggling with going from a loaded swf to the next frame in my timeline, where a new swf file will be loaded.Ths is my current code which is trying to move onto the next frame in my timeline is located at the end Frame of a 10 second animation:
[Code]...
View 3 Replies
Feb 26, 2010
how do you do the following
A movieclip is playing...
When it reaches frame 20, it goes back and plays at frame 5. Then it keeps doing this. To me this is harder than it looks
View 6 Replies
Mar 28, 2011
If I take a swf, and run it through swfdump
swfdump.exe -abc file.swf > ABC.txt
One the first run I may get some output in ABC.txt like this
ObjectConfig.as$60
And on a subsequent run of the same SWF get a different output
ObjectConfig.as$61
What is the meaning of the number after the $ ?
View 1 Replies
Aug 22, 2009
I tried this code but doesnt work properly, anyone has a solution? i need to load different swfs in the same MC depending on the frame, i have placed the simple loadmovie code in each frame with the different swfs and it works but i would prefer to keep the code in 1 frame. This would be even better if using labels instead of frames.
[Code]..
View 3 Replies
Mar 13, 2004
Anyway, I'm using loadMovie() and then trying to go to a specific frame within it:
[Code]...
When I replace "currentFrame" with a number, say 10, it doesn't work either. This should be so simple but I just don't get it.
View 3 Replies
Dec 14, 2004
I know. This topic has been addressed several times in various posts. And I've read and tried all of them, however nothing seems to work. I'm not sure if due to the circumstances...I'll explain.
I have made 2 files: main.swf and products.swf. A button in main.swf has the following code:
on (release){
_root.loadMovie("products.swf");
}
This works great, but what I really want to do is go to frame label "Range" in products.swf. A note of explanation: I'm not trying to load products.swf into a container movieclip, I want to replace main.swf with products.swf and go to Range label.
View 2 Replies