1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Starting with Flash at the Deep End

Discussion in 'Graphics & Multimedia' started by daniel.skinner, Feb 16, 2008.

  1. #1
    Hi,

    I have extremely little experience with Flash but I need to learn it quickly to accomplish a certain task.

    I am looking to control my Flash object with Javascript, and will be passing parameters via external function calls using Swiff. So, my javascript will simply pass the location of an image file to flash.

    Flash will then fade out to white whatever is currently happening whilst loading the image (the location of which was passed to an ActionScript function). Once the image is loaded it will then fade in.

    So, I am guessing I will need an Actionscript function that can be called externally which handles the fading out, loading of an image and fading in?

    Are there any Flash guru's out there that can confirm this is the right way to do it. Are there any tutorials like this out there that might help me out?

    At the moment I am looking at a blank Flash workspace with no idea how to start :p
     
    daniel.skinner, Feb 16, 2008 IP
  2. wassim

    wassim Well-Known Member

    Messages:
    322
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Hi,

    You should read flash documentation about externalInterface class, this is exactly what you need to get this task done.
     
    wassim, Feb 16, 2008 IP
    daniel.skinner likes this.
  3. daniel.skinner

    daniel.skinner Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks. So I can use ExternalInterface::addCallback to register my ActionScript function as being callable by JavaScript externally.

    What do I need to look for to import an arbitrary image from an URL and apply effects to it?
     
    daniel.skinner, Feb 16, 2008 IP
  4. daniel.skinner

    daniel.skinner Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I just found the ActionScript 3.0 Reference - This is a fantastic resource.

    ActionScript 3.0 looks like a really nice language, I wish JavaScript looks more like this!
     
    daniel.skinner, Feb 16, 2008 IP
  5. daniel.skinner

    daniel.skinner Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Ok, I have managed to get images to be loaded in externally. Since I am new to flash I am unsure about all the terminology. Please could you point me in the right direction to do something like:

    I would like to be able to create custom animations (as soon as I learn) for the image transition effect. So, each time the function calls and an image is loaded, I would need to remove anything currently on the stage(?) or fade it, then restart the timeline to re-use the image transition for the new image.
     
    daniel.skinner, Feb 16, 2008 IP
  6. daniel.skinner

    daniel.skinner Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    How do I use a movie clip as a mask?

    The following code adds the mask but doesn't animate it:

    mcContainer.addChild(image);
    mcContainer.mask = new mcMask();
     
    daniel.skinner, Feb 17, 2008 IP