Navigation Trouble - Please, It's Urgent
hi there,
if anyone could help me with this problem i make sure i'll go to your country to give you a hug. I have a small site to present tomorrow, it's my last project in my final year at college. I have a "slide" navigation sistem, so, if i push a button, a movieclip inside a mask will move to a certain position. but the code that i used in a school exercise, moves an external movie clip, and not only another movie clip tha is inside of that one. I have a movie clip called "turns", inside there are 2 movie clips inside masks called "turnoff" and "turnon". theres also a layer with this action script: v=0; _root.onEnterFrame = function() { turnon._y=h-int(h-turnon._y)/1.2; turnoff._y=h-int(h-turnoff._y)/1.2; }; stop();
--------there is also the buttons with this code: on (release) { _root.turns.h = 200; }
--------my teacher did this code, i changed the code in the actions layer so now the button moves both the turnoff and turnon movieclips. what i want is to have a button that moves "turnoff", and another that moves "turnon". i tryed different things but i cant make it work, i thought that changing the button code with "_root.turnoff.h = 200;", could work but no way.
I'm terrible in flash, i hope someone can help me. My site depends on this code. If you want i can send you the fla. file
thanks
FlashKit > Flash Help > Flash Newbies
Posted on: 06-25-2006, 09:19 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Navigation Trouble
I'm trying to make a navigation system for a site. But what i have tried won't work. This is what its like:
[BUTTON 1] [BUTTON 2] [BUTTON 3]
:::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::
::::::::::::::::content:::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::
What happens is when it is loaded the content moves from offscreen form the right into the center but when you click on another button it moves off to the right and the new content comes in from off screen form the right.
One content on the timeline looks like this
[.]----->[.][.][.]----->[.]
The first tween is it going on the keyframe in the middle has stop() in it and the other tween is it going off.
the script in the buttons is
like
on.mouserealase
i=0; '0 is in button 1, 1 is in button etc
play()
in the end frame of the content moving out is like this
If {
i=0;
gotoANDplay(40) 'this is the first frame of content 1
}
else
i=1;
GotoANDplay(80) 'the first frame of content 2
else
i=2;
GotoAndPlay(100)
Else
STOP
[I know the code is setout proberly with the right symbols { but it is just for a general gist.
But what happens is it will just go right back to the start of the movie
any help appreciated.
THANKS
More Navigation Trouble...
U guys will remember I was having a problem before with enabling/disabling buttons for navigation on different levels. I'm having the same problem again but with a different movie. This one is a little more complex. Has much more action script and pizzaz. Took some stuff from FK and a lot of my own. It will be a great site, soon as I can get the buttons working again. The buttons are in a movie instance, that is loaded into another instance that is loaded into my main movie. They are loading external page.swf into a target in the main movie _root. To say the least it seems I cannot get the timelines/buttons/movies/whatever to communicate back and forth the btn.enabled=; or the btn._alpha=; tags. I've tried every combination of _levelx, _parent, & _root identifiers. Still no function, if you think you can help I will mail you the fls/swf files for the whole thing. So difficult to explain much further. Thank you all :-)
Still Having Trouble With Navigation
i have five different slideshow pages(swfs/html pages)... each has a buttons(movie clips) that i would like to link to corresponding pages to pull up the new slideshow page into _self... unfortunately when i've tried getURL it doesn't seem to work... i've done it using absolute and relative paths... i'm sure it's something silly and little that i'm missing...
if anyone has any ideas it would be much appreciated...
thanks...
PLEASE HELP - Trouble With Navigation
I have a movie where the user will navigate through the movieclips using LEFT & RIGHT arrow keys. ENTER key will be the click. There will be no mouse. The trouble i am having is that i need the rollover state to show when the user goes over the movieclip. i found some code and it makes the movieclip transparent with alpha when it is selected. Instead of it being alpha, i need it to go to a rollover state. there would be a rollover state that would be inside the movieclip with a label ("over").
For example: button1.gotoAndStop("over") instead of button1._alpha=60;.
I have been trying to execute this but it is not working. I would appreciate it if someone can help me out with what i would need to do in order to make this work.
Actionscript CODE:
PHP Code:
// Declare variabled.
var btnOver:Number = 0; // The button that is currently highlighted.
var btnClicked:Number = 0; // The button that has been clicked.
// Mouse button codes.
button1.onRollOver = function() {
btnOver = 1;
highlighted();
}
button1.onRollOut = function() {
btnOver = 0;
highlighted();
}
button1.onRelease = function() {
btnClicked = 1;
selected();
}
button2.onRollOver = function() {
btnOver = 2;
highlighted();
}
button2.onRollOut = function() {
btnOver = 0;
highlighted();
}
button2.onRelease = function() {
btnClicked = 2;
selected();
}
button3.onRollOver = function() {
btnOver = 3;
highlighted();
}
button3.onRollOut = function() {
btnOver = 0;
highlighted();
}
button3.onRelease = function() {
btnClicked = 3;
selected();
}
button4.onRollOver = function() {
btnOver = 4;
highlighted();
}
button4.onRollOut = function() {
btnOver = 0;
highlighted();
}
button4.onRelease = function() {
btnClicked = 4;
selected();
}
// Create keyboard listener.
watchKeyboard = new Object();
watchKeyboard.onKeyDown = function() {
if (Key.isDown(Key.ENTER)) {
btnClicked = btnOver;
selected();
}
if (Key.isDown(Key.LEFT)) {
btnOver--;
if (btnOver < 1){
btnOver = 4;
}
highlighted();
}
if (Key.isDown(Key.RIGHT)) {
btnOver++;
if (btnOver > 4){
btnOver = 1;
}
highlighted();
}
}; // Close onKeyDown.
Key.addListener(watchKeyboard);
function highlighted(){
button1._alpha = 100;
button2._alpha = 100;
button3._alpha = 100;
button4._alpha = 100;
_root["button"+btnOver]._alpha = 60;
if (btnOver != 0) {
outputText = "Button " +btnOver+ " has been selected.";
}
else {
outputText = "";
}
};
function selected(){
_root["button"+btnClicked]._alpha = 100;
outputText = "Button " +btnClicked+ " has been clicked.";
};
PLEASE HELP!! THANK YOU!!!
Navigation Trouble
I have a movie where the user will navigate through the movieclips using LEFT & RIGHT arrow keys. ENTER key will be the click. There will be no mouse. The trouble i am having is that i need the rollover state to show when the user goes over the movieclip. i found some code and it makes the movieclip transparent with alpha when it is selected. Instead of it being alpha, i need it to go to a rollover state. there would be a rollover state that would be inside the movieclip with a label ("over").
For example: button1.gotoAndStop("over") instead of button1._alpha=60;.
I have been trying to execute this but it is not working. I would appreciate it if someone can help me out with what i would need to do in order to make this work.
Actionscript CODE:
PHP Code:
// Declare variabled.
var btnOver:Number = 0; // The button that is currently highlighted.
var btnClicked:Number = 0; // The button that has been clicked.
// Mouse button codes.
button1.onRollOver = function() {
btnOver = 1;
highlighted();
}
button1.onRollOut = function() {
btnOver = 0;
highlighted();
}
button1.onRelease = function() {
btnClicked = 1;
selected();
}
button2.onRollOver = function() {
btnOver = 2;
highlighted();
}
button2.onRollOut = function() {
btnOver = 0;
highlighted();
}
button2.onRelease = function() {
btnClicked = 2;
selected();
}
button3.onRollOver = function() {
btnOver = 3;
highlighted();
}
button3.onRollOut = function() {
btnOver = 0;
highlighted();
}
button3.onRelease = function() {
btnClicked = 3;
selected();
}
button4.onRollOver = function() {
btnOver = 4;
highlighted();
}
button4.onRollOut = function() {
btnOver = 0;
highlighted();
}
button4.onRelease = function() {
btnClicked = 4;
selected();
}
// Create keyboard listener.
watchKeyboard = new Object();
watchKeyboard.onKeyDown = function() {
if (Key.isDown(Key.ENTER)) {
btnClicked = btnOver;
selected();
}
if (Key.isDown(Key.LEFT)) {
btnOver--;
if (btnOver < 1){
btnOver = 4;
}
highlighted();
}
if (Key.isDown(Key.RIGHT)) {
btnOver++;
if (btnOver > 4){
btnOver = 1;
}
highlighted();
}
}; // Close onKeyDown.
Key.addListener(watchKeyboard);
function highlighted(){
button1._alpha = 100;
button2._alpha = 100;
button3._alpha = 100;
button4._alpha = 100;
_root["button"+btnOver]._alpha = 60;
if (btnOver != 0) {
outputText = "Button " +btnOver+ " has been selected.";
}
else {
outputText = "";
}
};
function selected(){
_root["button"+btnClicked]._alpha = 100;
outputText = "Button " +btnClicked+ " has been clicked.";
};
Navigation Trouble
As you will see in the code below, I added _self to try and open in the same window, but it just does not work.
Help??
Home_btn.buttonMode = true;
var link:URLRequest = new URLRequest("Index.html");
Home_btn.addEventListener(MouseEvent.CLICK, onClick);
function onClick(event:MouseEvent):void {
navigateToURL(link, "_self");
}
Home_btn.buttonMode = true;
prev_btn.buttonMode = true;
var link2:URLRequest = new URLRequest("NDECEUpage3.html");
prev_btn.addEventListener(MouseEvent.CLICK, onClick2);
function onClick2(event:MouseEvent):void {
navigateToURL(link2, "_self");
}
prev_btn.buttonMode = true;
next_btn.buttonMode = true;
var link3:URLRequest = new URLRequest("NDECEUpage5.html");
next_btn.addEventListener(MouseEvent.CLICK, onClick3);
function onClick3(event:MouseEvent):void {
navigateToURL(link3, "_self");
}
next_btn.buttonMode = true;Text
Navigation Bar Trouble
hey everyone...been awhile since i needed a hand, but i'm stuck on trying to figure this out...though, it's probably a simple problem on my part...
anyway, my problem is this:
i want to create a navigation bar that follows the mouse on the y axis as the user moves around the screen.
once the user clicks a button, i want the navigation bar to quickly move up to y coordinate 57 and i want the navigation bar to be fixed to that spot from then on.
i've attached my fla. i have the following of the mouse working...but as far as getting the button to snap the navigation bar to the coordinate...shrug...
thanks in advance to anyone that can help
Simple Navigation Trouble
but it's driving me crazy.! Haven't fooled around with flash since flash 5 and now I am running MX 2004 Pro. I'm having simple navigation trouble.
I have MC on the main stage (MainMC) and inside MainMC I have a movie called skinTone so I can change the skintone of the model see LINK. Inside skinTone MC I have five labels "light, dark" etc... I cannot get th code to work. The button (change skintone) is located inside MainMC.
Please help it's driving me crazy.
I have tried
on (release) {
_root.MainMC.skinTone.gotoAndStop("light");
}
and about 5 others. what am I doing wrong? oh wonderful flash gurus. It's driving me nuts. *runs out of thread embarrassed
Button Navigation Trouble
Hey everyone, I'm kinda new to all this flash stuff so I'd really appreciate your help on this...the thing is, I'm trying to make it so that after a button is pressed a certain number of times, it goes to a different scene. I have been searching for ways to do this for awhile, but I just can't seem to figure it out. I was thinking that an if statement might be useful for this but I'm not sure. If anyone could help me out, that would be great! Thanks so much in advance
Navigation Trouble - Should Be Simple
Help! I am trying to do a simple navigation task from a menu within a movie clip to a certain frame within another movieclip. Why can I not navigate to the point I need to go? What am I not seeing? This should be simple right?? The code I have tried is:
on (press) {
_root.Intro_Movie.gotoAndPlay("menu");
}
on (press) {
this._parent._parent._parent._parent.Intro_Movie.gotoAndPlay("menu");
}
on(release) {
with(_root.Intro_Movie) {
gotoAndPlay("menu");
}
}
Simple NEXT-style Navigation Trouble
here's the deal, (am I stoopid or what?)(dont answer that)
I have on stage, a button and a movie clip with an instance name of "joe". Within that movie clip is a ball and various frames with stop actions on them. The ball is in a different location at each stop frame. I want to simulate movement of a ball around a circle (they are motion tweened.)
Can't I just put a script on the button on main timeline telling the movie clip to go to the current frame + 1, to make the movie incrementally move ahead?
on (press) {
_root.joe.gotoAndPlay(_currentframe+1);
}
this is my code on the button. It keep looping back to frame 1 and never getting beyond the first tween. What am I missing?
Trouble With Navigation Betweet Layers
hi
i want to make someting.... i just follow the tutorials but it dont work..... maby i forget someting? can somebody help me out? flash 5
on scene 1 there is a stop commant.
in scene 1 there are 2 movie's movie "first" and movie "second"
there is only one layer in scene 1
on movie "first" there is a stop commant in de first frame.
in movie "first" there is a button "button"
on movie "second" there are stop commants on the first en second frame.
there is a grapic on frame 1 a other on frame 2.
This is what i will make.
when you click on the button in movie "first" movie "second" must go to second frame....
This is action script on the button now:
on (release) {
_root.second.gotoAndStop(2);
}
when i start this no failure is reported but the button don't do anyting............
can somebody help me out?
thanks
[f8] Side-Scrolling Navigation Trouble
What i'm trying to do is create a flash navigation that has a sub menu that scrolls sideways. I want it to be automatic, so depending on where the mouse is over the sub nav, it reveals that area of the sub nav.
OBJECTIVES:
- I need help with my AS math to get flash_navigator_ver2.fla to ease the sub nav to reveal the nav depending on where the mouse is
- The movement should only happen on mouseover of the sub button
- the sub nav should ease but NOT should not slide past farther than the end of the current button.
I hope this makes sense. If so, is this even possible? I have detailed notes below in case you feel up to the challenge.
thanks,
jwt
Please view the enclosed files. flash_navigator_ver1.fla was the first working version i had. I thought it was working properly, EXCEPT i was finding that the sub nav would move position before you got a chance to hit some of the buttons. (test and try to hit every button, you'll see what i mean). Also, it uses a continuous loop to detect the position of the mouse -- not very processor friendly.
flash_navigator_ver2.fla is the new version. What i had done was remove the looping statement and instead called the reposition function only when the user moused over a sub button. adjustScrollerNew(myWidth, myX)
Now i assume you will need to get the position and width of the sub button so you can make sure the scroll doesn't go past the edge of the button. I want the sub nav to ease only once upon rolling over the button.
All the script for the subnav is in the root layer called "FUNCTION SUB"
Navigation should target Flash 7
Having Trouble With Tween Navigation (New To Flash)
http://douglas.mackenzie.natcoll.net...lash/index.swf
http://douglas.mackenzie.natcoll.net...lash/index.fla
is the link to the flash file.
The problem I am having is that it only tweens once. I wanted to be able to go back and forth - It just doesn't seem to respond after the first click.
Also it always goes the same way no matter where it's clicked. Can anyone work this out?
If anyone has time to read over this code it would be greatly appreciated.
Thanks
Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
var xTween:Tween;
var yTween:Tween;
var castMc:cast = new cast;
addChild(castMc);
castMc.x = -580;
castMc.y = 145;
//castMc.buttonMode = true;
var trailerMc:trailer = new trailer;
addChild(trailerMc);
trailerMc.x = 120;
trailerMc.y = 145;
//trailerMc.buttonMode = true;
var datesMc:dates = new dates;
addChild(datesMc);
datesMc.x = 820;
datesMc.y = 145;
//datesMc.buttonMode = true;
castMc.addEventListener(MouseEvent.CLICK, navigate);
trailerMc.addEventListener(MouseEvent.CLICK, navigate);
datesMc.addEventListener(MouseEvent.CLICK, navigate);
var castXposFarLeft:Number = -1280;
var castYposFarLeft:Number = 145;
var castXposLeft:Number = -580;
var castYposLeft:Number = 145;
var castXposMiddle:Number = 120;
var castYposMiddle:Number = 145;
var trailerXposLeft:Number = -580;
var trailerYposLeft:Number = 145;
var trailerXposMiddle:Number = 120;
var trailerYposMiddle:Number = 145;
var trailerXposRight:Number = 820;
var trailerYposRight:Number = 145;
var datesXposFarRight:Number = 1280;
var datesYposFarRight:Number = 145;
var datesXposRight:Number = 820;
var datesYposRight:Number = 145;
var datesXposMiddle:Number = 120;
var datesYposMiddle:Number = 145;
function navigate(event:MouseEvent):void
{
if(event.currentTarget.name == "castMc")
{
setTweenCast(castXposMiddle, castYposMiddle);
setTweenTrailer(trailerXposRight, trailerYposRight);
setTweenDates(datesXposFarRight, datesYposFarRight);
}
else if(event.currentTarget.name == "trailerMc")
{
setTweenCast(castXposLeft, castYposLeft);
setTweenTrailer(trailerXposMiddle, trailerYposMiddle);
setTweenDates(datesXposRight, datesYposRight);
}
else(event.currentTarget.name == "datesMc")
{
setTweenCast(castXposFarLeft, castYposFarLeft);
setTweenTrailer(trailerXposLeft, trailerYposLeft);
setTweenDates(datesXposMiddle, datesYposMiddle);
}
//trace(event.currentTarget.name);
}
function setTweenDates(tweenX:Number, tweenY:Number):void
{
xTween = new Tween(datesMc, "x", Strong.easeOut, datesMc.x, 0, 4, true);
yTween = new Tween(datesMc, "y", Strong.easeOut, datesMc.y, 145, 4, true);
xTween.begin = datesMc.x;
yTween.begin = datesMc.y;
xTween.finish = tweenX;
yTween.finish = tweenY;
xTween.start();
yTween.start();
}
function setTweenCast(tweenX:Number, tweenY:Number):void
{
xTween = new Tween(castMc, "x", Strong.easeOut, castMc.x, 0, 4, true);
yTween = new Tween(castMc, "y", Strong.easeOut, castMc.y, 145, 4, true);
xTween.begin = castMc.x;
yTween.begin = castMc.y;
xTween.finish = tweenX;
yTween.finish = tweenY;
xTween.start();
yTween.start();
}
function setTweenTrailer(tweenX:Number, tweenY:Number):void
{
xTween = new Tween(trailerMc, "x", Strong.easeOut, trailerMc.x, 0, 4, true);
yTween = new Tween(trailerMc, "y", Strong.easeOut, trailerMc.y, 145, 4, true);
xTween.begin = trailerMc.x;
yTween.begin = trailerMc.y;
xTween.finish = tweenX;
yTween.finish = tweenY;
xTween.start();
yTween.start();
}
Trouble With Functions And Navigation...oh The Pain...ohh The Agony...
Hey there,
I am new with ActionScript, but not new to flash. A friend told me that it is more efficient to place my actionscript in functions on frame one of the main timeline rather than having it all appear throughout the page on various buttons etc. I am trying to get a button tht loads in the main timeline to call upon a function, and then have it perform the following actions:
a) When the mouse is released, it will send the information to a function called openServices. The code to send it here is
//Services Button - loads the services swf
on(release){
_root.openServices();
}
Then the fuction code I have is as follows,
//Services Button - loads the services SWF file into the main time line.
fuction openServices(services_btn) {
_root.createEmptyMovieClip ("infoPage_mc",_root.getNextHighestDepth());
_root.infoPage_mc.loadMovie("hello.swf");
_root.infoPage_mc._y=55;
_root.infoPage_mc._x=0;
}
The button's instance is services_btn .
When I try to test the movie, it states that I have a syntax error. Forgive my inability to detect this error, but I would more than appreciate some assistance. I love the idea of functions, and hope to make use of them more if I can just see a good model of one.
Later, and Thanks,
Greg
Trouble With Flash MX 2004 Button Navigation
Hello
This is my first time on this site and if I am posting this in the incorrect spot then please direct me elsewhere. I am trying to create simple button navigation in Flash MX 5. In the tutorial on your site and in the book I have checked out (the book is on Flash4 though) it says you can simply click on the button and then select Modify>Instance, choose the actions tab, and select from a variety of On (mouse event) actions. Flash MX 5 does not work like this and I have tried going in to the actions and selecting the action scipt commands by hand but I keep receiving script errors. I am fairly new to the program and the way the manual and a couple tutorials I have looked at make it seem rather simple to use buttons to navigate between scenes and frames of a flash document. I seem to be missing how to get to this simple mouse action/naviation menu. To me it seems they have actually made it harder not any easier in the transition from 4 to 5.
Thanks for any help you may be able to offer,
ebarr
Trouble With Flash MX 2004 Button Navigation
Hello
This is my first time on this site and if I am posting this in the incorrect spot then please direct me elsewhere. I am trying to create simple button navigation in Flash MX 5. In the tutorial on your site and in the book I have checked out (the book is on Flash4 though) it says you can simply click on the button and then select Modify>Instance, choose the actions tab, and select from a variety of On (mouse event) actions. Flash MX 5 does not work like this and I have tried going in to the actions and selecting the action scipt commands by hand but I keep receiving script errors. I am fairly new to the program and the way the manual and a couple tutorials I have looked at make it seem rather simple to use buttons to navigate between scenes and frames of a flash document. I seem to be missing how to get to this simple mouse action/naviation menu. To me it seems they have actually made it harder not any easier in the transition from 4 to 5.
Thanks for any help you may be able to offer,
ebarr
RemoveChild - Trouble Removing Sprite W/ Tabbed Navigation
I have a widget I've created. It's composed of:Shell.as - document class, from which I loadBackground.as (extends Sprite) - loads background assets for widget
Navigation.as (extends Sprite) - the tabbed navigation object for the widget
GameDayTab.as, TeamInfoTab.as or NewsTab.as (each extends Sprite) - one of these at a time; the content for each section called from the tabbed navigation
Right now, I instantiate one of each of the three tab classes depending on user interaction. When I flip between the tabs in the widget, I make the other 2 invisible to the user:
ActionScript Code:
// load tab content
private function loadTab(current_tab:String, last_tab:String = null):void
{
trace(":: loadTab() ::");
if (last_tab)
{
switch(last_tab)
{
case "nav_tab_0" :
if(_gameDayTab) { _gameDayTab.visible = false; }
break;
case "nav_tab_1" :
if(_teamInfoTab) { _teamInfoTab.visible = false; }
break;
case "nav_tab_2" :
if(_newsTab) { _newsTab.visible = false }
break;
}
}
switch(current_tab)
{
case "nav_tab_0" :
if (_gameDayTab)
{
_gameDayTab.visible = true;
}
else
{
_gameDayTab = new GameDayTab(_configData.game_day_tab_xml, _cssStyles);
_gameDayTab.name = "game_day_tab";
addChild(_gameDayTab);
}
break;
case "nav_tab_1" :
if (_teamInfoTab)
{
_teamInfoTab.visible = true;
}
else
{
_teamInfoTab = new TeamInfoTab(_configData.team_info_tab_xml, _cssStyles);
_teamInfoTab.name = "team_info_tab";
addChild(_teamInfoTab);
}
break;
case "nav_tab_2" :
if (_newsTab)
{
_newsTab.visible = true;
}
else
{
_newsTab = new NewsTab(_configData.news_tab_xml, _cssStyles);
_newsTab.name = "news_tab";
addChild(_newsTab);
}
break;
}
}
This is soooo rudimentary to me. What I would LIKE to do is to REMOVE a current tab instance entirely (deleting all data associated with it) so that, when a user revisits the tab, the tab content refreshes (loads updated XML information -- each tab does this in various ways).
Problem is, when I tried to remove GameDayTab.as instance, which included a few calls to the BulkLoader class, I got errors from BulkLoader saying that it had already been instantiated. I couldn't do this:
ActionScript Code:
removeChild(_gameDayTab)
and then run the load function again for that tab type.
What is the best way to manage sort of content windows like this with removeChild?
Thanks,
IronChefMorimoto
Navigation Trouble, Using Button Rollover, Rollout And Button Down
Hello all
Take a look at the following sites; and notice their menus. Both have a rollover and rollout on their buttons, and when the button is hit the button stays down until another button is pressed. In the scissor sisters site, the neon bar still fades out after another has been pressed.
Franz Ferdinand
Scissor Sisters
I am trying to achieve this myself with my own site, which you can view in progess here:
My Site
I have mastered the button rollOver and rollOut effect, in which i gathered the code from a kirupa tutorial. My problem is, getting the neon bar to stay underneath teh last button that has been pressed.
The main movie is located on the main timeline in frame 2, because frame 1 contains the pre loader.
The actions for frame 2 of the main timeline are:
Code:
stop();
movieLoader.loadMovie("news.swf");
total = movieLoader.getBytesTotal();
loads = movieLoader.getBytesLoaded();
percent1 = Math.round(loads/total*100);
movieLoadText.text = "Loading news "+percent1+"%";
if (loads != total) {
} else {
movieLoadText._visible = false;
}
Now the buttons are not buttons, they are movieclips, which are located on the stage, and have instance names of b1 for news, b2 for biography etc etc
Inside the movieclip, the animation of the neon bar fading in takes 25 frames, and this has a stop action on the end.
This code is placed on the first frame:
Code:
stop();
news.onEnterFrame = function(){
if(rewind == true)
{
prevFrame();
}
}
news.onRollOver = function(){
rewind = false;
gotoAndPlay(25);
}
news.onRollOut = function(){
rewind = true;
}
news.onRelease = function(){
_root.logo.gotoAndPlay("buzz");
_root.movieLoader.loadMovie("news.swf");
}
As you have probably noticed this is the same as the kirupa tutorial.
So now my problem is to make sure that the last button clicked leaves the underline bar down until the next button is pressed.
Whoever can solve this for me is a life saviour!
Thanks
Williby
LoadMovie Trouble Trouble Troubles
hello,
i'm having a little bit of trouble here trying to load multiple movies into the same container. not all at one time. like this:
when a button is clicked this happens in my preloader clip which is located in my _root movie:
********************************
// set vars
sectionMovie = _root.currentSection + ".swf";
// un/load movie
unloadMovie("_root.SectionContent");
loadMovie(sectionMovie, "_root.SectionContent");
********************************
then the next frame of the preloader says:
********************************
// get the percent of the movie loaded
bytesLoaded = _root.sectionContent.getBytesLoaded();
bytesTotal = _root.sectionContent.getBytesTotal();
percentLoaded = int((bytesLoaded / bytesTotal)*100);
// if it's loaded then continue
if (percentLoaded == 100) {
this.gotoAndStop (1);
}
********************************
it all seems like it should work. i click "button1" which loads "movie1.swf" perfectly. then i click "button2" and it will unload the movie fine, but it just stops when it gets to "loadMovie"... anyone know what is happening?
thakns in advance for the help, it's a school project...mwaahaha!
xo
"Oooooh Trouble Trouble..." (Foghat Reference +1000 Points)
I am attempting to add X movie clips to the stage via script, with follow AI behaviors added to each of them. But for now I am just having them immediately start moving left until they hit the stage edge OR eachother...which is the problem.
I cannot get them ALL to stop when they collide with somehting else on the stage...
the way I atempted to solve this problem was to start an array... a list... and to add to that list the name of every object I add to the stage when I add it to the stage. So before ANYTHING moves it loops through this array to see if it is hitting anything else on the stage. Sounds simple right?
Well it seems to only work for the LAST movie attached in my function.
I have attached the script to this post. Please take a look, provide some help, give me some alternative ideas, tell me a good joke :-P, just gimme some feedback. Thanks in advance to anyone who even tries to help.
CuePoint Navigation Vs. CueSegment Navigation
Having problems throwing up a talking head slide show in MX2004 Pro.
1) The slider works going forwards, but not going backwards
2) The buttons seeking slides work going forward, but not going backwards
After talking with tech support, it seems the problem is with how they set up CuePoint navigation. Basically, a single time point = cue point triggers an event, which is a slide change. This is triggered from left to right in time, but not going the other way.
A slide show requires a different action script; however. It is not cue points that are linked with slides, but SEGMENTS in time are linked with STATES that correspond with a certain slide being in place.
Is there an action script expert out there who could help me program this into a slider that really works, going backwards and forwards?
If that is too ambitious, how can I subtract 300 milliseconds from q.time?
This will at least, hopefully, make the slide buttons work, since they will seek to a time point slightly before the actual cue point.
Jonas
CuePoint Navigation Vs. CueSegment Navigation
Having problems throwing up a talking head slide show in MX2004 Pro.
1) The slider works going forwards, but not going backwards
2) The buttons seeking slides work going forward, but not going backwards
After talking with tech support, it seems the problem is with how they set up CuePoint navigation. Basically, a single time point = cue point triggers an event, which is a slide change. This is triggered from left to right in time, but not going the other way.
A slide show requires a different action script; however. It is not cue points that are linked with slides, but SEGMENTS in time are linked with STATES that correspond with a certain slide being in place.
Is there an action script expert out there who could help me program this into a slider that really works, going backwards and forwards?
If that is too ambitious, how can I subtract 300 milliseconds from q.time?
This will at least, hopefully, make the slide buttons work, since they will seek to a time point slightly before the actual cue point.
Jonas
Trouble Explaining The Trouble
i am having a hard time explaining this problem so i have attached my fla file with some notes attached to it.
i'm trying to customise the a.s. but alas i'm not very good at it yet.
i have an element on the page that when it is clicked on it zooms big and comes to the center of the stage. when you click on it again it zooms back to its original position. - i have this part working.
the problem is i want elements within the zoomed elements to behave the same way. essentially zooming further into the stage. i just can't get it to work.
at this point i am completely lost, any help on this is much appreciated.
thanks everyone
Having Trouble With
I am having trouble with scripting or so I think. I made a movie and just loaded it up, the navi bar was working fine now it isn't. Checked...never mind got done.
L
Having Trouble, Need Some Help
I have not idea why but here is what is going on.
I have a button inside a movie clip. I want that button to tell the main timeline to go to a scene and or a label. for some reason its not working. Here is the action i have on the button
_root.gotoAndPlay ("scene2" , 1);
Could someone tell me why this is not working????
Trouble With URL Help Please
I'm curently developing a web site, and I am making it with Front Page. I allready have my flash animation to post it on to my site. But the thing is that I'm trying to post some buttons I did in flash, on to my HTML page and make these buttons open the frame I want it to. My HTML page has 4 frames.
I've allready done it but I just can't have it open the frame I want to. Please help!!!!!
Or is there an other way of inserting Flash Buttons into Front Page??????
If Else Trouble
I have an interface, and when a button is clicked it plays frame 1 of a movie named "screen" which I dragged on to the main movie.
If any of the buttons have been clicked it no longer plays frame 1 instead it plays frame 31.
How can I do this successfully, I'm trying to set a variable to 1 then increment it by 1 each time a button is clicked, if the var equals to more than 1 then it should play frame number 31.
But I'm not that familiar with the syntax however I kinda know what I'm supposed to do.
Can anybody help in any way?
Trouble With An If
Alright I have to frames and one button. The button should tell the the root to go to "portfoliop" frame onyl if the current frame on the root is not damnit.
Should this really be this tricky?
on (release) {
if (_root._currentframe != "damnit") {
_root.gotoAndPlay("portfoliop");
}
}
As usual assistance is always appreciated.
Thanks everyone
Plz Help Me, Im Having Trouble
Ok
I am having trouble and i need some help i have searched everywhere for a tutorial or message but here is my question...
I am making a sort of banner in flash where it is to go in a --seperate-- frame at the top. Anyway this banner has links to different pages in my site. But when u click on it, it opens that page in the same web page frame which is really annoying... So i want it to open in the main frame in the middle.
Plz help me
reply asap plz
Big Trouble
this is not flash related but i really need help. what hapens to my computer is that sometimes my system just hangs and the thing i am seeign at that time, comes up as i am seeing it in speed. u know in the movies a bullet is moving and in breaks the wind barriers, that sort of thing. i dont know what to do. this thing can happen any momemt. please help.
Trouble With The Web
Hello,
I have experienced some problems after uploading my website onto the web. I designed it (obviously) totally on my home PC and everything there works perfectly, all the preloaders work, the intro is fine and the seperate movies load as they are supposed to.
However, when I've uploaded it, it won't get past the intro. The initial preloader seems to work fine, but the separate homepage.swf etc. just won't load. They're all being held in the same sub folder on the ftp server and I can see no reason why it won't work - particularly as it is great on my home PC.
Anyone else had these kinds of problems?
Trouble With Æ,ø,å
I'm loading an external .txt document into my flash movie, but it doesn't support Danish. I have tried to write the html code but still no luck. Is there any way to do this?
Having Trouble
I am having trouble, I am so used to just hitting delete to remove a keyframe, How can this be accomplished in mx?
Any help would be appreciated, other than right clicking and clicking remove.
I'm Looking For Trouble...
And I found it!!
I need to make a script for a button that enables me to goto the "PREVIOUS LABEL" when you click it.
(just like previous frame/next frame)
Can you help me out?
thanks,
J
Var Trouble
hi,
i got 2 listboxes and use em as a navigation menu and an index search. both have the same changehandler. i use the data to determine which frame in which mc to jump to. the function works fine for the inhalt_lb but
it won t work for the stichwort_lb. it simply jumps to frame 1 of the the correct mc. the funny thing is i tried to use a dyn textbox as debug output but it won t show the status var...it simply shows nothing. the index and frame textboxes show the value of the but status is simply empty.
and even more funny is that if i change my if condition from status=inhalt to status = x it still works although status will never get x. i m confused so pls help (using flashmx).
hi,
i got 2 listboxes and use em as a navigation menu and an index search. both have the same changehandler. i use the data to determine which frame in which mc to jump to. the function works fine for the inhalt_lb but
it won t work for the stichwort_lb. it simply jumps to frame 1 of the the correct mc. the funny thing is i tried to use a dyn textbox as debug output but it won t show the status var...it simply shows nothing. the index and frame textboxes show the value of the but status is simply empty.
and even more funny is that if i change my if condition from status=inhalt to status = x it still works although status will never get x. i m confused so pls help.
function jump2frame(){
if (status == inhalt)
{
index = inhalt_lb.getSelectedIndex();
frame = inhalt_lb.getSelectedItem().data;
if (index < 7) {
gotoAndStop("1");
textpad.gotoAndStop(frame);
}
}
else if (status == stichwort){
frame = stichwort_lb.getSelectedItem().data;
if (frame < 200) {
frame = frame-100;
gotoAndStop("1");
textpad.gotoAndStop(frame);
}
}
}
Help Me Please I Am In Trouble I Think
I have made an entire site in flash, only i am still partly complete. Loads more things have yet to be done to it, I have made my site so its all in 1 file.
I think I am going to have mega download times for user's.
How can i get overcome this? Is there anything I can do to split up the download times into a user's browser?
Please help I need to show this site to an important person this coming tues and i don't want to look the fool!
I Am Trouble, Plz Help
Hi, yesterday there was a problem, and a humble person solved it for me, i was working on win98, but when i try to run that on window 2000 it was not giving any responce not at all.
Plz see the attached Flash 5 and HTML file. see the code for both HTML and FLA files.
I am just trying to open a URL from flash if the value of flash will be one.
plz see the code u will understand.
thanks
Please Help : I'm In Trouble
Hi guys,
I’m facing a major problem with a scrip that I’m doing, i think it's pretty simple but i can't figure this out.
I’m loading variables (numbers) from a text file with a loadVariables("poll.txt",_root); action, i can see the variables when i run the swf file. but the problem is that i'm trying to have a "total" that counts all the variables and dump them in there.
I’m using variable1+varables2; but it doesn’t work. i think it's because it's loading it from an external files please help. The Swf file will be in flash 6.
thanks in advance
Sam
Trouble With Mc's
Hi Dudes & Dudettes!
I am hoping that one of you flash bods can help me out with this MC problem that I can't get my head around!?
I have a movie that I am working and in theory it should be quite simple. I have a MC(screen) of a display screen that part-rotates on a timeline of 100 frames (24fps) frame 1 shows a 3/4 left side on view of the screen - frame 50 shows a flat front on view - and frame 100 shows a 3/4 right side on view. This movie clip is then put into another timeline on a 750width stage where the MC-Screen starts on the far left hand side of the stage and moves to the exact centre on frame 50 and finishes on the far right of the stage on frame 100 all positions on the stage correspond to the rotation amount in the MC-screen.
What I want to do is have 10 screens placed at intervals across the stage and want the MC-screen to start playing from different frames of the MC-screen ie: the first screen plays from frame 1 of it's timeline then the next screen will always play from frame 10 etc... so it gives the effect of continuous movement by the screens. I have tried to duplicate the MC-screen and then paste the first 10 frames at the end of the timeline for the MC-screen so as frame 10 becomes frame 1 but it seems to eat the memory up.
How do I do it??? someone out there must have some idea......
......please!!!!
Cheers
Diga
FLA Trouble
Does anyone know why Flash is cutting off half my image when I go to view it? When I export it to FP, its only half there. And with the sizethat I a, using, 600 X 20, it comes up very small. I am using the menu tabs template that came with flash. PLEASE HELP!!!
Thanks in advance!
SWF Trouble
Hello. I am creating a simple flash file for my boss. When I use the jimco addins flasher to add my movie to the site, It works fine. When I try to see if the video works, its good till you hit the products value which is supposed to bring you to a new menu set. Instead, it tries to start the swf over, and stops. PLEASE HELP!!! It works fine as just a SWF too by the way!!
Here's the link. The SWF and actual file can be found at:
http://yorkwire.com/swftest.htm
Thanks again
HELP Trouble With .swf
I've loaded some .swf files into my movie, and when I use my navigation buttons the image remains on the screen, on top of the navigation.
Right now I have it set up so that the .swf is actually a pop-up from a hotspot, contained within a movie. The button is contained on frame one. The swf is on frame 2. I have an exit box in the upright corner that hold the unload movie command. This works great as long as you don't try to use the navigation buttons. But!! as I said, when you try to use the navigation buttons while viewing the movie holding the .swf, the .swf stays right on top.
What can I do? Please Please Please help me. I'm supposed to be leaving on a much needed vacation today.
Having Trouble
Yep.. I'm a newbie.. and I can't figure out how to put my swf files on my website (geocities) I already tried ws_ftp Pro.. doesnt let me connect to geocities.. i cannot figure out the html code to post. help wud be good! ty!
More Trouble...
Now, I know the javascript code, and everything
I even tested it in a HTML page and it worked.
But I'm having trouble with flash.
THere's two pages:
index.html
home.html
I put this code in index:
var windowH=600 // high
// set the screen position where the popup should appear
var windowX = (screen.width/2)-(windowW/2);
var windowY = (screen.height/2)-(windowH/2);
// set the url of the page to show in the popup
var urlPop = "teste.htm"
// set the title of the page
var title = "This Is A Frameless Popup Window"
// set this to true if the popup should close
// upon leaving the launching page; else, false
var autoclose = true
// ============================
// do not edit below this line
// ============================
s = "width="+windowW+",height="+windowH;
var beIE = document.all?true:false
function openFrameless(){
if (beIE){
NFW = window.open("","popFrameless","fullscreen,"+s)
NFW.blur()
window.focus()
NFW.resizeTo(windowW,windowH)
NFW.moveTo(windowX,windowY)
var frameString=""+
"<html>"+
"<head>"+
"<title>"+title+"</title>"+
"</head>"+
"<frameset rows='*,0' framespacing=0 border=0 frameborder=0>"+
"<frame name='top' src='"+urlPop+"' scrolling=auto>"+
"<frame name='bottom' src='about:blank' scrolling='no'>"+
"</frameset>"+
"</html>"
NFW.document.open();
NFW.document.write(frameString)
NFW.document.close()
} else {
NFW=window.open(urlPop,"popFrameless","scrollbars, "+s)
NFW.blur()
window.focus()
NFW.resizeTo(windowW,windowH)
NFW.moveTo(windowX,windowY)
}
NFW.focus()
if (autoclose){
window.onunload = function(){NFW.close()}
}
}
</script>
Trouble With My FPS
Im making a simple FPS and im trying to make the enemies pop up at a certain point but they never come here is the script for the enemy named socka:
onClipEvent (load){
counter = 0;
}
onClipEvent (enterFrame){
counter +=1;
if (counter>=1200 and _root.doorahit==true){
this._y = 80;
this._x = 200;
counter = 0;
}
}
And heres the script for the button that you use to shoot him (if it matters):
on (release) {
_root.gun.gotoAndPlay( 2 );
if (_root.doorahit==false){
_root.doora.gotoAndPlay( 2 );
}
if (_root.socka._y==80 and _root.doorahit==true) {
_root.socka.gotoAndPlay( 2 );
}
}
The varaible doorahit is activated in a movie clip animation and I know it works just FWI.
if you can see anything ive done wrong please say.
Thanks, Plog.
Gif Trouble
when i import a gif into flash, it adds a white line at the top of it. Why does this happen and how do i stop it. I have turned off smoothing in properties, but its still there. Ive also tried changing jpeg export quality and turned off file compression, but neither of these did anything.
Thanks in advance
rob
Gif Trouble
when i import a gif into flash, it adds a white line at the top of it. Why does this happen and how do i stop it. I have turned off smoothing in properties, but its still there. Ive also tried changing jpeg export quality and turned off file compression, but neither of these did anything.
Thanks in advance
rob
Gif Trouble
when i import a gif into flash, it adds a white line at the top of it. Why does this happen and how do i stop it. I have turned off smoothing in properties, but its still there. Ive also tried changing jpeg export quality and turned off file compression, but neither of these did anything.
Thanks in advance
rob
|