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

Need advice

New Here ,
Jan 14, 2011 Jan 14, 2011

Hello,

I'm a morning dew born newbie on AS.

A customer absolutely wanted a flash template he as seen on the web and made me buy it for him to integrate it on his new website.

It is a header with horizontal slides you can click on and make it show the picture on it and has a link to make you jump to the rgiht page.

I've intergated it to my pages, so far so good!

The problem is he want me to modify so that when you are on a page, the corresponding slide is selected and pops out.

I've search on diffferents forums, but I can not figure out which commands to use to have the as script read and know which page is showing.

I'm thinking using a special <body> ID tag for each page and have the as read it on opening the flash script.

Could it be the answer? How should I do it?

Thanks a lot in advance for any good advice.

John

TOPICS
ActionScript
474
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

correct answers 1 Correct answer

LEGEND , Jan 14, 2011 Jan 14, 2011

Your file uses Actionscript 2, so my suggestion to search AS3 FlashVars would change to AS2 FlashVars.  If you think you're going to need help with the coding, you should repost in the AS2 forum.

Translate
LEGEND ,
Jan 14, 2011 Jan 14, 2011

You could use FlashVars in the html embedding code of each different page that indicates which scenario applies and use that.  Serach Google using "AS3 FlashVars" and you should be able to find a tutorial or two.

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
LEGEND ,
Jan 14, 2011 Jan 14, 2011

How you might accomplish this depends on a number of variables. What do you mean by a page? Do you have multiple html documents that each have this banner flash movie embedded so that when a picture is selected on any given html document, you will open a new html document with the same flash movie embedded?

Somewhere in the template that you have is the code that moves the pictures and allows them to be selected. You may be able to adapt that actionscript to tell the new copy of the flash movie in the new html document to act like that particular picture was selected. To talk to the new html doc from the old one you can use a Javascript variable that is set and read by the Flash movie. The ExternalInterface class does this.

If your Flash template does not have robust documentation, and you are not familiar with working in Actionscript, this whole task may be very, very, difficult for you.

The whole process is also dependent on which version of Flash you are using and which version of Actionscript the template is using.

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
New Here ,
Jan 14, 2011 Jan 14, 2011

Thanks Ned and Rob for you're amazingly fast replies !

For Rob:

I'll try to explain myself better.

Yes there are several html docs, all of them have that flash banner embeded.

whith pictures, it will be easier for me to explain.

accueil.jpg

There are 7 slides numbered 01 thru 07

Stickers.jpg

In this example I clicked on 04. The script pulled out the proper slide.

If I click on the link (where the pointer is), it does bring me to the right html page "stickers" in this case,

but the flash script of that banner is reinitialized to 01.

Stickers2.jpg

Originally from that script, it does get info from the page with the body id "page4" and the ?button=4

<body id="page4" onLoad="javascript: preloader();changeimages();">
<div class="flash1">
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="86" id="FlashID" tabindex="1" title="Menu">
    <param name="movie" value="flash/menu_v8.swf?button=4" />
    <param name="quality" value="high" />
    <param name="wmode" value="transparent" />
    <param name="swfversion" value="8.0.35.0" />

Here's what I have under Flash CS4

Script.jpg

And as for documentation and proper identification of layers, pict and text, you're right it is null (txt_1, txt_2, txt_x...) !

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
LEGEND ,
Jan 14, 2011 Jan 14, 2011

Your file uses Actionscript 2, so my suggestion to search AS3 FlashVars would change to AS2 FlashVars.  If you think you're going to need help with the coding, you should repost in the AS2 forum.

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
New Here ,
Jan 14, 2011 Jan 14, 2011
LATEST

Ok thanks for your precious help Ned.

I'll follow your advice and ask for somme help inAS2 section.

If I had time, I would try to figure it out by my self, it's the best <ay to learn, but I've already lost to much time.

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