Autor Zpráva
mystic-x
Profil *
Nazdar lidicky,mam problem s dynamickem menu upravili jsem si ho jenze pak jsem zjistil (jak v tom neumim), ze mi to menu nezije.Nefunguje mi.Proste kdyz si vyberu nejakou polozku z menu tak mi to vypise jenom text a ja bach potreboval aby to ukazovalo na stranky. Prikladam zdrojovy kod actionscriptu a email aby to bylo jednodusi mystic-x@email.cz

onClipEvent (load) {
// -- set up names of main items here
// -- you can add as many new sections as you want (or your computer can handle)
mainSections = new Array("O nás", "tituly", "ceník", "řády", "odkazy", "ke stažení", "půjčovny", "erotika");
// -- one array for each main Section -
subSection0 = new Array
subSection1 = new Array("novinky", "připravujeme", "TOP 25 VHS", "TOP 10 DVD", "seznamy", "vyhledávání" );
subSection2 = new Array("půjčovné", "poplatky");
subSection3 = new Array("podmínky", "řád");
subSection4 = new Array("filmy", "distributoři", "technika");
subSection5 = new Array
subSection6 = new Array("Dejvická", "Letná", "Kavalírka", "N.Butovice");
subSection7 = new Array
// --
// --
// -- build the main buttons
for (i=0; i<mainSections.length; i++) {
attachMovie("mainButton", "main"+i, i+100);
myButton = this["main"+i];
myButton.subs = this["subSection"+i];
myButton.button.value = mainSections[i];
myButton._x = myButton._width*i;
// -- build subsection buttons for each main button
for (x=0; x<myButton.subs.length; x++) {
myButton.attachMovie("subButton", "sub"+x, x);
mySub = myButton["sub"+x];
mySub.button.value = myButton.subs[x];
mySub.button.outYpos = myButton._height+(mySub._height*x);
}
}
// -- function that opens the subsection on rollover
function openSubs (target) {
for (i=0; i<this[target].subs.length; i++) {
subMenuCounter = 0;
this[target]["sub"+i].button.newY = this[target]["sub"+i].button.outYpos;
currentOpen = target;
}
}
// -- close subsections function
function closeSubs (target) {
for (i=0; i<this[target].subs.length; i++) {
this[target]["sub"+i].button.newY = this[target]["sub"+i].button.oYpos;
}
}
// - this is the fuction you would change to load content, or add more functionality to the buttons
function doSubSection (target, sub) {
_root.currentSelection = target +" "+ sub;
closeSubs(currentOpen);
}
}
onClipEvent (enterFrame) {
// -- a timer that closes the menus after a certain amount of time
subMenuCounter++;
if (subMenuCounter>100) {
closeSubs(currentOpen);
subMenuCounter = 0;
}
}
onClipEvent (mouseUp) {
// -- this closes the curently open submenu if the user clicks outside of the menu
if (!this.hitTest(_root._xmouse, _root._ymouse)) {
closeSubs(currentOpen);
}
}
flz
Profil
co tak sem dat .fla?
mystic-x
Profil *
rad bych,ale nejak sem to nenasel jak ho sem importovat. Nebo ho muzu vlozit pomoci html znacek?
Hanz
Profil
mystic-x
Nahrej ho kamkoli na jakýkoli server a dej sem odkaz.
mystic-x
Profil *
tak to jo.Ja myslel, ze to jde nejak jinak.OK
mystic-x
Profil *
www.dynmenu.webpark.cz/menu.fla
Sceptic
Profil *
Prosim vas nenasla by sa tu nejaka dobra dusa, ktora mi pomoze s mojim menu, ktore chcem dat na moju straku poslal by som to na mail ...

Moj problem spociva vtom, ze ani netusim ako sa davaju odkazy z jednotlivým tlacitok do mnu urceneho framu na *.html ktore chcem v danom frame zobrazit staci mi ak by ste mi pomohli trebars so 4 tlacitkami
ostatne si dorobím sám praca na 15 min.

Dakujem kontakt : faboland@seznam.cz
Sitnarf
Profil
Jestli to ještě nemáš tak to udělej tak, že dovnitř toho buttonu dej
onClipEvent(load){
this.onRelease = function() {
getURL(stranka);
}
}
potom když se bude generovat přiřaď tlačítku proměnnou stránka podle toho na co má odkazovat.

myButton.stranka = "stranka.htm";
Funguje od verze MX.
Hanz
Profil
Sceptic
No kdybys napsal ten odkaz správně (bez www) tak bych ti to napsal hned, ale až teď jsem si uvědomil že to máš špatně.
Script se vkládá na toto místo:
onClipEvent (load) {
// -- set up names of main items here
// -- you can add as many new sections as you want (or your computer can handle)
mainSections = new Array("O nás", "tituly", "ceník", "řády", "odkazy", "ke stažení", "půjčovny", "erotika");
// -- one array for each main Section -
subSection0 = new Array
subSection1 = new Array("novinky", "připravujeme", "TOP 25 VHS", "TOP 10 DVD", "seznamy", "vyhledávání" );
subSection2 = new Array("půjčovné", "poplatky");
subSection3 = new Array("podmínky", "řád");
subSection4 = new Array("filmy", "distributoři", "technika");
subSection5 = new Array
subSection6 = new Array("Dejvická", "Letná", "Kavalírka", "N.Butovice");
subSection7 = new Array
// --
// --
// -- build the main buttons
for (i=0; i<mainSections.length; i++) {
attachMovie("mainButton", "main"+i, i+100);
myButton = this["main"+i];
myButton.subs = this["subSection"+i];
myButton.button.value = mainSections[i];
myButton._x = myButton._width*i;
// -- build subsection buttons for each main button
for (x=0; x<myButton.subs.length; x++) {
myButton.attachMovie("subButton", "sub"+x, x);
mySub = myButton["sub"+x];
mySub.button.value = myButton.subs[x];
mySub.button.outYpos = myButton._height+(mySub._height*x);
}
}
// -- function that opens the subsection on rollover
function openSubs (target) {
for (i=0; i<this[target].subs.length; i++) {
subMenuCounter = 0;
this[target]["sub"+i].button.newY = this[target]["sub"+i].button.outYpos;
currentOpen = target;
}
}
// -- close subsections function
function closeSubs (target) {
for (i=0; i<this[target].subs.length; i++) {
this[target]["sub"+i].button.newY = this[target]["sub"+i].button.oYpos;
}
}
// - this is the fuction you would change to load content, or add more functionality to the buttons
function doSubSection (target, sub) {
_root.currentSelection = target +" "+ sub;

----> ZDE <----
closeSubs(currentOpen);
}
}
onClipEvent (enterFrame) {
// -- a timer that closes the menus after a certain amount of time
subMenuCounter++;
if (subMenuCounter>100) {
closeSubs(currentOpen);
subMenuCounter = 0;
}
}
onClipEvent (mouseUp) {
// -- this closes the curently open submenu if the user clicks outside of the menu
if (!this.hitTest(_root._xmouse, _root._ymouse)) {
closeSubs(currentOpen);
}
}


Pro vytvořnío ožívá getURL(). Takže script, který tam vložíš může potom vypadat třeba:
getURL("http://www.jakpsatweb.cz")

Tohle bytě odkazovalo vždy na stejnou stránku. Přitom jak je to menu dělané (moc jsem ho ale nestudoal) je nejlepší způsob jak se dostat vždy na jinou stránku je asi takto (netestoval jsem):
if(_root.currentSelection==NĚJAKÁ HODNOTA){getURL("http://www.jakpsatweb.cz")}


No prostě přez podmínky. Například budu chtít aby když kliknu v tom tvém menu na položku CENÍK->PŮJČOVNÉ tak to bude takhle:
if(_root.currentSelection=="main2 sub0"){getURL("http://www.jakpsatweb.cz")}
mystic-x
Profil *
Hanz -> thanx tak to je super.J SEM SI RIKAL,ZE TO NEBUDE NECO SLOZITEHO,ALE NAD ME SCHOPNOSTI.Moc diky.
Toto téma je uzamčeno. Odpověď nelze zaslat.

0