RollOver Hover Timing Issue
I have 9 buttons on a Flash animation and when I hover over one of the buttons, a graphic is displayed. As I move the mouse off the button, the graphic is removed. I am using the following script to make the graphic display:
service_desk.onRollOver = function () {
service_desk.gotoAndPlay("_over");
}
service_desk.onRollOut = function () {
service_desk.gotoAndPlay("_out");
}
monitoring.onRollOver = function () {
monitoring.gotoAndPlay("_over");
}
monitoring.onRollOut = function () {
monitoring.gotoAndPlay("_out");
}
The issue I am having is that if I move my mouse from one button to another too quickly, the first button does not perform the “_out” so I have to mouse back over the button to have the monitoring.gotoAndPlay("_out"); work. If I move my mouse slowly from button to button, everything seems to work just fine.
Can someone please suggest a way to fix this? I am willing to use a different technique; I just need to get this working.
Adobe > Flash General Discussion
Posted on: 06/10/2007 11:09:54 AM
View Complete Forum Thread with Replies
Sponsored Links:
Rollover Timing
I have a navigation that can be seen here:
http://71.18.60.52/upload/test.swf
My client is having trouble when you try and use the secondary nav. Whats happening is that they rollover the neighboring button and it changes the secondary nav. Each primary nav button goes and stops at a different frame.
Are there any workarounds for this type of thing? A timer on the button maybe?
View Replies !
View Related
Timing Issue(?)
I am building an application to run on CD, which has video clips (I imported into flash from avi's supplied). Each clip has a counter on it, which I must match in a more legible format.
I found a script from these forums and altered it to fit my needs and write dynamic text.
it works fine on my mac but as soon as I run it on another mac or PC the dynamic text goes out of sync with the video clip.
any suggestions? I am fairly new to actionscripting.
thank you
Jon-e-orange
// the script
frame 1 -
var startNum:Number=5;
mcTimerD.Cnt_txt.text = startNum;
mcTimerD.markerTxt.text = "00";
frame 4 -
mcTimerD.Cnt_txt.text = startNum+1;
frame 5-
var count:Number;
count = startNum+1;
update = function () {
count += 1;
mcTimerD.Cnt_txt.text = count;
};
intv1 = setInterval(update, 1000);
frame 116 -
clearInterval(intv1);
View Replies !
View Related
Timing Issue
Hi,
I have this media player I built in flash done and it basically loads a video movie and plays it easy enough. The video movie that gets loaded also loads into the player a subtitles movie that get played along with the video movie. I did it that way so I could keep the timing on both the video and subtitles the same.
Now I would like to just have two files that load into the player with a click of the button and have the subtitles movie wait to play until the video movie is fully loaded and ready to go since it will take some time to load it in comparison to the subtitles. I can't combine the video and subtitles because of the look and feel so my only option is the separate movies.
I was wondering if anyone had a suggestion as to where I need to start regarding action script to make this happen.
Thanks,
Gary
View Replies !
View Related
Timing Issue
Hi,
I have this media player I built in flash done and it basically loads a video movie and plays it easy enough. The video movie that gets loaded also loads into the player a subtitles movie that get played along with the video movie. I did it that way so I could keep the timing on both the video and subtitles the same.
Now I would like to just have two files that load into the player with a click of the button and have the subtitles movie wait to play until the video movie is fully loaded and ready to go since it will take some time to load it in comparison to the subtitles. I can't combine the video and subtitles because of the look and feel so my only option is the separate movies.
I was wondering if anyone had a suggestion as to where I need to start regarding action script to make this happen.
Thanks,
Gary
View Replies !
View Related
Hover Delay On Rollover
Hello Smart People:
Does anyone have any script that will delay a movie for a second before continuing on with playing -
to give a kind of hover effect when rolling over long lists of links that start animated graphics - so they don't start playing if someone wants to move through the list quickly -
if this makes sense somehow -
please post your awesomeness.
thanks
happy heidi
View Replies !
View Related
Wierd Timing Issue....
Okay guys, here's what I'm doing. In part one I'm parsing the XML data and the pushing all of the text data into arrays, dynamically.
Using a "for" loop I'm using the attachMovie to generate and place buttons on the stage using the array.length property. So, basically what I want to do is to be able to click on one of the buttons(movieclip) and have it display in a text field. For some reason it's not displaying the text properly. If I write the following...
genreName_txt.text = genre_array[id];
it will not display the text in the text field and it will return "undefinded" when running a trace. But if I write
genreName_txt.text = genre_array[3];
for example, it displays the proper text in the text field.
Why can't I use the "genre_array[id]" to access text within the genre_array?
genreXML = new XML();
genre_array = new Array();
ginfo_array = new Array();
genreXML.ignoreWhite = true;
genreXML.load("Genrelist.xml");
genreXML.onLoad = function(success) {
if (success) {
var rootNode = this.firstChild;
var children = rootNode.childNodes;
for (i=0; children[i]; i++) {
var Genre = children[i].attributes.genre;
var List = children[i].firstChild.nodeValue;
//trace ("Genre : "+Genre);
genre_array.push(Genre);
ginfo_array.push(List);
}
buildIt();
}
};
//-------Build Genre Buttons----------
function Buildit() {
for (i=1; i<=genre_array.length; i++) {
attachMovie("daButton_mc", "genre_mc"+i, i);
this["genre_mc"+i]._x = 95+(i-1)*10;
this["genre_mc"+i]._y = 498;
this["genre_mc"+i]._xscale = 60;
this["genre_mc"+i]._yscale = 90;
this["genre_mc"+i].id = i;
this["genre_mc"+i].onRollover = function() {
rollOver(this);
genreName_txt.text = genre_array[i];
};
this["genre_mc"+i].onRollOut = function() {
rollOut(this);
genreName_txt.text = "";
};
}
}
View Replies !
View Related
Loadvars Timing Issue
i am writing a class called Game and in the constructor, i created a loadvars object that loads a series of strings into an array like so:
Code:
public function Game() {
//load the words into the arrays
test();
init();
}
private function test() {
trace("OMG");
}
private function init() {
trace("in init");
dictioLoader = new LoadVars();
dictioLoader.onLoad = function(success) {
fourLetters = this.four_letters.split('|');
fiveLetters = this.five_letters.split('|');
//_global.trace(fourLetters);
//_global.trace(fiveLetters);
test();
}
dictioLoader.load("words.php");
}
what prints out is:
OMG
in init
BUT, the question is..why isn't it calling the test() function when the thing is loaded? im really stumped here, so any help would be appreciated.
View Replies !
View Related
Interval/timing Issue
We are having a problem with an interval/timing issue. (we think)
The idea is to click a button & attach and play two MCs at two set intervals. Movie1 should initially load and play without delay. Movie2 should load & play 7 secs later. At the same time we need to populate a dynamic text box with a number from 1-4 each time one of the movies loads until the text box count intervals up to 4 (1,2,3,4). The text box count should reset when it reaches 4. At the count of 4 we also need to populate another dynamic text box with a message string. This message remains throughout. The chart below lays out our goals a bit more clearly…
1.Movie 1 loads & plays
textboxA = 1
5 sec elapses
2.Movie 2 loads & plays
textboxA = 2
7 sec elapses
3.Movie 1 loads & Plays
textboxA = 3
5 sec elapes
4.Movie2 Loads & Plays
textbox A= 4
7 sec elapes
5.textboxB = “message”
6.REPEAT PROCESS
7.Movie 1 loads & plays
textboxA = 1
5 sec elapses
8.Movie 2 loads & plays
textboxA = 2
7 sec elapses
9.Movie 1 loads & Plays
textboxA = 3
5 sec elapes
10.Movie2 Loads & Plays
textbox A= 4
7 sec elapes
11.textboxB = “message”
12.REPEAT PROCESS...
We are so lost! Any code suggestions would be a blessing.
View Replies !
View Related
LoadVariables Timing Issue
Can I use the results of loading a variables file using loadVariables on the very next frame? Or do I need to build in a set number of frames delay before trying to use the variables being populated by the load statement?
Right now I am only giving one frame spacing from execution of the loadVariables and I try to use the variables on the next frame with sporadic results. Is next frame use overly optimistic? What is a good coding practice if there is a timing issue with using the results of loadVariables?
Here is script I am using...
quote:loadVariables("MyVars.txt", _root);
Thanks!
Bob
View Replies !
View Related
Timing Or Syncing Issue
I have been working on a Flash movie that has a nine minute MP3 audio track that I am syncing or cueing graphics to appear when the audio reaches a certain point or phrase. The problem is, when offline, my Published movie seems to be accurate as far as the timing, but when I post it to my web server to test the movie, it is not matching correctly. This project is still in progress and I want to resolve this issue before I complete any more of the movie. Can anyone help? Here is a link to the uploaded movie...
LINK-
http://www.t2graphicdesign.com/merlin/
View Replies !
View Related
Beginner Question - Hover/Rollover
I'd like to remove the HAND SIGN when the cursor hovers over a button. However, i'd like it to work this way:
I'd like to create a SYMBOL(NOT A BUTTON.) When your cursor hovers over that symbol then it plays another movie clip. When the cursor is off the symbol, then the movie clip disappears.
How to do this? Its very basic, I know, but I am very rusty on my flash skills.
View Replies !
View Related
Flash To Javascript - Timing Issue?
I have a problem which I'm guessing is a timing issue.
I have a FMX2004 / FlashPlayer7 movie that is just a data store using a shared object. It is a 1px by 1px movie with no graphics, 1 frame only, just actionscript2 for reading and writing shared object data. The movie itself does nothing, it is "driven" by javascript, and acts back apon javascript via fscommands. The movie runs on a web page, but the web page runs locally (from a file:// reference) from a CD. There is no web server involved. My program basically does this:
1. Web Page loads
2. Javascript load even fires and finds movie object
3. Does a SetVariable and sends a command 'initialise' (as a string)
3a. Flash sees the variable change and performs a switch on the command name. An initialise command tells it to load an array from the shared object.
3b. Flash finishes loading the shared object data (usually several hundred K) and then serialises it into a string.
3c. Flash uses a FSCommand to send the string back to javascript.
4. Javascript does a switch on the fscommand and data to deterrmine and deserialises the data back into a javascript array
5. A callback function is called by javascript to tell it it is ok to continue processing.
n. After user input or other events, flash may again be notified using SetVariable about other commands or be sent data to be saved. It uses the same javascript callback method via FSCommands to notify javascript that it is finished processing / saving.
This round robin processing seems to work fine most of the time, but tends to fail when the machine is under load (such as many tasks running or intensive cpu operations). Interestinly, the process seems to work fine regardless of the overall speed of the machine it runs on (tried old 700mhz celerons with low ram, 2.8ghz p4's with lots of ram, mid range machines) and unless the cpu is actually under load, it performs properly. Once you put extra cpu load on the machine, it is as if the flash movie doesn't finish loading the data from the shared object before it internally continues and does it's fscommand call. I'm guessing that the extra cpu load causes the bit of the flash player that can access external data from shared objects to perform slower than the execution of the actionscript that asked for it - but that's just my theory. I don't know enough about how a movie executes to verify this.
Can someone explain in glorious techincal detail the execution path of a movie so I can rule in or out my suspicions about cpu load affecting the shared object load time, and also let me know if the process I'm doing here is appropriate or if there's a better method of talking bidirectionally from javascript to a flash movie.
View Replies !
View Related
Class Initialization Timing Issue
I have what I think is a timing issue in the initialization of my classes. I have a main movie that loads in a few child movies. One of these is the communications file that handles all the communications with the server. The others are different UI elements. One of the UI swfs contains instances of a class I've created called "ScrollingTextField", which is basically an extension of the MovieClip class that will scroll the text if the text is too long for the field. This works great most of the time. However, I've run into a few occasions where NONE of the instances of the ScrollingTextField class work at all. The text doesn't even get displayed. All I have are blank lines. I think this is caused by the fact that, due to odd timing differences, sometimes I try to write to the ScrollingTextField instance before the class is fully initialized. I've tried to put "import" lines in the movie before anything else happens, but that hasn't helped. The part that confuses me the most is that when this happens, it never recovers. It seems as if trying to write to a method of a class when that class doesn't fully exist yet forever breaks any instances of that class.
Has anyone seen this before or are there simple ways around this that have eluded me? Any help would be greatly appreciated.
Thanks,
View Replies !
View Related
MouseEvent.CLICK Timing Issue
Here is my eventhandler:
function MoveItem(Event:MouseEvent):void
{
if (Event.target.alpha == 1)
{
trace("Event.target.alpha = 1");
Event.target.alpha = .5;
}
if (Event.target.alpha == .5)
{
trace("Event.target.alpha = .5");
Event.target.alpha = 1;
}
}
A single click triggers both trace statements. I was hoping to make it a toggle functionality. What did I do wrong?
Thanks,
T
View Replies !
View Related
[CS3] AS 2.0: Hover/Rollover Tooltip From External Swf MovieClip
I would like to create a dynamic tooltip with an external SWF MovieClip. I am getting the tooltip box to show up on rollover and to dissapear on rollout, but I cannot pass the text variables to show up.
Please help.
This is what I have.
Main Movie Clip with AS 2.0 has the following script, it basically triggers the creation of the rollover tooltip when rolling over an specific instance of a movieclip named room_mc:
Code:
room_mc.onRollOver = function () {
_root.createEmptyMovieClip("container_mc", _root.getNextHighestDepth());
_root.container_mc.loadMovie("popup_as2.swf");
_root.container_mc.label1.text = "Text to be displayed on Dynamic Text Box with instance name label1 inside the popup_as2.swf";
_root.container_mc.label2.text = "Text to be displayed on Dynamic Text Box with instance name label2 inside the popup_as2.swf";
_root.onMouseMove = function(){
_root.container_mc._x = _xmouse ;
_root.container_mc._y = _ymouse ;
}
}
room_mc.onRollOut = function () {
removeMovieClip("container_mc");
}
And the popup_as2.swf document has basically two dynamic text boxes, which I have named their instances as: label1 and label2
I have run the movie and I just receive the following text on label1 and label2 on the rollover container_mc:
Code:
_level0.container_mc.label1
_level0.container_mc.label2
I have tried replacing this on my code above but no use, it still does not work. Am I missing something?
I am attaching the documents.
I will appreciate your help with helping me solve this matter. Thank you.
View Replies !
View Related
Flash In Looping Powerpoint -timing Issue
I have inserted a flash swf into a looping powerpoint presentation. I want the swf to play from the beginning everytime that slide comes up. I can't seem to get the timing down.
Powerpoints "advance to the next slide timer" is not syncing with my length of the swf file.
I tired inserting a goto and stop (1) at the end of my swf, then have ppt but that doesn't seem to stop powerpoint from looping the presentation. If I don't turn looping on in powerpoint, it will only play the swf one, and when the slide comes around again it is static.
I can't seem to get the timing right. Any suggestions?
View Replies !
View Related
Flash Button Rollover/Hover Not Working Immediatly
http://www.ekolinemedia.com/portfolio.htm
Here is the problem: In Opera and IE7, when you hover/rollover over a link you do not get my button animation immediatly. Instead you have to click on the button, and then when you hover over the button you get an animation
IE6 and FF allow the user to play the hover animation immediatly.
I think it is because the user has to allow the "control" to be activated. I am not sure how to fix this though.
Any help would be much appreciated!
First frame:
Code:
if(_root.getBytesLoaded()==_root.getBytesTotal()){
gotoAndPlay(3);
}
else{
gotoandplay(1);
}
Last frame:
Code:
stop();
View Replies !
View Related
[cs3] CacheAsBitmap Problem With External Loading (not A Timing Issue)
Hi
I'm creating a DOM based xhtml site with some flash elements, and have run into some issues. I've several times thought about going to this forum for help
but I always convinced myself that the answers were out there on the internet, and most of the times they were. But now I've searched for days without any real progress, so here I am.
I've created an swf file which loads up a bunch of external jpg's, places them inside my main (empty) movieclip and applies a number of movieclip prototypes to the new clips (and the main movie itself).
Basacly, the structure looks like this:
SWF
|
main clip ("huvudfilm")
|
clip 1("film1")- clip 2("film2") - clip 3("film3") - ...
And so on, where one clip is created per jpg in the folder of the SWF. Ok, so far, so good, but here's the issue:
I want the main movieclip to be masked by an external alpha mask so that it gets a nice transition thingy. The external mask loads like this:
Code:
var maskfilm:MovieClip = this.createEmptyMovieClip("maskfilm_aux",100);
var loadListener:Object = new Object();
var mcLoader:MovieClipLoader = new MovieClipLoader();
loadListener.onLoadInit = function(){
huvudfilm._visible = true;
maskfilm.cacheAsBitmap = true;
huvudfilm.cacheAsBitmap = true; <---- PROBLEM
huvudfilm.setMask(maskfilm);
}
mcLoader.addListener(loadListener);
mcLoader.loadClip("mask.swf", maskfilm);
The problem is that the cacheAsBitmap for the main clip doesn't seem to work. If I remove that line the mask get applied fine, except that there is no alpha transition. The mask is either applied 100%, or nothing at all. the whole transition thing doesn't work. Sorry if I'm being a bit diffuse here but I'm sure you get the picture if you know what cacheAsBitmap does to masks.
I've read some adobe documentation about masking problems but I don't really know what to do. My guess is that you can't cache something as a bitmap if the clip only contain externaly loaded/created clips. Because the same code(caching) worked when I didn't load the jpg's externally, but had them "manually" in the subclips. (meaning as objects in the library and then putting them into the clips)
I've tested online and offline, caching the subclips instead of the main one, and a bunch of other things that I can't remember know.
I would greatly appreciate any help on this matter, as I'm kinda over my head here. If you wanna know how the jpg's are loaded, here's the code:
Code:
MovieClip.prototype.menyfilmloader = function(target, _number:Number){
var _this:MovieClip = this;
var loadListener:Object = new Object();
var mcLoader:MovieClipLoader = new MovieClipLoader();
loadListener.onLoadStart = function(){
testImage();
}
loadListener.onLoadError = function(){
Counter--;
}
mcLoader.addListener(loadListener);
mcLoader.loadClip(target,_this);
};
testImage = function (){
Counter++;
huvudfilm.createEmptyMovieClip("film"+Counter, 194 + Counter);
huvudfilm["film"+Counter].menyfilmloader(Counter + ".jpg", Counter);
};
testImage();
Okay that's issue number 1. My second question is;
Is there a way to use site relative paths in actionscript URL methods? I know you can put "../" before the path to go up one level, but is there a similar way to
Code:
href="/folder/content.as"
I'm guessing the answer here is no because flash is a "user-side" application, but is there any way to work around it?
The thing is I need to load a bunch of external as files from swfs on different levels on my page. And with the "../" way, I would need a different amount of dots in different swfs, and that's not possible, since the external as file needs to be the same.
That about wrappes it up, sorry about all the swedish names in the code.
Thanks in advance,
Leo
View Replies !
View Related
Dynamic Hover Text Issue
i've been struggling with learning flash, so pardon in advance for my lack of skills.
i've been deconstructing the 'hover captions' tutorial as a reference for those of you who have seen it.
i've actionscripted a movieclip circle which i treat as a button for rollover effects. i've authored on the stage a rectangle on the stage, then deleted and used the attachmovie() method to set it on a differing depth. i also created a movieclip 'inside' the rectangle which i attached scripts to control the visiblity of the rectangle, which appears when the mouse rollover of the movieclip button occurs. i've built a dynamic text field on that 'rectholder' movie clip and referenced some scripting on the main layer to control the text's appearance.
everything works great except for getting the dynamic text to display. if i go back in and change the dynamic text field to static, the text displays fine... however, moving to dynamic text... no go. this is my final hurdle.
can anyone give this a shot and shed some light? much thanks in advance... i'm attaching my FLA file.. i use flash mx 2004.
j.
View Replies !
View Related
Strange Hover Caption Issue
I'm working on an interactive cd and i am having some issues implementing a hover caption over an infinite menu.
Before the hover caption, the buttons on the menu would load html in another frame. Once i made a simple hover caption for the mildly computer-retarded users who will be using it, the links do not work anymore. I made sure that the "+" is outside of the text box, it's driving me nuts!
Anybody with any ideas on what i can do to fix this please let me know, I appreciate your help in advance.
Link to .swf: http://home.cogeco.ca/~jjonah/sponsorbarhovertest.swf
Link to .fla: http://home.cogeco.ca/~jjonah/sponsorbarcovertest.fla
Josh Jonah
www.DefectiveProduction.tk
View Replies !
View Related
Dynamic Hover Text Issue
i've been struggling with learning flash, so pardon in advance for my lack of skills.
i've been deconstructing the 'hover captions' tutorial as a reference for those of you who have seen it.
i've actionscripted a movieclip circle which i treat as a button for rollover effects. i've authored on the stage a rectangle on the stage, then deleted and used the attachmovie() method to set it on a differing depth. i also created a movieclip 'inside' the rectangle which i attached scripts to control the visiblity of the rectangle, which appears when the mouse rollover of the movieclip button occurs. i've built a dynamic text field on that 'rectholder' movie clip and referenced some scripting on the main layer to control the text's appearance.
everything works great except for getting the dynamic text to display. if i go back in and change the dynamic text field to static, the text displays fine... however, moving to dynamic text... no go. this is my final hurdle.
can anyone give this a shot and shed some light? much thanks in advance... i'm attaching my FLA file.. i use flash mx 2004.
j.
View Replies !
View Related
Dynamic Text CSS Hover Issue
wondering if anyone else has encountered this problem. i'm importing dynamic text from an xml file into a text field with fonts rendered as "anti-alias for readability". i have css styles for the link hovers. works great, problem is that when i view in the browser the linked text is slightly overlapping the word before it. once you hover over it though, it fixes itself and has a space between itself and the word before it.
the only thing i've found that solves this problem is switching the font render to "anti-alias for animation", only that makes the font i'm using look horrible (Zurich Cn BT).
anyone else ever get this issue and find a solution to it? :eek
thanks for any help!
View Replies !
View Related
[timing] Function Timing - Delay In Script
Hi all,
Back again to find help provided by helpfull flashers
Right now i have the following script
PHP Code:
var speed = 20;
MovieClip.prototype.slideIt = function(whereX) {
this.onEnterFrame = function() {
this._x += (whereX-this._x)/speed;
if (Math.abs(this._x-whereX)<1) {
this._x = whereX;
delete this.onEnterFrame;
}
};
};
green.onRollOver = function() {
blue.slideIt(520);
red.slideIt(550);
};
green.onRollOut = function() {
blue.slideIt(193);
red.slideIt(386);
};
What i want to do is pretty simple, i want the onRollOver to be delayed for a few seconds before it runs the slideIt script.
I searched on kirupa for similar actions and found this
http://www.kirupa.com/forum/showthread.php?t=47450
but how can i implement this in my own script ? tried a few things but all it does is either nothing or even more nothing ...
Need some help on this - Thanks in advance
View Replies !
View Related
Publish Timing V/s Working Timing
I have a question.....when I am working in flash MX and I am modifying a purchased flash site I did some changes to it and it works well.
I added music and modified the thest animations to go with the music and all looks well but when I publish it and see it on the web it is all out of sync????
Why does the syncronization change from my working movie to my published movie ????
Now I also did some more editing to my movie / web and on when I am in FLASH MX all works well and looks good but when I save as a movie and view it as the .swf file all the text animations are gone ????
But it looks fine while in the actual flash program.......
Anybody got any advise ?????
View Replies !
View Related
Rollover Issue
I have a slight issue. Created 2 movie clips to control content.
They are exactly the same size and occupy the same space. I need both of them selectable.
The mc's are in different layers
The container of the MC's are square so they lay on top of each other
code to control clips
***************
stop();
this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
}
}
this.onRollOver = function(){
rewind = false;
play();
}
this.onRollOut = function(){
rewind = true;
}
***********
example link
http://www.icanmarketyou.com/guys_wo...ontroller.html
Any ideas on how to make both tabs hot and keep the integrity of this design?
Thanks for any help
View Replies !
View Related
RollOver Issue
I'm modding a template for a friend, the site is pgaloans.com
When you go to the first page or the last page, everything works fine. The menu also corresponds to the current page by having the button remaining highlighted. However this isn't working for pages 2 - 5, any idea why?
Code:
on (rollOver) {
if (_root.link<>4) {
this.gotoAndPlay("s1");
}
}
on (releaseOutside, rollOut) {
if (_root.link<>4) {
this.gotoAndPlay("s2");
}
}
on (release) {
if (_root.link<>4) {
_root["item"+_root.link].gotoAndPlay("s2");
_root.link = 4;
getURL("about.html");
}
}
The actionscript is the same for every button, except the get URL and the _root.link=4 do change to the appropriate url/number.
View Replies !
View Related
Issue With Rollover
I want my buttons to show a movie clip on a rollover but only while its rolled over. I will then chance the text as the pointer goes over the other buttons but keep the movie clip consistant. I tried it and its just not working. this is my code and flash is telling me there is a syntax eroor
dee.onRollOver = over;
dee.onRollOut = out;
function over() {
dee._visible = true;
dee._x = 15.6 and dee._y = 72.8
this.gotoAndPlay(2);
}
function out() {
dee._visible = false;
dee._x = 15.6 and dee._y = 72.8
this.gotoAndPlay(7);
}
this is what flash is telling me
**Error** Symbol=button, layer=Layer 15, frame=1:Line 6: Left side of assignment operator must be variable or property.
dee._x = 15.6 and dee._y = 72.8
**Error** Symbol=button, layer=Layer 15, frame=1:Line 12: Left side of assignment operator must be variable or property.
dee._x = 15.6 and dee._y = 72.8
Total ActionScript Errors: 2 Reported Errors: 2
View Replies !
View Related
Buttons Rollover Issue
i've noticed that a common problem with using Button.onRollOver/Button.onRollOut is that if you roll out too quickly, the onRollOut effect does not trigger. for exemple, on an expanding menu element, if you move the mouse across it very quickly the submenu expands but doesn't contract. i'm guessing this is something to do with the framerate - if two events happen in the same frame, only the first occurs? perhaps someone can tell me if that's the case?
i'm looking for a solution to the problem. my first thought is to use onEnterFrame to check if the mouse is within the x/y coordinates of the button/clip. that way, even if the movie does not detect the mouse rolling off in the first frame it happens, it will get it next frame. am i thinking in the right direction, or is there a better solution?
thanks in advance for any help!
View Replies !
View Related
Rollover Button Issue
ok so i have 5 buttons, when i roll the mouse over them i would like to have a text box change content saying what each button is. admin, home, about, contact, projects.
anywho i have this setup
admin.onRollOver = function(){
buttonName.text = "admin";
}
home.onRollOver = function(){
buttonName.text = "home";
}
etc...
now nothign is happening, the text box's name is buttonName, and it is a dynamic text box
thanks for your help.
View Replies !
View Related
RollOver/Out Button Issue
Hi , i need some help with a rollover button i made using this code.
stop();
catreApicultura_mc.addEventListener(MouseEvent.ROL L_OVER, rolover);
catreApicultura_mc.addEventListener(MouseEvent.ROL L_OUT, rollout);
catreApicultura_mc.addEventListener(MouseEvent.CLI CK, gonext);
function rolover(event:MouseEvent):void {
stage.removeEventListener(Event.ENTER_FRAME, rewind);
catreApicultura_mc.gotoAndPlay(2);
//basically it plays an animation that is inside catreApicultura_mc until last frame where there is a stop();
}
function rollout(event:MouseEvent):void {
stage.addEventListener(Event.ENTER_FRAME, rewind);
}
function rewind(event:Event):void {
catreApicultura_mc.prevFrame();
}
function gonext(event) {
gotoAndStop(2);
}
The problem is, when i get to frame 2 of the file (using the button) i get this output error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Apicultura_fla::MainTimeline/rewind()
Edit: I forgot to mention the button in the next frame does no exist and i do not want it to exist there.
Is there a way to fix this? or is my code wrong? Please help. Thank you
Here is the .FLA for the RollOver button.
View Replies !
View Related
On(rollOver) And On(rollOut) Issue
Hello all,
I am having a bit of a frustrating problem with a button state. I have a button with the following code:
Code:
on(rollOver) {
this.gotoAndStop(2);
}
on(rollOut) {
this.gotoAndStop(1);
}
then on Frame (2) I have only:
Code:
on(rollOut){
this.gotoAndStop(1);
}
Everything works really nicely except when I mouse through the button very quickly, and it stays on the rollOver state, or Frame 2.
I have tried to use the Hittest function, however, on Frame 2 another button shows up on top of the original (an X so that the original button can be closed, like closing a pop-up window in XP) and when you are over it, the hittest fails, making the MC go back to Frame (1).
Basically what I am doing is creating a room with various furniture. Maybe you place a couple desks in the room, but then you decide you want to get rid of one. I want to enable the user to rollOver the desk, see the red X button appear, and click it to remove that specific desk.
Does anyone know a quick fix to this? Any help is greatly appreciated. The Fla is attached.
View Replies !
View Related
Simple Rollover Issue
I want to make a MC play when someone rolls over a button. The Button is
a logo and I want part of the logo to spin on rollover so the MC is in
the same spot as the button.
I tried to do this the most basic way possible, so I created a graphic
for the logo, I dragged it into a new symbol of a MC and animated it and
then I made a button and dragged the graphic into all of the states
expect the over state, and I placed the MC on the over state so it plays
this on rollover. I then positioned everything so it is on the same X
and Y coordinates.
However, when I test the movie when it is on the stage, it works though,
but the rollover (the MC) moves to a different location when the button
is rolled over?
Why is it doing this????
View Replies !
View Related
Submenu Rollover Issue
Hi guys,
I have a question. In an animation I am working on, I have a menu which I load via an xml file.
The problem I have is that when I move the mouse away or I click on a link in the submenu, it does not clear itself and stays on active. How can I make this work?
When I add clear_child(inview); to function menuchild_init, that removes the links in the submenu when it's clicked, but the background of the submenu remains active and on top of the animation.
What changes to the function are needed to remove the background too?
The script is below:
Attach Code
inview=0;
function menuitem_init(i,label, action) {
item=menuitem.duplicateMovieClip("menuitem" add i,i);
item.label=label;
item._x=10;
item._y=(10+(28*i));
_root.item.button.onRelease = function (){
if (action<>""){
loadMovie(action, "load");
}
}
_root.item.button.onRollOver = function (){
_level0.prova="ciao" add action;
i_temp=this._target.substring(9,10);
if (_root.inview==0) {
_root.inview=i_temp;
} else {
clear_child(inview);
_root.inview=i_temp;
}
for (var j = 0; j<_root.node[i_temp-1].childNodes.length; j++) {
target_temp="_root.menuchild" add i_temp add j;
setProperty(target_temp,_x,140);
setProperty(target_temp,_y,(10+(i_temp*28)+j*28));
setProperty(target_temp,_visible,true);
}
_root.selected_menu.bg_child._height=j*28;
_root.selected_menu._y=10+(i_temp*28);
}
}
function clear_child(inview){
for (var j = 0; j<_root.node[inview-1].childNodes.length; j++) {
setProperty("_root.menuchild" add inview add j,_visible,false);
}
}
function menuchild_init(i,j,label, action) {
item=menuchild.duplicateMovieClip("menuchild" add i add j,i add j);
item.label=label;
item._visible=false;
_root.item.button.onRelease = function() {
if (action.lastIndexOf("http://")>-1 or action.lastIndexOf("mailto")>-1) {
getURL(action,"_blank","post");
} else {
loadMovie(action, "load");
}
}
}
menu_xml = new XML();
menu_xml.ignoreWhite = true;
menu_xml.load("menu_structure.xml");
menu_xml.onLoad = function(success) {
if (success) {
_root.root = menu_xml.firstChild;
_root.node = _root.root.childNodes;
for (var i = 1; i <= _root.node.length; i++) {
menuitem_init(i,_root.node[i-1].attributes.name, _root.node[i-1].attributes.action);
for (var j = 0; j<_root.node[i-1].childNodes.length; j++) {
menuchild_init(i,j,_root.node[i-1].childNodes[j].attributes.name, _root.node[i-1].childNodes[j].attributes.action);
}
}
}
}
View Replies !
View Related
Rollover Event Issue
I have two movieclips. Let's call them mc_1 and mc_2.
In the timeline, mc_2 has a higher depth value than mc_1, meaning that mc_2 covers part of mc_1.
mc_1 has onRollOver defined for it. It animates when the mouse rolls over it. mc_2 has an alpha value of less than 100, making it semi transparent. My problem is when I roll the mouse cursor over mc_2, I trigger mc_1.onRollOver and can see the animation through the semi-transparency of mc_2.
Is there a way to prevent mc_1.onRollOver from receiving an event when there is a movieclip object that has a higher depth value blocking it?
View Replies !
View Related
Rollover Speed Issue..
Hey,
I'm making a menu where if I rollover a button, an object moves along the x co-ordinate.
Here's what I got so far..
Quote:
on (rollOver) {
myMovieX = getProperty(_root.chair, _x);
speed = 4;
chair._x += speed;
if (chair._x > 570) chair._x=-82;
}
Everything seems to work, except the fact that the object only moves once when I rollover. To move it a great distance I have to keep rolling over the button.
What do I need to do to my code to make the object move continuously when i rollover the button?
Thanks,
Tom
View Replies !
View Related
Rollover Event Issue
I have two movieclips. Let's call them mc_1 and mc_2.
In the timeline, mc_2 has a higher depth value than mc_1, meaning that mc_2 covers part of mc_1.
mc_1 has onRollOver defined for it. It animates when the mouse rolls over it. mc_2 has an alpha value of less than 100, making it semi transparent. My problem is when I roll the mouse cursor over mc_2, I trigger mc_1.onRollOver and can see the animation through the semi-transparency of mc_2.
Is there a way to prevent mc_1.onRollOver from receiving an event when there is a movieclip object that has a higher depth value blocking it?
View Replies !
View Related
Button Rollover Issue
Hey everyone,
I have a small problem. I've created a button so that when you do a rollover, text that describes the function of the button appears above it. The problem is when you roll over the area in which the text loads, it appears also. I just want the text to appear ONLY when you're over the button. Any suggestions?
View Replies !
View Related
Rollover Issue - Count Variable?
my problem is this: i have a rollover sound on a button. pressing that button takes you to another scene. when you get to that new scene, the mouse is detected in the 'over' position again and the sound plays a second time. i dont want the second sound to happen. i saw a response posted earlier to this but i couldnt open the file that was posted as an example. there was mention of a count variable. PUHLEASE. any pointers would help as this is really blocking my project.
m
View Replies !
View Related
Dynamic Textfields & Rollover Issue
Hi All!
I am generating several textfields using the createTextField command.
Then I can set the properties of the textfields using the myTextFormat.property = value;
But what I need to do is be able to trigger events on Rollover and Rollout on the textfields.
Can anyone help!
Thnak you...
View Replies !
View Related
Rollover/Rollout Menu Issue
I've read similar threads but nothing exactly like this. I'm creating a simple rollover menu: when a menu heading is rolled over, a submenu appears, and each submenu item is a button. Conversely, I *want* to the submenu to disappear when it is rolled off - as seen in Macromedia's main navigation menu. However, I have been unable to get this to happen.
I have set this up (as seen in the attached file) thusly: the main timeline is just one frame, which contains a movieclip of the Rollover Menu, which has three menu headings. The Rollover Menu movie clip has four sections: one with all of the submenus closed, and one of each submenu open. When any of the menu headings is rolled over, I gotoAndPlay the corresponding "submenu open" section.
I made the submenus movieclips of their own, in the hopes that they would respond as a group to the "rollOff" command (by going to the "menus closed" section). However, I've since learned on this forum that movieclips containing buttons will not take button behaviors. I do not want to use the cheap trick of creating a large invisible button and using "rollOver" to go to the "menus closed" section. I have looked at two examples posted on this site that use the "hitTest" command to determine whether a movieclip is being rolled over, but I have not been successful at applying hitTest to my file.
I'm new to actionscript, but I'm not afraid of a little coding, as long as I can comprehend what's being done. The code in the examples seemed to be more complex than what I need. If anyone can take me to this next step, I'd be much obliged.
View Replies !
View Related
Button Rollover Layering Issue
I'm using Flash 8. I'm currently upkeeping a large flash site that is essentially a map with cities in text. Rolling over the text has various images that appear over the map. The images are unique to each city.
Now, there are a -lot- of cities on this map. Since I got a hold of these files, there is currently 2 layers: map background and layer containing all the cities. Cities are buttons.
My problem is, as I am adding new rollover images, layering is becoming a problem. These images are being bled into from the other city buttons below it. Since no button is on its own layer, how can i fix this? Is there a script or anything that will move the rollover images as the top layer?
Note that it is impossible at this point to move the buttons to their own layers. Currently, I am just attempting to place these new images in an area on the map where there isn't any buttons to interfere -- i'm running out of space.
(Sorry, I would link to the site, but for some reason the domain is down. I do not have the rights to post the .fla file here.)
View Replies !
View Related
Flash Movie Rollover Issue
Hello,
I'm designing and creating my website these days, and I've come up with a concept where on the index page of the site, I'll have three 3D boxes which, on click, will redirect you to the respective pages of my site.
However, these 3D boxes are made and rendered to AVI in 3dsmax, then converted to .mpg in Sony Vegas and imported into Flash CS3 (and obviously converted). My goal is to have the animation (or movie if you want) to be paused on the first frame as the page loads, but start when the mouse in hovered over the flash movie.
I've read a few things about an invisible button, and I've followed a tutorial on that, but when I test the Flash Movie, it comes back with an error (shown below). I'm using AS2.0 and my button instance name is "Rollover1" and the layer I've put it in is named "ActionButton".
Can anyone please give me some help on how to solve this issue. All I really need is the code for the movie to play on(rollover) and stop on(rollout). It would be great if the movie stoped as if paused (since the boxes are rotating 360 degrees it would be great if they stopped and stayed in their current position when the mouse if rolled off the movie.
My newbie code:
on (release) {
Rollover1.onRollOver = function(play) {
};
}
on (release) {
Rollover1.onRollOut = function(stop) {
};
}
I hope I portrayed my issues clearly and that someone has some good advice! Thank you in advance :)
View Replies !
View Related
Help In Solving Issue With Rollover Sticking
Hello,
I am working on my online portfolio and would like to have an animated menu that works similarly to Metadesign's old site. Simply put, there are three items on the stage, and as one rolls over an item the other items move to create space in which details about the item that has been rolled over are revealed. My problem is that if a viewer to the site moves his/her mouse over one of the items a little quickly, the menu sticks on the "rollover" part.
I have looked for solutions to this problem for a couple of years, and have changed designs on previous projects as my knowledge of Flash Actionscript is not that advanced, but I have finally decided that I would like to overcome this issue. I have found a number of different possible solution here and elsewhere, but they seemed pretty advanced and I couldn't figure out how to implement them into my own project.
Therefore, it is my hope that some kind soul here could guide me in the direction I need to go, or be generous enough to even help me out with my .fla, which I have included below.
Thanks,
Bill
View Replies !
View Related
A Question About Some RollOver/RollOut Issue
I´m trying to do a menu that opens when I RollOver it and closes when I RollOut of it. Like the menu on this site. But it menu_mc.onRollOver = function() {
menu_mc.gotoAndPlay(1);
}
menu_mc.onRollOut = function() {
What will I write here???? I´ve tried gotoandStop but it stills
}
Thanks i advance..
View Replies !
View Related
Rollover Movieclip/button Issue
okie so...i haven't really searched for another similar post, but then again..i don't know what to search for... basically, i have this animated button, pretty similar to what lee did...it's after his idea, you know... but i'm having some trouble... so onRollOver, onRollOut..i did it differently. i had the movie clip containing the background square, a graphic, and then, a button with the text in it, and the on(rollOver/Out) actions applied directly to the button. when the button reaches that middle area, when i click it, i want it to play some labeled frame... but..it won't..i've tried a whole lot of things, but i'm not sure i tried them in the right way, or all of them, for that matter...
here is the file
http://download.yousendit.com/B446101C47D28E01
(in lack of better hosting ideas)
so...any help is welcomed...
cheers
View Replies !
View Related
Mc_ Depth Issue. RollOver Failing When Under Another Mc_
I have a set of movie clips generated and layered out next to each other via an array (buttons).
Above this and contained within an onEnterFrame function I have automatically created another Movie Clip that spans the depth and width of the array. ("container")
I am using this to register mouse over events that occur within my array area.
I have also created another Movie clip ("mc")
This mc uses the drawingAPI to create a box with the lower edge set as a bezier curve.
'mc' is set as a mask
I have set an onRollOver function to the 'container' that switches the bezier curves x and y coordinates of 'mc' to the mouse position.
The effect of all this creates a liquid mask that is dependant on the mouse position on rollover.
When the container is not rolled over the mask or 'mc' position is controlled via a tween.
This all works fine and looks nice.
However..
I want the buttons generated by the array to each have a rolled over effect. I cannot achieve this due their depths being beneath the container.
If i set the container depth to a lower value each buttons roll over then works but then of course the 'containers' roll over fails to work.
here is the .as
Code:
import com.mosesSupposes.fuse.*;
ZigoEngine.simpleSetup(Fuse, Shortcuts, PennerEasing);
var mover = this.attachMovie("mover","mover",100);
mover._x = 0;
mover._y = 25;
mover._visible = false;
var m_over:Boolean = false;
var home:MovieClip = this;
var buttons:Array = new Array("home","help","links","otherStuf","guuf","whatever","yep");
numOfItems = buttons.length;
for(var i:Number =0;i<numOfItems;i++)
{
var t = home.attachMovie("MainNav","MainNav"+i,i+1);
t._x = 80*i;
t.onRollOver = over;
t.onRollOut = out;
//create an area for the mouse over effect on the mask
var cont = createEmptyMovieClip("container",1000);
cont.moveTo(0,0);
cont.lineStyle(2,0xffffff,0);
cont.beginFill(0x0000ff,0);
cont.lineTo(80*i+60,0);
cont.lineTo(80*i+60,60);
cont.lineTo(0,60);
cont.lineTo(0,0);
cont.endFill();
this.onEnterFrame = function()
{
if(m_over == true)
{
mover._x = home._xmouse;
mover._y = (home._ymouse) +20;
Xpos = mover._x;
Ypos = mover._y;
}
else
{
Xpos = mover._x;
Ypos = mover._y;
}
var mc = createEmptyMovieClip("mc",0);
mc.moveTo(0*i,0);
mc.lineStyle(2,0xffffff,0);
mc.beginFill(0x000000,25);
mc.lineTo(80*i,0);
mc.lineTo(80*i,25);
mc.curveTo(Xpos,Ypos,0*i,25);
mc.lineTo(0*i,0);
mc.endFill();
home.setMask(mc);
}
//end enter frame
}
// set up the timed wobble
var moveA:Fuse = new Fuse();
moveA.push({target:mover, x:80*i + 60 , y:25, controlX:80*i + 10 , controlY:80, time:2/3, ease:"easeInBack"});
moveA.push({target:mover, x:0, y:25, controlX:-10, controlY:-80, time:2/3, ease:"easeOutBack"});
moveA.push({target:mover, x:80*i + 60, y:25, controlX:80*i - 60, controlY:60, time:1, ease:"easeInSine"});
moveA.push({target:mover, x:0, y:25, controlX:20, controlY:40, time:1, ease:"easeOutSine"});
moveA.push({target:mover, x:0, y:25, time:5, ease:"easeOutBack"});
moveA.push({func:function(){moveA.start();}});
moveA.start();
cont.onRollOver = function()
{
var theX = home._xmouse;
var theY = home._ymouse;
if(theX <(80*i+60)/2)
{
var Ycon:Number = theY +80;
var Xcon:Number = 80*i+40;
mover._x = 80*i+60;
}
else
{
var Ycon:Number = theY +80;
var Xcon:Number = 20;
mover._x = 0;
}
moveA.stop();
var bounceOut:Fuse = new Fuse();
bounceOut.push({target:mover, x:theX , y:theY , controlY:Ycon, controlX:Xcon, time:1, ease:"easeOutSine"});
bounceOut.push({func:function(){m_over = true;}});
bounceOut.start();
}
cont.onRollOut = function()
{
theX = _root._xmouse;
theY = _root._ymouse;
var bounceOut:Fuse = new Fuse();
bounceOut.push({target:mover, x:theX , y:10 , time:1/8, ease:"easeOutSine"});
bounceOut.push({target:mover, x:theX , y:50 , time:1/8, ease:"easeOutSine"});
bounceOut.push({target:mover, x:theX , y:20 , time:1/8, ease:"easeOutSine"});
bounceOut.push({target:mover, x:theX , y:40 , time:1/8, ease:"easeOutSine"});
bounceOut.push({func:function(){moveA.start();}});
bounceOut.start();
m_over = false;
}
//item roll overs
function over():Void
{
//trace("over");
var over:Fuse = new Fuse();
over.push({target:this, scale:120, alpha:75, time:1/4, ease:"easeInQuad"});
over.start();
}
function out():Void
{
//trace("out");
var out:Fuse = new Fuse();
out.push({target:this, scale:100, alpha:100, time:1/4, ease:"easeInQuad"});
out.start();
}
But it would likely be better if you had the fla to look at (Fuse Kit needed)
http://www.slashdash.co.uk/allsorts/flash/bounce_menu.fla
Try switching the containers depth between 1000 and 0 to see what I mean.
Is there a way around this ?
Cheers
Crowds
View Replies !
View Related
Play Sound On Hover/ Off On No Hover
I have music playing in my file and I have a section of the site which plays some short audio pieces, about 5 or 6. There maybe a simple solution but I have not had many flash lessons, but the problem with playing the audio clips is you can press it again and it plays again and press others, so it becomes a mess with multiple sounds playing. I tried stopallsounds on the button but that turns off my music. So i thought a workaround would be to have the sound play on hover of the button and go off when you are not on hover, but I cannot see how to get this to work. Unless there is another way, I guess ideally Id like it so you have to click the button.
View Replies !
View Related
Rollover Issue's Must Resolve By 3:00pm Today
Hey guys I am currently designing a flash site for a landscaping company and Im having some issues with my click and rollovers. First let me explain what im trying to achieve. On the main buttons I have a rollover where the buttons get larger and on the rollout slowly transition to their original size I have done this using movie clips with the rollover, rollout actions inside. Now this would work fine if thats all I wanted but on the click I want the buttons to play an animation I have specified on the main timeline. I have tried to put the actions for this on the movie clips with a
on (press) {gotoAndPlay("aboutclick");
}
Anyway with this code implemented neither one will work it wont play the framelabel aboutclick or do the rollover effect and for the life of me I cant figure out what to do.
Ah so if anybody could help me I would be so very appreciative since Im out of options I have included the flash file so you guys can see what I mean.
Thanks so much in advance.
View Replies !
View Related
|