Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




[F8] Moving Chrecter From Frame To Frame



I have a MC created and i use this code:

onClipEvent (enterFrame) {
if (_parent.Main.hitTest (this)) {
_parent.gotoAndStop(3);
}
}

Main = my chrecter

The MC is on the right side of the work area and when my charecter hits the MC he starts on the right side.

Is there anyway i can make him start on the left side of the new frame.



FlashKit > Flash Help > Flash Newbies
Posted on: 10-08-2008, 03:58 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Moving Images Frame-by-frame With Mouse Movement
Hi, I'm new to flash mx, so please help me out in details. thanks.
I have 10 images in 10 frames ( 1 image per frame ). So I'm trying to make the frame to go to the next one when the mouse is moved to the right, and make the frame to go to the prev one when the mouse is moved to the left.
Can someone please help me? I really need to have this done ASAP.
Thanks for all the inputs.

Moving Images Frame-by-frame With Mouse Movement
Hi, I'm new to flash mx, so please help me out in details. thanks.
I have 10 images in 10 frames ( 1 image per frame ). So I'm trying to make the frame to go to the next one when the mouse is moved to the right, and make the frame to go to the prev one when the mouse is moved to the left.
Can someone please help me? I really need to have this done ASAP.
Thanks for all the inputs.

Help Moving From Frame To Frame With Mouse.
I have a series of pictures and I want to be able to cycle through them from 1 to 30 by moving the mouse to the right to left and be able to cycle back by moving from left to right, stopping on individual frames by coming to a stop. I have enough experience that I can manipulate action script; however I am horrible at writing from scratch. Any and all help welcome. If you can help pls. don’t feel like you are talking down to me the more thorough the explanation the better.

[F8] Unloading Frame When Moving On To The Next Frame
Hello,

I have an flash project with several pages, (Home, members, Contact, etc). and they all have buttons, and when you click on them, they take you to different places. My members frame overlaps the others even when i move to a differernt frame. I am using the coverflow addon, but i was curious, is there like a "on next frame UNLOAD" actionscript command?

PLEASE HELP!

XML Data And Moving From Frame To Frame
I am making a project and using XML to bring in the data externally. However i have ran into a little snag. My code to query the XML works, but if i don't start with the first button, the rest of the buttons dont work.

If i click on the first button which takes you to a new frame and loads in the XML data into a text area the rest of the buttons will work and go the frame they are supposed to and work as intended.

However if i do not click on the first button first, the button will take you to the frame that it is supposed to take you to but the XML does not load.

The buttons are on a grid and are supposed to be clicked in any order and bring open the right information, which is why this is a problem.

here is the code that is on the second frame. All the other frames look just like this one but with the names changed to fit the names of the buttons.

Any help will be appreciated


Quote:




//this makes the xml request
var jeapordy_xml:XML;
var xmlReq:URLRequest = new URLRequest("Jeapordy.xml");
var xmlLoader:URLLoader = new URLLoader();

//this will load the XMl and place the correct information in the text area
function C1HighSchool(event:Event):void
{
var query:XML;
var queryText:String ="";
jeapordy_xml = new XML(xmlLoader.data);

query = jeapordy_xml.C1100.Question.(@id == "1").parent();

for each(var elements:XML in query.*)
{
if(elements.*.length())
{
queryText += elements.name() + ":" + elements;
}
}
info_txt.htmlText = queryText;
}

//will display from the XML the answer for the button that is clicked, and will tell the picture to move into position
function C1Answer1(Event:MouseEvent):void
{
var query:XML;
var queryText:String ="";
jeapordy_xml = new XML(xmlLoader.data);

query = jeapordy_xml.AnswersQ1_1.Answer.(@id == "A1").parent();

for each(var elements:XML in query.*)
{
if(elements.*.length())
{
queryText += elements.name() + ": " + elements;
}
}
answer_txt.htmlText = queryText;

query = jeapordy_xml.images.pic1.(@id =="BoR1").parent();

for each(var picture:XML in query.*)
{
if(picture.*.length())
{
queryText += picture.name() + elements;
}
}
picBox.htmlText = query
}

//will display from the XML the answer for the button that is clicked
function C1Answer2(Event:MouseEvent):void
{
var query:XML;
var queryText:String ="";
jeapordy_xml = new XML(xmlLoader.data);

query = jeapordy_xml.AnswersQ1_2.Answer.(@id == "A2").parent();

for each(var elements:XML in query.*)
{
if(elements.*.length())
{
queryText += elements.name() + ": " + elements ;
}
}


answer_txt.htmlText = queryText;
}

//will display from the XML the answer for the button that is clicked
function C1Answer3(Event:MouseEvent):void
{
var query:XML;
var queryText:String ="";
jeapordy_xml = new XML(xmlLoader.data);

query = jeapordy_xml.AnswersQ1_3.Answer.(@id == "A3").parent();

for each(var elements:XML in query.*)
{
if(elements.*.length())
{
queryText += elements.name() + ": " + elements ;
}

}

answer_txt.htmlText = queryText;
}

//will display from the XML the answer for the button that is clicked
function C1Answer4(Event:MouseEvent):void
{
var query:XML;
var queryText:String ="";
jeapordy_xml = new XML(xmlLoader.data);

query = jeapordy_xml.AnswersQ1_4.Answer.(@id == "A4").parent();

for each(var elements:XML in query.*)
{
if(elements.*.length())
{
queryText += elements.name() + ": " + elements ;
}

}

answer_txt.htmlText = queryText;
}

//this function will move a picture into position when the correct answer is clicked
function picMove(Event:MouseEvent):void
{
mask_mc.play();
}

//this function will go back to the grid of buttons
function homeF2(Event:MouseEvent):void
{
this.gotoAndStop(1);
}

//this will reset the text fields to be empty
function reset(Event:MouseEvent):void
{
info_txt.text = "";
answer_txt.text = "";
}


xmlLoader.load(xmlReq);
xmlLoader.addEventListener(Event.COMPLETE, C1HighSchool);
A1.addEventListener(MouseEvent.CLICK, picMove);
A1.addEventListener(MouseEvent.CLICK, C1Answer1);
B1.addEventListener(MouseEvent.CLICK, C1Answer2);
C1.addEventListener(MouseEvent.CLICK, C1Answer3);
D1.addEventListener(MouseEvent.CLICK, C1Answer4);
Reset.addEventListener(MouseEvent.CLICK, reset);
F2Home.addEventListener(MouseEvent.CLICK, homeF2);

Help Moving From Frame To Frame With Mouse
I have a series of pictures and I want to be able to cycle through them from 1 to 30 by moving the mouse to the right to left and be able to cycle back by moving from left to right, stopping on individual frames by coming to a stop. I have enough experience that I can manipulate action script; however I am horrible at writing from scratch. Any and all help welcome. If you can help pls. don’t feel like you are talking down to me the more thorough the explanation the better.

Previous Frame Overlay..... Frame By Frame By Frame By Frame By Frame By.....
Hello there.

I am trying to create a small animation just as a little bit of fun. I would like to do it frame by frame.

I have a simple question to ask about frame by frame animation.

When drawing frame by frame, you would usually have a transparent overlay that you can compare with the next frame. Is there a way to do this in flash without having to copy the previous keyframe into a new keyframe on a new layer?

Thanks Emdiesse

Moving From Frame To Frame
Can someone tell me the script for moving from frame to frame?

Example:
I'm on frame 1 and I'd like to click on a button and that button takes me to frame 33.

PS:
Please to speak to me like you would to a child, bucause I'm not the brightest bulb when it comes to flash.

Trying To Make Movie Play Frame X To Frame Y Then Switch To Frame Z..
Hello,

I was hoping someone could help me out with an issue I'm having. I have my flash on multiple scenes, and would like to play an animation when clicking on the navigation button before switching to a different scene.

I'm halfway to accomplishing this.

Here is what i used


Code:
_root.gotoAndPlay("changepage1");
_root.onEnterFrame=function(){
if(this._currentframe=="changepage2"){
gotoAndPlay("Home2",1);
}

}
The above code is on a blank keyframe. Changepage1 is the start of the animation and Changepage2 is the end of the animation.

Upon clicking the navigation button it plays the above scenes.

However it doesn't change scenes to scene "Home2".

Thank you in advance for all your replies.

Moving From One Frame To Another...
Hi,

I am having trouble moving from one frame to another. I have one frame with a movieclip in it. I have an onpress event that uses goToAndPlay(2) to move to the next frame. Only trouble is, it doesn't move there.

I've attached my .fla if anyone could take a look and let me know what I'm doing wrong...

[F8] Help Moving Frame
Hi

I have a .fla and part of a navigation bar which when hovered over expands and when you click it should open another scene but for some reason it does not do anything when i click on it apart from get smaller.

The file can be found here

Thanks

Moving From One Frame To Another
Hello, please:

On the 1st frame of timeline I have a keyframe with only one button (A), and on the 2nd frame I have another keyframe with another lonely button (B). Now, when I click on A I would like to move the current frame to 2, and when I click on B, move to frame #1.

In previous Flash I could use on(enterFrame) { gotoAndStop(1); }

However, in ActionScript 3 I have to register the EventListener first and there's is my problem because it can't see button B, which is in another frame.

Is this even possible in AS 3?

Thanks!

Moving From One Frame To Another...
Hi,

I am having trouble moving from one frame to another. I have one frame with a movieclip in it. I have an onpress event that uses goToAndPlay(2) to move to the next frame. Only trouble is, it doesn't move there.

I've attached my .fla if anyone could take a look and let me know what I'm doing wrong...

Moving From One Frame To Another
Hi,

I have three key frames with three pictures. Suupose I have an action "go to and stop " on keyframe 1 to go to keyframe 3. When I click pic 1, it straiight goes to 3. is it possible it first go to pic 2 and then go to 3, so that i see  pic 2 sliding by and then see pic 3.


Thanks

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

Moving Objects In More That 1 Frame
How do i move objects in more than one frame at the same time? they are on the same layer.

Textfield Value Gone When Moving To Next Frame
Damn those pull-down menus! I built a series of pull-down menus with flash5. They use a 1 frame mc on the main timeline, with a textfield that stores the chossen value. The pull-down options are stored in another embedded mc with 2 frames. First frame is blank, secon one contains the options. When the menu is clicked, the reading head moves to frame two to show the available options. Once an option is selected, a value for the textfield in "../" is set (mytextfield="Monday"). In the same time, another variable is set and sent to "_root" (myvar=1). The text Monday shows in the pull-down menu, and 1 is stored in the memory. So far so good... When the next and then the back buttons are clicked (one frame), the pull-down menu is back to blank, however myvar remains 1. the only way arroun I found was to put mytextfield on the main timeline, not in the mc, but that is not an option since I would have to change the script every time I use a new instance of the menu.

source file here http://www.smashmachine.com/clients/pull_down_days.fla

How can I make the menu to show "Monday"?

Thanx, Smash
ps: right-click/save link as to download, then rename file from .htm to .fla if you have problems

[Edited by smash on 03-21-2002 at 08:13 PM]

Loading A Moving On A Frame
Hello everyone,

Just wondering if it possible to load a movie on a frame instead of having to put the loadmovie action in a button that has to be clicked for it to load the movie.


Cheers.

Dean.

Help On Moving To Frame Numbers
Can I make a embedded SWF file goto a set frame number or play a movie clip on th click of a HTML button?

UGH Stop Moving To The Next Frame
Alright, you guys, I'm getting very desperate here and in need of a kindly individual(s) to help me.

What I'm trying to do is create a simple multiple choice quiz with an MC that pops up when none of the selections have been made. I'm sure there's a much simpler way to create what I've done, but I'm not terribly experinced in AS. So, forgive me and have patience.

Okay, first:

I created an empty text field. Then added AS to the first frame that gives it 1.

Then, I have the answers to the multiple choice. Each question is in an MC. Outside of these are buttons.

The buttons tell the question mc to move to the second frame, which has the AS that adds 1. When it's clicked again, it subtracts 1, then gotoAndStops at frame 1.

Then, the submit button check to see if the value of that text field is equal or less than 4.


Second, and most importantly:

If none of the selections are made, the value inside the txt box is still one.
When hit the submit button, I want it to remain on that frame and make this one MC's alpha 100. Otherwise, it'll eather go to q3_n(question 3, wrong) or q3_y.



Code:
on (release) {

if (Number(clickCount_txtbox) == 1)
{
stop();
plsanswer_mc._alpha=100;
}

else if (Number(clickCount_txtbox) == 4)
{
gotoAndStop("q3_y");
}

else if (Number(clickCount_txtbox) <= 4)
{
gotoAndStop("q3_n");
}
}
But, what always happens is it goes to q3_n when the value is 1.

How do I keep it from moving to that frame and to set the alpha of plsanswer_mc too 100?

[F8] Moving A Picture In A Frame.
Hello there everyone need a bit of help with a flash presentation i am making.

Im making a flash map of a town that has buttons on it but i need to move it around within a frame (like a picture frame). So i need a way of moving it around. as the map is bigger than That way when people have the map they will be able to move it them selves and see the buttons on there. So i need a way of linking buttons to the map so that when you move the map the buttons move with it.

Thanks guys

Delay In Moving To Next Frame
I'm new to Flash, and I'm creating a quiz. When an answer is clicked, I want a sound to play (gives feedback on whether the answer was correct or not) and the next frame to appear. This all works fine. However, I want the next frame to appear only after the feedback sound has finished playing (about 2 seconds). Is there any way to do this. I've been trying lots of different stuff (like setinterval stuff) and nothing is working quite right. Thanks in advence for any help you can provide!

Help Moving To Next Frame After FLV Plays
I don't know much about Actionscript 3. With that said, I'm hoping somebody can help me figure out how to solve my navigation problem.

I'm working with the following Actionscript in my first frame:
function showVid1(evt:MouseEvent):void {
vid_comp.source ="videos/alzheimers.flv";
//vid_comp.width = 253;
//vid_comp.height = 204;
//vid_comp.x = 0;
//vid_comp.y = 0;

}


alzheimers_btn.addEventListener(MouseEvent.CLICK, showVid1);


function showVid2(evt:MouseEvent):void {
vid_comp.source ="videos/cancer.flv";
}
cancer_btn.addEventListener(MouseEvent.CLICK, showVid2);


function showVid3(evt:MouseEvent):void {
vid_comp.source ="videos/heart_disease.flv";
}

heart_btn.addEventListener(MouseEvent.CLICK, showVid3);


function showVid4(evt:MouseEvent):void {
vid_comp.source ="videos/polio.flv";
}

polio_btn.addEventListener(MouseEvent.CLICK, showVid4);It works just fine, but now I need to have a short movie clip play after each segment and stop there with the movie buttons (showVid1-4) still available. I would have written stop, gotoandplay before, but I'm unsure of how to achieve this effect in Actionscript 3.

I'm wondering A) Is creating a another keyframe containing my movie and navigation the best way to go
B) If yes, how can I get the movie to move to that keyframe after each one of the videos plays.

Thanks for your time.
Andy

Moving Movie To Different Frame
Can someone please please help!

I main movie which is made up of different movieclips. The whole main movie is all on the 1st frame, with the movieclips all on their own timeline.

As soon as I move my main movie to begin on any frame other than the 1st, everything looks broken and bad qaulity. I need to move my movie to begin on Frame 3 so I can add a preloader. I've even tried creating a seperate scene for my preloader so my movie stays on frame 1 but it still loses quality and everything looks broken.

Only time it looks fine is when it begins on frame 1 and one scene is used.

I need to find out whats causig this..anyone?

Much appreciated

Not Moving To Frame Lable
Ok. I finally finsihed my first game but have one slight problem. The timeline refuses to move from frame 4 to frame 5 which contains text and a button which should takes you to frame 6. I don't understand why this doesn't happen as I've used the same code and method for frames 2-3.

This is the code I've used on frame 4:


Code:
stop();
// initialise variables
bulletNum = 0;
dropdown = false;
speed = 15;
_root.bombspeed = 0.1;
initAliens("bug");
//
//-----------ONLOAD-----------//
_root.onLoad = function() {
Mouse.hide();
};
//
//-------------ENTERFRAME----------//
_root.onEnterFrame = function() {
// move the defender with the mouse.
_root.defender._x = _root._xmouse;
_root.defender._y = 385;
// bullet move
var y = 0;
while (y<6) {
eval("_root.bullet"+y)._y -= 30;
y++;
}
moveBombs("bug");
moveAliens("bug", 4,15);
initBombs(_root.bombspeed);
};
//
//-------------MOUSE CLICK----------//
_root.onMouseDown = function() {
// duplicate the bullet mc
attachMovie("bullet", "bullet"+bulletNum, bulletNum);
// set the coords to the mouse clik
eval("_root.bullet"+bulletNum)._x = _root.defender._x;
eval("_root.bullet"+bulletNum)._y = _root.defender._y;
// increment the bullet number
++bulletNum;
// if more than 5 bullets , start again at 0
if (bulletNum>5) {
bulletNum = 0;
}
};
Frame 5 got a simple:


Code:
stop();
stopAllSounds();
If anyone can help, I'd be most grateful. This is doing my 'ead in!

Yossarian

FP7 Bug? Moving 0,1 Px Per Frame Not Working.
I'm having a problem with moving two bitmaps using actionscript...

They move 0.1 pixels on each onEnterFrame (I've also tried using setInterval with equal results) but in the flashplayer it seems more like they're moving one pixel... I also have an if-statement checking if they've reached a certain point.

When I try this in FP8 it works smoothly, but not in FP7. I've tried to enable "allow smoothing" in the bitmap options. But it's still very "jumpy" in FP7, even though the CPU only reaches 22% at the most.


Any solutions?

Moving Xml File Between Frame
Hi!

I have a large xml file that I load at the beginning of program(frame 1). Then depending, at each frame, I will querry that xml file. However, I can not "transfer" the value of xml file in the first frame to other frame. _global does not seems to work. What is the most efficient way.

Thanks.

Moving Movie To Different Frame
Can someone please please help!

I main movie which is made up of different movieclips. The whole main movie is all on the 1st frame, with the movieclips all on their own timeline.

As soon as I move my main movie to begin on any frame other than the 1st, everything looks broken and bad qaulity. I need to move my movie to begin on Frame 3 so I can add a preloader. I've even tried creating a seperate scene for my preloader so my movie stays on frame 1 but it still loses quality and everything looks broken.

Only time it looks fine is when it begins on frame 1 and one scene is used.

I need to find out whats causig this..anyone?

Much appreciated

Not Moving To Frame Lable
Ok. I finally finsihed my first game but have one slight problem. The timeline refuses to move from frame 4 to frame 5 which contains text and a button which should takes you to frame 6. I don't understand why this doesn't happen as I've used the same code and method for frames 2-3.

This is the code I've used on frame 4:


Code:
stop();
// initialise variables
bulletNum = 0;
dropdown = false;
speed = 15;
_root.bombspeed = 0.1;
initAliens("bug");
//
//-----------ONLOAD-----------//
_root.onLoad = function() {
Mouse.hide();
};
//
//-------------ENTERFRAME----------//
_root.onEnterFrame = function() {
// move the defender with the mouse.
_root.defender._x = _root._xmouse;
_root.defender._y = 385;
// bullet move
var y = 0;
while (y<6) {
eval("_root.bullet"+y)._y -= 30;
y++;
}
moveBombs("bug");
moveAliens("bug", 4,15);
initBombs(_root.bombspeed);
};
//
//-------------MOUSE CLICK----------//
_root.onMouseDown = function() {
// duplicate the bullet mc
attachMovie("bullet", "bullet"+bulletNum, bulletNum);
// set the coords to the mouse clik
eval("_root.bullet"+bulletNum)._x = _root.defender._x;
eval("_root.bullet"+bulletNum)._y = _root.defender._y;
// increment the bullet number
++bulletNum;
// if more than 5 bullets , start again at 0
if (bulletNum>5) {
bulletNum = 0;
}
};
Frame 5 got a simple:


Code:
stop();
stopAllSounds();
If anyone can help, I'd be most grateful. This is doing my 'ead in!

Yossarian

Moving To Next Frame W/ActionScript
I'm trying to learn to develop in Flash with ActionScript, but I keep running into the same problem. I'm developing a banner ad that has several text effects that I want to happen in sequence. So I put each object and the code for each effect in a different frame. The trouble is programming hte movie to go from one frame to the next only when the current effect is complete. For example, here is some code I've tried in the first frame, that moves to the second frame and effect just fine:

stop();

// This code shows the title
var endY = 8;
var stepY = 2;

title.onEnterFrame = function ()
{
if (this._y < endY) {
this._y += stepY;
} else {
gotoAndPlay("headline");
}
};


But the when I try the same method on the next frame, it doesn't go to the third frame:

stop();

// This code shows the headline
MovieClip.prototype.ScaleDown = function(maxScale, minScale, minAlpha, alphaStep, scaleStep) {
var mc = this.createEmptyMovieClip("ScaleDown", 0);
this._xscale = maxScale;
this._yscale = maxScale;
this._alpha = minAlpha;
mc.minScale = minScale;
mc.scaleStep = scaleStep;
mc.alphaStep = alphaStep;
mc.onEnterFrame = function() {
if (this._parent._xscale > this.minScale) {
this._parent._xscale -= this.scaleStep;
this._parent._yscale -= this.scaleStep;
}
if (this._parent._alpha < 100) {
this._parent._alpha += this.alphaStep;
}
};
};

teach.ScaleDown (500, 100, 0, 2, 10);
technology.ScaleDown (500, 100, 0, 2, 10);
academics.ScaleDown (500, 100, 0, 2, 10);

academics.onEnterFrame = function() {
if (this._alpha > 98) {
gotoAndPlay("details");
}
};


And the code for frame 3 for good measure:


stop();

MovieClip.prototype.fadeUp = function (targetAlpha, alphaStep, smoothness)
{
this.targetAlpha = targetAlpha;
this.alphaStep = alphaStep;
this.smoothness = smoothness;
this._alpha = 0;
this.onEnterFrame = function ()
{
if (this._alpha < this.targetAlpha) {
this._alpha += alphaStep;
}
};
};

details1.fadeUp (100, 2, 6);



Is the problem with the onEnterFrame event handler? I have looked through a ton of Flash books, and I can't find any good solution for how to move from one effect to the next after the previous effect is complete.

Please help!

Problem With Moving Frame...?
Ok I am trying to get a frame that resizes to a picture when its loaded. I followed the tutorial that tod made but I am having one problem. The picture pops up before the frame moves...how can i fix that to do the opposite..? I want the frame to move and the picture to pop up. Here is a link to my fla file...thanks


http://www.gotitelectronics.com/Javi2.fla

Moving To The Next Frame In A Scene
I have a movie symbol within my scene that when finished I would like it to call the next frame in my scene. I am using flash mx 2004 and have no idea how to go about this.

I tried using gotoAndPlay("scene_name", frame#), but it didn't work.

Any suggestions?

Thanks in advance

Moving To A Particular Frame With A Movie
hi, i was wondering if any of you guys have tried doing something like this.

I have a main file called intro.swf, this in turn calls other swf files. The intro is fed a text file called "data.txt". eg

loadVariablesNum("data.txt", 0);

This text file defines variables to load swf files. eg:

url_rub3=Chapter3.swf&titre_rub3_s1=Overview&url_rub3_s1=Chapter3.1.swf&url_rub3_s2=Chapter3.2.swf

and so on...

The only file that is embedded in the html is the intro.swf.

What i need to do is when the intro page is loaded, i would like the user to go to a particular frame in the loaded movie (something like a bookmark). This is what i'm trying to do in the intro.fla file


loadMovieNum(url_rub3_s2,1);
_level1.gotoAndPlay(6);


where:
url_rub3_s2 is the "Chapter3.2.swf" to be loaded.

It loads the chapter, but i cannot move to that frame as i'm still in the intro.swf.

I'm not sure, if i'm going the right way. Any suggestion/solutions?

Regds,
Allwyn

Playing MC 5 Times Then Moving To Next Frame
Astrum Et Securis!

In my main swf .. i have a small little movie clip, of 100 frames, with Instance name "bf".

On the first frame of my main movie, i place this MC, and i want it to repeat 5 times, and then move on to the next frame of the main movie, where this MC is not present.. how can i do this?

i put the following action on the first frame..

for(i=0;i=5;i++) {
bf.play();
}
bf.stop();
gotoAndPlay(2);

But it didn't work, obvisously i'm doing something.

Help needed..

Help Needed With Moving To Next Frame Automatically
Hi,

I have a intro and would like to automatically move to the next frame of the movie when the intro is done playing.

The intro is a movieclip that in placed in the first frame of the movie. Should the action be put into the intro movie clip or onto the frame in the main timeline where the intro movie clip instance is placed? I would assume that it would be placed in the movie clip itself? Also is it possible to add a 3 second delay after the intro animation plays before the user is taken to next frame?

Thanks

Zain

Moving Mouse To Advance To Next Frame
I feel like an idiot for having to write in for this, but it's been awhile since I've had to write actionscript, and I have forgotten a lot of it. I'm trying to make a file that advances to the next frame with any mouse movement. I understand how to do it, I'm just having trouble writing it.

On clipevent(enterframe)
positionX == _xmouse
positionY == _ymouse
if positionX !== _xmouse
goto (nextframe)
if positionY !== _ymouse
goto (nextframe)


Is this anywhere near right? Thanks,

-A

Moving To A Random Frame With Button...
I am trying to create a game in which there are trivia questions, so I would like buttons to go to random frames when clicked, although, depending on the button that is clicked, there would be a certain range of frames that would come up.

For example:

Trivia category would be 'Famous People'...
-I want a random frame to come up from frames 200-399.
-I would also want only even numbers to be possible results (because I would have the questions be the evens and the answers be the odds.)

So to recap: Results should be
-Random
-Within a certain range of frames
-Only even frames within that range should be results

I am awful at programming so any help would be much appreciated.

Thanks

Moving From Code To Frame And Back
What I want to create is a piece of code that at a certain point, goes to a different scene, then returns to that part of the code where it left off. Heres an example based on when im trying to write.
if (level == 2){
enemiesLeft = 12;
bossNow = true;
gotoAndPlay("shySpy", 1);
}
Is there an easy way to do this? Im currently planning on replicating the code for the different levels (if that would work) as a possible alternative, but coding it like this would be easier if its possible.
Thanks for your help peoples

[F8] Moving To New Frame Once Actionscript Is Executed ?
I have a movie. I want it to fade in, and once it's done fading, move on to the next frame in the timeline.

Here is my code. It's very simple:


Code:
onClipEvent (load) {
this._alpha = 0;
}
onClipEvent (enterFrame) {
if (this._alpha<100) {
this._alpha += 2;
}
}
For some reason I can't figure this out. I tried a bunch of different combinations but it did nothing but play and then stop at the end. I have this code in my movie and my movie is on frame 1 of the main timeline. When it's done fading in, I simply want it to go to frame 2 of the main timeline and start playing. Any ideas?

Thanks!

Moving A Clip Event To The Frame
Hi, I used a tutorial to create the following movement but i want to move it from the clip to the frame. It works fine with one clip on the frame, but then any duplicates just mirror the motion of the instance.

please help..!!


Code:
for (i=0; i<5; i++){
var clip = bug_mc.duplicateMovieClip ("newclip"+i, i)
clip.onEnterFrame = bugsEnterFrame ;

}

max = 21;
x_speed = max/2;
y_speed = max/2;
rotation_speed = 1;
friction = .98;

bugsEnterFrame = function () {

var rand = random(30);
if (rand == 1) {
x_speed = random(max)-max/2;
}
if (rand == 2) {
y_speed = random(max)-max/2;
}
// boundries
if (this._x >= 500) {
x_speed = -Math.abs(x_speed) * friction;
}
if (this._x <= 0) {
x_speed = Math.abs(x_speed) * friction;
}
if (this._y >= 500) {
y_speed = -Math.abs(x_speed) * friction;
}
if (this._y <= 0) {
y_speed = Math.abs(x_speed) * friction;
}
// friction
x_speed = x_speed * friction;
y_speed = y_speed * friction;
// set _x and _y
this._x = this._x + x_speed;
this._y = this._y + y_speed;
// rotation
distance_x = x_speed;
distance_y = y_speed;
theta_target = Math.atan(distance_y/distance_x) * (180/Math.PI);
if (distance_x<0 and distance_y>0) {
theta_target = theta_target + 180;
}
if (distance_x<0 and distance_y<0) {
theta_target = theta_target - 180;
}
theta_this = getProperty(this,_rotation);
theta_distance = theta_target - theta_this;
theta = theta_this + theta_distance/rotation_speed;
this._rotation = theta;
}

[MX04]moving To A Random Frame
Hello,
currently I have been encountering a problem with random frame movement.I want to do something like this-
When I come to frame 1, automatically go to frame 2 or 15, not 2-15,
ONLY 2 OR 15.
I know how to do 2-15,

Code:
gotoAndPlay(random(2)+15)

Can somebody help me!
Thank You,
Chinmaya

Help With Moving Objects In Frame To Front
Can someone please take a look at the attached flash file and help me out? I'm wanting to move each object to the front in the frames where each is zoomed in. If you open the file and preview the movie, you'll see what I mean. Currently, when each is hovered over and zoomed, it remains behind the other objects. Thanks much.

Moving To Next Frame After Certain Time Period
I there a way to go to and play another frame after say, 5 seconds?

Thanks

Flash Moving Pics In A Frame
I've imported a PSD file with layers into Flash. Now I want to create a movie file with photos moving and changing within a masked frame on the page. Is this possible?

[MX04][AS2]moving To Random Frame
Hello,
currently I have been encountering a problem with random frame movement.I want to do something like this-
When I come to frame 1, automatically go to frame 2 or 15, not 2-15,
ONLY 2 OR 15.
I know how to do 2-15,
gotoAndPlay(random(2)+15)
Can somebody help me!
Thank You,
Chinmaya

Moving To A Specific Frame In A Movieclip
hi everyone. I have a problem and I've looked everywhere for a solution but haven't found one yet. I'm trying to move the playhead to a specific frame inside a movieclip but can't find any code that will allow this to happen.

In more detail: I have 5 movieclips that act as my main pages on my main timeline. from inside let's say, from the 5th movieclip on frame 100 i want to move out of this clip and into the 3rd movieclip BUT NOT to go to frame 1 but move to frame 50 of the 3rd movieclip. I've tried everything but no matter what happens the first frame is always displayed, and i don't want that.

Any ideas on how to jump to a specific frame inside a specific movieclip?

Moving To A Specific Frame In A Movieclip
hi everyone. I have a problem and I've looked everywhere for a solution but haven't found one yet. I'm trying to move the playhead to a specific frame inside a movieclip but can't find any code that will allow this to happen.

In more detail: I have 5 movieclips that act as my main pages on my main timeline. from inside let's say, from the 5th movieclip on frame 100 i want to move out of this clip and into the 3rd movieclip BUT NOT to go to frame 1 but move to frame 50 of the 3rd movieclip. I've tried everything but no matter what happens the first frame is always displayed, and i don't want that.

Any ideas on how to jump to a specific frame inside a specific movieclip?

Moving Frame Contense To MC For Printing
hi peeps,

i have a movie clip with 8 different frames, the user can navigate to each frame, manipulate the contense of the frame, and then print thier creation out.

I believe to achieve this end, that the entire contense of the frame they have manipulated (multiple layers) needs to be moved to an empty MC which is then printed, true?
how does one go about this?

i tried keeping the contense in the original mc, and using #p, but each frame needs to be printable at different times, and conflicts occur when 8 frames area all "#p", with out #p it randomly chooses which frame to print or prints them all....eep!

thanks muchly.

Moving To A Frame In An Embedded Movie?
Please excuse me because I am just learning Flash,

I have a swf movie that I imported into another Flash Movie - When you roll the mouse over a button on the new movie I want it to go to a specific frame in the embedded movie.

How can I do this?

Thanks,
Sarah

Copyright © 2005-08 www.BigResource.com, All rights reserved