Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Easy AS2 script btn advice needed pls,

Engaged ,
Mar 25, 2010 Mar 25, 2010

I have a nav bar movie clip in a flash document imbedded as swf in an html page.  I want the button on release to go to a particular frame of a flash timeline imbedded as swf in another html page.

The html page is in a different folder at the same level, so ../ works to get to the html page.  But then I dont know how to drill into the flash time line from there.

Any help appreciated, thank you.

TOPICS
ActionScript
974
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 25, 2010 Mar 25, 2010

is the other html page already open when your button will be clicked?  if not, will your current page stay open while the 2nd html page opens?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 25, 2010 Mar 25, 2010

The other page is NOT open; the current page will close, thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 25, 2010 Mar 25, 2010

then this isn't going to be the easiest thing for you.  you need to:

1.  use getURL() to open your other html page, append a query string to the url that indicates the frame you want to display in the other swf

2.  add a javascript function to the other html page that returns location.href when called

3.  call that javascript function from your other swf (using the externalinterface class) and finally

4.  use preloader code in your other swf to ensure the needed frame is loaded and execute your goto to display the desired frame.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 25, 2010 Mar 25, 2010

Holy cow, I dont know any of that.

Once I "get url", isn't there just a way with naming the swf and "goto" or "with" or any of that elementary stuff?

Otherwise I just make a twin html page that simply starts at the desired location and call that up.

The basic idea is simply to avoid the intro if anyone returns to the first html page.

Thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 25, 2010 Mar 25, 2010

no.  there's no easy way to do what you originally requested.

but, if all you want is to skip an intro when users return, that should be done differently.  you could use the flash sharedobject to indicate a user has previously viewed your intro.  then when they return that sharedobject would be recalled and your intro skipped.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 25, 2010 Mar 25, 2010

if it is easy, or there is some place to read that, then perhaps you could direct me?

Altho the help files are often tough cuz I still dont even know syntax concepts or what "string" means etc.

Hard to believe?   But if I can get something to work, I just move on to my other life and that's the end of my training.

With modern speeds, I dont need to shave 5 kb here and there.

But thanks !

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 25, 2010 Mar 25, 2010
LATEST

you can check the flash help files under sharedobject.  there's example code that shows how to use it.  see if you can tweak it to meet your needs.

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