Flash embed problem when jumping to a frame from Querystring

Dear friends

I hv got stuck in a problem, which somehow i need to solve in a day. I have a asp page which runs a swf file. Now this swf file has to jump into a specific frame depending upon what is in the querystring of the page. It is being called by a number of pages like
file.asp?frame=5 .. and then file has to jump to frame 5. Now even if the swf file is same it is reloading everytime a new frame is called in the querystring.
file.asp?frame=5
file.asp>frame=6
file.asp?frame=7

they are all reloading the same swf again. Also the first time i call the file, it is not jumpin to the right destination frame. after first loadup, if i then refresh the page.. it shows the correct frame.

to see this problem live... pls check here
http://67.128.88.71/adit/sg/clients.asp

click on any logo (only 6 are clickable)..and ideally it shd open the same logo . but the first time it always some frame.. and then when u refresh it shows the correct frame...

pls gimme a solution for this
Thks a lot
zombeen

LVL 2
zombeenAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

 
zombeenAuthor Commented:
ALso, on my local server, this 2nd problem of wrong frame showing the first time is not happening. it always show the right frame
0
 
zombeenAuthor Commented:
the code i m ucing with my swf file is

<param name="movie" value="clients/casestudies.swf?frame=<%=request.QueryString("frame")%>">
param name="quality" value="high">
<embed src="clients/clients-amd.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="778" height="227"></embed>
0
 
negatyveCommented:
The first time it's always the same because the flash movie it's not fully loaded yet, and the player cannot redirect it to a frame that is not loaded..
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
zombeenAuthor Commented:
negatyve, but i hv a preloader before that...
also what can i do to not let this file load into cache again and again.
Right now i can see entries in my cache like
casestudies.swf?frame=4
casestudies.swf?frame=5
and so on

param name="movie" value="clients/casestudies.swf?frame=<%=request.QueryString("frame")%>">
param name="quality" value="high">
<embed src="clients/clients-amd.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="778" height="227"></embed>

0
 
negatyveCommented:
>negatyve, but i hv a preloader before that...

But the gotoAndStop(frame) [ or gotoAndPlay(frame) ] is after or before the preloder?

>also what can i do to not let this file load into cache again and again.

anything. to view the file, it must be in the browser's cache
0
 
zombeenAuthor Commented:
_root.gotoAndPlay(Number(frame));
This is mentioned in the 2nd frame . the loader's in 1st frame

<param name="movie" value="clients/casestudies.swf?frame=<%=request.QueryString("frame")%>">
This line here is making the movie cache again n again. Can anything be done about this...

Thks once again
0
 
negatyveCommented:
if you mean that you want to update the movie every time, you could do something like:

<param name="movie" value="clients/casestudies.swf?update=ASP_CODE_FOR_RANDOM_NUMBER&frame=<%=request.QueryString("frame")%>">
0
 
zombeenAuthor Commented:
no negatyve...
i want that the swf file shd not reload again n again if the frame number is different. even if its the same file, just b'coz it uses diff querystring value, it is loading again n again, cuasing the speed to slow down

Cant we make it load only once in cache
0
 
negatyveCommented:
Oh, I'm sorry, now I understand. Try it this way:

[...]
      <param name="movie" value="clients/casestudies.swf">
      <param name="FlashVars" value="frame=<%=request.QueryString("frame")%>">
      <param name="quality" value="high">
      <embed
            src="clients/clients-amd.swf"
            FlashVars="frame=<%=request.QueryString("frame")%>"
            quality="high"
            pluginspage="http://www.macromedia.com/go/getflashplayer"
            type="application/x-shockwave-flash"
            width="778" height="227">
      </embed>
</object>
0
 
zombeenAuthor Commented:
Thks negatyve for such help. i m trying this now , and will get back soon
0
 
zombeenAuthor Commented:
negatyve, it works beautifully. Thks a ton.. one of the 2 problems still remain though. for some reason, it still loads a particular frame only (irrespective of Querystring value), and once the swf file is loaded once after that the correct frame is loaded always. on this u had remarked, that b'coz the frame might not be loaded at that time it is showing the first frame or so...but i have already put a preloader on the first frame..what can be the problem here?

You have done me a gr8 favour by answering the Ques. Pls see if u can help me on this, otherwise in any case i will award u the points after ur next post

Zombeen
0
 
negatyveCommented:
Could you write here your preloader code?
0
 
zombeenAuthor Commented:
my fla file is loaded here www.betashoes.co.uk/casestudies.zip
Pls see where i m going wrong
0
 
zombeenAuthor Commented:
negatyve cud you find any prob in the file?
0
 
negatyveCommented:
Maybe the problem is in that

if (bytesLoaded == bytesTotal) {
      _root.gotoAndPlay (3);
}

in the preloader code, where the gotoAndPlay(Number(frame)) is on frame 2 of the main timeline

That's exactly what I would do:

• open the fla
• edit the preloader clip
• delete frame 2 of the preloader
• delete the script from frame 1
• go back to the main timeline
• delete frame 2
• drop this code on frame 1

this.stop();
this.onEnterFrame = function()
{
      // this will get the total bytes loaded up to now
      var bytesLoaded = this.getBytesLoaded();
      // this will get the total Kilobytes loaded up to now
      var KbytesLoaded = Math.round(bytesLoaded / 1024) + " KB";
      // this will get the total bytes of the movie
      var bytesTotal = this.getBytesTotal();
      // this will get the total Kilobytes of the movie
      var KbytesTotal = Math.round(bytesTotal / 1024) + " KB";
      // this will set up the percentage of the movie loaded
      var percentSetup = ((bytesLoaded / bytesTotal) * 100);
      // this will put the percentage result in the text box
      percentage = Math.round(percentSetup) + "%";
      // this will set the loader bars scale property to 0 in the
      // beginning but it will expand as the percent level goes up.
      this.DropIn.LoaderBar._xscale = percentSetup;
      // this will check to see if the movie is loaded yet. If not
      // it will go to frame 2 and basically start over at frame
      // 1. In other words it will go back to the beginning of
      // the script above.
      if (bytesLoaded >= bytesTotal) {
            this.onEnterFrame = undefined
            this.gotoAndPlay(frame ? Number(frame) : 2);
      }
};

• open the library
• go to "Flash UI Components" folder
• do this thing for both "ScrollBar" and "ScrollPane" component
                    • click with the mouse right button on the component
                    • choose linkage from the context menu
                    • deselect the "Export in first frame" checkbox

• if you do everything, you should rememeber that now you should send to frame 2 instead of frame 3, frame 4 instead of frame 5 and so on
0
 
zombeenAuthor Commented:
thnx negatyve...

the problem is solved in terms of jumpting to the right frame... but now the text is not coming in the scroll panes. They are empty....!!!!....
I m sorry ot bother u again n again... but what can eb the problem now?

here's to see what is the problem (click on a logo)
http://67.128.88.71/adit/sg/clients.asp
0
 
negatyveCommented:
Have you made other changes?

(look here, frame=6)

http://www.negatyve.com/test/casestudies.html
0

Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
 
zombeenAuthor Commented:
ya! i dont know what i hv missed.
negatyve, can u post the fla file on the server or email me at akohli.cdg@spectranet.com
That'll be gr8

Thks
zombeen
0
 
zombeenAuthor Commented:
this is marvellous negatyve... Thks a ton...
btw i was missing the linkage part for scroll components
0
 
negatyveCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.