GotoandPlay - Buttons Vs. Frame Actions
Does gotoandPlay() behave diff. if it is being used as a button action vs. being used as a simple frame action?
When I use it (as in the example below) directly from a frame as a frame action it seems to behave the same as gotoandStop()
example:
I have a movie clip with 10 frames and 2 layers.
Layer 1 has a stop() action in frames 1 and 10.
Layer 2 is a shape tween.
When I say movieclip.gotoandPlay(2) from a frame action it doesn't play... it goes there and stops. But if I call it from a button
on(release){
movieclip.gotoandPlay(2);
}
It works just fine.
The main time line is one frame. and the only scripts in the movie are the goto action(s) and the 2 stop scripts in the movieclip.
Any ideas? I don't know what else to try. Am I missing something simple?
any suggestions would be greatly appreciated.
thanks
--Mizary
(My 1st post!!)
FlashKit > Flash Help > Flash ActionScript
Posted on: 09-05-2001, 01:59 PM
View Complete Forum Thread with Replies
Sponsored Links:
The Actions On These Buttons Are Links(var Li, How To Put A GotoAndPlay Action To It?
the actions on these buttons are link (var link = new Array(7), how to put a gotoAndPlay action to each button? please help me, this one I don't know! Thanks
var names = new Array(7)
names[1] = "home"
names[2] = "portofolio"
names[3] = "download"
names[4] = "graphic"
names[5] = "contact"
names[6] = "hosting"
var link = new Array(7)
url1="http://www............";
url2="http://www............";
url3="http://www............";
url4="http://www............";
url5="http://www............";
url6="http://www............";
for(i=1;i<=6;i++){
clip.duplicateMovieClip("clip"+(i+0), +i)
height = _root.clip._height + 2
_root["clip"+(i+0)]._y = _root.clip._y +height * i
_root["clip"+(i+0)]._alpha = 75
_root["clip"+(i+0)].names = names[i];
_root["clip"+i].link = _root["url"+i];
_root["clip"+i].onPress = function() {
getURL(this.link);
};
}
_root["clip"+(i+1)]._alpha = 75
_root["clip"+(i+1)].name = names[i];
_root.clip._visible = false
stop()
View Replies !
View Related
Buttons Vs Frame Actions - Which Has Precedence
I placed timing actions in each frame to cause the movie to pause five seconds and then play the next frame.
Then I decided to install a pause, fast forward, next frame and return button.
But the buttons seem to upset the normal flow of the frame actions and the frames are played out of sequence and jump all over the place.
I first tried on release, gotoAndStop. Then thought the Stop was the problem, so I tried gotoAndPlay for my buttons. For the fast forward I used gotoAndPlay (_currentframe + 3)
Are there rules of precedence going on here? Anyone. For anyone answering, just a simple,
yes, I have done it, your code must be wrong would be sufficient or
no, there are always conflicts when button actions interupting frame actions of this type are put together.
Many thanks for anyone who answers.
View Replies !
View Related
Buttons With Links Added In Actions Frame
I am trying to set up my site using buttons with instance names instead of adding the code to the buttons themselves, as the newer actionscript is supposed to be done.
However, I am finding that it only works if I put the code on the same frame as the buttons themselves (in the actions layer). I thought I could put all the code for the buttons at the beginning? Even if the code is one frame away, it doesn't seem to access it.
This is my code for my buttons - they are on several pages of a diary, which accesses some dynamic text and has next and back buttons. On 'DIARY1' frame, the first button (btn_diary1next) works, but the ones I'm trying to reference for the next frame (DIARY2) don't work. I've also tried it without the "_root" there, but that doesn't seem to make a difference. What could the problem be?
stop();
myText.load("text/article_diary1.txt");
//script for next and back buttons on diary
btn_diary1next.onRelease = function(){
gotoAndPlay("DIARY2");
}
//test
btn_diary2next.onRelease = function(){
_root.gotoAndPlay("DIARY3");
};
btn_diary2back.onRelease = function(){
_root.gotoAndPlay("DIARY1");
}
View Replies !
View Related
Flash MX: Controlling Frame Actions W/ Buttons Embeded In MCs
Can we still use Button Actions to control Scene navigation? Example:
on (release) {
gotoAndStop("1,1");
}
I have an actionscript controling an MC. The MC is a Horizontal Scroller that is made up of buttons. The buttons in the MC have the above code. When I play the movie, nothing but the rollover performs. The action on the buttons do not work properly.
This is Flash MX related.
thanks!
View Replies !
View Related
Actions On The Main Page..do They Affect Actions On Movie Buttons?
ON the home page I've created, the buttons I used with the code in my previous thread ("two questions about HTML publishing and buttons"), I added an on rollover action to the actions layer of the main timeline (not the movie button timeline) so that on rollover, a picture would change according to the button that was rolled over. I did this for all three buttons. The rollover action works great, but now the links don't work in either the html OR the swf version. Would the added action disable the movie-clip button actions? Here's the added main timeline code, edited for space: photobtn_mc.onRollOver = function() {
gotoAndStop(2);
photobtn_mc.onRollOut = function() {
gotoAndStop(1); ( Again, help is greatly appreciated!)
View Replies !
View Related
Refreshing Actions When You GotoAndPlay
I was wondering if there's an easy way to refresh the actions when you go to a new frame or scene, particularly ending all the loops/movie clips left over in earlier scenes?
I have a program where items spawn at the top and come down, but at the end I want to go to the next scene and those items will stop spawning. I'd expect them to stop (since I don't carry the code over), but it still stores it and continues the loops.
I'm a bit new to this, any help would be much appreciated, thanks!
View Replies !
View Related
[F8] How To Use Two GotoAndPlay Actions With One Button Press?
Hi,
Does anyone know how to use two gotoAndPlay actions when a button is pressed?
E.g. when the user presses a button, I want it to play the roll-over animation (Frames 1 - 51) THEN play the down animation (Frames 52-70)! Heres what Ive got so far, though at the moment it just skips straight to the "_down" part!
Code:
btnHitPhysics_mc.onRelease= function(){
Physics_mc.gotoAndPlay("_over");
Physics_mc.gotoAndPlay("_down");
}
btnHitPhysics_mc.enabled=false;
}
This is the code of my rollover and rollout actions on the same button, which might be interferring:
Code:
btnHitPhysics_mc.onRollOver = function(){
if(Physics_mc. _currentframe > 51){
Physics_mc.gotoAndPlay(102 - Physics_mc. _currentframe);
}
else{
Physics_mc.gotoAndPlay("_over");
}
}
btnHitPhysics_mc.onRollOut = function(){
if(Physics_mc. _currentframe < 51){
Physics_mc.gotoAndPlay(102 - Physics_mc. _currentframe);
}
else{
Physics_mc.gotoAndPlay("_out");
}
}
Simply repeating the over animation in the down section is not really possible due to large file size.
Many Thanks, Ben.
View Replies !
View Related
GotoAndPlay(frame) Messing Up If Frame Is The Current Frame
I have a bug with my buttons and I am trying to figure out how to fix them. I have about 5 different buttons that will take me to different places on my website (http://www.usu.edu/drc)(don't judge me on design, I am not the greatest web designer)
Anyway, if I click on the students button it will load the students swf and take me to that frame in my mc. If I am already in the students frame, it loads the next frame in my mc instead doing nothing, which is what I want it to do. Anybody know why this is?
Now to fix the problem. I am fairly new to AS and was hardcoding my frames, but as I add frames and move things around, I have to go in and change the frame numbers, hello frame labels. Well, I now have the different frames labeled but I need to check if _currentFrame is equal to my frame label. I don't know how to do this.
What I was thinking is something like this:
if(_currentFrame.name == "students"){ don't do anything }
I don't know if this would work or if this is even the right syntax. Anybody have an idea on this one? Thanks for the help.
Jason
View Replies !
View Related
Frame Actions Vs Object Actions
In preparation for AS3 which no longer supports object actions, I am on the process of converting flash movies created with Object actions in AS2 to Frame actions. While I understand some valid reasons for switching to Frame actions, I am discovering that converting button and clip actions to Frame actions is a very tedious process and so far, more than half the files I have tried to convert do not work. Having worked with Flash since version 3, I know about timelines, targeting and variable scope but this whole conversion process is driving me nuts! Is there a place that I can go to or tutorials available that teach how to attack this conversion? What are the main guidelines in converting from Object to Frame Actions? I have looked in the CS3 Help (from the program or Adobe online) and I have not found anything to guide me. Am I the only one experiencing this? Thanks for your help.
Yvan
View Replies !
View Related
Object Created In A Frame's Actions Telling Parent Frame To Delete It?
I've got an object (an instantiation of my own class that extends Sprite) being created in the actions for a frame, like this:
Code:
import Scripts.CFoobar;
var foobar:CFoobar = new CFoobar();
addChild(foobar);
stop();
CFoobar then creates and manages some buttons, etc. At a certain point, CFoobar knows it's time has come, and it wants to be deleted, and have the frame go to another frame.
What's the best way to have it do this?
View Replies !
View Related
[CS3] GotoAndPlay Exeption (example: If MC1 Frame 30 Is Loaded, Play MC2 Frame 5)
Hi, for a long time i've been struggling to achieve this effect, that is an action script that would allow me to make an exeption. i playes with variables and stuff but i never got it right:/
i have a button, and i have an action assigned to it:
menubutton2.onRelease = function():Void {
content2.gotoAndPlay(2);
IF content3 is on frame 10, i want it to play content3 frame 15,
IF content3 is on frame 1, i dont want it to do anything with content3
};
If only AS could be that easy....
if anyone could help me with this one i would feel relieved... thanks in advance
View Replies !
View Related
Buttons Whos Actions Depend On States Of Other Buttons -HOW?
Hi,
I’ve made a 3D animation as a background to my homepage, and have imported it into Flash CS3 as a series of still TIFF images (one image on each frame).
Now I am looking to control this animation using a series of 9 buttons. At the moment each button does the following:
Button1: Play frames 01 – 20. Stop.
Button2: Play frames 21 – 30. Stop.
Button3: Play frames 31 – 40. Stop.
…etc.
However, I want to make each button’s action dependant on the states of the other buttons:
When the user presses any of the 8 buttons other than the one that is currently engaged, I want the animation relating to the button that is currently engaged to be played in reverse, and then the animation belonging to the button that has just been pressed to be played!
For example, if Button 1 has been pressed, then the user presses Button 2, I want frames 20 – 01 and then frames 21 – 30 to be played. Another example; Button 3 is engaged, user presses Button 1 – frames 40 – 31 should be played and then frames 01 – 20.
If anyone could help me with the ActionScript to perform this (ideally AS3 but AS2 is fine) then I would be extremely, extremely grateful.
Thanks in advance for any comments.
Ben.
View Replies !
View Related
Buttons Whos Actions Depend On States Of Other Buttons -HOW?
Hi,
I’ve made a 3D animation as a background to my homepage, and have imported it into Flash CS3 as a series of still TIFF images (one image on each frame).
Now I am looking to control this animation using a series of 9 buttons. At the moment each button does the following:
Button1: Play frames 01 – 20. Stop.
Button2: Play frames 21 – 30. Stop.
Button3: Play frames 31 – 40. Stop.
…etc.
However, I want to make each button’s action dependant on the states of the other buttons:
When the user presses any of the 8 buttons other than the one that is currently engaged, I want the animation relating to the button that is currently engaged to be played in reverse, and then the animation belonging to the button that has just been pressed to be played!
For example, if Button 1 has been pressed, then the user presses Button 2, I want frames 20 – 01 and then frames 21 – 30 to be played. Another example; Button 3 is engaged, user presses Button 1 – frames 40 – 31 should be played and then frames 01 – 20.
If anyone could help me with the ActionScript to perform this (ideally AS3 but AS2 is fine) then I would be extremely, extremely grateful.
Thanks in advance for any comments.
Ben.
View Replies !
View Related
GotoAndPlay (Frame WHAT?)
Hey gang,
I can't seem to make a movie jump from one point to another using a gotoAndPlay("Frame Label") -- The particular frame label I'm trying to jump to is within a movie that is itself a nested movie. Can a gotoAndPlay command with a frame label jump to the frame no matter where it is, or do I need additional actionscript to make it go up two levels from the main stage? HELP!!!
Thanks
Ben
View Replies !
View Related
GotoAndPlay A Frame Of Another MC
when i click on a button on the main stage.. i want to play frame 5 of a movieclip, i know this must be soooo easy, but i'm doing smthing wrong :s the name of the movieclip is math.
this is my code:
on (press) {
_root.math.gotoAndPlay(5);
}
is it correct??
pls help! thx
View Replies !
View Related
Gotoandplay Some Frame Before Going Somewhere
hello
each x=frame, a=frame, b=frame, c=frame d= frame .....
X A X X X X X B X X X X X C X C* X X X D X D* X X X E X X X
on my frame A
i have 3 buttons
when i click on the button c i'd like him to play the frames from A to B then go to frame C => C* without playing the frames xxx between b and c
For the button D i'd like him to play A ==> B then D => D*
how can i make some buttons play the same frames after the A then move somewhere else after playing those X frames between A and B
thx
View Replies !
View Related
Gotoandplay ( Frame-given-by-URL)
I'm just trying to call the same animation
but give at each time a different start position...
So i just want to make a gotoandplay(frameVar)
where "frameVar" is given to the animation through url or other...
i've test with a file :
"data.txt" containing "beginFrame=10"
and in the animation :
LoadVariableNum (data.txt, 0); gotoandplay (beginFrame);
dont works ...
i've try with url : http://www.test.com/myfile.html?beginFrame=10
dont works too...
then i try to modify <param> and <embed> in the html file ...
like src=test.swf?beginFrame="10"
don't works any more...
Please help ! thanks ...
View Replies !
View Related
Please Help Me GotoAndPlay(frame)
Hello,
Sorry for probably a basic problem, I'm new to this!
In my movie at frame 100 is a symbol which contains 15 large images which fade into each other by clicking an arrow. Else where in the movie I have a thumbnail gallery which I want to link each small thumbnail to it's matching larger image.
I've tried naming each frame of each large image and then in the code typing in the frame name like this (this is linking to the first frame containing the first image):
on (release) {
_root.gotoAndPlay(icsaw01);
}
But nothing happens.
Then I tried making the link the for the frame number in the movie (ie frame 100) and it does go straight to the begining of that symbol.
on (release) {
_root.gotoAndPlay(100);
}
BUT...I want each thumbnail to link to the correct large image and not just to the beginning of the whole lot. SO...what am I doing wrong? What could I be doing wrong?
Your help is greatly appreciated on this!!!
View Replies !
View Related
GotoAndPlay Frame
I have 2 frames on root, frame 1 is for preload, frame 2 is the main program. Inside main frame I have 12 buttons and the 12 frames content inside of mc_contents.
the codes for each button
on (release) {
_root.mc_contents.gotoAndStop(1); // 1-12 for each buttons
}
at first, it work fine with just main frame on frame 1, but when I add preload frame before main frame, it not display anything when button is cliked. Any suggestion?
Thanks
View Replies !
View Related
GotoAndPlay From Frame
Isn't it possible to use the gotoAndPlay function from frameaction?
I've got a movieclip on the stage with a stop action i frame 1 and an animation from frame 2-10. When I write:
test_mc.gotoAndPlay(2)
in the frame action nothing happens. If I put the action on a button it works fine, but I need to call it from the frame.
View Replies !
View Related
GotoAndPlay A Frame Within A MC
If anyone could help me I would really appriciate it- I have been trying to solve this easy problem for a few days now. I have a button on frame 2 of the main timeline that I want to gotoAndPlay and a named frame "homepage_1" that is nested at the last frame of a movieclip which occurs on frame 1 of the main timeline. I have named the instance of the mc "march_intro".
This is the code that I am using for the button:
on (release) {
_root.march_intro.gotoAndPlay("homepage_1");
}
At frame homepage_1, I have 2 mcs that should load and play once the playhead is targeted to the right location. Can anyone tell me what to type for the location because the above code will not work. Thanks in advance.
View Replies !
View Related
GotoAndPlay A New Frame
When I use my movie clip symbol it is supposed to constantly replay. However, when it gets to the end it shows a blank frame before it starts again. I'm trying to code it to go to a specific frame at the beginning so it does not show the blank frame. My code does not work. Any suggestions/critiques would be appreciated. I cannot figure out what I am doing wrong.
Thanks
Attach Code
//function gotoAndPlay
function movieClip(pEvent:CurrentLabel):void
{
//gotAndPlay command to restart
if (pEvent.currentLabel == "end")
{
// handle pEvent
gotoAndPlay("begin")
}
}
//register events
pEvent.(CurrentLabel.);
View Replies !
View Related
GotoAndPlay(20) Going To Frame 1
I am using Flash CS3 with AS2 to write code that will fade images in and out, looping from the last frame back to frame 20. Loading the images with XML is working, as is the fading in and out. Unfortunately, when it reaches frame 390 it loops back to frame 1 instead of frame 20.
In frame 390 I tried using gotoAndPlay(20) to code the loop. Then I tried using _root.gotoAndPlay(20); but this did not work either. I am not sure why it is playing frame 1 instead of 20.
Thanks in advance for your help and suggestions!
Rachel
View Replies !
View Related
LoadMovie() And GotoAndPlay Certain Frame?
Ok, I have a main movie that has an empty movie clip with an instance name of LoadPress. I load an animation into that movie clip. Then there are six doors on that animation that spin with a press title on it, when you click one of the doors it loads another movie clip, Panel One, and unloads the _root(six doors animation). What I need to do after that Panel One movie plays is go back to the main movie and load the six doors movie into the empty movie clip(LoadPress)and make it go to a certain frame.
Is there a way to do this?
Thanks,
John
View Replies !
View Related
GotoAndPlay Scene & Frame
Hi
I need to set an action on a button that loads a new movie and sets that movie to play the specific scene on specified frame.
eg; load movie 1, and play scene 3, frame 12
when I follow the prompts given by the actions panel I get errors???
any ideas - this cant be too hard but it got me ;-(
View Replies !
View Related
Using GotoAndPlay(Scene, Frame)
Hi, this problem may be simple, but it's been bugging me for a really long time. Hope someone can help me.
I'm trying to control the flash movie from a movie clip. The code on my movie clip is as follow :
onClipEvent(enterFrame) {
If (i > 40) {
_root.gotoAndPlay("Scene1", 34)
}
}
I also tried :
onClipEvent(enterFrame) {
If (i > 40) {
_parent.gotoAndPlay("Scene1", 34)
}
}
and simply using :
onClipEvent(enterFrame) {
If (i > 40) {
gotoAndPlay("Scene1", 34)
}
}
But none of them worked.
View Replies !
View Related
Preloader - GotoAndPlay Frame In MC
I'm trying to make a preloader that will goto a specific frame in a movieclip as the entire move loads. I'm not wonderfully versed in actionscript yet, but I've pieced together the following code that I think would work...but doesn't. All it does is jump straight to 30. Eventually I would continue the process to 100.
With the _root.gotoAndPlay("preloader"); line I am making it loop so that it will continue constantly check for the conditions.
any help would be greatly appreciated.
-----
loaded = getBytesLoaded();
total = getBytesTotal();
percent = Math.round((loaded/total)*100);
if (percent<10) {
preloader.gotoAndStop("preloader0");
_root.gotoAndPlay("preloader");
}
if (percent=10) {
preloader.gotoAndStop("preloader10");
_root.gotoAndPlay("preloader");
}
if (percent=20) {
preloader.gotoAndStop("preloader20");
_root.gotoAndPlay("preloader");
}
if (percent=30) {
preloader.gotoAndStop("preloader30");
_root.gotoAndPlay("preloader");
}
-----
View Replies !
View Related
GotoAndPlay In A Frame...Target?
ummmkkkkk
here's the code i have on a button in a movie clip called submaster_mc. this movie clip is in another movie clip called master_mc. I want this button (contact) to call to the empty_mc in my frame.swf file and play the animation from a certain frame. how would i target it to work smoothly?
on (rollOver) {
_root.empty_mc.fade = true;
}
on (rollOut, dragOut) {
_root.empty_mc.fade = false;
}
on (release) {
loadMovie("contact.swf", "_root.empty_mc");
}
My final purpose is to have an animation happen, have another animation drop down over top of that one and play the next piece. thanks in advance - Chris
View Replies !
View Related
GotoAndPlay To A Target Frame
I have a problem that has been stumping me for quite some time and I'm hoping one of you pros can shed some light for me.
I have a flash movie that is used as a navigation bar for my site. It works fine on it's own, but I also want to be able to control it from a different source. I simply want to be able to load the movie and start at a target frame based on the viewer choosing a region from a list elsewhere on my page. I am trying to accomplish this just by sending a URL variable when it's loaded. For example, the flash movie might be loaded like this:
navflash.swf?targetFrame=11
I have created a little debug text field in the movie that just shows the variable targetFrame. That text field shows the proper value based on the URL, so I know that the variable is getting passed correctly. The only values that actually get passed to it are 11, 31, 51, 71, 91, 111, 131 and 151 which are the start frames of the various parts of my navigation setup.
On frame 1 of my movie I have an action that is:
code: stop();
if (targetFrame>1) {gotoAndPlay(targetFrame);}This is where my problem starts. No matter what the value of targetFrame actually is, the movie jumps to frame 14. I have been able to verify this by changing my gotoAndPlay() to a gotoAndStop() and checking what the actual start frame looks like. After playing through a few frames, frame 28 has an action that tells the movie gotoAndPlay(1). Bizarrely, this time when it goes to frame 1, it properly executes the original gotoAndPlay(targetFrame) and goes to the correct frame. So the problem is that it is only executing the gotoAndPlay(targetFrame) properly when the movie jumps back to frame 1, but not when the movie first loads. I had a delete targetFrame command along with the gotoAndPlay(1) on frame 28, but deleted it during my troubleshooting. Once I figure this out, I plan on putting it back in so that the variable is deleted and an endless loop is prevented when it returns to frame one.
I have attached the original .fla file in a .zip. I hope somebody can shed some light on my problem. Thanks in advance.
-Pete
View Replies !
View Related
GotoAndPlay(scene,frame)
Ok, is flash just buggy or am I just stupid. I have 4 scenes in my movie. I want the root to be sent to different scenes based on a button push. If I want to go to frame one of scenen "main" don't I just write:
on(press){
tellTarget(_root)
gotoAndPlay("main",1)
}
What gives? It's not working. the reason that I have the tell target script is the button does not reside on the main timeline and
_root.gotoAndPlay("main",1) or gotoAndPlay("main",1) don't work either. Anyone know what I am doing wrong?
View Replies !
View Related
GotoAndPlay Frame Mc Prob.
Hi there,
In My external loaded file(loaded by a eclip) on first frame I used a mask.
The mask is an mc.the first frame has a stop(); and frame11
on another mc placed on stage I placed in the last frame following code.
_root.mask.gotoAndplay(2);
works great when I publish this.Only when I open my main.swf and see the extern.swf(with mask) get loaded.The mask(mc)is not going to frame2.
how solve this?
Big thx in advance!!!
Grtz,
View Replies !
View Related
Using HitTest To GotoAndPlay A Frame In A Mc (mx)
hit test question???
hey again..... i'm stil trying to work out the answer to the sequencer sound thing.......I am trying to use the hitTest script to do this..... when a MC "head" hits another MC "button1" i would like it to gotoAndPlay frame 11 in MC "button1"......is this possible???? i have tried to use the hitTest tutorial and have had no luck.. i followed it carefully and it still didnt work...... any ideas anyone???? any good working tutorials anyone knows of???
regards
View Replies !
View Related
GotoAndPlay Advancing One Frame Too Many
I'm sorry if the solution to this problem is more obvious than I think, but this is for a project that's due quite soon, so I haven't researched it very much.
Basically, I'm making a menu system for this presentation. Just dealing with one level of the heirarchy, I have scenes for each chapter -- "menu10", "menu11", "menu12", et cetera. Each frame has an identical menu consisting of buttons for each scene. Each button has a gotoAndPlay action that directs the playhead to the respective menu scene. So on release, the button marked 11 executes a gotoAndPlay("menu11", 1); action. But instead of going to menu11, it goes to the next scene, menu12, and then stops. Every combination of inserting extra frames, stop actions, changing to gotoAndStop, etc, has not fixed the problem. It seems inconsistent -- sometimes it screws up one way, sometimes another, sometimes not at all -- but most of the time it's not working properly. Is there something I'm missing that would fix this obvious problem?
View Replies !
View Related
[F8] GotoAndPlay(frame) - And STAY There
it's a basic problem, but it's a problem for me nonetheless.
my movie has a button that targets the last frame (5). I'm trying to make it gotoAndPlay(5), but if I do that, it only works 50% of the time. The other 50% it goes to frame one and loops back to frame 5. If I use gotoAndStop(5), it'll work once, but then the movie stops all buttons from working.
I tried prevFrame on frame 6 to see if that'd work, but it doesn't. Anyone know how this works???
View Replies !
View Related
GetURL With GotoAndPlay Some Frame
Hi guys, i'm having a problem, to open a new .swf using:
on(release) {
getURL("http://www.mywebsite.com/somelink.html","_parent");
_root.gotoAndPlay("thisframe");
}
This is not working because in the swf file i have in frame 1 the main and frame 2 the company profile. And using this script, opens the somelink.hmtl but doesn't go to the frame 2.
Thanks
Gian
View Replies !
View Related
ComboBox GoToAndPlay From Frame
I'm new to AS3 and I'm at work trying to make this map of the room at our Law Library.
The plan is to have a ComboBox the only text on the layout and then for the user to just click a type of book (ie: a book regarding Immigration Law or even just to find a Printer) from the ComboBox. The action of clicking the selection would then stop any kind of other movie clips from playing and then play a seperate movie clip from a specific frame. (ie: Someone wanted a book on Immigration law, they click "Immigration Law" from the ComboBox and then the shelf(s) where Immigration Law can be found starts to blink in and out on the map so they know where to go.)
I created the movie clip for the blinking action and gave it the instance name of mc_shelf01 with the action starting frame as fm_start.
Typically I would just use a button and use something along the lines of:
Code:
on(press){
_root.mc_shelf01.goToAndPlay("fm_start");
}
My question is how do I do this in AS3? My experience with flash was strictly AS2 up to this point and I never had to use a ComboBox. I've only used drop downs in other web languages. I would prefer the ComboBox be called from actionscript than just dragging a component on screen.
The ULTIMATE goal is to have the ComboBox populated by an XML page but I don't think that part will be a problem to put in later on. (I could be, and probably am, wrong of course.)
Any Help on this is MUCH appreciated. Thanks so much.
View Replies !
View Related
[CS3] GotoAndPlay Current Frame?
I have a movie with 5 buttons and that go to 5 different frame labels. However, if I am on the current frame label and I click the button for that frame label it moves to the next frame label rather than reloading the current one. For example,
Button A should jump to frame label A, B to B and C to C.
However if I am on A and click the button for A it goes to B.
Any advice? Thanks!
View Replies !
View Related
External Swf GotoAndPlay Frame...
I am loading an external.swf into a main.swf
Code:
if (totalev>=1) {
if (Student_Score == eventload1[0] && Beek_Score == eventload1[1]) {
this.createEmptyMovieClip("container", 1);
this.container.loadMovie(External.swf);
//Note the below line
this.container.gotoAndPlay("Event3");
_global.flag=1;
}
} else {
if(flag!=1)
{
this.gotoAndPlay("start");
}
}
I am trying to make the external movie jump to a different frame, but I can't figure out how to do it...
It seems simple enough-- does anyone have any ideas?
--Jacob1234
View Replies !
View Related
Problem With GotoAndPlay(frame No).
Hi,
My main movie (_root) has ONE frame. From this frame I do my animations by a tween class (scaleTo, alphaTo etc.). This works fine.
I have a mc1 in the library which is being attached to a mc2 by a new linkage name MC1 on the stage.
The mc1 has 50 frames with a stop() at frame 20. How can I tell the mc1 gotoAndPlay(21)?
I have used
ActionScript Code:
_root.mc2.MC1.gotoAndPlay(21);
No luck. Any tips here please?
View Replies !
View Related
Need AS3.0 On Release Gotoandplay Frame
Hi all,
I am trying to get a simple button to work with actionscript 3.0.
Need AS3.0 "on release gotoandplay frame". This should be relatively easy but for some odd reason I can't put an action script directly on the button. This is the first time I have used Flash 9 CS3. Can anyone help? I have a deadline to meet. Or can someone send me an example?
Thanks,
Rick
View Replies !
View Related
|