Highlighted

Navigation issue inside movie clip with VR (not a simple -1 frame issue)

Explorer ,
Jul 03, 2020

Copy link to clipboard

Copied

This is my code. It is inside a moviclip in a VR project 

My issue is: clicking on the butons won't direct you to the correspondent frame (FLA attached). Instead, directing it any to frame smaller than 3 will stay at frame 0, directing it to frame 3 will result in displaying frame 1, and directing it to frame 4 will direct it to frame 3. It is driving me mad! 

 Any ideas? It couldn't be simpler than that.

 

 

{
var _this = this;

//Clicking on the specified symbol instance executes a function.
_this.bt0.addEventListener(AnEvent.CLICK, function() {
//Moves the playhead to the specified frame number in the timeline and and stops the movie
_this.gotoAndStop(0);
	
});

//Clicking on the specified symbol instance executes a function.
_this.bt1.addEventListener(AnEvent.CLICK, function() {
//Moves the playhead to the specified frame number in the timeline and and stops the movie
_this.gotoAndStop(1);
	
});

//Clicking on the specified symbol instance executes a function.
_this.bt2.addEventListener(AnEvent.CLICK, function() {
//Moves the playhead to the specified frame number in the timeline and and stops the movie
_this.gotoAndStop(2);
	
});

//Clicking on the specified symbol instance executes a function.
_this.bt3.addEventListener(AnEvent.CLICK, function() {
//Moves the playhead to the specified frame number in the timeline and and stops the movie
_this.gotoAndStop(3);
	
});

//Clicking on the specified symbol instance executes a function.
_this.bt4.addEventListener(AnEvent.CLICK, function() {
//Moves the playhead to the specified frame number in the timeline and and stops the movie
_this.gotoAndStop(4);
	
});

_this.stop();

}

 

 

(I would have attached it, but the forum gives me the message "The attachment's vrbug.fla content type (application/octet-stream) does not match its file extension and has been removed"

 

TOPICS
ActionScript, Error

Views

24

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Navigation issue inside movie clip with VR (not a simple -1 frame issue)

Explorer ,
Jul 03, 2020

Copy link to clipboard

Copied

This is my code. It is inside a moviclip in a VR project 

My issue is: clicking on the butons won't direct you to the correspondent frame (FLA attached). Instead, directing it any to frame smaller than 3 will stay at frame 0, directing it to frame 3 will result in displaying frame 1, and directing it to frame 4 will direct it to frame 3. It is driving me mad! 

 Any ideas? It couldn't be simpler than that.

 

 

{
var _this = this;

//Clicking on the specified symbol instance executes a function.
_this.bt0.addEventListener(AnEvent.CLICK, function() {
//Moves the playhead to the specified frame number in the timeline and and stops the movie
_this.gotoAndStop(0);
	
});

//Clicking on the specified symbol instance executes a function.
_this.bt1.addEventListener(AnEvent.CLICK, function() {
//Moves the playhead to the specified frame number in the timeline and and stops the movie
_this.gotoAndStop(1);
	
});

//Clicking on the specified symbol instance executes a function.
_this.bt2.addEventListener(AnEvent.CLICK, function() {
//Moves the playhead to the specified frame number in the timeline and and stops the movie
_this.gotoAndStop(2);
	
});

//Clicking on the specified symbol instance executes a function.
_this.bt3.addEventListener(AnEvent.CLICK, function() {
//Moves the playhead to the specified frame number in the timeline and and stops the movie
_this.gotoAndStop(3);
	
});

//Clicking on the specified symbol instance executes a function.
_this.bt4.addEventListener(AnEvent.CLICK, function() {
//Moves the playhead to the specified frame number in the timeline and and stops the movie
_this.gotoAndStop(4);
	
});

_this.stop();

}

 

 

(I would have attached it, but the forum gives me the message "The attachment's vrbug.fla content type (application/octet-stream) does not match its file extension and has been removed"

 

TOPICS
ActionScript, Error

Views

25

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 03, 2020 0
foq LATEST
Explorer ,
Jul 03, 2020

Copy link to clipboard

Copied

THe issue does not happen on a regular HTML5 Fla  (replacing AnEvent with a regular listener -- which I also tried on the VR project)

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 03, 2020 0