ActionScript 1/2 :: Text File Controlling Movie Timeline?
Mar 11, 2010
I have a movie where on the main timeline stage I have placed a movie clip (Clip1) and a dynamic text field. I have a .txt document that contains a variable that will always be a number (Var1).
Currently, the dynamic text field reads Var1 and displays that number. This is great, but I want Var1 to be used in 2 places:
How can I get Clip1 to also read Var1 and, based on the number that is Var1, play a certain frame of Clip1?
I'd like it to go like this: If Var1 is <1000 then play frame1, If Var1 is =1000 and <2000 then play frame2, If Var1 is =2000 and <3000 then play frame3, and so on...
View 17 Replies
Similar Posts:
Jul 21, 2010
I have a loaded swf file that is a short animated intro I am using he addChild method. I wold like it to simply move the timeline to a label "menu" after it has played. This is the cde on my main Timeline:
stop();import flash.display.*;import flash.events.Event;import flash.media.SoundMixer;
var Xpos:Number=0;
[Code]....
View 7 Replies
Feb 19, 2009
On my main timeline I have two movie clips sitting side by side in frame1. They are called content_mc and content_mc2. Those are their respective names in the library and as instances. Now, I have a button in content_mc in which I am looking for the following behavior. When I click it, I want the timeline inside
content_mc2 to jump to frame2. MovieClip(parent).gotoAndStop(2); This code would be just dandy if I wanted to go to frame 2 of the main timeline, but I cannot find, for the life of me, how to go up one level (parent) and then specify down a new level (content_mc2). In other words, where do I put "content_mc2" in this syntax?
View 1 Replies
Nov 5, 2010
How would one on a specific frame inside a movie clip cause the main timeline to go to a certain frame label?
I know how to use gotoandstop(), but i can't seem to find a working, correct syntax variable that accesses the main timeline and not the movie clip's timeline.
View 3 Replies
Jan 4, 2012
I'm in the process of designing this site as a portfolio for my art and am in the process of creating and laying out the galleries. My idea was to create movie clip animated buttons that would react to the roll over stuff. I got that part to work the way I wanted it. But now, I can't seem to figure out how to put a "Gotoandplay" type of code on the buttons so that the timeline would jump to the appropriate frame and play. (I put an "on(release) gotoandplay" on it the way I would put it on a button but it never responds. I have a couple of buttons that work fine with a "geturl". so I thought a "gotoandplay" would work fine. If this can be figured out in a way that I can easily use it for all buttons with just the frame number needing alteration, that would be best. After you click the splashpage door jpg, there will be a piece of paper on the floor. That is a button which should trigger the animation that starts at frame 114. When clicked, the page lifts up and spread open to two pages. But it never reacts
[URL]
View 6 Replies
Nov 18, 2008
I'm trying to control the root timeline from a movie clip. On the last frame of the movie clip, I have:
MovieClip(root).gotoAndPlay (10);
which successfully brings me back to frame 10 on the main timeline. However, from here, none of the ActionScript that is on Frame 1 seems to work... the rollovers aren't working, except on those embedded in a separate movie clip.
View 2 Replies
Feb 25, 2010
But how should I adapt such to control a movieclip called mcGlider from a button on the main timeline.
btn1.addEventListener(MouseEvent.CLICK, btn1Click);
function btn1Click(evt:MouseEvent):void {
var url:String = "http://www.awebsite.com/awebpage.html";
[Code]....
View 9 Replies
Nov 13, 2010
What I am trying to achieve is have one movie clip containing a button control the timeline of another movie clip.I know how to get a button to control the timeline of it's current movie clip, however, getting a button to control the timeline of a seperate clip seems to evade me.
View 6 Replies
Nov 13, 2010
What I am trying to achieve is have one movie clip containing a button control the timeline of another movie clip. I know how to get a button to control the timeline of it's current movie clip, however, getting a button to control the timeline of a seperate clip seems to evade me.
Re: Question: AS3 Button controling timeline of movie clip.
here is the coding I am using too:
but_shows.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
function onMouseDown(event:MouseEvent):void{
_root.mainContainer.gotoAndStop(2);
}
it says that I have an error:
Symbol 'ribbon_menu', Layer 'actions', Frame 1, Line 20 1120: Access of undefined property _root.
but_shows is located in a movie clip called Ribbon_menu that is trying to go to and play x fram in a movieclip called mainContainer.
Both Ribbon_menu and mainContainer are located on the root timeline.
I wonder since the button scripting is located in Ribbon_menu and not the main timeline is the _root command confusing itself with the root of the stage, or the stage of the ribbon_menu movieclip!
View 4 Replies
Jul 2, 2003
how to create a movie where a user can control the position of the playhead on a root or mc timeline with a scrolling slider mc? for example, check out [URL] home page (flash mx movie introducing ground breaking sites nike skateboarding, eagle f-1, and cbc home delivery).
View 1 Replies
Sep 10, 2009
I have created a website on the time line. There is actionscipt contolling which frame to play via a button. Within this button is a movieclip with a fade in using alpha on its own timeline with a stop(); at the end.The problem is I only want it to play when you first see it from moving to that page from the main timeline. Currently if i move over the button it plays the movie again which i dont want to happen. I do however want to retain the over states etc for the button.
View 2 Replies
Aug 5, 2004
Ive been having problems getting buttons within a movie clip to control the main timeline and switch scenes. Ive tried everything from _root.gotoAndPlay to with(_parent) and such.
View 1 Replies
Jul 19, 2011
So I have been trying to figure out a way to control multiple clips using the same "on press" & "on release" statements located on 1st frame of main timeline. A variable is being set to a value that correlates to the name of each movie clip as an interaction occurs.Ex: user clicks from a selection of buttons & depending on the button clicked it sets clipNum = "1" through "21".What I want is to have something like the following code that will give the user the ability to click and drag the clip with code on the main timeline similar to the following:
_root["drag_" + clipNum].onPress = function () {
startDrag (_root["drag_" + clipNum]);
};
[code].....
View 2 Replies
Mar 10, 2010
I have a movie clip on the main stage- inside that movie clip is a button- I want that button to contol a function on the main timeline-
example: Button Script
closeAll_btn.addEventListener(MouseEvent.MOUSE_DOWN, goCloseAll);
function goCloseAll(e:MouseEvent):void {
****don't know what to put here to activate "closeAllOpenMovieClips" function on main stage****
}
example: Main Stage Timeline Script
function closeAllOpenMovieClips():void { trek_mc.gotoAndStop(1); lost_arts_mc.gotoAndStop(1); rain_mc.gotoAndStop(1); vintage_mc.gotoAndStop(1);}
***don't know if I need more script on Main Stage Timeline that just "function" ***
View 5 Replies
Jan 23, 2005
I load a movieclip via:
on(release){
loadMovieNum("detection.swf", 1);
}
So I load it in my current timeline on level 1. Now in the detection.swf is a button that has to control the first movie. (that loaded the swf)
I tried:
on(release){
_level0_root.nextScene();
}
Which did not work. Referencing via _root.nextScene() also, because the loaded swf has its own _root. So how can I control the first movie out of the loaded one?
View 1 Replies
Aug 26, 2009
Basically when loading dynamic text... the .txt will have a simple yes or no inside of it... nothing more nothing less.I've been trying all morning to get a movie clip to begin playing if the value is "yes", and to NOT play if the value is "no"
Basically i have a movie clip on the main time line named WHM. and im loading a dynamic text file into a dynamic text field named player1whm.
I want to be able to change the text file to yes or no on a whim, and if the value is equal to yes... i want the movie clip to begin playing as soon as it loads that value into the box. If it says no then i want that movie clip to continue doing nothing.I have already been successful at getting yes or no to load into the dynamic text box... i just cant seem to get it to control the movie clip.
View 7 Replies
Mar 16, 2011
I've got the following file reference listener on a file to upload art for display on a flash movie. However, I want this to display only at a certain size. I tried the "easy way", but this ends up sizing down my whole movie. Where should I insert the code to get the uploaded file to show on my flash movie only to a certain height and width? "chip_clip" is the empty movie clip this is being uploaded to:
var file:FileReference = new FileReference();
file.addEventListener(Event.SELECT, fileSelect);
file.addEventListener(Event.COMPLETE, fileComplete);
[Code].....
View 2 Replies
Jul 9, 2009
While creating one photo gallery I am facing one problem in controlling the Font Color, Font Size and other characteristics of a text loaded into a text field from an XML File. The name of the text field in question is �my_txt� it loads the title from the xml file attached herewith. how I can control the behavior of the text loaded in that text field.
[Code]...
View 1 Replies
Aug 19, 2004
If I have a dynamic text box with hyperlinks in it, how do I control movie objects through them? I mean is it some kinda code that I'll have to add in the <a></a> tags or some other cool s h i t?
View 1 Replies
Jul 29, 2010
So I'm trying to get sound on my flex application. Then tried to load an swf movie with only audio in it.But when it loads on init(), it loops non-stop.Here's a sample code:
[Code]...
View 1 Replies
Feb 15, 2012
Main_mc has a movie with a button movie and an animation movie. I want the button_mc to control my main_mc timeline. I want a btn when rollover play up to frame a and stop. Rollout play to end. If btn is clicked play and stop at frame a.
View 5 Replies
Feb 10, 2012
I started using Flash (for school) and I was doing an animation. It was going well until something happened. I'm not sure what, but the stage/timeline and SWF movie file were showing the same thing.....but now the SWF file doesn't display anything. I have text and image layers in my project and it shows when I play it (by hitting enter).....but when I preview it.. nothing shows. Did I accidentally change a setting...
View 9 Replies
Jan 25, 2010
Well, I have a project where I would need a XML with a % range from 0-100 to controll a timeline. The concept is to fill a bottle. So the timeline would animate from empty to full. But must be controlled with a XML number and its all in AS2...
View 18 Replies
Nov 29, 2010
I never seem to get any answers on these forums lately but surely someone can answer this. I've loaded an AS2 based SWF in to an AS3 SWF. I want to gotoAndPlay a frame in the AS2 SWF when a button is clicked thats inside the AS3 SWF.
View 2 Replies
Nov 26, 2009
if its possible to control a movieclips timeline a bit more than the simple play, stop functions.
I was hoping by pressing a button, it would make the MC's playhead not just jump to frame 20, but play to it.
So if the movieclip's timeline is on frame 60, I press a button and it scrubs all the way back to frame 20. Click another button and it scrubs to frame 40, etc..
View 3 Replies
Mar 27, 2004
I have a MC in my movie. I want to control it's properties in different frames in the main timeline. For instance
at the 1. frame change it's position
at frame 50 change it's alpha
at frame 100 change it's scale
until now I have done all this by motion tweening but I know AS is the best way.
View 3 Replies
May 15, 2009
In my externally loaded text file, I want to place a link that will control a specific movie clip in my flash timeline.Is there a way to do this?
View 3 Replies
Apr 3, 2010
i have forward/back buttons to control the timeline. what happens in the following code is that if the button is clicked while in the < or > range of frames, it gets buggy. heres the code.
[Code].....
this doesnt seem to go to the exact frame i need if i click while the current sample is still animating in. It would be much better if i could tell flash to a specific frame instead of asking flash to determine a range. that way, if a button is pressed during an animation it wont just advance one frame, it would jump to a specific frame.
I wish i could just do this:
[Code].....
i thought about creating a var that would be a string. i could then add a number to the name of that string each time the button is clicked. then i could make frame labels the name of the string. but i couldnt get my head around it. also, i didnt know how to make the button stop adding to the string name once it reach a certain value (6 in this case). or how to make it play the last sample animation if the user kept clicking the advance button at the end of the samples.
View 1 Replies
Sep 1, 2010
So im creating a site for a friend and I have placed the menu inside a movieclip so the buttons are inside the movieclip. This the script i have tried :
Code:
stop();
natural1.onRelease = function () {
[code].....
View 1 Replies
Nov 11, 2009
This time I'm attempting to make a timeline, that should control what frame of a movie clip on the root timeline is displayed. So relevant to where the user slides the slider bar, the appropriate information will be displayed inside that movie clip. Now I really have NO idea where to start the coding that will attempt to convert the slider's location on its on slider bar, to what frame is shown on that movieclip.
[Code]...
View 28 Replies