Changing Scenes via buttons

  • Arlene
  • Born
  • Born
  • Arlene
  • Posts: 3
  • Loc: Kent, UK

Post 3+ Months Ago

Hi
I'm creating a kind of 'treasure hunt' game for really young children.
There will be a number of items, which when pressed will dissappear (buttons inside movies).
Once all of these items have been selected (therefore are no longer visible), I want the timeline to move to the next scene.

It's gonna be an 'alphabet treasure hunt'. I have 'A, B, C & D' on scene 1.
These are each sepperate movie clips, with buttons inside.
When the letter is pressed, it dissappears ( i have done this using the alpha tool).
What i need, is when all of these letters have been pressed (therefore are invisible), to move onto the next scene (where more letters will be hidden.
I have given each of the letters instance names (treasureA, treasureB...)

I have applied this advice I was given:

Create a movie clip called "count_mc"

Place it on the _root

Within the "count_mc" create 5 frames where the first four frames simply say stop; and the last frame says goto "yourscenename"

Now on each of your 4 buttons set

on (release)
telltarget _root.count_mc
GotoNextFrame;

The problem I am now having is the output window says:

Target not found: Target="_root.count_mc" Base="_level0.treasureA

(treasureA is the instance name of the letter i pressed)

The letters fade though, but the scene doesnt change!! :shock:
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Arlene
  • Born
  • Born
  • Arlene
  • Posts: 3
  • Loc: Kent, UK

Post 3+ Months Ago

...just to let u know, I have fixed this now.

Thanks for all the help btw (lol)
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Glad you got your problem solved. Sorry I haven't been around much lately :(
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Arlene. Welcome to OZZU. Just so you know, we do encourage our posters/members who discover the solution to their problem on their own, to post how you did it, so others in the future with similar problems can benefit as well.
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

My guess is the problem was where the scene change was being called from.

Scene changes via gotoAndPlay or gotoAndStop can only be called from the _root timeline, not from within a movieclip symbol or a button in a movieclip symbol.

However, the way around this is the give the first frame in every scene a frame label (in the properties panel) then use
Code: [ Select ]
_root.gotoAndPlay("frameLabelToGoTo")
  • Sean Dempsey
  • Novice
  • Novice
  • Sean Dempsey
  • Posts: 25

Post 3+ Months Ago

I found this thread on a google search for "movie buttons changing scenes" and this was the first result.

The thread solved my problem, and taught me something new I didn't know. I am extremely pleased.

I hope to be an active member here, I am a full time site designer, but more advanced flash is new to me.

Thanks again!
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

That's good to hear Sean :)
  • vice82
  • Born
  • Born
  • vice82
  • Posts: 1
  • Loc: Miami, FL

Post 3+ Months Ago

Hello, i just recently stumbled on to this wonderful site in hopes that someone out there can help! Ive been stuck for days... I cant figure it out...

Im creating a flash site for a photographer which consists of different categorys, each on its own scene...

From scene 1, (the main menu) i would like the user to be able to click on a category button which would take the user to scene 2...
the only thing is that on scene 2, I would also like to load in an external swf with the main content of that category AND dynamically load in an external movie clip INTO an empty movieclip placeholder thats already on the stage!

I can so far get from scene 1 to scene 2...
but i dont know the actionscript to add to the button instance to make the other ones load in... I have everything set up with all the file names and all... i just need HELP on the actionscript code to make it
1. change scene
THEN
2. load external movieclip into empty movie clip placeholder
THEN
3.load external swf for that page's category

PLEEEEEEASE!!!! IF ANYONE CAN HELP....LET ME KNOW!
thanxxx
:?
  • roarmeow
  • Professor
  • Professor
  • User avatar
  • Posts: 861
  • Loc: BKNY

Post 3+ Months Ago

1. change scene
Code: [ Select ]
gotoAndPlay("scene2");


2. load external movieclip into empty movie clip placeholder
3.load external swf for that page's category

look into "loadMovie" and "loadMovieNum" in the actionscript dictionary and figure out how you wanna do it...

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 15 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.