Hi guys,
I have a flow chart, the Flash works perfectly, no problems, however i am using the multiple screens on Powerpoint slides in a program called Articulate (a simple program to house things like this as a whole media object on a website etc).
The only issue with this is that i need to add links on top of each button on the page, which link to other slides in the presentation. So not hyperlinks in the Flash code, slide-hyperlinks in Powerpoint.
The Flash code should be enough to make the shapes have hover states, but not be a 'button', if that makes any sense? The hyperlink shapes i add on afterwards in Powerpoint should be the clickable areas with the cursor turning to a hand, but the Flash code by itself should just have a hover state with the cursor staying as an arrow.
Does that make sense?
Here's the code -
var tl:MovieClip=this;
for(var i = 1; i < 30; i++){
tl["mc"+i].ivar=i;
tl["mc"+i].onRollOver=function(){
tl["but"+this.ivar].gotoAndStop(2);
}
tl["mc"+i].onRollOut=function(){
tl["but"+this.ivar].gotoAndStop(1);
}
}
Thanks!
Ollie
Thanks for the help!
Ned i have utilised the useHandCursor function and have got it to work for individual movieclips (eg mc7.useHandCursor = false;), how can i set it for ALL movieclips? In my original code above the 'mc' is what i want to effect with the HandCursor. I have tried using;
movieClip.useHandCursor = false;
mc.useHandCursor = false;
and a few other variants but nothing works so far.
Prodigalmaster i don't follow exactly, i'm no Flash expert.
The 'add code here' sections, what do i add there? I presume one is my original code?
I suppose maybe this is more complex than i first stated, i have tested my problem with the new removed cursor, for mc7 for example, in Articulate (the program we are using to house the flash objects) and it still doesnt link, even though the cursor stays as default (arrow).
My code has no 'onRelease' function so i don't know exactly what is giving them the button properties.
I'd like the flow chart shapes to change colour when hovered but have no button properties i suppose?
This is a working example before some recent changes were made, i don't know if it is any help -
for(var x = 1; x < 8; x++)
{
var currentBut = eval("but"+x);
currentBut.onMouseMove = function(){
if(this._xmouse > 0 && this._xmouse < this._width && this._ymouse > 0 && this._ymouse < this._height){
this.gotoAndStop(2);
}
else
{
this.gotoAndStop(1);
}
};
}
Thanks both!
It would be something along the lines of changing this portion of the code you showed to add that line...
for(var i = 1; i < 30; i++){
tl["mc"+i].useHandCursor = false;
tl["mc"+i].ivar=i;
tl["mc"+i].onRollOver=function(){
tl["but"+this.ivar].gotoAndStop(2);
}
tl["mc"+i].onRollOut=function(){
tl["but"+this.ivar].gotoAndStop(1);
}
}
That's great Ned, that has sorted the arrow symbol for each of the movie clip shapes!
Still the problem of the links not working in Articulate though (essentially Microsoft Powerpoint slides packaged together).
As i said, i think it's something to do with the movieclip button functionality, rather than just force removing the handcursor.
One of those beautiful Flash moments where one small detail leaves you pulling your hair out ![]()
I thought you said the other buttons are not part of the Flash file. If that's the case, then there isn't much you can do in the Flash file to fix the other file. The only thing I can see that might be the problem is that the Flash buttons might block the other buttons, thus rendering them unusable. If that's the case, then you might need to rethink your approach.
That's probably right Ned, damn.
The other code i posted up though is a working Flash file someone im workign with has used in the past. That code allows the clear buttons to work over the top of the Flash but still uses the hover colour change of the Flash code.
Here it is again -
for(var x = 1; x < 8; x++)
{
var currentBut = eval("but"+x);
currentBut.onMouseMove = function(){
if(this._xmouse > 0 && this._xmouse < this._width && this._ymouse > 0 && this._ymouse < this._height){
this.gotoAndStop(2);
}
else
{
this.gotoAndStop(1);
}
};
}
If you guys can't help then i'm definitely re-thinking it ![]()
Sorry, it's a confusing problem ![]()
To strip this down...
I'd like to see if there was a way of removing any 'button' (clickable) functionality from my movieclips. So they are not usable at all, but still are effected when hovered.
I think this is what is interfering with the Articulate usability.
The last code i posted is a working code i received from a colleague doing the same thing. He has made everything in Flash and bundled it into Articulate in the same way and his works correctly. eg his flash objects dont block the Articulate links.
There is no issue with Articulate, it is just something i need to edit in the Flash code. Essentially making the objects unusable (there purely as images) which indicate when hovered.
I'm hoping the codes i have provided will lead to an answer.
Thanks guys, sorry if this makes no sense it's hard to explain as i'm not an expert.
Thanks kglad, i hope we're on the right track!
This is the code im using and there doesn't appear to be a onRelease or onPress handle etc.
var tl:MovieClip=this;
for(var i = 1; i < 30; i++){
tl["mc"+i].ivar=i;
tl["mc"+i].onRollOver=function(){
tl["but"+this.ivar].gotoAndStop(2);
}
tl["mc"+i].onRollOut=function(){
tl["but"+this.ivar].gotoAndStop(1);
}
}
The code my colleague sent me that does work is as follows, do you think it could be HOW the code is written eg there must be a hand full of ways to do this type of thing and maybe i've just gone down the wrong route with the tl["but"+... etc?
for(var x = 1; x < 8; x++)
{
var currentBut = eval("but"+x);
currentBut.onMouseMove = function(){
if(this._xmouse > 0 && this._xmouse < this._width && this._ymouse > 0 && this._ymouse < this._height){
this.gotoAndStop(2);
}
else
{
this.gotoAndStop(1);
}
};
}
I think this shall be my last attempt ![]()
It seems to be confusing everyone
if:
var tl:MovieClip=this;
for(var i = 1; i < 30; i++){
tl["mc"+i].ivar=i;
tl["mc"+i].onRollOver=function(){
tl["but"+this.ivar].gotoAndStop(2);
}
tl["mc"+i].onRollOut=function(){
tl["but"+this.ivar].gotoAndStop(1);
}
}
were the only code you were using the above movieclips would not respond to a mouse click, on the rollover and rollout. do your movieclips respond to a click? if yes, there's code elsewhere causing that.
use movie explorer to find that code.
This is the only code (aside from 'stops') in the entire document.
The shapes don't respond to clicks, but the cursor was turning to a hand when hovering. Is that normal? The cursor has been forced to stay as a cursor now, and not turn to a hand when hovering but i think the functionality causing it to turn to a hand is still there...
I just don't know what that reason is.
Sorry for having such a ridiculously difficult issue...
North America
Europe, Middle East and Africa
Asia Pacific