954,604 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Linking Pages in Flash

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:(

princekool
Light Poster
31 posts since Apr 2007
Reputation Points: 7
Solved Threads: 3
 

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

Fungus1487
Posting Pro in Training
459 posts since Apr 2007
Reputation Points: 66
Solved Threads: 56
 
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
 

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

princekool
Light Poster
31 posts since Apr 2007
Reputation Points: 7
Solved Threads: 3
 

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 ?

Fungus1487
Posting Pro in Training
459 posts since Apr 2007
Reputation Points: 66
Solved Threads: 56
 

Did you remember to make the files public?

MidiMagic
Nearly a Senior Poster
3,319 posts since Jan 2007
Reputation Points: 730
Solved Threads: 182
 

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

princekool
Light Poster
31 posts since Apr 2007
Reputation Points: 7
Solved Threads: 3
 

what is on(release) ?


I think what you want is:

< .... onclick="gotoAndStop('scene x')">
MidiMagic
Nearly a Senior Poster
3,319 posts since Jan 2007
Reputation Points: 730
Solved Threads: 182
 

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

Fungus1487
Posting Pro in Training
459 posts since Apr 2007
Reputation Points: 66
Solved Threads: 56
 
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.

vishesh
Nearly a Posting Virtuoso
1,381 posts since Oct 2006
Reputation Points: 85
Solved Threads: 42
 

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.. :)

adarsha_saraff
Newbie Poster
2 posts since Jan 2008
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: