Hi People,
I’ve been struggling with an issue with swfaddress for quite some time now. And haven’t been able to find a solution yet. I’ve been implementing SWFaddress in my project and so far so good… All links in the website trigger the browser to set it to the location, and even copy/paste the URL to a new tab works fine…
The only issue I still have is that the back & foreward buttons in the browser don’t work. I’ve tried everything I could think of but for weeks of puzzling still nothing works…
Here’s my code
// SWFAddress include
import com.asual.swfaddress.*;
// SWFAddress handling
SWFAddress.onChange = function() {
var value = SWFAddress.getValue();
address_txt.text = value; // error handler on canvas
if (value == '/') {
A1Start();
} else if (value == '/over_ons/') {
B1Start();
} else if (value == '/vacatures/') {
B2Start();
} else if (value == '/over_icon/') {
C1Start();
} else if (value == '/photoshoots/') {
C2Start();
} else if (value == '/catwalks/') {
C3Start();
} else if (value == '/partner/') {
C4Start();
} else if (value == '/icon_boeken/') {
C5Start();
} else if (value == '/haar_vrouwen/') {
D1Start();
} else if (value == '/mode_vrouwen/') {
D2Start();
} else if (value == '/haar_mannen/') {
D3Start();
} else if (value == '/mode_mannen/') {
D4Start();
} else if (value == '/preview/') {
D5Start();
} else if (value == '/merken/') {
E1Start();
} else if (value == '/retail/') {
E2Start();
} else if (value == '/vrouwen/') {
F1Start();
} else if (value == '/mannen/') {
F2Start();
} else if (value == '/haar_verlenging/') {
F3Start();
} else if (value == '/styling_vrouwen/') {
G1Start();
} else if (value == '/styling_mannen/') {
G2Start();
} else if (value == '/styling_bruiloft/') {
G3Start();
} else if (value == '/styling_gala/') {
G4Start();
} else if (value == '/styling_uitgaan/') {
G5Start();
} else if (value == '/contact/') {
H1Start();
} else if (value == '/locatie/') {
H2Start();
} else if (value == '/legal_disclaimer/') {
H3Start();
}
var title = 'Grand Salon';
var names = SWFAddress.getPathNames();
for (var i = 0; i<names.length; i++) {
title += ' / '+names*.substr(0, 1).toUpperCase()+names*.substr(1);
}
SWFAddress.setTitle(title);
};
stop();
In every onRelease Function it calls it has a Setvalue trigger in the function. This is build in ever button.
menu_mc.sub_mc.btnA1_mc.onRollOver = function() {
SWFAddress.setStatus("/");
Tweener.addTween(menu_mc.sub_mc.btnA1_mc, {_color: 0xFFFFFF, time: 0.2});
}
menu_mc.sub_mc.btnA1_mc.onRollOut = function() {
SWFAddress.resetStatus();
Tweener.addTween(menu_mc.sub_mc.btnA1_mc, {_color: 0xFF0098, time:1});
}
menu_mc.sub_mc.btnA1_mc.onRelease = function() {
SWFAddress.setValue("/"); // homepage
Tweener.addTween(main_mc, {_alpha:0, time:0.5, onComplete:A1Start} );
};
has anyone any idea what I do wrong? Or did I miss something? To be honest I’m desperate… I did everything by the book!
Sincerely,
Le Marquis