Adobe Dreamweaver Forums



Last 10 THreads :         Snippet Pod Problems (Last Post : Captiv8r - Replies : 1 - Views : 2 )           »          Problem with "Title" and DW CS4 (Last Post : emt79 - Replies : 0 - Views : 1 )           »          Importing Iweb to Dreamweaver (Last Post : tllearner - Replies : 2 - Views : 3 )           »          How to I get an FLV Skin to display on external sites? (Last Post : QADesign - Replies : 0 - Views : 1 )           »          Spry menu bar with a different image for each item? (Last Post : bongalook - Replies : 0 - Views : 1 )           »          Live View doesn't reflect changes to script (Last Post : phillip914 - Replies : 0 - Views : 1 )           »          Table cell - text formatting question (Last Post : JRStaf4ord - Replies : 7 - Views : 8 )           »          Library documents do not accept SWF objects (Last Post : Murray *ACE* - Replies : 2 - Views : 3 )           »          CFGRID, please help (Last Post : The ScareCrow - Replies : 1 - Views : 2 )           »          How can I make an image to stay at the bottom of abrowser? (Last Post : Greg Lafrance - Replies : 1 - Views : 2 )           »         


User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-04-2008, 09:02 AM
ridgeback1105
 
Posts: n/a
Diggs:
Default Flex Animation Effects

Hi,

I'm newbie in flex. I want to do the same effects in the http://www.slam.com.
Go to products, I want the effects when you mouseover on SAILING GEAR,
SPORTSWEAR, GOLF, BMW ORACLE Racing. Is there a way to do it in flex? any
example code. Please help.



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-04-2008, 09:03 AM
Greg Lafrance
 
Posts: n/a
Diggs:
Default Re: Flex Animation Effects

You can probably do that with states and Resize effect. See FB3 help sys or LiveDocs.
Reply With Quote
  #3 (permalink)  
Old 11-04-2008, 11:53 PM
ridgeback1105
 
Posts: n/a
Diggs:
Default Re: Flex Animation Effects

Hi,

Sorry for that. I'm a newbie. Here's is my sample code. One of my problem is
the z-order. In the slam website the whole image will show when you mouse over.
Please hep me. Thanks

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[

import mx.effects.effectClasses.ResizeInstance;
import mx.events.EffectEvent;
import mx.controls.Button;
import mx.collections.ArrayCollection;

public var resizeInstArray:ArrayCollection = new ArrayCollection([]);
public var resizeInst:ResizeInstance;

public function handleMouse(event:MouseEvent):void
{
var instanceFound:Boolean = false;

for (var i:int=0; i < resizeInstArray.length; i++)
{
if(resizeInstArray.getItemAt(i).id == Button(event.target).id)
{
resizeInst = resizeInstArray.getItemAt(i).inst;
instanceFound=true;
}
}
if (instanceFound)
resizeInst.reverse();
else
r2.play([event.currentTarget],event.type==MouseEvent.MOUSE_OUT);

}

public function setResizeInstance(event:EffectEvent): void
{
var newObject:Object = {inst: ResizeInstance(event.effectInstance),
id: Button(event.effectInstance.target).id};
resizeInstArray.addItem(newObject);
}

public function removeInstance(event:EffectEvent): void
{
for (var i:int=0; i < resizeInstArray.length; i++)
{
if(resizeInstArray[i].id ==
Button(event.effectInstance.target).id)
{
resizeInst = resizeInstArray[i].inst;
resizeInst = null;
resizeInstArray.removeItemAt(i);
}
}
}

]]>
</mx:Script>

<mx:Resize id="r2" widthTo="60" widthFrom="40"
effectStart="setResizeInstance(event);" effectEnd="removeInstance(event)"/>

<mx:HBox verticalAlign="bottom" horizontalGap="-10">
<!--<mx:Button id="btn1" width="40" height="40"
mouseOver="handleMouse(event)" mouseOut="handleMouse(event)" />
<mx:Button id="btn2" width="40" height="40"
mouseOver="handleMouse(event)" mouseOut="handleMouse(event)" />
<mx:Button id="btn3" width="40" height="40"
mouseOver="handleMouse(event)" mouseOut="handleMouse(event)" />
<mx:Button id="btn4" width="40" height="40"
mouseOver="handleMouse(event)" mouseOut="handleMouse(event)" />-->

<mx:Image id="btn1" source="golf.gif" width="40" height="40"
mouseOver="handleMouse(event)" mouseOut="handleMouse(event)"
scaleContent="false"/>
<mx:Image id="btn2" source="regatto.gif" width="40" height="40"
mouseOver="handleMouse(event)" mouseOut="handleMouse(event)"
scaleContent="false" />
<mx:Image id="btn3" source="golf.gif" width="40" height="40"
mouseOver="handleMouse(event)" mouseOut="handleMouse(event)"
scaleContent="false" />
<mx:Image id="btn4" source="regatto.gif" width="40" height="40"
mouseOver="handleMouse(event)" mouseOut="handleMouse(event)"
scaleContent="false" />

</mx:HBox>


</mx:Application>


Reply With Quote


Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 10:44 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk