| |||||||
Du magst keine Werbung? Wir auch nicht!
Einfach registrieren und die Werbung ist weg. Diese Nachricht sehen nur nicht registrierte Nutzer.
![]() |
| | LinkBack | Themen-Optionen | Ansicht |
| | #1 (permalink) |
| Neuer User Registriert seit: Dec 2008
Beiträge: 6
|
Hello, I'm new to this but luckily got quite far in creating my first flash website. I noticed that there is somewhere a section for writing code (Actionscript 2 /3?), but it is difficult to find. I dont even know if it is necessary go into the code editor to add an alternate text for a normal jpg-image. Could someone tell me how to add this alternate text on mouse roll-over to appear when placing it over the image and are there ways of changing the style, for making the text that pops up larger? Thanks, Burton |
| | |
| | #2 (permalink) |
| Perverted Hermit Registriert seit: Mar 2004 Ort: Delmenhorst
Beiträge: 12.142
|
Whenever you want to add some sort of interaction you need to add at least some lines of actionscript. What you need is some knowledge about the eventsystem. Since i don't know which components you use i'll write down some line of code which you just have to modify: ActionScript:
Creating a MovieClip instance and adding eventlisteners as well as a field label. Whenever a MouseEvent is dispatached by the MovieClip instance, the listener will be invoked.
__________________ http://icodeapps.net | Meet me at the Flex user group Hamburg talking about CoffeeScript |
| | |
| | #3 (permalink) |
| Neuer User Registriert seit: Dec 2008
Beiträge: 6
|
Thank you, but I am completely new to this. Could you please tell me more precisely how to proceed and where I can find the editor for this? What kind of component do you need to know? I just have four images that I use as nagivation menu buttons, which I modified from previous template at the top of the page. I have them saved in the library. And your whole actionscript is necessary just for having the text pop up once the mouse is moved over the picture? Seems a big deal for such a small thing... is there no easier standard option to do this? Many thanks. |
| | |
| | #4 (permalink) |
| mod_rewrite Registriert seit: Feb 2003 Ort: München
Beiträge: 15.621
| So have you ever considered learning the very basics for yourself and then consulting a forum in case you encounter a specific issue or problem..? Please be aware that a forum is not a good place to start if you have no idea or no plan and a forum cannot replace books, lessons, tutorials, practice and so on. Btw, what you are looking for is called 'tooltip'.
__________________ RTFM Wie man Fragen richtig stellt. Achim Bindannmalweg Money makes the world go round, fear makes it turn much faster. (New Model Army) |
| | |
| | #5 (permalink) |
| Neuer User Registriert seit: Dec 2008
Beiträge: 6
|
Thanks , but no I do not intend to learn it all as I am only doing one site and it is 90% complete thanks to the template. It would be too timeconsuming to learn it from scratch.... Anyhow, I found the editor under: Windows --> Actions (or F9) And thanks for the tooltips, I'll watch this video tomorrow: http://library.creativecow.net/artic...e/tooltips.php Cheers! |
| | |
| | #8 (permalink) |
| Neuer User Registriert seit: Dec 2008
Beiträge: 6
|
Ich deute nochmals drauf, das hier ist das "Flash Einsteiger" forum ![]() Mit dem tooltip funktionierts noch nicht richtig, das tooltip-Bild erscheint nicht wenn ich mit dem Maus über den button (bzw. jpg-image) gehe. Hier der code: Code: tooltip._visible = false
var tipInt;
b1.onRollOver = function() {
tipInt = setInterval(showTip,100,"Ausstellungen");
}
b1.onRollOut = function() {
hideTip();
}
b2.onRollOver = function() {
tipInt = setInterval(showTip,100,"Lieferanten");
}
b2.onRollOut = function() {
hideTip();
}
b3.onRollOver = function() {
tipInt = setInterval(showTip,100,"Kunden");
}
b3.onRollOut = function() {
hideTip();
}
b4.onRollOver = function() {
tipInt = setInterval(showTip,100,"Kontakt");
}
b4.onRollOut = function() {
hideTip();
}
var count = 0;
function showTip(tiptext) {
if(count == 1) {
clearInterval(tipInt);
count = 0;
tooltip.tiptext.text = tiptext;
tooltip._x = _root.xmouse;
tooltip._y = _root.ymouse;
tooltip._visible = true;
_root.OnMouseMove = function() {
tooltip._x = _root.xmouse;
tooltip._y = _root.ymouse;
updateAfterEvent();
}
}
else {
count++;
}
}
function hideTip() {
clearInterval(tipInt);
tooltip._visible = false;
} Das einzige mal das er erscheint ist ganz kurz beim Aufbau der Seite, dann kommt er nicht mehr. Unter actions frame "check syntax" findet er keine Fehler. Wie füge ich den tooltip code korrekt ein? In actions habe ich folgende timelines: Actions frame 1 (buttons, labels) Code: music_notes.setMask(music_notes_mask);
menu_item_group.menu_item._visible = false;
var menu_label:Array = new Array("", "", "", "", "");
var total:Number = menu_label.length;
var distance_x:Number = 124;
var i:Number = 0;
for( ; i < total; i++ )
{
menu_item_group.menu_item.duplicateMovieClip("menu_item"+i, i);
menu_item_group["menu_item"+i].over = true;
menu_item_group["menu_item"+i].item_label = menu_label[i];
menu_item_group["menu_item"+i].item_no = i;
menu_item_group["menu_item"+i]._x = i * distance_x;
}
function change_page(no):Void
{
for( i = 0; i < total; i++ )
{
menu_item_group["menu_item"+i].flashmo_button._visible = true;
menu_item_group["menu_item"+i].over = true;
menu_item_group["menu_item"+i].flashmo_button.onRollOver = function()
{
this._parent.over = false;
}
menu_item_group["menu_item"+i].flashmo_button.onRollOut =
menu_item_group["menu_item"+i].flashmo_button.onDragOut = function()
{
this._parent.over = true;
}
menu_item_group["menu_item"+i].flashmo_button.onRelease = function()
{
_root.change_page(this._parent.item_no);
}
menu_item_group["menu_item"+i].onEnterFrame = function()
{
if( this.over == true ) this.prevFrame();
else this.nextFrame();
}
}
delete menu_item_group["menu_item"+no].flashmo_button.onRollOut;
menu_item_group["menu_item"+no].flashmo_button._visible = false;
menu_item_group["menu_item"+no].over = false;
_root.page = no + 1;
_root.play();
}
change_page(0); // the default page on load
flashmo_floral.onEnterFrame = function()
{
speed = ( 400 + _xmouse - this._x) * 0.004;
this._rotation += speed;
flashmo_plant._x += speed;
if( this._rotation > 150 )
this._rotation = 150;
if( this._rotation < -150 )
this._rotation = -150;
if( flashmo_plant._x > 700 )
flashmo_plant._x = 700;
if( flashmo_plant._x < 400 )
flashmo_plant._x = 400;
} Code: flashmo_contents.gotoAndStop(page); Code: flashmo_contents.gotoAndStop(page); stop(); Code: gotoAndPlay("start"); Geändert von raefe (01-01-2009 um 02:30 Uhr) |
| | |
![]() |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | |
| |