Announcement

Collapse
No announcement yet.

Does anybody know how I could achieve this?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Does anybody know how I could achieve this?

    I'm working on a wheel site, and would like to see if this is possible with actinic..

    If you look on the below page http://www.performancealloys.com/res...=wheels_by_car

    you can view wheels on a car, i.e. your car.

    I'd like to try this out, any advice or source code would be a huge benefit.

    Cheers

    #2
    tricks

    I guess Actinic could provide the framework but the actual preparation of the car and wheel images would have to be done by something else.

    Exploring the web page, this is actually done quite 'crudely' - but effectively! The car is a jpg with blacked out areas for the wheels. The wheels are gifs, with black transparency. The key is then to position two wheels relative to each car photo - this seems to be done by setting the top and left margins for the wheels images, positioning them over the car in a table. They seem to be using ASP with SQL Server - so all the positioning will be held there - and presented dynamically to the user.

    Actinic is mainly a pre-publish tool - ie all the pages are pre-prepared; to achieve the same result you would have to write something which did all the image assembly and then embed the resulting html in say the Extended Information page. But this would make swapping the wheels on the same car rather hardwork - if there are 100 cars and for each 20 wheel options you would have 2000 pages - you would be swapping 20 pages for a car - not ideal...

    A method which might work (other people may know more definitely) is to embed php in the Actinic page - so the image assembly/re-assembly would be handled dynamically - supported by a MySQL database. So you would have one page per car in Actinic, with the wheel images swapped by the PHP.

    And some JavaScript guru will have another method!

    Comment


      #3
      Some server-side PHP can do this. PHP is capable of returning an image so you could have some browser side JavaScript that replaces an image with a PHP created one. E.g.

      on the browser (in JavaScript)

      document.getElementById('carimg').src = carcreator.php?carid=123&wheelid=345

      and on the server a PHP page called carcreator.php that looks up a table like this

      index imagename fronyx, fronty, rearx, reary
      123 trabant.jpg 12 23 150 22

      where the numbers are the coordinates of each wheel center

      Another table contains the list of wheel images.

      The PHP now knows enough to build and return a composite image containing 2 correctly located wheels.

      See http://www.drillpine.biz/v7imageuplo..._Products.html for a demo or http://www.fastframes.co.uk/acatalog...old_80mm_.html for a real world Actinic site doing similar things.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment

      Working...
      X