VideoHive

AS3 gotoframe works fine except when I load into another swf

905 posts
  • Has been a member for 5-6 years
  • Bought between 100 and 499 items
  • United States
unchartedrealms says

I built a AS3 file that uses listeners for clicks on object then jumps to a frame label. This method has been working great but when I publish the swf with the jump to frame code and load it as a external swf into another AS3 project the jump to frame code does not work any more. Any suggestions. Thank you so much for anyone who can help.

I will get a file from whoever solves it before me. Thanks yall

here is my go to frame code that works fine except when I publish and load as external swf into another as3 movie

http://pastie.org/433200

3 years ago
3860 posts
  • Has been a member for 5-6 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Contributed a Tutorial to a Tuts+ Site
  • Contributed a Blog Post
  • Author had a Free File of the Month
  • Beta Tester
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 100 and 499 items
  • United Kingdom
  • Referred between 200 and 499 users
flashjunkie says
Truly shocked if this works but oh well, i dont know as3, just a stab in the dark lol
nav_ten.addEventListener(MouseEvent.CLICK, navTenFunction);

function navTenFunction(e:MouseEvent) {
gotoAndStop("bychannel")
}

just thought maybe removing the function from the listener might help?

Jay

3 years ago
905 posts
  • Has been a member for 5-6 years
  • Bought between 100 and 499 items
  • United States
unchartedrealms says

Thanks J I will give it a shot. if it works then u know what :)

3 years ago
905 posts
  • Has been a member for 5-6 years
  • Bought between 100 and 499 items
  • United States
unchartedrealms says

well it threw no errors but it still did not allow me to navigate. Thanks so much for giving it a shot. It means much. I still look forward to purchasing your new cms file when it comes out :)

It really is making me upset because I use this same AS3 file/template I built before and use to load AS2 movies with jump to frame code in it and it worked perfect. Know same file and code loading AS3 and a no go. One of the many problems I have with AS3 making flash harder for a none code junky

Maybe I need to lock the root in the swf or something. I guess I could convert it back to as2 but its many many places I would have to do it. ah deadline ahh.

3 years ago
3860 posts
  • Has been a member for 5-6 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Contributed a Tutorial to a Tuts+ Site
  • Contributed a Blog Post
  • Author had a Free File of the Month
  • Beta Tester
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 100 and 499 items
  • United Kingdom
  • Referred between 200 and 499 users
flashjunkie says

It sounds like it could be a scope issue…

not sure :)

Have decided to hold back on the CMS until ive released some other files and built a stronger customer base.

But dont worry, the files are gonna be just as good.

Email me if you want to preview my next file :)

Jay

3 years ago
4209 posts
  • Has been a member for 3-4 years
  • Contributed a Tutorial to a Tuts+ Site
  • Contributed a Blog Post
  • Community Superstar
  • Author had a Free File of the Month
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Bought between 100 and 499 items
  • United States
  • Referred between 50 and 99 users
CodingJack says

Is the click event firing at all? Try putting a trace inside the gotoFrame function to see if you get something.

3 years ago
905 posts
  • Has been a member for 5-6 years
  • Bought between 100 and 499 items
  • United States
unchartedrealms says

good to know FJ I will email you to get a sneak peek. its good to have a gameplan.

lockroot was removed in AS3 as it is supposed to be that way by default. dooh.

Thanks CrackerJack I am going to try that. I will search for some trace code. and report back my results.

3 years ago
905 posts
  • Has been a member for 5-6 years
  • Bought between 100 and 499 items
  • United States
unchartedrealms says

Hi Cracker Jack when I replace the go to frame with a Trace(“hello”) nothing showed up in the output panel. But when the external swf with the go to frame code loaded into the main clip it gave me this error

TypeError: Error #1009: Cannot access a property or method of a null object reference. at directv_interactive_fla::MainTimeline/frame1()

3 years ago
905 posts
  • Has been a member for 5-6 years
  • Bought between 100 and 499 items
  • United States
unchartedrealms says

Well I got the go to frame to work. I deleted the flvPlayback component I had on the first frame of the loaded swf that would not go to a frame on command, and once the flv playback components were gone it would go to a frame correctly as planned. To annoying cause I really need video in that swf file.

As3 is so buggy and such a tight ass for a Designer to use. Its like a clean freak girlfriend that nags about things being out of place all night long allowing nothing to get done ]

I guess i will try another technique to load video.

3 years ago
4209 posts
  • Has been a member for 3-4 years
  • Contributed a Tutorial to a Tuts+ Site
  • Contributed a Blog Post
  • Community Superstar
  • Author had a Free File of the Month
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Bought between 100 and 499 items
  • United States
  • Referred between 50 and 99 users
CodingJack says

haha that’s my favorite part of AS3 ! The mystery error! What could it be? Thanks Adobe for being sooooo helpfull!

But seriously,

I assume the loaded swf works when you test it as is. Are you working with classes?

3 years ago
by
by
by
by
by