Hey everyone;
Am having problem linking pages in flash, i tried action script linking but when publishing and i click on the buttons its showing error message "the specified path cannot be found" and i specified de exact file wich the pages are located, hav tried evrythng else i thot wud work and i now ask for help from anyone. M stuck:(

Dani AI

Generated

Quick summary and where this thread is headed: created several “pages” inside one FLA by using scenes/frames and then mixed references to an on-stage clip called actions and to child clips (for example actions.about). That mix of scopes plus missing timeline halts is the most likely reason the movie keeps playing everything and why navigation behaves unpredictably. Several people pointed useful directions — (putting nav logic on a central control), (watch symbol types and frame scripts) and (check publish/public file issues) — but the thread never ties those together into a consistent model. Below is a practical, modern workflow and a short example you can adapt.

What to do (high level)

  • Decide which ActionScript version you’re using (AS2 vs AS3) and stick to it. Mismatches cause many hard-to-debug errors.
  • Avoid using multiple Scenes for site navigation. Use a single main timeline (or a master “content” MovieClip) and navigate by frame labels or by loading external SWFs.
  • Put the navigation buttons in a persistent container on stage (one layer or a MovieClip that stays put) and give every button and content clip an instance name. That keeps scope predictable.
  • Make sure each content frame/clip halts the playhead so it doesn’t auto-advance; control play from your nav code.

Example (AS3 pattern — preferred if your publish settings allow AS3)

navMC.home_btn.addEventListener(MouseEvent.CLICK, onNav);
function onNav(e:MouseEvent):void {
    gotoAndStop("homeLabel");      // jump main timeline to the labeled page
    contentMC.gotoAndPlay(1);      // kick a child clip if it has its own animation
}

Quick troubleshooting checklist

  • Confirm instance names (Properties panel) and that your code references those names exactly (case-sensitive).
  • If links to external files produced “specified path cannot be found”, verify relative paths and test from the published HTML folder (Flash local-security can interfere with local testing).
  • If buttons live inside a clip that you replace on navigation, their event handlers will disappear — keep handlers on a persistent nav clip or attach them on the document root after you load a new clip.
  • If you must keep Scenes, ensure each scene’s entry frame halts the playhead so frames don’t run straight through.

This keeps navigation deterministic: one central controller, clear instance names, frame labels instead of magic numbers, and separate timelines for animated content.

Recommended Answers

All 10 Replies

so your linking a html file to a button in flash ? or is it another type of file. Post the actionscript here ?

Its nt a html file linking wit a button in flash but what i did is; i created diff pages all in flash den combined dem in one page on different frames den i wrote the codings as below:

actions.gotoAndStop ("about");
about_btn.onRelease = function() {
actions.gotoAndStop("about");
actions.about.gotoAndPlay(5)
};
history_btn.onRelease = function() {
actions.gotoAndStop("history");
actions.history.gotoAndPlay(8)
};
gallery_btn.onRelease = function() {
actions.gotoAndStop("gallery");
actions.gallery.gotoAndPlay(10)
};
contacts_btn.onRelease = function() {
actions.gotoAndStop("contacts");
actions.contacts.gotoAndPlay(13)
};

Any idea of what i shud do? Thnx

Its nt a html file linking wit a button in flash but what i did is; i created diff pages all in flash den combined dem in one page on different frames den i wrote the codings as below:

actions.gotoAndStop ("about");
about_btn.onRelease = function() {
actions.gotoAndStop("about");
actions.about.gotoAndPlay(5)
};
history_btn.onRelease = function() {
actions.gotoAndStop("history");
actions.history.gotoAndPlay(8)
};
gallery_btn.onRelease = function() {
actions.gotoAndStop("gallery");
actions.gallery.gotoAndPlay(10)
};
contacts_btn.onRelease = function() {
actions.gotoAndStop("contacts");
actions.contacts.gotoAndPlay(13)
};

Any idea of what i shud do? Thnx

why not put the action in the actionscript for the button ?

i.e. convert the object to a button using F8 etc

right click on button and select actions

then use

on (release) {
    gotoAndStop(PAGE NUMBER);
}

then whenever you wish to use this just copy the button from your library ? does that help ?

Did you remember to make the files public?

Thanx guys, some positive progress seen. But its nw acting funny ie. when i publish it, it keeps on playing all the scenes. This wat i used for all the buttons:

on (release){
gotoAndStop("scene x");
}

NB: X stands for the scene number.

Anyone who knows wea de problem is n hw to stop it?
Thanx

what is on(release) ?


I think what you want is:

< .... onclick="gotoAndStop('scene x')">

what is on(release) ?


I think what you want is:

< .... onclick="gotoAndStop('scene x')">

similiar action as on click except it fires when the mouse is released

Member Avatar for Member #114696

Its nt a html file linking wit a button in flash but what i did is; i created diff pages all in flash den combined dem in one page on different frames den i wrote the codings as below.

This thing is confusing me. Do you mean
1. you have made different flash movies and places them in different files.
2. you have made different scenes in a flash movie.
3. you have made different flash movies and a master flash movie where you use other falsh movies using loadMovie .

Make sure that the symbol you are using is not a BUTTON, but a MovieClip.
Also if your flash movie plays all the scens without stopping check out the actionscipt in each frame.

I think your idea is not perfect. Do one thing edit that file wit my ideas!!!
create diff scenes for for diff pages. rename the scenes with your page names:
Scene 1 as Home, Scene 2 as About, Scene 3 as Gallery and Scene 4 as Contacts and So on..
then in every 1st frame of the scene don't forget to put stop(); in AS...:)
place the buttons in according to your design in a layer which is common to all frames of scene.. do the same for all scenes.
For Home button place codes:

on(press){
       gotoAndStop("Home",1);
}
For About button place codes:
on(press){
         gotoAndStop("About",1);
}
For Gallery button place codes:
on(press){
          gotoAndStop("Gallery",1);
}
For Contact button place codes:
on(press){
         gotoAndStop("Contacts",1);
}

if you have more no. of page within that.. I mean if u have 2 to 3 pages or more in Gallery.. create frames for each pages.. Then create next and back buttons.
In frame 1 place only next button and in last frame place only back button.
And don't forget to use stop(); in AS.. :)

For next button use code:
on(press){
      nextFrame();
}
For back button use code:
on(press){
       prevFrame();
}

i think you have got an better idea from this... i have given you my idea based on your AS you given.. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.