Welcome, Guest
  • Author Topic: Flash 8 and Ming  (Read 978 times)

    sround

    • Server what's that
    • *
    • Posts: 2
      • View Profile
    Flash 8 and Ming
    « on: 11/24/06, 13:31 »
    I'm trying to get a "simple as possible" script to work using Ming and
    Flash 8 features.  The link below shows how gobbsmacking F8 can be:

    http://redhot.pepper.jp/ming_php/textgradient.html

    I'd like to load up a jpg within  the AS portion of the Ming script,
    but so far, I haven't had any luck. This works when the "ming_useswfversion" is
    set to 6, but 7 kills it.   Have I slammed up against a brick wall here?

    TIA,

    sround

    <?php

    dl('php_ming.so');

    Ming_setScale(20.0);
    ming_useswfversion(7);
    $movie = new SWFMovie();
    $movie->setRate(25.000000);
    $movie->setDimension(550,400);
    $movie->setBackground(0xde,0xde,0xde);

    #------------------------------------
    # Add onClipEvent Actions
    #------------------------------------

    $strAction= "

    createEmptyMovieClip('pic',1);
    pic._x=150;
    pic._y=100;
    pic.loadMovie('yum.jpg');
    ";

    // add the actionscript to frame 1 of the movie and save...

    $movie->add(new SWFAction($strAction));

    // save movie
    $swfname = basename(__FILE__,".php");
    $movie->save($outswf="$swfname.swf",9);
    // open movie and set version to 8
    // (hack until it can be set in ming)
    $ftmp=fopen($outswf,"r");
    $stmp=fread($ftmp,filesize($outswf));
    $ftmp=fopen($outswf,"w");
    fwrite($ftmp,substr_replace($stmp,chr(8),3,1));
    ?>


    sround

    • Server what's that
    • *
    • Posts: 2
      • View Profile
    Re: Flash 8 and Ming
    « Reply #1 on: 11/29/06, 12:15 »
    Okay...just solved this issue.

    What I needed to do was to create the image sprite in the Ming portion,
    then export it, then attach it in the AS portion.  Trivial problem, really.
    (aren't they all??? )  ;)

    sround