[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

scrollpane, auto scroll, flash

Posted on 2004-12-01
11
Medium Priority
?
502 Views
Last Modified: 2008-01-09
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
0
Comment
Question by:COwebmaster
  • 6
  • 3
9 Comments
 
LVL 6

Expert Comment

by:wimthepimscake
ID: 12717726
Hi,

if this is flash mx 2004 component then do this:

scrollPaneInstance.vPosition = scrollPaneInstance.height

Wim
0
 

Author Comment

by:COwebmaster
ID: 12717768
Yes, it is.  Where would I place this line of code: in the first page movie clip or the second page movie clip?
0
 
LVL 6

Expert Comment

by:wimthepimscake
ID: 12717780
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 6

Expert Comment

by:wimthepimscake
ID: 12717803
COwebmaster,

sorry that was a wrong post :-)
0
 
LVL 6

Expert Comment

by:wimthepimscake
ID: 12717823
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
 

Author Comment

by:COwebmaster
ID: 12717988
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
 
LVL 6

Expert Comment

by:wimthepimscake
ID: 12718035
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
 
LVL 6

Accepted Solution

by:
wimthepimscake earned 2000 total points
ID: 12718098
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
 

Author Comment

by:COwebmaster
ID: 12719321
Ok, so do where would I place this script...on the button in the flash movie on the first page?
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question