scrollpane, auto scroll, flash

I have two web pages.  In the first web page, I have a scrollpane with a button in it that navigates to the 2nd web page (using GetURL: _top).  Now, in that 2nd web page, I also have a scrollpane.  What I want to do is when the button is clicked on that first page (button inside the scrollpane), it will go to that 2nd page BUT I want it to automatically scroll down to the bottom of the scrollpane on that 2nd page.  In other words, I don't want the user to have to scroll down to the bottom.  I'd like to somehow trigger it so that it navigates to the end of the scrollpane.  I haven't seen any articles on this anywhere and I've searched the web and this site extensively.

Thanks,
COwebmaster
COwebmasterAsked:
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.

wimthepimscakeCommented:
Hi,

if this is flash mx 2004 component then do this:

scrollPaneInstance.vPosition = scrollPaneInstance.height

Wim
0
COwebmasterAuthor Commented:
Yes, it is.  Where would I place this line of code: in the first page movie clip or the second page movie clip?
0
wimthepimscakeCommented:
If you want to go through with tis here is a parsing example in T-SQL:

Parsing the comma separated values into a temporary table and joining the temp table to main table


CREATE PROC dbo.GetOrderList2
(
    @OrderList varchar(500)
)
AS
BEGIN
    SET NOCOUNT ON

    CREATE TABLE #TempList
    (
        OrderID int
    )

    DECLARE @OrderID varchar(10), @Pos int

    SET @OrderList = LTRIM(RTRIM(@OrderList))+ ','
    SET @Pos = CHARINDEX(',', @OrderList, 1)

    IF REPLACE(@OrderList, ',', '') <> ''
    BEGIN
        WHILE @Pos > 0
        BEGIN
            SET @OrderID = LTRIM(RTRIM(LEFT(@OrderList, @Pos - 1)))
            IF @OrderID <> ''
            BEGIN
                INSERT INTO #TempList (OrderID) VALUES (CAST(@OrderID AS int)) --Use Appropriate conversion
            END
            SET @OrderList = RIGHT(@OrderList, LEN(@OrderList) - @Pos)
            SET @Pos = CHARINDEX(',', @OrderList, 1)

        END
    END    

    SELECT o.OrderID, CustomerID, EmployeeID, OrderDate
    FROM     dbo.Orders AS o
        JOIN
        #TempList t
        ON o.OrderID = t.OrderID
       
END
GO

GRANT EXEC ON dbo.GetOrderList2 TO WebUser
GO

 
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.

wimthepimscakeCommented:
COwebmaster,

sorry that was a wrong post :-)
0
wimthepimscakeCommented:
what do you mean by first page or second page? do you mean that the two flashes are embeded in two seperate html pages?
0
COwebmasterAuthor Commented:
Yes:

I have two web pages.  In the first web page, I have a scrollpane with a button in it that navigates to the 2nd web page (using GetURL: _top).  Now, in that 2nd web page, I also have a scrollpane.  What I want to do is when the button is clicked on that first page (button inside the scrollpane), it will go to that 2nd page BUT I want it to automatically scroll down to the bottom of the scrollpane on that 2nd page.  In other words, I don't want the user to have to scroll down to the bottom.  I'd like to somehow trigger it so that it navigates to the end of the scrollpane.  I haven't seen any articles on this anywhere and I've searched the web and this site extensively.


0
wimthepimscakeCommented:
You hav to pass a parameter in the url to the second page, then with javascript get it from the url and use it to initialize the second flash

I have an example here somewhere
0
wimthepimscakeCommented:
in this example we give a onlineHelpId variable to the flash, be carefull this javascript only parses out 1 parameter from the url.
example:

    //get param from url:
    var url = window.location;
    url = String(url)
    var search = url.split('?');
    if (search.length > 1) {
        search = search[1];
        var helpIdPair = search.split('&')[0]
        var helpId = helpIdPair.split("=")[1]
        swfVars = "onlineHelpId=" + helpId
    } else {
        swfVars = ""
    }

    swfFile = "pageFrame.swf"
    swfWidth = "1014"
    swfHeight = "702"
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ')
    document.write('codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,95,0" type="application/x-shockwave-flash" ')
    document.write('width="' + swfWidth + '" height="' + swfHeight + '" id="pageFrame" align="middle">')
    document.write('<PARAM NAME="FlashVars" VALUE="' + swfVars + '">')
    document.write('<param name="movie" value="' + swfFile + '?' + swfVars + '">')
    document.write('<param name="quality" value="high">')
    document.write('<param name="allowScriptAccess" value="sameDomain" />')
    document.write('<param name="quality" value="high" />')
    document.write('<param name="swf" value="fdfd" />')
    document.write('<param name="scale" value="exactfit" />')
    document.write('<param name="bgcolor" value="#ffffff" />')
    document.write('<embed src="' + swfFile + '?' + swfVars + '" ')
    document.write(' FlashVars="' + swfVars + '" ')
    document.write(' quality="high" scale="exactfit" bgcolor="#ffffff" name="pageFrame" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="' + swfWidth + '" height="' + swfHeight + '"></embed></object>')
0

Experts Exchange Solution brought to you by

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
COwebmasterAuthor Commented:
Ok, so do where would I place this script...on the button in the flash movie on the first page?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.

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.