00:00
00:00
Newgrounds Background Image Theme

Lipinski14D just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Actionscript 2.0 - Emergency Help!

436 Views | 2 Replies
New Topic Respond to this Topic

Greetings wise and powerful coders,

Here is my issue:

I have a combobox(component) with instance name of "my_cb" in flash actionscript 2.0 with the following:

frame actionscript:

//combobox list

my_cb.addItem({ label:"Select Your Work Place"});
my_cb.addItem({data:pink, label:"SPP"});

my_cb.addItem({data:blue, label:"stages"});

//////

function pinkEvac() {

if (my_cb.selectedItem.data == pink)
gotoAndStop("pink");
}
///////////////

function blueEvac() {

if (my_cb.selectedItem.data == blue)
gotoAndStop("blue");
}

my_cb.addEventListener("change", pinkEvac);
my_cb.addEventListener("change", blueEvac);

When I try to change the selected Item under the combobox to something else, for example select "stage", the play-head does not go to the specified frame. It just flickers and stays in the same frame that it was originally sent to.

Help is very much appreciated, thanks everyone.
-Jake


BBS Signature

Response to Actionscript 2.0 - Emergency Help! 2014-05-23 23:49:32


If you put a trace inside your if conditions, do they output something to the console ?

If yes, I guess the gotoAndPlay()s are faulty. Try specifying a scene id/name in those calls.

At 5/22/14 05:43 PM, LazyModeComics wrote: Greetings wise and powerful coders,

Here is my issue:

I have a combobox(component) with instance name of "my_cb" in flash actionscript 2.0 with the following:

frame actionscript:

//combobox list

my_cb.addItem({ label:"Select Your Work Place"});
my_cb.addItem({data:pink, label:"SPP"});

my_cb.addItem({data:blue, label:"stages"});

//////

function pinkEvac() {

if (my_cb.selectedItem.data == pink)
gotoAndStop("pink");
}
///////////////

function blueEvac() {

if (my_cb.selectedItem.data == blue)
gotoAndStop("blue");
}

my_cb.addEventListener("change", pinkEvac);
my_cb.addEventListener("change", blueEvac);

When I try to change the selected Item under the combobox to something else, for example select "stage", the play-head does not go to the specified frame. It just flickers and stays in the same frame that it was originally sent to.

Help is very much appreciated, thanks everyone.
-Jake

website :: hugostonge.com

my job :: we+are

Response to Actionscript 2.0 - Emergency Help! 2014-05-27 15:24:40


At 5/23/14 11:49 PM, gorman2001 wrote:

The problem turned out to be the Data variable had to be a number not a string. It was odd. But my main Blannis figured it out!


BBS Signature